mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-04-05 04:00:19 +00:00
1 line
21 KiB
JavaScript
1 line
21 KiB
JavaScript
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/goods_details/index"],{"0845":function(t,e,i){},"2e10":function(t,e,i){"use strict";var o=i("0845"),s=i.n(o);s.a},"50b5":function(t,e,i){"use strict";i.r(e);var o=i("9723"),s=i("88c8");for(var n in s)"default"!==n&&function(t){i.d(e,t,(function(){return s[t]}))}(n);i("2e10");var r,a=i("f0c5"),c=Object(a["a"])(s["default"],o["b"],o["c"],!1,null,"5044675b",null,!1,o["a"],r);e["default"]=c.exports},"88c8":function(t,e,i){"use strict";i.r(e);var o=i("ec8f"),s=i.n(o);for(var n in o)"default"!==n&&function(t){i.d(e,t,(function(){return o[t]}))}(n);e["default"]=s.a},9551:function(t,e,i){"use strict";(function(t){i("6e38");o(i("66fd"));var e=o(i("50b5"));function o(t){return t&&t.__esModule?t:{default:t}}wx.__webpack_require_UNI_MP_PLUGIN__=i,t(e.default)}).call(this,i("543d")["createPage"])},9723:function(t,e,i){"use strict";i.d(e,"b",(function(){return s})),i.d(e,"c",(function(){return n})),i.d(e,"a",(function(){return o}));var o={cusPreviewImg:function(){return i.e("components/cus-previewImg/cus-previewImg").then(i.bind(null,"3df9"))}},s=function(){var t=this,e=t.$createElement,i=(t._self._c,t.attr.productAttr.length&&t.skuArr.length>1?t.skuArr.slice(0,4):null),o=parseFloat(t.CartCount),s=parseInt(t.id);t._isMounted||(t.e0=function(e){t.H5ShareBox=!1}),t.$mp.data=Object.assign({},{$root:{l0:i,m0:o,m1:s}})},n=[]},ec8f:function(t,e,i){"use strict";(function(t){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=i("f15c"),s=i("3474"),n=i("7fe6"),r=i("e0d6"),a=i("c6cd"),c=i("26cb"),u=i("1346"),l=(i("00fa"),h(i("fd65")),h(i("c83f")));function h(t){return t&&t.__esModule?t:{default:t}}function d(t){return m(t)||g(t)||f(t)||p()}function p(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function f(t,e){if(t){if("string"===typeof t)return v(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?v(t,e):void 0}}function g(t){if("undefined"!==typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}function m(t){if(Array.isArray(t))return v(t)}function v(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,o=new Array(e);i<e;i++)o[i]=t[i];return o}var $=function(){i.e("components/cus-previewImg/cus-previewImg").then(function(){return resolve(i("3df9"))}.bind(null,i)).catch(i.oe)},S=function(){i.e("components/productConSwiper/index").then(function(){return resolve(i("86c2"))}.bind(null,i)).catch(i.oe)},_=function(){Promise.all([i.e("common/vendor"),i.e("components/couponListWindow/index")]).then(function(){return resolve(i("6411"))}.bind(null,i)).catch(i.oe)},y=function(){i.e("components/productWindow/index").then(function(){return resolve(i("1ae3"))}.bind(null,i)).catch(i.oe)},C=function(){i.e("components/userEvaluation/index").then(function(){return resolve(i("7a68"))}.bind(null,i)).catch(i.oe)},I=function(){i.e("components/shareRedPackets/index").then(function(){return resolve(i("280d"))}.bind(null,i)).catch(i.oe)},b=function(){Promise.all([i.e("common/vendor"),i.e("components/kefuIcon/index")]).then(function(){return resolve(i("1a3e"))}.bind(null,i)).catch(i.oe)},A=function(){i.e("components/menuIcon").then(function(){return resolve(i("92ca"))}.bind(null,i)).catch(i.oe)},w=function(){Promise.all([i.e("common/vendor"),i.e("components/mp-html/mp-html")]).then(function(){return resolve(i("b584"))}.bind(null,i)).catch(i.oe)},k=function(){i.e("components/Authorize").then(function(){return resolve(i("420f"))}.bind(null,i)).catch(i.oe)},x=getApp(),P=function(){Promise.all([i.e("common/vendor"),i.e("components/jyf-parser/jyf-parser")]).then(function(){return resolve(i("9902"))}.bind(null,i)).catch(i.oe)},T={components:{productConSwiper:S,couponListWindow:_,productWindow:y,userEvaluation:C,shareRedPackets:I,kefuIcon:b,mpHtml:w,menuIcon:A,cusPreviewImg:$,authorize:k,parser:P},directives:{trigger:{inserted:function(t,e){t.click()}}},mixins:[l.default],data:function(){return{showSkeleton:!0,isNodes:0,Active:!1,coupon:{coupon:!1,type:-1,list:[],count:[]},showAnimate:!0,showMenuIcon:!1,attrTxt:"请选择",attrValue:"",animated:!1,id:0,replyCount:0,reply:[],storeInfo:{},productValue:[],couponList:[],cart_num:1,isAuto:!1,isShowAuth:!1,isOpen:!1,actionSheetHidden:!0,posterImageStatus:!1,storeImage:"",PromotionCode:"",canvasStatus:!1,posterImage:"",posterbackgd:"/static/images/posterbackgd.png",sharePacket:{isState:!0},uid:0,circular:!1,autoplay:!1,interval:3e3,duration:500,clientHeight:"",systemStore:{},good_list:[],replyChance:0,CartCount:0,isDown:!0,storeSelfMention:!0,posters:!1,weixinStatus:!1,attr:{cartAttr:!1,productAttr:[],productSelect:{}},description:"",navActive:0,H5ShareBox:!1,activity:[],navH:"",navList:[],opacity:0,scrollY:0,topArr:[],toView:"",height:0,heightArr:[],lock:!1,scrollTop:0,tagStyle:{img:"width:100%;display:block;",table:"width:100%",video:"width:100%"},returnShow:!0,diff:"",is_money_level:1,is_vip:0,navbarRight:0,homeTop:20,routineContact:0,skuArr:[],selectSku:{}}},computed:(0,c.mapGetters)(["isLogin"]),watch:{isLogin:{handler:function(t,e){1==t&&(this.getCouponList(),this.getCartCount(),this.downloadFilePromotionCode())},deep:!0},storeInfo:{handler:function(){this.$nextTick((function(){}))},immediate:!0}},onLoad:function(e){var i=this,o=getCurrentPages();if(i.returnShow=1!==o.length,i.navH=x.globalData.navHeight,i.id=e.id,t.getSystemInfo({success:function(e){i.height=e.windowHeight,i.navbarRight=e.windowWidth-t.getMenuButtonBoundingClientRect().left}}),e.scene){var s=i.$util.getUrlParams(decodeURIComponent(e.scene));s.id&&(e.id=s.id),s.pid&&(x.globalData.spid=s.pid)}if(!e.id)return this.showSkeleton=!1,i.$util.Tips({title:"缺少参数无法查看商品"},{tab:3,url:1});i.id=e.id,e.spid&&(x.globalData.spid=e.spid),i.getGoodsDetails()},onReady:function(){this.isNodes++,this.$nextTick((function(){var e=this,i=t.getMenuButtonBoundingClientRect(),o=t.createSelectorQuery().in(this);o.select("#home").boundingClientRect((function(t){e.homeTop=2*i.top+i.height-t.height})).exec()}))},onShareAppMessage:function(){var t=this;return t.$set(t,"actionSheetHidden",!t.actionSheetHidden),(0,s.userShare)(),{title:t.storeInfo.store_name||"",imageUrl:t.storeInfo.image||"",path:"/pages/goods_details/index?id="+t.id+"&spid="+t.uid}},methods:{jumpUrl:function(e){t.switchTab({url:e})},videoPause:function(){this.$nextTick((function(){that.infoScroll()}))},closeChange:function(){this.$set(this.sharePacket,"isState",!0)},boxStatus:function(t){this.showAnimate=t},goActivity:function(e){var i=e;"1"===i.type?t.navigateTo({url:"/pages/activity/goods_seckill_details/index?id=".concat(i.id,"&time=").concat(i.time,"&status=1")}):"2"===i.type?t.navigateTo({url:"/pages/activity/goods_bargain_details/index?id=".concat(i.id,"&bargain=").concat(this.uid)}):t.navigateTo({url:"/pages/activity/goods_combination_details/index?id=".concat(i.id)})},iptCartNum:function(t){this.$set(this.attr.productSelect,"cart_num",t)},returns:function(){t.navigateBack()},tap:function(t){var e="past"+t,i=(t=t,this);this.$set(this,"toView",e),this.$set(this,"navActive",t),this.$set(this,"lock",!0),this.$set(this,"scrollTop",t>0?i.topArr[t]-x.globalData.navHeight/2:i.topArr[t])},scroll:function(t){var e=this,i=t.detail.scrollTop,o=i/200;if(o=o>1?1:o,e.$set(e,"opacity",o),e.$set(e,"scrollY",i),e.$set(e,"showAnimate",!1),e.$set(e,"showMenuIcon",!1),e.lock)e.$set(e,"lock",!1);else for(var s=0;s<e.topArr.length;s++)if(i<e.topArr[s]-x.globalData.navHeight/2+e.heightArr[s]){e.$set(e,"navActive",s);break}},goDetail:function(e){0!=e.activity.length?e.activity&&2==e.activity.type?t.redirectTo({url:"/pages/activity/goods_bargain_details/index?id=".concat(e.activity.id,"&bargain=").concat(this.uid)}):e.activity&&3==e.activity.type?t.redirectTo({url:"/pages/activity/goods_combination_details/index?id=".concat(e.activity.id)}):e.activity&&1==e.activity.type&&t.redirectTo({url:"/pages/activity/goods_seckill_details/index?id=".concat(e.activity.id,"&time=").concat(e.activity.time,"&status=1")}):t.redirectTo({url:"/pages/goods_details/index?id="+e.id})},onLoadFun:function(t){},ChangCouponsClone:function(){this.$set(this.coupon,"coupon",!1)},getUserInfo:function(){var t=this;(0,s.getUserInfo)().then((function(e){t.$set(t,"uid",e.data.uid),t.$set(t,"is_money_level",e.data.is_money_level)}))},ChangeCartNum:function(t){var e=this.productValue[this.attrValue];if(void 0!==e||this.attr.productAttr.length||(e=this.attr.productSelect),void 0!==e){var i=e.stock||0,o=this.attr.productSelect;t?(o.cart_num++,o.cart_num>i&&(this.$set(this.attr.productSelect,"cart_num",i||1),this.$set(this,"cart_num",i||1))):(o.cart_num--,o.cart_num<1&&(this.$set(this.attr.productSelect,"cart_num",1),this.$set(this,"cart_num",1)))}},attrVal:function(t){this.$set(this.attr.productAttr[t.indexw],"index",this.attr.productAttr[t.indexw].attr_values[t.indexn])},ChangeAttr:function(t){var e=this.productValue[t];this.$set(this,"selectSku",e),e&&e.stock>0?(this.$set(this.attr.productSelect,"image",e.image),this.$set(this.attr.productSelect,"price",e.price),this.$set(this.attr.productSelect,"stock",e.stock),this.$set(this.attr.productSelect,"unique",e.unique),this.$set(this.attr.productSelect,"cart_num",1),this.$set(this.attr.productSelect,"vip_price",e.vip_price),this.$set(this,"attrValue",t),this.$set(this,"attrTxt","已选择")):(this.$set(this.attr.productSelect,"image",this.storeInfo.image),this.$set(this.attr.productSelect,"price",this.storeInfo.price),this.$set(this.attr.productSelect,"stock",0),this.$set(this.attr.productSelect,"unique",""),this.$set(this.attr.productSelect,"cart_num",0),this.$set(this.attr.productSelect,"vip_price",this.storeInfo.vip_price),this.$set(this,"attrValue",""),this.$set(this,"attrTxt","请选择"))},ChangCoupons:function(t){var e=t,i=this.$util.ArrayRemove(this.couponList,"id",e.id);this.$set(this,"couponList",i),this.getCouponList()},setClientHeight:function(){var e=this;if(e.good_list.length){var i=t.createSelectorQuery().in(this).select("#list0");i.fields({size:!0},(function(t){e.$set(e,"clientHeight",t.height+20)})).exec()}},getGoodsDetails:function(){var e=this,i=this;(0,o.getProductDetail)(i.id).then((function(o){for(var s=o.data.storeInfo,n=o.data.good_list||[],r=Math.ceil(n.length/6),a=new Array,c=0;c<r;c++){var u=n.slice(6*c,6*c+6);u.length&&a.push({list:u})}for(var l in i.$set(i,"storeInfo",s),i.$set(i,"description",s.description),e.description=e.description.replace(/<img/gi,'<img style="max-width:100%;height:auto;float:left;display:block" '),i.$set(i,"reply",o.data.reply?[o.data.reply]:[]),i.$set(i,"replyCount",o.data.replyCount),i.$set(i,"replyChance",o.data.replyChance),i.$set(i.attr,"productAttr",o.data.productAttr),i.$set(i,"productValue",o.data.productValue),i.$set(i,"is_vip",o.data.storeInfo.is_vip),i.$set(i.sharePacket,"priceName",o.data.priceName),i.$set(i.sharePacket,"isState",0!=o.data.priceName),i.$set(i,"systemStore",o.data.system_store),i.$set(i,"storeSelfMention",o.data.store_self_mention),i.$set(i,"good_list",a),i.$set(i,"PromotionCode",s.code_base),i.$set(i,"activity",o.data.activity?o.data.activity:[]),i.$set(i,"couponList",o.data.coupons),i.$set(i,"routineContact",Number(o.data.routine_contact_type)),t.setNavigationBarTitle({title:s.store_name.substring(0,7)+"..."}),o.data.productValue){var h=o.data.productValue[l];i.skuArr.push(h)}e.$set(e,"selectSku",i.skuArr[0]),i.$set(i,"diff",i.$util.$h.Sub(s.price,s.vip_price));var d=["商品","详情"];o.data.replyCount&&d.splice(1,0,"评价"),i.$set(i,"navList",d),i.isLogin&&i.getUserInfo(),e.$nextTick((function(){n.length&&i.setClientHeight()})),setTimeout((function(){i.infoScroll()}),500),i.downloadFilestoreImage(),i.DefaultSelect(),i.getCartCount(),setTimeout((function(){e.showSkeleton=!1}),1e3)})).catch((function(t){return i.$util.Tips({title:t.toString()},{tab:3,url:1})}))},infoScroll:function(){for(var e=this,i=[],o=[],s=0;s<e.navList.length;s++){var n=t.createSelectorQuery().in(this),r="#past"+s;(!this.replyCount&&!e.good_list.length&&1==s||this.replyCount&&!e.good_list.length&&2==s||!this.replyCount&&e.good_list.length&&2==s)&&(r="#past3"),!this.replyCount&&e.good_list.length&&1==s&&(r="#past2"),n.select(r).boundingClientRect(),n.exec((function(t){var s=t[0].top,n=t[0].height;i.push(s),o.push(n),e.$set(e,"topArr",i),e.$set(e,"heightArr",o)}))}},makePhone:function(){t.makePhoneCall({phoneNumber:this.systemStore.phone})},showMaoLocation:function(){if(!this.systemStore.latitude||!this.systemStore.longitude)return this.$util.Tips({title:"缺少经纬度信息无法查看地图!"});t.openLocation({latitude:parseFloat(this.systemStore.latitude),longitude:parseFloat(this.systemStore.longitude),scale:8,name:this.systemStore.name,address:this.systemStore.address+this.systemStore.detailed_address,success:function(){}})},DefaultSelect:function(){var t=this.attr.productAttr,e=[];for(var i in this.productValue)if(this.productValue[i].stock>0){e=this.attr.productAttr.length?i.split(","):[];break}for(var o=0;o<t.length;o++)this.$set(t[o],"index",e[o]);var s=this.productValue[e.join(",")];s&&t.length?(this.$set(this.attr.productSelect,"store_name",this.storeInfo.store_name),this.$set(this.attr.productSelect,"image",s.image),this.$set(this.attr.productSelect,"price",s.price),this.$set(this.attr.productSelect,"stock",s.stock),this.$set(this.attr.productSelect,"unique",s.unique),this.$set(this.attr.productSelect,"cart_num",1),this.$set(this,"attrValue",e.join(",")),this.$set(this.attr.productSelect,"vip_price",s.vip_price),this.$set(this,"attrTxt","已选择")):!s&&t.length?(this.$set(this.attr.productSelect,"store_name",this.storeInfo.store_name),this.$set(this.attr.productSelect,"image",this.storeInfo.image),this.$set(this.attr.productSelect,"price",this.storeInfo.price),this.$set(this.attr.productSelect,"stock",0),this.$set(this.attr.productSelect,"unique",""),this.$set(this.attr.productSelect,"cart_num",0),this.$set(this.attr.productSelect,"vip_price",this.storeInfo.vip_price),this.$set(this,"attrValue",""),this.$set(this,"attrTxt","请选择")):s||t.length||(this.$set(this.attr.productSelect,"store_name",this.storeInfo.store_name),this.$set(this.attr.productSelect,"image",this.storeInfo.image),this.$set(this.attr.productSelect,"price",this.storeInfo.price),this.$set(this.attr.productSelect,"stock",this.storeInfo.stock),this.$set(this.attr.productSelect,"unique",this.storeInfo.unique||""),this.$set(this.attr.productSelect,"cart_num",1),this.$set(this.attr.productSelect,"vip_price",this.storeInfo.vip_price),this.$set(this,"attrValue",""),this.$set(this,"attrTxt","请选择"))},getCouponList:function(t){var e=this,i={page:1,limit:20,product_id:e.id};void 0===t&&null===t||(i.type=t),(0,n.getCoupons)(i).then((function(i){if(e.$set(e.coupon,"count",i.data.count),void 0===t||null===t){var o=d(e.coupon.count),s="",n=o.findIndex((function(t){return t})),r=e.coupon.count,a=[],c=0;r.forEach((function(t,e){0===t?c=e:a.push(t)})),s=3==a.length?2:2==a.length?2===c?1:2:r.findIndex((function(t){return t===o[n]})),e.$set(e.coupon,"type",s),e.getCouponList(s)}else e.$set(e.coupon,"list",i.data.list)}))},ChangCouponsUseState:function(t){var e=this;e.coupon.list[t].is_use=!0,e.$set(e.coupon,"list",e.coupon.list),e.$set(e.coupon,"coupon",!1)},setCollect:function(){if(!1===this.isLogin)(0,a.toLogin)();else{var t=this;this.storeInfo.userCollect?(0,o.collectDel)(this.storeInfo.id).then((function(e){return t.$set(t.storeInfo,"userCollect",!t.storeInfo.userCollect),t.$util.Tips({title:e.msg})})):(0,o.collectAdd)(this.storeInfo.id).then((function(e){return t.$set(t.storeInfo,"userCollect",!t.storeInfo.userCollect),t.$util.Tips({title:e.msg})}))}},selecAttr:function(){this.$set(this.attr,"cartAttr",!0),this.$set(this,"isOpen",!0)},couponTap:function(){var t=this;!1===t.isLogin?(0,a.toLogin)():(t.getCouponList(),t.$set(t.coupon,"coupon",!0))},onMyEvent:function(){this.$set(this.attr,"cartAttr",!1),this.$set(this,"isOpen",!1)},joinCart:function(t){!1===this.isLogin?(0,a.toLogin)():this.goCat()},goCat:function(e){var i=this,s=i.productValue[this.attrValue];if(i.attrValue?i.attr.cartAttr=!i.isOpen:i.isOpen?i.attr.cartAttr=!0:i.attr.cartAttr=!i.attr.cartAttr,!0===i.attr.cartAttr&&!1===i.isOpen)return i.isOpen=!0;if(i.attr.productAttr.length&&void 0===s&&!0===i.isOpen)return i.$util.Tips({title:"产品库存不足,请选择其它属性"});if(i.attr.productSelect.cart_num<=0)return i.attr.productSelect.cart_num=1,i.isOpen=!1,i.$util.Tips({title:"请先选择数量"});var n={productId:i.id,cartNum:i.attr.productSelect.cart_num,new:void 0===e?0:1,uniqueId:void 0!==i.attr.productSelect?i.attr.productSelect.unique:"",virtual_type:i.storeInfo.virtual_type};(0,o.postCartAdd)(n).then((function(o){i.isOpen=!1,i.attr.cartAttr=!1,e?t.navigateTo({url:"/pages/users/order_confirm/index?new=1&cartId="+o.data.cartId}):i.$util.Tips({title:"添加购物车成功",success:function(){i.getCartCount(!0)}})})).catch((function(t){return i.isOpen=!1,i.$util.Tips({title:t})}))},getCartCount:function(t){var e=this,i=this,o=i.isLogin;o&&(0,r.getCartCounts)().then((function(o){i.CartCount=o.data.count,e.$store.commit("indexData/setCartNum",i.CartCount>99?"...":i.CartCount+""),t&&(i.animated=!0,setTimeout((function(){i.animated=!1}),500))}))},goBuy:function(t){!1===this.isLogin?(0,a.toLogin)():this.goCat(!0)},open:function(t){this.showMenuIcon=t},authColse:function(t){this.isShowAuth=t},listenerActionSheet:function(){!1===this.isLogin?(0,a.toLogin)():(this.downloadFilePromotionCode(),this.posters=!0)},listenerActionClose:function(){this.posters=!1},posterImageClose:function(){this.posterImageStatus=!1},setDomain:function(t){return t=t?t.toString():"",t.indexOf("https://")>-1?t:t.replace("http://","https://")},downloadFilestoreImage:function(){var e=this;t.downloadFile({url:e.setDomain(e.storeInfo.image),success:function(t){e.storeImage=t.tempFilePath},fail:function(){return e.$util.Tips({title:""})}})},downloadFilePromotionCode:function(e){var i=this;(0,o.getProductCode)(i.id).then((function(o){t.downloadFile({url:i.setDomain(o.data.code),success:function(t){i.$set(i,"isDown",!1),"function"==typeof e?e&&e(t.tempFilePath):i.$set(i,"PromotionCode",t.tempFilePath)},fail:function(){i.$set(i,"isDown",!1),i.$set(i,"PromotionCode","")}})})).catch((function(t){i.$set(i,"isDown",!1),i.$set(i,"PromotionCode","")}))},getImageBase64:function(){var t=this;(0,u.imageBase64)(t.storeImage,t.PromotionCode).then((function(e){t.storeImage=e.data.image,t.PromotionCode=e.data.code})).catch((function(){}))},goFriend:function(){this.posters=!1},goPoster:function(){var e=this;e.posters=!1,e.$set(e,"canvasStatus",!0);var i=[e.posterbackgd,e.storeImage,e.PromotionCode];if(e.isDown)return e.$util.Tips({title:"正在下载海报,请稍后再试!"});t.getImageInfo({src:e.PromotionCode,fail:function(t){return e.$util.Tips({title:"小程序二维码需要发布正式版后才能获取到"})},success:function(){""==i[2]?e.downloadFilePromotionCode((function(t){if(i[2]=t,""==i[2])return e.$util.Tips({title:"海报二维码生成失败!"});e.$util.PosterCanvas(i,e.storeInfo.store_name,e.storeInfo.price,e.storeInfo.ot_price,(function(t){e.$set(e,"posterImage",t),e.$set(e,"posterImageStatus",!0),e.$set(e,"canvasStatus",!1),e.$set(e,"actionSheetHidden",!e.actionSheetHidden)}))})):e.$util.PosterCanvas(i,e.storeInfo.store_name,e.storeInfo.price,e.storeInfo.ot_price,(function(t){e.$set(e,"posterImage",t),e.$set(e,"posterImageStatus",!0),e.$set(e,"canvasStatus",!1),e.$set(e,"actionSheetHidden",!e.actionSheetHidden)}))}})},copyCommand:function(){wx.navigateToMiniProgram&&wx.navigateToMiniProgram({appId:"wxb036cafe2994d7d0",path:"/publish/ugc-publish/ugc-publish",extraData:{productInfo:{title:this.storeInfo.store_name,path:"/pages/goods_details/index?id="+this.storeInfo.id,thumbUrl:this.storeInfo.image}}})},savePosterPath:function(){var e=this;t.getSetting({success:function(i){i.authSetting["scope.writePhotosAlbum"]?t.saveImageToPhotosAlbum({filePath:e.posterImage,success:function(t){e.posterImageClose(),e.$util.Tips({title:"保存成功",icon:"success"})},fail:function(t){e.$util.Tips({title:"保存失败"})}}):t.authorize({scope:"scope.writePhotosAlbum",success:function(){t.saveImageToPhotosAlbum({filePath:e.posterImage,success:function(t){e.posterImageClose(),e.$util.Tips({title:"保存成功",icon:"success"})},fail:function(t){e.$util.Tips({title:"保存失败"})}})}})}})},tabCouponType:function(t){this.$set(this.coupon,"type",t),this.getCouponList(t)},showImg:function(t){this.$refs.cusPreviewImg.open(this.selectSku.suk)},changeSwitch:function(t){var e=this.skuArr[t];this.$set(this,"selectSku",e);var i=e.suk.split(",");this.$set(this.attr.productAttr[0],"index",i[0]),2==i.length?(this.$set(this.attr.productAttr[0],"index",i[0]),this.$set(this.attr.productAttr[1],"index",i[1])):3==i.length?(this.$set(this.attr.productAttr[0],"index",i[0]),this.$set(this.attr.productAttr[1],"index",i[1]),this.$set(this.attr.productAttr[2],"index",i[2])):4==i.length&&(this.$set(this.attr.productAttr[0],"index",i[0]),this.$set(this.attr.productAttr[1],"index",i[1]),this.$set(this.attr.productAttr[2],"index",i[2]),this.$set(this.attr.productAttr[3],"index",i[3])),e&&(this.$set(this.attr.productSelect,"image",e.image),this.$set(this.attr.productSelect,"price",e.price),this.$set(this.attr.productSelect,"stock",e.stock),this.$set(this.attr.productSelect,"unique",e.unique),this.$set(this.attr.productSelect,"vipPrice",e.vipPrice),this.$set(this,"attrTxt","已选择"),this.$set(this,"attrValue",e.suk))}}};e.default=T}).call(this,i("543d")["default"])}},[["9551","common/runtime","common/vendor"]]]); |