You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
7.2 KiB
1 line
7.2 KiB
3 months ago
|
require('../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/users/user_info/index"],{"4d6a":function(t,i,e){"use strict";(function(t){var n=e("47a9");Object.defineProperty(i,"__esModule",{value:!0}),i.default=void 0;var a=e("77d7"),r=e("a230"),s=e("7ba4"),o=e("8f59"),u=(n(e("bc59")),n(e("cef6"))),c={components:{tuiModal:function(){e.e("components/tui-modal/index").then(function(){return resolve(e("ac66"))}.bind(null,e)).catch(e.oe)},NavBar:function(){e.e("components/NavBar").then(function(){return resolve(e("5962"))}.bind(null,e)).catch(e.oe)}},mixins:[u.default],data:function(){return{isCancellation:!1,userInfo:{},loginType:"h5",userIndex:0,switchUserInfo:[],isAuto:!1,isShowAuth:!1,canvasWidth:"",canvasHeight:"",canvasStatus:!1,district:[],multiArray:[],multiIndex:[0,0,0],valueRegion:[0,0,0],region:["省","市","区"],mp_is_new:this.$Cache.get("MP_VERSION_ISNEW")||!1}},computed:(0,o.mapGetters)(["isLogin"]),watch:{isLogin:{handler:function(t,i){},deep:!0}},onLoad:function(){this.isLogin?this.getUserInfo():this.getIsLogin()},onShow:function(){t.removeStorageSync("form_type_cart")},methods:{getIsLogin:function(){(0,s.toLogin)()},addressList:function(){this.getCityList()},getCityList:function(){var t=this,i=this;(0,r.getCity)().then((function(e){t.district=e.data,i.initialize()}))},initialize:function(){var t=[],i=[],e=[];if(this.district.length){var n=this.district[0].c||[],a=n.length&&n[0].c||[];this.district.forEach((function(i){t.push(i.n)})),n.forEach((function(t){i.push(t.n)})),a.forEach((function(t){e.push(t.n)})),this.multiArray=[t,i,e]}},bindRegionChange:function(t,i){var e=this.multiIndex,n=this.district[e[0]]||{c:[]},a=n.c[e[1]]||{v:0},r=this.multiArray,s=t.detail.value;this.region=[r[0][s[0]],r[1][s[1]],r[2][s[2]]],this.userInfo.register_extend_info[i].value=a.v,this.userInfo.register_extend_info[i].province=this.region[0],this.userInfo.register_extend_info[i].city=this.region[1],this.userInfo.register_extend_info[i].district=this.region[2],this.valueRegion=[0,0,0],this.initialize()},bindMultiPickerColumnChange:function(t){var i=t.detail.column,e=t.detail.value,n=this.district[e]||{c:[]},a=this.multiArray,r=this.multiIndex;switch(r[i]=e,i){case 0:var s=n.c[0]||{c:[]};a[1]=n.c.map((function(t){return t.n})),a[2]=s.c.map((function(t){return t.n}));break;case 1:var o=this.district[r[0]].c[r[1]].c||[];a[2]=o.map((function(t){return t.n}));break;case 2:break}this.$set(this.multiArray,0,a[0]),this.$set(this.multiArray,1,a[1]),this.$set(this.multiArray,2,a[2]),this.multiIndex=r},radioChange:function(t,i){this.userInfo.register_extend_info[i].value=t.detail.value},bindDateChange:function(t,i){this.userInfo.register_extend_info[i].value=t.target.value},onLoadFun:function(){this.getUserInfo(),this.isShowAuth=!1},authColse:function(t){this.isShowAuth=t},Setting:function(){t.openSetting({success:function(t){}})},switchAccounts:function(i){var e=this,n=this.switchUserInfo[i],a=this;return a.userIndex=i,a.switchUserInfo.length<=1||(void 0===n?a.$util.Tips({title:"切换的账号不存在"}):void("h5"===n.user_type?(t.showLoading({title:"正在切换中"}),(0,r.switchH5Login)().then((function(i){t.hideLoading(),a.$store.commit("LOGIN",{token:i.data.token,time:e.$Cache.strTotime(i.data.expires_time)-e.$Cache.time()}),a.getUserInfo()})).catch((function(i){return t.hideLoading(),a.$util.Tips({title:i})}))):(a.$store.commit("LOGOUT"),t.showLoading({title:"正在切换中"}),this.getIsLogin())))},getUserInfo:function(){var t=this;(0,a.getUserInfo)().then((function(i){i.data.register_extend_info.forEach((function(t){"radio"==t.format?t.value="0":(t.value="","address"==t.format&&(t.province="",t.city="",t.district=""))})),i.data.register_extend_info.forEach((function(e){i.data.extend_info.forEach((function(i){if(e.info===i.info&&(e.value=i.value,"address"==e.format)){var n=[i.province,i.city,i.district];t.$set(t,"region",n)}}))})),t.$set(t,"userInfo",i.data);for(var e=i.data.switchUserInfo||[],n=0;n<e.length;n++)e[n].uid==t.userInfo.uid&&(t.userIndex=n);t.$set(t,"switchUserInfo",e)}))},uploadpic
|