Files
PropertyDeployment/resources/Web/MicroCommunityMallWeb/html/js/chunk-69e0acaa.bd96b9e0.js
Anfioo adfd019d2d 江门
1
2026-02-01 15:37:55 +08:00

2 lines
10 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-69e0acaa"],{"14b9":function(t,a,s){"use strict";s.r(a);var e=function(){var t=this,a=t._self._c;return a("div",{staticClass:"product-detail-container"},[a("el-row",{staticClass:"indbody pro-style"},[a("el-col",{attrs:{span:24}},[a("div",{staticClass:"nb recom-box"},[a("div",{staticClass:"pro-view",attrs:{id:"ym-item"}},[a("div",{staticClass:"pview-left"},[a("div",{staticClass:"ovclear"},[a("product-image-slider",{attrs:{product:t.productDetailInfo.product}}),a("div",{staticClass:"fish-detail"},[a("h3",[t._v(t._s(t.productDetailInfo.product.prodName))]),a("p"),a("div",{staticClass:"price"},[a("div",[t._v("市场价:"),a("s",[t._v("¥"+t._s(t.productDetailInfo.product.otPrice))])]),a("div",[t._v("价格:"),a("span",{staticClass:"redbold"},[t._v("¥"),a("b",{attrs:{id:"ym-price"}},[t._v(t._s(t.productDetailInfo.product.price))])])])]),a("div",{staticClass:"deliver"},[a("div",[t._v("配送: "),a("span",[a("b",[t._v("平台发货")])])])]),a("div",{staticClass:"spec",attrs:{id:"goods-spec"}},[a("div",[t._v("规格: "),t._l(t.productDetailInfo.product.productSpecValues,(function(s,e){return a("li",{key:e},[t._v(" "+t._s(s.specName)+" "),a("span",[s.stock>0?a("b",[t._v("有货")]):a("b",[t._v("无货")])]),t._v(" "+t._s(s.otPrice)+" ")])}))],2)]),a("div",{staticClass:"pro-number"},[a("a",{staticClass:"reduce",attrs:{href:"javascript:void(0);"},on:{click:function(a){return t.minusProd()}}},[t._v("-")]),a("input",{directives:[{name:"model",rawName:"v-model",value:t.goodsNum,expression:"goodsNum"}],staticClass:"result",attrs:{type:"text",id:"goods_num","data-max":"99",value:"1",maxlength:"10"},domProps:{value:t.goodsNum},on:{input:function(a){a.target.composing||(t.goodsNum=a.target.value)}}}),a("a",{staticClass:"add",attrs:{href:"javascript:void(0);"},on:{click:function(a){return t.addProd()}}},[t._v("+")])]),a("div",{staticClass:"cart-buy"},[a("a",{staticClass:"buy-btn",attrs:{href:"javascript:void(0);"},on:{click:function(a){return t._buyNow(t.productDetailInfo.product)}}},[t._v("立即购买")]),a("a",{staticClass:"cart-btn",attrs:{href:"javascript:void(0);"},on:{click:function(a){return t._addToCart(t.productDetailInfo.product)}}},[t._v("加入购物车")]),a("a",{staticClass:"help-btn",attrs:{href:"javascript:void(0);"},on:{click:function(a){return t._helpBtn()}}},[t._v("咨询")])])])],1)]),a("div",{staticClass:"pview-right"},[a("h2",[t._v("相关推荐")]),a("div",{staticClass:"slider-protj"},[a("div",{staticClass:"bd"},[a("ul",t._l(t.productLabelList,(function(s,e){return a("li",{key:e},[a("a",{attrs:{href:"page.html#/pages/plateform/productDetail?productId="+s.productId,target:"_blank"}},[a("img",{attrs:{src:s.coverPhoto,alt:""}})]),a("p",[a("a",{attrs:{href:"page.html#/pages/plateform/productDetail?productId="+s.productId,target:"_blank"}},[t._v(t._s(s.prodName))]),a("span",[t._v("¥"+t._s(s.price))])])])})),0)]),a("div",{staticClass:"hd"},[a("a",{staticClass:"prev",attrs:{href:"javascript:void(0);"}}),a("a",{staticClass:"next",attrs:{href:"javascript:void(0);"}})])])])]),a("div",{staticClass:"pro-tab"},[a("div",{staticClass:"slide-detail"},[a("div",{staticClass:"hdd"},[a("ul",[a("li",{class:{"good-detail":!0,on:0===t.activeTab},on:{click:function(a){return t.switchTab(0)}}},[t._v("商品详情")]),a("li",{class:{"good-evalate":!0,on:1===t.activeTab},on:{click:function(a){return t.switchTab(1)}}},[t._v(" 客户评价("),a("em",[t._v(t._s(t.productAppraiseInfo.length))]),t._v(" ")])])]),a("div",{staticClass:"bdd"},[a("div",{staticClass:"box1"},[a("div",{directives:[{name:"show",rawName:"v-show",value:0===t.activeTab,expression:"activeTab === 0"}],staticClass:"box1detail"},[a("div",{staticClass:"attr"},[a("ul"),a("div",{staticClass:"clear"})]),a("br"),a("p",{staticStyle:{"text-align":"center"}},[a("span",{domProps:{innerHTML:t._s(t.productDetailInfo.product.content)}})]),a("p",[a("br")])]),a("div",{directives:[{name:"show",rawName:"v-show",value:1===t.activeTab,expression:"activeTab === 1"}],staticClass:"evalute"},[a("h3",{staticClass:"title"},[t._v("商品评价")]),a("div",{staticClass:"tab-gbw"},[a("div",{staticClass:"bd"},[a("div",{staticClass:"evalute-detail",attrs:{id:"all"}},[a("ul",[0===t.productAppraiseInfo.length?a("li",{staticStyle:{"text-align":"center"}},[t._v("暂无评价~")]):t._e(),t._l(t.productAppraiseInfo,(function(s,e){return a("li",{key:e,staticClass:"appraise-item"},[a("div",[a("span",{staticClass:"user-name"},[t._v(t._s(s.appraiseUserName)+" "+t._s(s.createTime))]),a("text",{staticClass:"time"})]),a("p",[t._v(t._s(s.context))])])}))],2)])])])]),a("div",{directives:[{name:"show",rawName:"v-show",value:2===t.activeTab,expression:"activeTab === 2"}],staticClass:"otherbox"})])])])])])])],1),a("input",{attrs:{type:"hidden",id:"goods_id"},domProps:{value:t.productId}}),a("input",{attrs:{type:"hidden",id:"user_discount",value:""}})],1)},r=[],o=s("b775");function i(t){return new Promise((a,s)=>{Object(o["a"])({url:"/product.queryProduct",method:"get",params:t}).then(t=>{const s=t.data;a(s)}).catch(t=>{s(t)})})}function c(t){return new Promise((a,s)=>{Object(o["a"])({url:"/shopAppraise.listShopAppraise",method:"get",params:t}).then(t=>{const s=t.data;a(s)}).catch(t=>{s(t)})})}function d(t){return new Promise((a,s)=>{Object(o["a"])({url:"/product.queryProductLabel",method:"get",params:t}).then(t=>{const s=t.data;a(s)}).catch(t=>{s(t)})})}function n(t){return new Promise((a,s)=>{Object(o["a"])({url:"/storeCart.saveStoreCart",method:"post",data:t}).then(t=>{const s=t.data;a(s)}).catch(t=>{s(t)})})}var l=function(){var t=this,a=t._self._c;return a("div",{staticClass:"slide-fish"},[a("div",{staticClass:"t2"},[a("a",{staticClass:"MagicZoom MagicThumb",attrs:{href:"javascript:void(0);",id:"bigimg"}},[a("img",{staticClass:"main_img",staticStyle:{width:"410px",height:"410px"},attrs:{src:t.currentImage||t.product.coverPhoto,id:"main_img"}})])]),a("div",{staticClass:"small-scroll"},[a("a",{staticClass:"prev",attrs:{href:"javascript:void(0);"},on:{click:t.scrollLeft}}),a("a",{staticClass:"next",attrs:{href:"javascript:void(0);"},on:{click:t.scrollRight}}),a("div",{staticClass:"bd"},[a("ul",{ref:"imageList",staticClass:"smallImg",attrs:{id:"imglist"}},[a("li",{class:{on:-1===t.currentIndex}},[a("a",{attrs:{rel:"bigimg",rev:t.product.coverPhoto},on:{click:function(a){return t.changeImage(t.product.coverPhoto,-1)}}},[a("img",{attrs:{src:t.product.coverPhoto}})])]),t._l(t.product.carouselFigurePhotos,(function(s,e){return a("li",{key:e,class:{on:t.currentIndex===e}},[a("a",{attrs:{rel:"bigimg",rev:s},on:{click:function(a){return t.changeImage(s,e)}}},[a("img",{attrs:{src:s}})])])}))],2)])])])},u=[],p={name:"ProductImageSlider",props:{product:{type:Object,required:!0}},data(){return{currentImage:null,currentIndex:-1}},methods:{changeImage(t,a){this.currentImage=t,this.currentIndex=a},scrollLeft(){this.$refs.imageList.scrollBy({left:-100,behavior:"smooth"})},scrollRight(){this.$refs.imageList.scrollBy({left:100,behavior:"smooth"})}}},h=p,v=(s("a865"),s("2877")),m=Object(v["a"])(h,l,u,!1,null,"31909b20",null),g=m.exports,f=s("7323"),I={name:"ProductDetail",components:{ProductImageSlider:g},data(){return{productId:this.$route.query.productId,activeTab:0,systemInfo:{platformName:"",contactUrl:"",contactPhone:"",mallManagerUrl:""},productDetailInfo:{product:{}},goodsNum:1,productAppraiseInfo:[],productLabelList:[],shopId:""}},created(){this.shopId=Object(f["f"])(),this._queryProductByProductId(this.productId),this._listShopAppraise(this.productId),this._loadInformations()},methods:{switchTab(t){this.activeTab=t},async _queryProductByProductId(t){try{const a=await i({page:-1,row:100,productId:t}),s=a.data[0],e=s.productSpecValues;e&&"undefined"!==e&&""!==e&&e.forEach(t=>{const a=t.productSpecDetails;let s="";a&&"undefined"!==a&&""!==a&&a.forEach(t=>{s+=t.detailValue+"/"}),t.specValue=s}),this.productDetailInfo.product=s,this._listProductLabel()}catch(a){console.error("获取商品详情失败:",a)}},async _loadInformations(){try{const t=await this.$http.get("/system.initPlatformData",{params:{page:1,row:100}}),a=t.data;this.systemInfo.platformName=a.data.platformName,this.systemInfo.contactUrl=a.data.contactUrl,this.systemInfo.contactPhone=a.data.contactPhone,this.systemInfo.mallManagerUrl=a.data.mallManagerUrl}catch(t){console.error("获取平台信息失败:",t)}},async _listShopAppraise(t){try{const a=await c({page:-1,row:100,objId:t,objType:"1001"});this.productAppraiseInfo=a.data}catch(a){console.error("获取商品评价失败:",a)}},async _listProductLabel(){try{const t=await d({page:-1,row:100,labelCd:"942021080038360001",shopId:this.productDetailInfo.product.shopId});this.productLabelList=t.data}catch(t){console.error("获取商品标签失败:",t)}},addProd(){this.goodsNum=parseInt(this.goodsNum)+1},minusProd(){this.goodsNum<=1?this.$message.warning("不能再减少了最小数量为1"):this.goodsNum=this.goodsNum-1},async _addToCart(t){try{const a=await n({prodName:t.prodName,productId:t.productId,valueId:t.valueId,storeId:t.storeId,price:t.price,shopId:t.shopId,cartNum:this.goodsNum});0===a.code?this.$message.success("加入购物车成功"):404===a.code?this.$message.warning(a.msg):this.$message.warning(a.data)}catch(a){console.error("加入购物车失败:",a),this.$message.error(a)}},_helpBtn(){this.$message.info(`咨询电话:${this.systemInfo.contactPhone},或移步"${this.systemInfo.platformName}"小程序`)},async _buyNow(t){try{const a=await n({prodName:t.prodName,productId:t.productId,valueId:t.valueId,storeId:t.storeId,price:t.price,shopId:t.shopId,cartNum:this.goodsNum});0===a.code?(this.$message.success("加入购物车成功"),this.$router.push({path:"/pages/plateform/order",query:{productId:t.productId,shopId:t.shopId,valueId:t.valueId,goodsNum:1}})):404===a.code?this.$message.warning(a.msg):this.$message.warning(a.data)}catch(a){console.error("立即购买失败:",a),this.$message.error(a)}},websiteAccessLog(){const t=this.$store.getters.userInfo,a=t?{loginName:t.name,loginId:t.userId,accessUrl:window.location.href,loginState:"1"}:{accessUrl:window.location.href,loginState:"0"};this.$http.post("websiteAccessLog.saveWebsiteAccessLog",a).then(t=>{const a=t.data;0!==a.code&&console.error("记录访问日志失败")}).catch(t=>{console.error("记录访问日志失败:",t)})}}},b=I,_=(s("bd62"),Object(v["a"])(b,e,r,!1,null,"ea2aee00",null));a["default"]=_.exports},7386:function(t,a,s){},"7d55":function(t,a,s){},a865:function(t,a,s){"use strict";s("7386")},bd62:function(t,a,s){"use strict";s("7d55")}}]);
//# sourceMappingURL=chunk-69e0acaa.bd96b9e0.js.map