公司小程序
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.

2 lines
7.1 KiB

(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/MineCenter/MineCenter"],{15:function(e,n,t){"use strict";t.r(n);var o=t(16),r=t.n(o);for(var a in o)"default"!==a&&function(e){t.d(n,e,(function(){return o[e]}))}(a);n["default"]=r.a},16:function(e,n,t){"use strict";(function(e){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o=a(t(4)),r=t(5);function a(e){return e&&e.__esModule?e:{default:e}}function i(e,n,t,o,r,a,i){try{var u=e[a](i),l=u.value}catch(c){return void t(c)}u.done?n(l):Promise.resolve(l).then(o,r)}function u(e){return function(){var n=this,t=arguments;return new Promise((function(o,r){var a=e.apply(n,t);function u(e){i(a,o,r,u,l,"next",e)}function l(e){i(a,o,r,u,l,"throw",e)}u(void 0)}))}}getApp().globalData.Define;var l=getApp().globalData.Player,c={mounted:function(){this.$refs.form1.setRules(this.rules)},data:function(){var e=this;return{player:l,isDateSelectShowing:!1,isShowLogoutModal:!1,rules:{headUrl:{type:"string",title:"头像",message:"",enableInput:!1,getValue:function(e){return""==e.headimgurl?"../../static/images/wode/touxiang_6.png":e.headimgurl},validator:function(e){}},name:{type:"string",title:"昵称",key:"name",message:"",enableInput:!1,getValue:function(e){return""==e.nickname?"没有获取到昵称":e.nickname},validator:function(e){}},sex:{type:"string",title:"性别",key:"sex",message:"",enableInput:!1,getValue:function(e){return 0==e.sex?"女":"男"},validator:function(e){}},phone:{type:"string",title:"手机号码",key:"phone",message:"",enableInput:!1,getValue:function(e){return e.phone},validator:function(e){}},birthday:{type:"string",title:"生日",key:"birthday",message:"未选择",enableInput:!1,getValue:function(e){return e.birthday},validator:function(e){}},profession:{type:"string",title:"职业",key:"occupation",message:"未填写",enableInput:!0,trigger:"blur",getValue:function(e){return e.occupation},validator:function(n){e.player.occupation=n.detail.value}}},form_tile_title:{width:"170rpx",height:"37rpx",fontSize:26,fontWeight:500,color:"black"},startTime:[1900,1,1],endTime:2022,currentTime:this.getCurrentDateSelectTime()}},methods:{onBackTouched:function(){e.navigateBack({})},getCurrentDateSelectTime:function(){var e=l;if(""==e.birthday)return null;var n=e.birthday,t=n.split("-");return[parseInt(t[0]),parseInt(t[1]),parseInt(t[2])]},onOpenDateSelect:function(){this.isDateSelectShowing=!0},onDateSelectConfirm:function(e){console.log(e),this.isDateSelectShowing=!1;var n=parseInt(e.a),t=parseInt(e.b),o=parseInt(e.c),r=n+"-"+t+"-"+o;this.player.birthday=r,this.currentTime=[n,t,o]},onDateSelectCanceled:function(){this.isDateSelectShowing=!1},onTouchOneItem:function(e){console.log(e),"birthday"!=e||(this.isDateSelectShowing=!0)},onBlurCallback:function(e,n){var t=this.rules[e];null!=t&&t.validator(n)},onEditPlayerIntro:function(e){console.log(e),this.player.introduction=e.detail.value},doConfirm:function(){var n=this;return u(o.default.mark((function t(){var a,i;return o.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return console.log("You just confirmed!"),a={birthday:n.player.birthday,introduction:n.player.introduction,occupation:n.player.occupation},e.showLoading({}),t.next=5,(0,r.post)("users/updateselfinfo",a);case 5:i=t.sent,console.log(i),e.hideLoading(),i.length>1&&e.navigateBack({});case 9:case"end":return t.stop()}}),t)})))()},doLoginOut:function(){console.log("You just loginout!"),this.isShowLogoutModal=!0},onTouchToGetPhone:function(n){var t=this;return u(o.default.mark((function a(){var i,u,l,c,s;return o.default.wrap((function(o){while(1)switch(o.prev=o.next){case 0:if(console.log("获取手机号码的返回:",n),i=n.detail.code,i){o.next=5;break}return e.showToast({title:"您拒绝了手机获取授权"}),o.abrupt("return");case 5:return e.showLoading(),o.next=8,(0,r.post)("users/wechatbindmobile",{code:i});case 8:if(u=o.sent,e.hideLoading(),!(u.length<=1)){o.next=12;break}return o.abrupt("return");case 12:if(l=u[1],i=l.data.code,0==i){o.next=16;break}return o.abrupt("return");case 16:c=l.data.data,console.log(c),s=c.phonenumber,t.player.phone=s;case 20:case"end":return o.stop()}}),a)})))()},onConfirmLogout:function(){e.clearStorageSync();var n=getApp().globalData.Player;n.clear(),this.isShowLogoutModal=!1,e.showToast({title:"退出成功"}),e.navigateBack({})},onCancelLogout:function(){this.isShowLogoutModal=!1}}};n.default=c}).call(this,t(0)["default"])},17:function(e,n,t){},206:function(e,n,t){"use strict";(function(e){t(3);o(t(2));var n=o(t(207));function o(e){return e&&e.__esModule?e:{default:e}}wx.__webpack_require_UNI_MP_PLUGIN__=t,e(n.default)}).call(this,t(0)["createPage"])},207:function(e,n,t){"use strict";t.r(n);var o=t(49),r=t(15);for(var a in r)"default"!==a&&function(e){t.d(n,e,(function(){return r[e]}))}(a);t(208);var i,u=t(1),l=Object(u["a"])(r["default"],o["b"],o["c"],!1,null,"048f3646",null,!1,o["a"],i);l.options.__file="pages/MineCenter/MineCenter.vue",n["default"]=l.exports},208:function(e,n,t){"use strict";var o=t(17),r=t.n(o);r.a},49:function(e,n,t){"use strict";var o;t.d(n,"b",(function(){return r})),t.d(n,"c",(function(){return a})),t.d(n,"a",(function(){return o}));try{o={uNavbar:function(){return Promise.all([t.e("common/vendor"),t.e("uni_modules/uview-ui/components/u-navbar/u-navbar")]).then(t.bind(null,489))},uLine:function(){return Promise.all([t.e("common/vendor"),t.e("uni_modules/uview-ui/components/u-line/u-line")]).then(t.bind(null,490))},uForm:function(){return Promise.all([t.e("common/vendor"),t.e("uni_modules/uview-ui/components/u-form/u-form")]).then(t.bind(null,491))},uFormItem:function(){return Promise.all([t.e("common/vendor"),t.e("uni_modules/uview-ui/components/u-form-item/u-form-item")]).then(t.bind(null,492))},uGap:function(){return Promise.all([t.e("common/vendor"),t.e("uni_modules/uview-ui/components/u-gap/u-gap")]).then(t.bind(null,493))},minPicker:function(){return t.e("components/min-picker/min-picker").then(t.bind(null,494))},uModal:function(){return Promise.all([t.e("common/vendor"),t.e("uni_modules/uview-ui/components/u-modal/u-modal")]).then(t.bind(null,495))}}}catch(i){if(-1===i.message.indexOf("Cannot find module")||-1===i.message.indexOf(".vue"))throw i;console.error(i.message),console.error("1. 排查组件名称拼写是否正确"),console.error("2. 排查组件是否符合 easycom 规范,文档:https://uniapp.dcloud.net.cn/collocation/pages?id=easycom"),console.error("3. 若组件不符合 easycom 规范,需手动引入,并在 components 中注册该组件")}var r=function(){var e=this,n=e.$createElement,t=(e._self._c,e.__map(e.rules,(function(n,t){var o=e.__get_orig(n),r=n.getValue(e.player),a="headUrl"==t?n.getValue(e.player):null,i="headUrl"!=t&&"phone"==t?n.getValue(e.player):null,u="headUrl"!=t&&"phone"==t&&""!=i?n.getValue(e.player):null,l="headUrl"!=t&&"phone"!=t&&n.enableInput?n.getValue(e.player):null,c="headUrl"==t||"phone"==t||n.enableInput?null:n.getValue(e.player),s="headUrl"==t||"phone"==t||n.enableInput||""==c?null:n.getValue(e.player);return{$orig:o,g0:r,g1:a,g2:i,g3:u,g4:l,g5:c,g6:s}})));e.$mp.data=Object.assign({},{$root:{l0:t}})},a=[];r._withStripped=!0}},[[206,"common/runtime","common/vendor"]]]);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/MineCenter/MineCenter.js.map