java-mall-app/unpackage/dist/build/mp-weixin/pages/index/member.js

1 line
16 KiB
JavaScript

(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/index/member"],{"27e8":function(e,a,o){},3206:function(e,a,o){"use strict";var n=o("27e8"),t=o.n(n);t.a},"47ac":function(e,a,o){"use strict";o.r(a);var n=o("f2d4"),t=o.n(n);for(var r in n)["default"].indexOf(r)<0&&function(e){o.d(a,e,(function(){return n[e]}))}(r);a["default"]=t.a},"54eb":function(e,a,o){"use strict";o.r(a);var n=o("6c73"),t=o("47ac");for(var r in t)["default"].indexOf(r)<0&&function(e){o.d(a,e,(function(){return t[e]}))}(r);o("3206");var i=o("828b"),s=Object(i["a"])(t["default"],n["b"],n["c"],!1,null,null,null,!1,n["a"],void 0);a["default"]=s.exports},"6c73":function(e,a,o){"use strict";o.d(a,"b",(function(){return t})),o.d(a,"c",(function(){return r})),o.d(a,"a",(function(){return n}));var n={uParse:function(){return Promise.all([o.e("common/vendor"),o.e("components/u-parse/u-parse")]).then(o.bind(null,"9733"))}},t=function(){var e=this,a=e.$createElement,o=(e._self._c,e.loadPageFlag,null),n=e.loadPageFlag&&!e.hasLogin?e.__("登录/注册"):null,t=(e.loadPageFlag,null),r=(e.loadPageFlag,null),i=(e.loadPageFlag,null),s=(e.loadPageFlag,null),l=(e.loadPageFlag,null),u=(e.loadPageFlag,null),g=(e.loadPageFlag,null),c=(e.loadPageFlag,null),h=(e.loadPageFlag,null),d=(e.loadPageFlag,null),f=(e.loadPageFlag,null),y=(e.loadPageFlag,null),m=(e.loadPageFlag,null),_=(e.loadPageFlag,null),p=(e.loadPageFlag,null),S=(e.loadPageFlag,null),F=(e.loadPageFlag,null),K=(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,L=e.loadPageFlag?e.__("待收货"):null,U=e.loadPageFlag?e.__("已完成"):null,M=e.loadPageFlag?e.__("我的预约"):null,I=e.loadPageFlag?e.__("查看全部"):null,$=e.loadPageFlag?e.__("待支付"):null,k=e.loadPageFlag?e.__("待服务"):null,O=e.loadPageFlag?e.__("待确认"):null,R=e.loadPageFlag?e.__("已完成"):null,x=e.loadPageFlag&&e.hall_b2b_enable?e.__("我的采购"):null,N=e.loadPageFlag&&e.hall_b2b_enable?e.__("发布采购"):null,D=e.loadPageFlag&&e.hall_b2b_enable?e.__("我的采购"):null,G=e.loadPageFlag&&e.hall_b2b_enable?e.__("我的报价"):null,B=e.loadPageFlag?e.__("常用的功能"):null,T=e.loadPageFlag?e.__map(e.PersonalCenterList.list,(function(a,o){var n=e.__get_orig(a),t=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),i=1!=a.cat||8==a.id&&a.isShow||"UserMoneyKey"==a.FeatureKey&&a.isShow||"WeStore"!=a.FeatureKey||!a.isShow?null:e.__("我的小店"),s=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),h=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),d=1==a.cat&&a.isShow&&"Integral"==a.FeatureKey?e.__("积分商城"):null;return{$orig:n,m38:t,m39:r,m40:i,m41:s,m42:l,m43:u,m44:g,m45:c,m46:h,m47:d}})):null,j=(e.loadPageFlag,null),W=(e.loadPageFlag,null),E=(e.loadPageFlag,null),q=e.loadPageFlag?e.__("特色功能"):null,z=e.loadPageFlag?e.__map(e.PersonalCenterList.list,(function(a,o){var n=e.__get_orig(a),t=8==a.id&&a.isShow?e.__("收货地址"):null,r=8==a.id&&a.isShow||"WeStore"!=a.FeatureKey||!a.isShow?null:e.__("我的小店"),i=8==a.id&&a.isShow||"WeStore"==a.FeatureKey&&a.isShow||"ReloadLang"==a.FeatureKey&&a.isShow||"KefuKey"!=a.FeatureKey||!a.isShow?null:e.__("平台客服"),s=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=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=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=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=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),h=12==a.id&&a.isShow?e.__("积分商城"):null;return{$orig:n,m52:t,m53:r,m54:i,m55:s,m56:l,m57:u,m58:g,m59:c,m60:h}})):null,A=(e.loadPageFlag,null),J=(e.loadPageFlag,null),H=(e.loadPageFlag,null),X=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._isMounted||(e.e0=function(a){e.showLoginPopup=!0}),e.$mp.data=Object.assign({},{$root:{m0:o,m1:n,m2:t,m3:r,m4:i,m5:s,m6:l,m7:u,m8:g,m9:c,m10:h,m11:d,m12:f,m13:y,m14:m,m15:_,m16:p,m17:S,m18:F,m19:K,m20:w,m21:P,m22:b,m23:C,m24:v,m25:L,m26:U,m27:M,m28:I,m29:$,m30:k,m31:O,m32:R,m33:x,m34:N,m35:D,m36:G,m37:B,l0:T,m48:j,m49:W,m50:E,m51:q,l1:z,m61:A,m62:J,m63:H,m64:X,m65:Y,m66:V,m67:Q,m68:Z,m69:ee}})},r=[]},cd9f:function(e,a,o){"use strict";(function(e,a){var n=o("47a9");o("ec76");n(o("3240"));var t=n(o("54eb"));e.__webpack_require_UNI_MP_PLUGIN__=o,a(t.default)}).call(this,o("3223")["default"],o("df3c")["createPage"])},f2d4:function(e,a,o){"use strict";(function(e){var n=o("47a9");Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var t=n(o("7eb4")),r=n(o("7ca3")),i=n(o("ee10")),s=o("8f59");function l(e,a){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);a&&(n=n.filter((function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable}))),o.push.apply(o,n)}return o}function u(e){for(var a=1;a<arguments.length;a++){var o=null!=arguments[a]?arguments[a]:{};a%2?l(Object(o),!0).forEach((function(a){(0,r.default)(e,a,o[a])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):l(Object(o)).forEach((function(a){Object.defineProperty(e,a,Object.getOwnPropertyDescriptor(o,a))}))}return e}var g={data:function(){return{Info:"",loadFlag:!1,UserInfo:{user_nickname:"新用户",user_avatar:"https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/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:"",showLoginPopup:!1}},computed:(0,s.mapState)(["Config","StateCode","notice","plantformInfo","shopInfo","userInfo","hasLogin","newMsgNum"]),components:{guessYouLike:function(){Promise.all([o.e("common/vendor"),o.e("components/product-list")]).then(function(){return resolve(o("76b6"))}.bind(null,o)).catch(o.oe)},uParse:function(){Promise.all([o.e("common/vendor"),o.e("components/u-parse/u-parse")]).then(function(){return resolve(o("9733"))}.bind(null,o)).catch(o.oe)},uniBadge:function(){o.e("components/uni-badge").then(function(){return resolve(o("9bed"))}.bind(null,o)).catch(o.oe)},loginPopup:function(){Promise.all([o.e("common/vendor"),o.e("components/loginPopup")]).then(function(){return resolve(o("0c45"))}.bind(null,o)).catch(o.oe)}},onLoad:function(){var a=(0,i.default)(t.default.mark((function a(o){var n;return t.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,o.perm_id&&o.perm_key&&(n.$.setStorageSync("uid",o.perm_id),n.$.setStorageSync("ukey",decodeURIComponent(o.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 o=this.Config.URL.center_menu;a.$.request({url:o,data:{},loading:!1,ajaxCache:{timeout:this.Config.CACHE_EXPIRE,forceRefresh:!0},success:function(e,o,n,t){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,s.mapMutations)(["login","logout","getPlantformInfo","forceUserInfo","reloadUserResource","getUserInfo","showCartNum"])),{},{closeLoginPopup:function(){this.showLoginPopup=!1},skiupPage:function(a){this.hasLogin?e.navigateTo({url:a}):this.showLoginPopup=!0},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,o,n,t){if(a.$.stopPullDownRefresh(),200==o&&(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 o={},n=this.Config.URL.store.menu;if(n=this.Config.URL.center_menu,a.$.request({url:n,data:o,ajaxCache:{timeout:this.Config.CACHE_EXPIRE},success:function(e,o,n,t){a.Lang.standard?e.menu.type=2:e.menu.type=1,a.setData({PersonalCenterList:e.menu,orders:e.orders}),a.$.stopPullDownRefresh()}}),this.hasLogin){o={user_id:this.userInfo.user_id};a.$.request({url:this.Config.URL.user.signState,data:o,success:function(e,o,n,t){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,o,n,t){e.reloadUserResource((function(e){})),200==o?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(o){a.userInfo.Id,e.detail.encryptedData,e.detail.iv,o.code}})},selectAddress:function(e){if(this.hasLogin){this.$.gopage("/member/address/list")}else this.showLoginPopup=!0},goTabBar:function(e){this.$.goToTabBar(this,e.currentTarget.dataset.url)},goKefu:function(e){var a=this;this.hasLogin?this.forceUserInfo((function(e){var o=a.$.sprintf("/im/chat/chat?uid=%s",a.site_im);a.$.gopage(o)})):this.showLoginPopup=!0},cleanCache:function(a){var o=this;a.currentTarget.dataset.index,a.currentTarget.dataset.path;o.$.confirm(o.__("确定要清除缓存吗?"),(function(a){if(a.confirm){var n=e.getStorageSync("selang");o.$Socket.nclose(),o.$.storage.clear(),e.setStorageSync("selang",n);var t=o.$.storage.info();o.setData({currentSize:Math.round(100*t.currentSize)/100,limitSize:Math.round(t.limitSize/1024*100)/100}),o.$Socket.nclose(),o.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,o,n,t){for(var r in e){var i=r.replace("_","-");a.Lang.G[i]=Object.assign(a.Lang.G[i],e[r])}console.info(a.Lang.G)}})},distributionWeStore:function(e){this.hasLogin?this.$.gopage("/pagesub/westore/index"):this.showLoginPopup=!0},navigate:function(e,a){console.info(e),console.info(a),this.$.gopage("/pagesub/webpage/webpage?u="+encodeURIComponent(e))}})};a.default=g}).call(this,o("df3c")["default"])}},[["cd9f","common/runtime","common/vendor"]]]);