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

1 line
16 KiB
JavaScript

(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/index/member"],{1251:function(e,a,t){"use strict";t.r(a);var n=t("d867"),o=t("d7c6");for(var r in o)["default"].indexOf(r)<0&&function(e){t.d(a,e,(function(){return o[e]}))}(r);t("d76d");var s=t("828b"),i=Object(s["a"])(o["default"],n["b"],n["c"],!1,null,null,null,!1,n["a"],void 0);a["default"]=i.exports},"362e":function(e,a,t){e.exports={theme_bg:"#f30213"}},"4bbf":function(e,a,t){"use strict";(function(e,a){var n=t("47a9");t("90c2");n(t("3240"));var o=n(t("1251"));e.__webpack_require_UNI_MP_PLUGIN__=t,a(o.default)}).call(this,t("3223")["default"],t("df3c")["createPage"])},b746:function(e,a,t){"use strict";(function(e){var n=t("47a9");Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var o=n(t("7eb4")),r=n(t("7ca3")),s=n(t("ee10")),i=t("8f59");function l(e,a){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),t.push.apply(t,n)}return t}function u(e){for(var a=1;a<arguments.length;a++){var t=null!=arguments[a]?arguments[a]:{};a%2?l(Object(t),!0).forEach((function(a){(0,r.default)(e,a,t[a])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):l(Object(t)).forEach((function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(t,a))}))}return e}var g={data:function(){return{Info:"",loadFlag:!1,UserInfo:{user_nickname:"新用户",user_avatar:"https://static.lancerdt.com/demodata/assets/data/avatar.png"},resource:{user_points:100},versionNumber:"",versionName:"",copyright:"",icp_number:"",site_im:"10001",hall_b2b_enable:!1,isGuessFlag:!1,IsChannel:!0,PersonalCenterList:{type:2},isMembership:!0,isCoupon:!0,isCutPrice:!0,isECashCard:!0,isMemDist:!0,isFightGrp:!0,isAbtVendor:!0,currentSize:0,limitSize:0,isStorage:!1,isGetnum:!1,hasSigned:!1,orders:{wait_pay_num:0,wait_shipping_num:0,ship_num:0,fin_num:0,returning_num:0},isPlus:!1,isShowMoney:!1,pageId:"",loadPageFlag:!1,PageContent:[],BgConfig:{BackgroundObj:{type:1,bgColor:"#ffffff",pathColor:"#f8f8f8",path:""}},PageNav:{window:{navigationBarBackgroundColor:"#ffffff",navigationBarTextStyle:"black",navigationBarTitleText:"",backgroundColor:"#f8f8f8",backgroundTextStyle:"dark"}},shareImg:"",shareTitle:""}},computed:(0,i.mapState)(["Config","StateCode","notice","plantformInfo","shopInfo","userInfo","hasLogin","newMsgNum"]),components:{guessYouLike:function(){Promise.all([t.e("common/vendor"),t.e("components/product-list")]).then(function(){return resolve(t("eaad"))}.bind(null,t)).catch(t.oe)},uParse:function(){Promise.all([t.e("common/vendor"),t.e("components/u-parse/u-parse")]).then(function(){return resolve(t("986d"))}.bind(null,t)).catch(t.oe)},statusBar:function(){t.e("components/status-bar").then(function(){return resolve(t("226f"))}.bind(null,t)).catch(t.oe)},uniBadge:function(){t.e("components/uni-badge").then(function(){return resolve(t("4b85"))}.bind(null,t)).catch(t.oe)},diy:function(){Promise.all([t.e("common/vendor"),t.e("components/themes/diy")]).then(function(){return resolve(t("1ad9"))}.bind(null,t)).catch(t.oe)}},onLoad:function(){var a=(0,s.default)(o.default.mark((function a(t){var n;return o.default.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return e.setNavigationBarTitle({title:this.__("用户中心")}),n=this,n.Lang.standard?n.PersonalCenterList.type=2:n.PersonalCenterList.type=1,t.perm_id&&t.perm_key&&(n.$.setStorageSync("uid",t.perm_id),n.$.setStorageSync("ukey",decodeURIComponent(t.perm_key))),this.forceUserInfo((function(e){})),this.getPageInfo(!1),a.next=8,this.$onLaunched;case 8:n.load(),n.loadFlag=!0;case 10:case"end":return a.stop()}}),a,this)})));return function(e){return a.apply(this,arguments)}}(),onShow:function(e){var a=this;if(a.$.isEmptyObject(this.PersonalCenterList)&&a.load(),this.hasLogin){a.reloadUserResource((function(e){a.setData({UserInfo:e})}));var t=this.Config.URL.center_menu;a.$.request({url:t,data:{},loading:!1,ajaxCache:{timeout:this.Config.CACHE_EXPIRE,forceRefresh:!0},success:function(e,t,n,o){a.Lang.standard?e.menu.type=2:e.menu.type=1,a.setData({PersonalCenterList:e.menu,orders:e.orders})}})}else this.setData({UserInfo:this.userInfo});this.showCartNum()},onPullDownRefresh:function(){this.load(!0)},onReachBottom:function(){this.$refs.guessYouLike.scrollbottom()},methods:u(u({},(0,i.mapMutations)(["login","logout","getPlantformInfo","forceUserInfo","reloadUserResource","getUserInfo","showCartNum"])),{},{getPageInfo:function(e){var a=this;a.$.request({url:this.Config.URL.index_app,data:{page_type:"page_likeyou"},ajaxCache:{timeout:this.Config.CACHE_EXPIRE,forceRefresh:e},success:function(e,t,n,o){if(a.$.stopPullDownRefresh(),200==t&&(a.setData({loadPageFlag:!0,pageId:e.page_id,PageContent:a.$.parseJSON(e.page_code),BgConfig:a.$.parseJSON(e.page_config),PageNav:a.$.parseJSON(e.page_nav),shareImg:e.page_share_image,shareTitle:e.page_share_title}),"black"==a.PageNav.window.navigationBarTextStyle&&(a.PageNav.window.navigationBarTextStyle="#000000"),"white"==a.PageNav.window.navigationBarTextStyle&&(a.PageNav.window.navigationBarTextStyle="#ffffff"),a.$.setNavigationBarColor({frontColor:a.PageNav.window.navigationBarTextStyle,backgroundColor:a.PageNav.window.navigationBarBackgroundColor}),e.page_name&&a.$.setNavigationBarTitle({title:e.page_name}),a.hasLogin&&e.im_enable)){a.$.getStorageSync("uid"),a.$.getStorageSync("ukey");var r=a.$.sprintf("/im/chat/chat?uid=%s",e.im_user_id);a.setData({chatUrl:r})}}})},load:function(e){"undefined"==typeof e&&(e=!0);var a=this;this.getPlantformInfo((function(e){a.setData({versionNumber:e.version,versionName:e.name,copyright:e.copyright,icp_number:e.icp_number,hall_b2b_enable:e.config.hall_b2b_enable,isGuessFlag:e.config.esearch_enable,site_im:e.site_im}),a.$.inArray(e.payment_channel_code_row,"money")?a.isShowMoney=!0:a.isShowMoney=!1}));a=this;var t={},n=this.Config.URL.store.menu;if(n=this.Config.URL.center_menu,a.$.request({url:n,data:t,ajaxCache:{timeout:this.Config.CACHE_EXPIRE},success:function(e,t,n,o){a.Lang.standard?e.menu.type=2:e.menu.type=1,a.setData({PersonalCenterList:e.menu,orders:e.orders}),a.$.stopPullDownRefresh()}}),this.hasLogin){t={user_id:this.userInfo.user_id};a.$.request({url:this.Config.URL.user.signState,data:t,success:function(e,t,n,o){a.setData({hasSigned:250==e.state})}})}a.$.getStorage({key:"cancel",success:function(e){"yes"==e.data?a.setData({isStorage:!1}):a.setData({isStorage:!0})},fail:function(e){a.setData({isStorage:!0})}})},click:function(){var e=this,a={user_id:this.userInfo.user_id};e.$.request({url:this.Config.URL.user.signIn,data:a,success:function(a,t,n,o){e.reloadUserResource((function(e){})),200==t?e.$.confirm(n):e.$.confirm(e.__("抱歉!今日您已签到")),e.load()}})},cancel:function(){this.setData({isGetnum:!1}),this.$.setStorage({key:"cancel",data:"yes"})},getPhoneNumber:function(e){var a=this;a.$.login({success:function(t){a.userInfo.Id,e.detail.encryptedData,e.detail.iv,t.code}})},selectAddress:function(e){this.$.gopage("/member/address/list")},goTabBar:function(e){this.$.goToTabBar(this,e.currentTarget.dataset.url)},goKefu:function(e){var a=this;this.forceUserInfo((function(e){var t=a.$.sprintf("/im/chat/chat?uid=%s",a.site_im);a.$.gopage(t)}))},cleanCache:function(a){var t=this;a.currentTarget.dataset.index,a.currentTarget.dataset.path;t.$.confirm(t.__("确定要清除缓存吗?"),(function(a){if(a.confirm){var n=e.getStorageSync("selang");t.$Socket.nclose(),t.$.storage.clear(),e.setStorageSync("selang",n);var o=t.$.storage.info();t.setData({currentSize:Math.round(100*o.currentSize)/100,limitSize:Math.round(o.limitSize/1024*100)/100}),t.$Socket.nclose(),t.logout(!0)}}),!0)},reloadLang:function(e){var a=this;console.info(a.Lang.G),a.$.request({url:this.Config.URL.listTranslateLang,data:{},success:function(e,t,n,o){for(var r in e){var s=r.replace("_","-");a.Lang.G[s]=Object.assign(a.Lang.G[s],e[r])}console.info(a.Lang.G)}})},distributionWeStore:function(e){this.$.gopage("/pagesub/westore/index")},navigate:function(e,a){console.info(e),console.info(a),this.$.gopage("/pagesub/webpage/webpage?u="+encodeURIComponent(e))}})};a.default=g}).call(this,t("df3c")["default"])},d76d:function(e,a,t){"use strict";var n=t("362e"),o=t.n(n);o.a},d7c6:function(e,a,t){"use strict";t.r(a);var n=t("b746"),o=t.n(n);for(var r in n)["default"].indexOf(r)<0&&function(e){t.d(a,e,(function(){return n[e]}))}(r);a["default"]=o.a},d867:function(e,a,t){"use strict";t.d(a,"b",(function(){return o})),t.d(a,"c",(function(){return r})),t.d(a,"a",(function(){return n}));var n={uParse:function(){return Promise.all([t.e("common/vendor"),t.e("components/u-parse/u-parse")]).then(t.bind(null,"986d"))}},o=function(){var e=this,a=e.$createElement,t=(e._self._c,e.loadPageFlag,null),n=e.loadPageFlag&&!e.hasLogin?e.__("登录/注册"):null,o=e.loadPageFlag&&e.isShowMoney?e.number_format(e.userInfo.user_money,2)||0:null,r=e.loadPageFlag&&e.isShowMoney?e.__("余额"):null,s=e.loadPageFlag&&e.Config.PLANTFORM_FX_ENABLE?e.number_format(e.userInfo.commission_amount,0)||0:null,i=e.loadPageFlag&&e.Config.PLANTFORM_FX_ENABLE?e.__("佣金"):null,l=e.loadPageFlag?e.number_format(e.userInfo.user_points,0)||0:null,u=e.loadPageFlag?e.__("积分"):null,g=e.loadPageFlag?e.number_format(e.userInfo.voucher,0)||0:null,c=e.loadPageFlag?e.__("优惠券"):null,d=(e.loadPageFlag,null),f=(e.loadPageFlag,null),h=(e.loadPageFlag,null),y=(e.loadPageFlag,null),m=(e.loadPageFlag,null),_=(e.loadPageFlag,null),S=(e.loadPageFlag,null),F=(e.loadPageFlag,null),K=(e.loadPageFlag,null),p=(e.loadPageFlag,null),w=(e.loadPageFlag,null),P=e.loadPageFlag?e.__("我的订单"):null,b=e.loadPageFlag?e.__("查看全部"):null,C=e.loadPageFlag?e.__("待支付"):null,v=e.loadPageFlag?e.__("待发货"):null,U=e.loadPageFlag?e.__("待收货"):null,L=e.loadPageFlag?e.__("已完成"):null,M=e.loadPageFlag?e.__("我的预约"):null,I=e.loadPageFlag?e.__("查看全部"):null,$=e.loadPageFlag?e.__("待支付"):null,O=e.loadPageFlag?e.__("待服务"):null,R=e.loadPageFlag?e.__("待确认"):null,N=e.loadPageFlag?e.__("已完成"):null,k=e.loadPageFlag&&e.hall_b2b_enable?e.__("我的采购"):null,x=e.loadPageFlag&&e.hall_b2b_enable?e.__("发布采购"):null,B=e.loadPageFlag&&e.hall_b2b_enable?e.__("我的采购"):null,D=e.loadPageFlag&&e.hall_b2b_enable?e.__("我的报价"):null,G=e.loadPageFlag?e.__("常用功能"):null,T=e.loadPageFlag?e.__map(e.PersonalCenterList.list,(function(a,t){var n=e.__get_orig(a),o=1==a.cat&&8==a.id&&a.isShow?e.__("收货地址"):null,r=1!=a.cat||8==a.id&&a.isShow||"UserMoneyKey"!=a.FeatureKey||!a.isShow||!e.isShowMoney||2==e.PersonalCenterList.type||"UserMoneyKey"!=a.FeatureKey?null:e.sprintf(e.__("你有 ¥%s"),e.UserInfo.user_money),s=1!=a.cat||8==a.id&&a.isShow||"UserMoneyKey"==a.FeatureKey&&a.isShow||"WeStore"!=a.FeatureKey||!a.isShow?null:e.__("我的小店"),i=1!=a.cat||8==a.id&&a.isShow||"UserMoneyKey"==a.FeatureKey&&a.isShow||"WeStore"==a.FeatureKey&&a.isShow||"KefuKey"!=a.FeatureKey||!a.isShow?null:e.__("平台客服"),l=1!=a.cat||8==a.id&&a.isShow||"UserMoneyKey"==a.FeatureKey&&a.isShow||"WeStore"==a.FeatureKey&&a.isShow||"KefuKey"==a.FeatureKey&&a.isShow||"CleanCacheKey"!=a.FeatureKey||!a.isShow?null:e.__("清除缓存"),u=1!=a.cat||8==a.id&&a.isShow||"UserMoneyKey"==a.FeatureKey&&a.isShow||"WeStore"==a.FeatureKey&&a.isShow||"KefuKey"==a.FeatureKey&&a.isShow||"CleanCacheKey"==a.FeatureKey&&a.isShow||!a.isShow||"Seller"!=a.FeatureKey||2==e.UserInfo.rid?null:e.__("商家入驻"),g=1!=a.cat||8==a.id&&a.isShow||"UserMoneyKey"==a.FeatureKey&&a.isShow||"WeStore"==a.FeatureKey&&a.isShow||"KefuKey"==a.FeatureKey&&a.isShow||"CleanCacheKey"==a.FeatureKey&&a.isShow||a.isShow&&"Seller"==a.FeatureKey||!a.isShow||"UserMoneyKey"!=a.FeatureKey&&"Coupon"!=a.FeatureKey&&"MemGrade"!=a.FeatureKey&&"UserMoneyKey"!=a.FeatureKey||2==e.PersonalCenterList.type||"UserMoneyKey"!=a.FeatureKey?null:e.sprintf(e.__("你有 ¥%s"),e.UserInfo.user_money),c=1!=a.cat||8==a.id&&a.isShow||"UserMoneyKey"==a.FeatureKey&&a.isShow||"WeStore"==a.FeatureKey&&a.isShow||"KefuKey"==a.FeatureKey&&a.isShow||"CleanCacheKey"==a.FeatureKey&&a.isShow||a.isShow&&"Seller"==a.FeatureKey||!a.isShow||"UserMoneyKey"!=a.FeatureKey&&"Coupon"!=a.FeatureKey&&"MemGrade"!=a.FeatureKey&&"UserMoneyKey"!=a.FeatureKey||2==e.PersonalCenterList.type||"Coupon"!=a.FeatureKey?null:e.sprintf(e.__("你有 %s 优惠券"),e.UserInfo.voucher),d=1!=a.cat||8==a.id&&a.isShow||"UserMoneyKey"==a.FeatureKey&&a.isShow||"WeStore"==a.FeatureKey&&a.isShow||"KefuKey"==a.FeatureKey&&a.isShow||"CleanCacheKey"==a.FeatureKey&&a.isShow||a.isShow&&"Seller"==a.FeatureKey||!a.isShow||"UserMoneyKey"!=a.FeatureKey&&"Coupon"!=a.FeatureKey&&"MemGrade"!=a.FeatureKey&&"UserMoneyKey"!=a.FeatureKey||2==e.PersonalCenterList.type||"MemGrade"!=a.FeatureKey?null:e.sprintf(e.__("你有 %s 积分"),e.UserInfo.user_points),f=1==a.cat&&a.isShow&&"Integral"==a.FeatureKey?e.__("积分商城"):null;return{$orig:n,m38:o,m39:r,m40:s,m41:i,m42:l,m43:u,m44:g,m45:c,m46:d,m47:f}})):null,j=(e.loadPageFlag,null),W=(e.loadPageFlag,null),E=(e.loadPageFlag,null),A=e.loadPageFlag?e.__("特色功能"):null,q=e.loadPageFlag?e.__map(e.PersonalCenterList.list,(function(a,t){var n=e.__get_orig(a),o=2==a.cat&&8==a.id&&a.isShow?e.__("收货地址"):null,r=2!=a.cat||8==a.id&&a.isShow||"WeStore"!=a.FeatureKey||!a.isShow?null:e.__("我的小店"),s=2!=a.cat||8==a.id&&a.isShow||"WeStore"==a.FeatureKey&&a.isShow||"ReloadLang"==a.FeatureKey&&a.isShow||"KefuKey"!=a.FeatureKey||!a.isShow?null:e.__("平台客服"),i=2!=a.cat||8==a.id&&a.isShow||"WeStore"==a.FeatureKey&&a.isShow||"ReloadLang"==a.FeatureKey&&a.isShow||"KefuKey"==a.FeatureKey&&a.isShow||"CleanCacheKey"!=a.FeatureKey||!a.isShow?null:e.__("清除缓存"),l=2!=a.cat||8==a.id&&a.isShow||"WeStore"==a.FeatureKey&&a.isShow||"ReloadLang"==a.FeatureKey&&a.isShow||"KefuKey"==a.FeatureKey&&a.isShow||"CleanCacheKey"==a.FeatureKey&&a.isShow||!a.isShow||"Seller"!=a.FeatureKey||2==e.UserInfo.rid?null:e.__("商家入驻"),u=2!=a.cat||8==a.id&&a.isShow||"WeStore"==a.FeatureKey&&a.isShow||"ReloadLang"==a.FeatureKey&&a.isShow||"KefuKey"==a.FeatureKey&&a.isShow||"CleanCacheKey"==a.FeatureKey&&a.isShow||a.isShow&&"Seller"==a.FeatureKey||!a.isShow||"UserMoneyKey"!=a.FeatureKey&&"Coupon"!=a.FeatureKey&&"MemGrade"!=a.FeatureKey&&"UserMoneyKey"!=a.FeatureKey||2==e.PersonalCenterList.type||"UserMoneyKey"!=a.FeatureKey?null:e.sprintf(e.__("你有 ¥%s"),e.UserInfo.user_money),g=2!=a.cat||8==a.id&&a.isShow||"WeStore"==a.FeatureKey&&a.isShow||"ReloadLang"==a.FeatureKey&&a.isShow||"KefuKey"==a.FeatureKey&&a.isShow||"CleanCacheKey"==a.FeatureKey&&a.isShow||a.isShow&&"Seller"==a.FeatureKey||!a.isShow||"UserMoneyKey"!=a.FeatureKey&&"Coupon"!=a.FeatureKey&&"MemGrade"!=a.FeatureKey&&"UserMoneyKey"!=a.FeatureKey||2==e.PersonalCenterList.type||"Coupon"!=a.FeatureKey?null:e.sprintf(e.__("你有 %s 优惠券"),e.UserInfo.voucher),c=2!=a.cat||8==a.id&&a.isShow||"WeStore"==a.FeatureKey&&a.isShow||"ReloadLang"==a.FeatureKey&&a.isShow||"KefuKey"==a.FeatureKey&&a.isShow||"CleanCacheKey"==a.FeatureKey&&a.isShow||a.isShow&&"Seller"==a.FeatureKey||!a.isShow||"UserMoneyKey"!=a.FeatureKey&&"Coupon"!=a.FeatureKey&&"MemGrade"!=a.FeatureKey&&"UserMoneyKey"!=a.FeatureKey||2==e.PersonalCenterList.type||"MemGrade"!=a.FeatureKey?null:e.sprintf(e.__("你有 %s 积分"),e.UserInfo.user_points),d=2==a.cat&&12==a.id&&a.isShow?e.__("积分商城"):null;return{$orig:n,m52:o,m53:r,m54:s,m55:i,m56:l,m57:u,m58:g,m59:c,m60:d}})):null,z=(e.loadPageFlag,null),J=(e.loadPageFlag,null),X=(e.loadPageFlag,null),H=e.loadPageFlag&&e.loadFlag?e.__("——猜你喜欢——"):null,Y=e.loadPageFlag&&!e.IsChannel?e.__("商城套件系统提供技术支持"):null,V=e.loadPageFlag&&e.isGetnum&&e.isStorage&&e.isFlagPhoto&&e.isWexinMobile?e.__("绑定手机号"):null,Q=e.loadPageFlag&&e.isGetnum&&e.isStorage&&e.isFlagPhoto&&e.isWexinMobile?e.__("您当前尚未绑定手机号,建议您绑定以获得更多优惠资讯"):null,Z=e.loadPageFlag&&e.isGetnum&&e.isStorage&&e.isFlagPhoto&&e.isWexinMobile?e.__("取消"):null,ee=e.loadPageFlag&&e.isGetnum&&e.isStorage&&e.isFlagPhoto&&e.isWexinMobile?e.__("确定"):null;e.$mp.data=Object.assign({},{$root:{m0:t,m1:n,m2:o,m3:r,m4:s,m5:i,m6:l,m7:u,m8:g,m9:c,m10:d,m11:f,m12:h,m13:y,m14:m,m15:_,m16:S,m17:F,m18:K,m19:p,m20:w,m21:P,m22:b,m23:C,m24:v,m25:U,m26:L,m27:M,m28:I,m29:$,m30:O,m31:R,m32:N,m33:k,m34:x,m35:B,m36:D,m37:G,l0:T,m48:j,m49:W,m50:E,m51:A,l1:q,m61:z,m62:J,m63:X,m64:H,m65:Y,m66:V,m67:Q,m68:Z,m69:ee}})},r=[]}},[["4bbf","common/runtime","common/vendor"]]]);