goods.js 5.2 KB

1
  1. (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["plugins/integral_mall/goods/goods"],{1205:function(e,n,o){"use strict";o.r(n);var t=o("b6dc"),r=o("a31b");for(var a in r)"default"!==a&&function(e){o.d(n,e,(function(){return r[e]}))}(a);o("d6ae");var i,c=o("f0c5"),l=Object(c["a"])(r["default"],t["b"],t["c"],!1,null,"4af112ae",null,!1,t["a"],i);n["default"]=l.exports},"660b":function(e,n,o){},a31b:function(e,n,o){"use strict";o.r(n);var t=o("eede"),r=o.n(t);for(var a in t)"default"!==a&&function(e){o.d(n,e,(function(){return t[e]}))}(a);n["default"]=r.a},b6dc:function(e,n,o){"use strict";var t,r=function(){var e=this,n=e.$createElement;e._self._c},a=[];o.d(n,"b",(function(){return r})),o.d(n,"c",(function(){return a})),o.d(n,"a",(function(){return t}))},d6ae:function(e,n,o){"use strict";var t=o("660b"),r=o.n(t);r.a},eede:function(e,n,o){"use strict";(function(e){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var t=o("2f62");function r(e,n){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);n&&(t=t.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),o.push.apply(o,t)}return o}function a(e){for(var n=1;n<arguments.length;n++){var o=null!=arguments[n]?arguments[n]:{};n%2?r(Object(o),!0).forEach((function(n){i(e,n,o[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):r(Object(o)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(o,n))}))}return e}function i(e,n,o){return n in e?Object.defineProperty(e,n,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[n]=o,e}var c=function(){Promise.all([o.e("common/vendor"),o.e("components/page-component/goods/app-goods-banner")]).then(function(){return resolve(o("de38"))}.bind(null,o)).catch(o.oe)},l=function(){Promise.all([o.e("common/vendor"),o.e("components/page-component/goods/app-goods-service")]).then(function(){return resolve(o("be7d"))}.bind(null,o)).catch(o.oe)},s=function(){o.e("components/page-component/goods/app-goods-attr").then(function(){return resolve(o("e7a9"))}.bind(null,o)).catch(o.oe)},u=function(){Promise.all([o.e("common/vendor"),o.e("components/page-component/app-attr/app-attr")]).then(function(){return resolve(o("4761"))}.bind(null,o)).catch(o.oe)},d=function(){Promise.all([o.e("common/vendor"),o.e("components/page-component/goods/app-goods-marketing")]).then(function(){return resolve(o("b3c0"))}.bind(null,o)).catch(o.oe)},p=function(){Promise.all([o.e("common/vendor"),o.e("components/basic-component/app-rich/parse")]).then(function(){return resolve(o("ee52"))}.bind(null,o)).catch(o.oe)},f=function(){Promise.all([o.e("common/vendor"),o.e("components/page-component/app-comments/app-comments")]).then(function(){return resolve(o("3627"))}.bind(null,o)).catch(o.oe)},m=function(){o.e("components/page-component/app-recommended-product/app-recommended-product").then(function(){return resolve(o("be22"))}.bind(null,o)).catch(o.oe)},h=function(){o.e("components/page-component/app-share-qr-code-poster/app-share-qr-code-poster").then(function(){return resolve(o("9f9b"))}.bind(null,o)).catch(o.oe)},g={name:"goods",components:{appGoodsBanner:c,appShareQrCode:h,appService:l,appGoodsAttr:s,appAttr:u,appGoodsMarketing:d,appRichText:p,appComments:f,appRecommendedProduct:m},data:function(){return{goods:{integralMallGoods:{integral_num:0},price:0},selectAttr:null,recommend_list:null,shareShow:!1,shareUrl:null,previewUrl:null,submitUrl:null,iphone_x:!1,attrShow:0,loading:!1}},computed:a({},(0,t.mapState)({theme:function(e){return e.mallConfig.theme},mall:function(e){return e.mallConfig.mall},isUnderlinePrice:function(e){return e.mallConfig.mall.setting.is_underline_price}})),onLoad:function(n){var o=this;o.loadData(n.goods_id),o.previewUrl=o.$api.integral_mall.order_preview,o.submitUrl=o.$api.integral_mall.order_submit,e.getSystemInfo({success:function(e){(e.model.indexOf("iPhone X")>-1||e.model.indexOf("iPhone 11")>-1||e.model.indexOf("iPhone11")>-1||e.model.indexOf("iPhone12")>-1||e.model.indexOf("Unknown Device")>-1)&&(o.iphone_x=!0)}})},onShareAppMessage:function(){return 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:this.goods.cover_pic,path:"/plugins/integral_mall/goods/goods",params:{goods_id:this.goods.id}})},methods:{loadData:function(n){var o=this;this.$showLoading(),this.$request({url:this.$api.integral_mall.goods_detail,data:{id:n}}).then((function(t){o.$hideLoading();var r=t.code,a=t.data,i=t.msg;0===r?(o.goods=a.detail,o.shareUrl=o.$api.integral_mall.poster+"&goods_id="+n,o.goods.id=n,o.loading=!0):e.showModal({title:"提示",content:i,showCancel:!1})})).catch((function(){o.$hideLoading()}))},onAttr:function(e){this.selectAttr=e},shareClick:function(){this.shareShow=!0},back:function(){e.redirectTo({url:"/pages/index/index"})},clickAttr:function(){this.attrShow=Math.random()}}};n.default=g}).call(this,o("543d")["default"])},f131:function(e,n,o){"use strict";(function(e){o("8748");t(o("66fd"));var n=t(o("1205"));function t(e){return e&&e.__esModule?e:{default:e}}e(n.default)}).call(this,o("543d")["createPage"])}},[["f131","common/runtime","common/vendor"]]]);