1 |
- (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/goods/goods"],{"0637":function(o,n,t){"use strict";t.r(n);var e=t("28e4"),i=t("2417");for(var c in i)"default"!==c&&function(o){t.d(n,o,(function(){return i[o]}))}(c);t("5015");var a,s=t("f0c5"),r=Object(s["a"])(i["default"],e["b"],e["c"],!1,null,"4d0cc00e",null,!1,e["a"],a);n["default"]=r.exports},2417:function(o,n,t){"use strict";t.r(n);var e=t("86c7"),i=t.n(e);for(var c in e)"default"!==c&&function(o){t.d(n,o,(function(){return e[o]}))}(c);n["default"]=i.a},"28e4":function(o,n,t){"use strict";var e;t.d(n,"b",(function(){return i})),t.d(n,"c",(function(){return c})),t.d(n,"a",(function(){return e}));var i=function(){var o=this,n=o.$createElement,t=(o._self._c,Number(110));o.$mp.data=Object.assign({},{$root:{m0:t}})},c=[]},5015:function(o,n,t){"use strict";var e=t("777c"),i=t.n(e);i.a},"777c":function(o,n,t){},"86c7":function(o,n,t){"use strict";(function(o){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var e=t("2f62");function i(o,n){var t=Object.keys(o);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(o);n&&(e=e.filter((function(n){return Object.getOwnPropertyDescriptor(o,n).enumerable}))),t.push.apply(t,e)}return t}function c(o){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?i(Object(t),!0).forEach((function(n){a(o,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(t)):i(Object(t)).forEach((function(n){Object.defineProperty(o,n,Object.getOwnPropertyDescriptor(t,n))}))}return o}function a(o,n,t){return n in o?Object.defineProperty(o,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[n]=t,o}var s=function(){t.e("components/page-component/goods/app-goods-banner").then(function(){return resolve(t("0248"))}.bind(null,t)).catch(t.oe)},r=function(){t.e("components/page-component/goods/app-goods-price").then(function(){return resolve(t("471d"))}.bind(null,t)).catch(t.oe)},p=function(){t.e("components/page-component/goods/app-goods-service").then(function(){return resolve(t("9a70"))}.bind(null,t)).catch(t.oe)},u=function(){t.e("components/page-component/goods/app-goods-attr").then(function(){return resolve(t("c7d8"))}.bind(null,t)).catch(t.oe)},d=function(){t.e("components/page-component/app-attr/app-attr").then(function(){return resolve(t("58fd"))}.bind(null,t)).catch(t.oe)},l=function(){t.e("components/page-component/goods/app-goods-marketing").then(function(){return resolve(t("e2b2"))}.bind(null,t)).catch(t.oe)},f=function(){Promise.all([t.e("common/vendor"),t.e("components/basic-component/app-jump-button/app-jump-button")]).then(function(){return resolve(t("cf11"))}.bind(null,t)).catch(t.oe)},g=function(){Promise.all([t.e("common/vendor"),t.e("components/page-component/app-goods-list/app-goods-list")]).then(function(){return resolve(t("cb83"))}.bind(null,t)).catch(t.oe)},h=function(){t.e("components/page-component/goods/app-goods-detail").then(function(){return resolve(t("eb92"))}.bind(null,t)).catch(t.oe)},m=function(){t.e("components/page-component/app-goods-recommend/app-goods-recommend").then(function(){return resolve(t("e58c"))}.bind(null,t)).catch(t.oe)},v=function(){Promise.all([t.e("common/vendor"),t.e("components/page-component/app-quick-navigation/app-quick-navigation")]).then(function(){return resolve(t("e726"))}.bind(null,t)).catch(t.oe)},b=function(){t.e("components/basic-component/app-iphone-x/app-iphone-x").then(function(){return resolve(t("a339"))}.bind(null,t)).catch(t.oe)},_=function(){t.e("components/basic-component/app-empty-bottom/app-empty-bottom").then(function(){return resolve(t("208f"))}.bind(null,t)).catch(t.oe)},w=function(){t.e("components/basic-component/app-composition/app-composition").then(function(){return resolve(t("c14f"))}.bind(null,t)).catch(t.oe)},O=function(){t.e("components/page-component/app-vip-card/app-vip-card").then(function(){return resolve(t("3592"))}.bind(null,t)).catch(t.oe)},j=function(){t.e("components/basic-component/uni-swiper-dot/uni-swiper-dot").then(function(){return resolve(t("9625"))}.bind(null,t)).catch(t.oe)},y={name:"goods",components:{appGoodsBanner:s,appGoodsPrice:r,appGoodsAttr:u,appAttr:d,appGoodsMarketing:l,appJumpButton:f,"app-goods-list":g,"app-goods-service":p,"app-goods-detail":h,"app-goods-recommend":m,"app-quick-navigation":v,"app-composition":w,appIphoneX:b,appEmptyBottom:_,uniSwiperDot:j,AppVipCard:O},data:function(){return{goods:null,selectAttr:null,recommend_list:null,is_vip:!1,is_vip_card_user:0,current:0,discount:null,attrShow:0,shareData:null}},computed:c({},(0,e.mapState)({theme:function(o){return o.mallConfig.theme},mall:function(o){return o.mallConfig.mall},gConfig:function(o){return o.gConfig}})),onLoad:function(o){this.isLogin&&this.$store.dispatch("user/info"),this.loadData(o.id)},onShareAppMessage:function(o){return console.log(this.shareData),"button"===o.from&&this.shareData?this.$shareAppMessage(this.shareData):this.$shareAppMessage({title:this.goods.app_share_title?this.goods.app_share_title:this.goods.name,imageUrl:this.goods.app_share_pic?this.goods.app_share_pic:"",path:"/pages/goods/goods",params:{id:this.goods.id}})},methods:{clickImage:function(n){o.showModal({title:"提示",content:"请选择下载方式",cancelText:"复制链接",confirmText:"下载文件",success:function(t){t.confirm?(console.log("下载文件"),console.log(n),o.downloadFile({url:n,success:function(o){200===o.statusCode&&console.log("下载成功")}})):t.cancel&&(console.log("复制链接"),console.log(n),o.setClipboardData({data:n}))}})},change:function(o){this.current=o.detail.current},quickShare:function(o){console.log(o),this.shareData=o},toComposition:function(n){console.log(n);var t=n.id>0?n.id:this.goods.plugin_extra.composition.list[0].id;o.navigateTo({url:this.goods.plugin_extra.composition.url+"?goods_id="+this.goods.id+"&composition_id="+t})},loadData:function(n){var t=this;t.$showLoading(),t.$request({url:t.$api.goods.detail,data:{id:n}}).then((function(n){t.$hideLoading(),0===n.code?(t.goods=n.data.goods,o.setNavigationBarTitle({title:t.goods.name}),t.goods.vip_card_appoint.discount>0&&(t.is_vip=!0,t.discount=t.goods.vip_card_appoint.discount),t.is_vip_card_user=t.goods.vip_card_appoint.is_vip_card_user,t.loadRecommend()):o.showModal({title:"提示",content:n.msg,showCancel:!1})})).catch((function(o){t.$hideLoading()}))},onAttr:function(o){this.selectAttr=o},loadRecommend:function(){var o=this;this.$request({url:this.$api.goods.new_recommend,data:{goods_id:this.goods.id,type:"goods"}}).then((function(n){0===n.code&&(o.recommend_list=n.data.list)}))},back:function(){o.reLaunch({url:"/pages/index/index"})},favorite:function(){var n=this.$api.user.favorite_add,t=!0;this.goods.favorite&&(n=this.$api.user.favorite_remove,t=!1),this.goods.favorite=t,this.$request({url:n,data:{goods_id:this.goods.id}}).then((function(n){0===n.code||o.showModal({title:"提示",content:n.msg,showCancel:!1})})).catch((function(o){}))},clickAttr:function(){this.attrShow=Math.random()}}};n.default=y}).call(this,t("543d")["default"])},cf6f:function(o,n,t){"use strict";(function(o){t("ecb4");e(t("66fd"));var n=e(t("0637"));function e(o){return o&&o.__esModule?o:{default:o}}o(n.default)}).call(this,t("543d")["createPage"])}},[["cf6f","common/runtime","common/vendor"]]]);
|