1 line
4.7 KiB
JavaScript
Executable File
1 line
4.7 KiB
JavaScript
Executable File
require('../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages_promotion/pintuan/list"],{"23ec":function(e,n,t){"use strict";t.d(n,"b",(function(){return o})),t.d(n,"c",(function(){return i})),t.d(n,"a",(function(){return a}));var a={nsAdv:function(){return t.e("components/ns-adv/ns-adv").then(t.bind(null,"7e88"))},nsEmpty:function(){return t.e("components/ns-empty/ns-empty").then(t.bind(null,"52a6"))},hoverNav:function(){return t.e("components/hover-nav/hover-nav").then(t.bind(null,"c1f1"))},loadingCover:function(){return t.e("components/loading-cover/loading-cover").then(t.bind(null,"c003"))}},o=function(){var e=this,n=e.$createElement,t=(e._self._c,e.addonIsExist.pintuan?e.dataList.length:null),a=e.addonIsExist.pintuan&&t?e.__map(e.dataList,(function(n,t){var a=e.__get_orig(n),o=e.goodsImg(n.goods_image),i=e.goodsTag(n),r=""!=i?e.goodsTag(n):null,s=e.$lang("common.currencySymbol"),u=parseFloat(n.pintuan_price).toFixed(2).split("."),c=parseFloat(n.pintuan_price).toFixed(2).split("."),d=e.$lang("common.currencySymbol");return{$orig:a,m0:o,m1:i,m2:r,m3:s,g1:u,g2:c,m4:d}})):null,o=e.addonIsExist.pintuan?e.dataList.length:null;e.$mp.data=Object.assign({},{$root:{g0:t,l0:a,g3:o}})},i=[]},3756:function(e,n,t){"use strict";(function(e,n){var a=t("47a9");t("d381");a(t("3240"));var o=a(t("61d8"));e.__webpack_require_UNI_MP_PLUGIN__=t,n(o.default)}).call(this,t("3223")["default"],t("df3c")["createPage"])},"4a74":function(e,n,t){"use strict";(function(e){var a=t("47a9");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o=a(t("7eb4")),i=a(t("ee10")),r={components:{nsAdv:function(){t.e("components/ns-adv/ns-adv").then(function(){return resolve(t("7e88"))}.bind(null,t)).catch(t.oe)}},data:function(){return{dataList:[],mpShareData:null,bgColor:""}},onLoad:function(n){var t=this;if(setTimeout((function(){t.addonIsExist.pintuan||(t.$util.showToast({title:"商家未开启拼团",mask:!0,duration:2e3}),setTimeout((function(){t.$util.redirectTo("/pages/index/index")}),2e3))}),1e3),n.source_member&&e.setStorageSync("source_member",n.source_member),n.scene){var a=decodeURIComponent(n.scene);a=a.split("&"),a.length&&a.forEach((function(n){-1!=n.indexOf("sku_id")&&(t.skuId=n.split("-")[1]),-1!=n.indexOf("m")&&e.setStorageSync("source_member",n.split("-")[1]),-1!=n.indexOf("is_test")&&e.setStorageSync("is_test",1)}))}},onShow:function(){var n=this;return(0,i.default)(o.default.mark((function t(){return o.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return n.storeToken&&e.getStorageSync("source_member")&&n.$util.onSourceMember(e.getStorageSync("source_member")),n.$util.getMpShare().then((function(e){n.mpShareData=e})),t.next=4,n.getZoneConfig();case 4:case"end":return t.stop()}}),t)})))()},onShareAppMessage:function(){return this.mpShareData.appMessage},onShareTimeline:function(){return this.mpShareData.timeLine},methods:{getZoneConfig:function(){var e=this;return(0,i.default)(o.default.mark((function n(){var t,a;return o.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,e.$api.sendRequest({url:"/api/config/promotionZoneConfig",data:{name:"pintuan"},async:!1});case 2:t=n.sent,a=t.data,a&&(e.bgColor=a.bg_color);case 5:case"end":return n.stop()}}),n)})))()},getData:function(e){var n=this;this.$api.sendRequest({url:"/pintuan/api/goods/page",data:{page_size:e.size,page:e.num},success:function(t){var a=[],o=t.message;0==t.code&&t.data?a=t.data.list:n.$util.showToast({title:o}),e.endSuccess(a.length),1==e.num&&(n.dataList=[]),n.dataList=n.dataList.concat(a),n.$refs.loadingCover&&n.$refs.loadingCover.hide()},fail:function(){e.endErr(),this.$refs.loadingCover&&this.$refs.loadingCover.hide()}})},toDetail:function(e){this.$util.redirectTo("/pages_promotion/pintuan/detail",{pintuan_id:e.pintuan_id})},imgError:function(e){this.dataList[e].goods_image=this.$util.getDefaultImage().goods,this.$forceUpdate()},goodsImg:function(e){var n=e.split(",");return n[0]?this.$util.img(n[0],{size:"mid"}):this.$util.getDefaultImage().goods},goodsTag:function(e){return e.label_name||""}}};n.default=r}).call(this,t("df3c")["default"])},"61d8":function(e,n,t){"use strict";t.r(n);var a=t("23ec"),o=t("c168");for(var i in o)["default"].indexOf(i)<0&&function(e){t.d(n,e,(function(){return o[e]}))}(i);t("8956");var r=t("828b"),s=Object(r["a"])(o["default"],a["b"],a["c"],!1,null,null,null,!1,a["a"],void 0);n["default"]=s.exports},8956:function(e,n,t){"use strict";var a=t("8b6e"),o=t.n(a);o.a},"8b6e":function(e,n,t){},c168:function(e,n,t){"use strict";t.r(n);var a=t("4a74"),o=t.n(a);for(var i in a)["default"].indexOf(i)<0&&function(e){t.d(n,e,(function(){return a[e]}))}(i);n["default"]=o.a}},[["3756","common/runtime","common/vendor"]]]); |