java-mall-app/unpackage/dist/build/mp-weixin/pagesub/westore/index.js
2024-11-01 16:35:40 +08:00

1 line
7.3 KiB
JavaScript

(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pagesub/westore/index"],{"09d7":function(t,e,s){"use strict";var i=s("2928"),o=s.n(i);o.a},2928:function(t,e,s){t.exports={theme_bg:"#f30213"}},"32c7":function(t,e,s){"use strict";s.d(e,"b",(function(){return i})),s.d(e,"c",(function(){return o})),s.d(e,"a",(function(){}));var i=function(){var t=this,e=t.$createElement,s=(t._self._c,t.__("商品")),i=t.__("综合排序~"),o=t.__("销量"),a=t.__("人气"),r=t.__("综合排序~"),n=t.__("价格从高到低"),d=t.__("价格从低到高"),c=t.__map(t.store_data.items,(function(e,s){var i=t.__get_orig(e),o=t.__("¥");return{$orig:i,m7:o}})),u=t.ispage?t.__("正在加载"):null,p=t.ispage?null:t.__("没有更多数据啦!");t.$mp.data=Object.assign({},{$root:{m0:s,m1:i,m2:o,m3:a,m4:r,m5:n,m6:d,l0:c,m8:u,m9:p}})},o=[]},5247:function(t,e,s){"use strict";s.r(e);var i=s("5efc"),o=s.n(i);for(var a in i)["default"].indexOf(a)<0&&function(t){s.d(e,t,(function(){return i[t]}))}(a);e["default"]=o.a},"5efc":function(t,e,s){"use strict";(function(t){var i=s("47a9");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=i(s("7ca3")),a=s("8f59");function r(t,e){var s=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),s.push.apply(s,i)}return s}function n(t){for(var e=1;e<arguments.length;e++){var s=null!=arguments[e]?arguments[e]:{};e%2?r(Object(s),!0).forEach((function(e){(0,o.default)(t,e,s[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(s)):r(Object(s)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(s,e))}))}return t}var d={data:function(){return{options:{},isStoreFlag:0,viewtype:1,pdlist:[],fglist:[],sort:2,flag:!0,ispage:!0,scposition:"",istop:!1,isdata:!1,isVirtual:!1,isInnerFlag:!1,post:{sidx:"",sord:"",isnew:!1,keywords:"",store_category_ids:0,page:1,wd_id:null},store_data:{invite_info:{}},PageQRCodeInfo:{Path:"",IsShare:!1,IsShareBox:!1,IsJT:!1},shareData:{}}},computed:(0,a.mapState)(["Config","StateCode","notice","plantformInfo","shopInfo","userInfo","hasLogin"]),components:{shareBoxMp:function(){s.e("components/share-box-mp").then(function(){return resolve(s("49ce"))}.bind(null,s)).catch(s.oe)},shareBoxApp:function(){s.e("components/share-box-app").then(function(){return resolve(s("68b1"))}.bind(null,s)).catch(s.oe)}},onLoad:function(e){t.setNavigationBarTitle({title:this.__("微小店")});var s=this;if(e.scene){var i,o=decodeURIComponent(e.scene);i=s.$.parse_str(o),e=Object.assign(e,i)}this.setData({options:e,isStoreFlag:e.is_store_flag?parseInt(e.is_store_flag):0}),this.setData({post:{wd_id:e.wd_id||this.userInfo.user_id,sidx:"product_sale_num",sord:"DESC",keywords:e.pname,store_category_ids:e.store_category_id,category_id:e.category_id,kind_id:e.kind_id,page:1}}),this.GetPlist((function(){0==s.pdlist.length?s.setData({isdata:!1}):s.setData({isdata:!0}),setTimeout((function(){var t=s.store_data.westore_name,e=s.store_data.westore_name,i=s.$.sprintf("%s/h5/pagesub/westore/index?wd_id=%s",s.Config.SiteUrl,s.post.wd_id),o=s.userInfo.user_avatar;s.$.wxShare(t,e,i,o)}),100)}))},onShareAppMessage:function(){return{title:this.store_data.westore_name,path:"/pagesub/westore/index?wd_id="+this.post.wd_id}},onBackPress:function(){if(this.$refs.shareBoxMp.showBoxView)return this.$refs.shareBoxMp.cancel(),!0},onUnload:function(){this.$refs.shareBoxMp.showBoxView&&this.$refs.shareBoxMp.cancel()},onNavigationBarButtonTap:function(e){0===e.index?this.onShareBox(e):t.showToast({title:this.__("你点了收藏按钮"),icon:"none"})},methods:n(n({},(0,a.mapMutations)(["login","logout","getPlantformInfo","forceUserInfo","getUserInfo"])),{},{viewType:function(t){0==this.viewtype?this.setData({viewtype:1}):this.setData({viewtype:0})},sortOpt:function(){this.setData({isInnerFlag:!0})},sortDefault:function(){this.setData({isInnerFlag:!1});var t=this.post;t.sidx="",t.sord="",t.page=1,this.setData({pdlist:[],post:t}),this.GetPlist()},sealnum:function(){this.setData({isInnerFlag:!1});var t=this.post;t.sidx="product_sale_num",t.sord="DESC",t.page=1,this.setData({pdlist:[],post:t}),this.GetPlist()},favoritenum:function(){this.setData({isInnerFlag:!1});var t=this.post;t.sidx="product_favorite_num",t.sord="DESC",t.page=1,this.setData({pdlist:[],post:t}),this.GetPlist()},newpd:function(){this.setData({isInnerFlag:!1});var t=this.post;t.sidx="product_add_time",t.sord="DESC",t.page=1,this.setData({pdlist:[],post:t}),this.GetPlist()},pdprice:function(){this.setData({isInnerFlag:!1});var t=this.post;t.sidx="product_unit_price",t.sord=1==this.sort?"DESC":"ASC",t.page=1,1==this.sort?this.setData({sort:2,pdlist:[],post:t}):this.setData({pdlist:[],sort:1,post:t}),this.GetPlist()},upPrice:function(){this.setData({isInnerFlag:!1});var t=this.post;t.sidx="product_unit_price",t.sord=1==this.sort?"DESC":"ASC",t.page=1,1==this.sort?this.setData({sort:2,pdlist:[],post:t}):this.setData({pdlist:[],sort:1,post:t}),this.GetPlist()},scrollbottom:function(t){if(this.flag){var e=this;e.setData({flag:!1}),clearTimeout(i);var s=this.post;s.sidx="product_unit_price",s.sord=1==this.sort?"DESC":"ASC",s.page=parseInt(e.post.page)+1;var i=setTimeout((function(){e.setData({post:s}),e.GetPlist()}),500)}},GetPlist:function(t){this.setData({flag:!1});var e=this,s=e.post;s.u_id=e.post.wd_id,s["poster_type"]=2,e.$.request({url:this.Config.URL.user.direct_store_index,data:s,success:function(t,s,i,o){e.$.setNavigationBarTitle({title:t.westore_name}),e.setData({store_data:t}),t.page>=t.total?e.setData({flag:!1,ispage:!1,pdlist:e.pdlist.concat(t.items)}):e.setData({flag:!0,ispage:!0,pdlist:e.pdlist.concat(t.items)})}})},modify:function(e){var s=this;e.currentTarget.dataset.item_id;t.showActionSheet({itemList:["删除"],success:function(t){0==t.tapIndex&&s.removeFromWestore(e)}})},removeFromWestore:function(t){var e=this,s={product_id:t.currentTarget.dataset.product_id};e.$.request({url:this.Config.URL.user.direct_store_remove,data:s,success:function(t,s,i,o){200==s?(e.$.alert(i),e.GetPlist()):e.$.alert(i)}})},onShareBox:function(t){var e=this.$.sprintf("%s/tmpl/member/directseller_store.html?u_id=%d&FX=%d",this.Config.WapSiteUrl,this.post.wd_id,this.userInfo.user_id);this.$.sprintf("%s/h5/pagesub/westore/index?wd_id=%s&uid=%d",this.Config.SiteUrl,this.post.wd_id,this.userInfo.user_id),e="/pagesub/westore/index?wd_id="+this.post.wd_id,this.setData({shareData:{shareTitle:this.store_data.westore_name,shareText:this.store_data.westore_name,href:e,image:this.store_data.invite_info.qrcode}}),this.$refs.shareBoxMp.show()},returnTop:function(){this.setData({scposition:0})},previewImg:function(){this.$.previewImage({current:this.store_data.invite_info.qrcode,urls:[this.store_data.invite_info.qrcode]})}})};e.default=d}).call(this,s("df3c")["default"])},"8a45":function(t,e,s){"use strict";(function(t,e){var i=s("47a9");s("90c2");i(s("3240"));var o=i(s("b589"));t.__webpack_require_UNI_MP_PLUGIN__=s,e(o.default)}).call(this,s("3223")["default"],s("df3c")["createPage"])},b589:function(t,e,s){"use strict";s.r(e);var i=s("32c7"),o=s("5247");for(var a in o)["default"].indexOf(a)<0&&function(t){s.d(e,t,(function(){return o[t]}))}(a);s("09d7");var r=s("828b"),n=Object(r["a"])(o["default"],i["b"],i["c"],!1,null,null,null,!1,i["a"],void 0);e["default"]=n.exports}},[["8a45","common/runtime","common/vendor"]]]);