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.

11 lines
8.5 KiB

8 months ago
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["components/auth"],{"1d25":function(e,t,n){"use strict";n.r(t);var r=n("882d"),o=n.n(r);for(var a in r)["default"].indexOf(a)<0&&function(e){n.d(t,e,(function(){return r[e]}))}(a);t["default"]=o.a},"2d7a":function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"c",(function(){return o})),n.d(t,"a",(function(){}));var r=function(){var e=this,t=e.$createElement;e._self._c;e._isMounted||(e.e0=function(t){return t.stopPropagation(),e.$refs.show_info_item.close()})},o=[]},3778:function(e,t,n){"use strict";var r=n("52e2"),o=n.n(r);o.a},"52e2":function(e,t,n){},"882d":function(e,t,n){"use strict";(function(e){var r=n("47a9");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n("7eb4")),a=r(n("34cf")),i=r(n("ee10")),u=r(n("7ca3")),s=n("8f59");function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){(0,u.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var l={components:{},name:"auth",props:{needAuth:{type:Boolean,default:function(){return!1}},must:{type:Boolean,default:function(){return!1}},userMust:{type:Boolean,default:function(){return!0}},showAuth:{type:Boolean,default:function(){return!1}},type:{type:String,default:function(){return"phone"}},btn_text:{type:String,default:function(){return""}},haveGo:{type:Boolean,default:function(){return!0}}},computed:(0,s.mapState)({primaryColor:function(e){return e.config.configInfo.primaryColor},subColor:function(e){return e.config.configInfo.subColor},configInfo:function(e){return e.config.configInfo},commonOptions:function(e){return e.user.commonOptions},userInfo:function(e){return e.user.userInfo}}),created:function(){this.init()},data:function(){return{contentList:{userInfo:["尊贵的用户,获取授权是为了能更好的为你服务","立即授权"],phone:["尊贵的用户,登录后我们才能更好的为你服务","立即登录"],setting:["为了功能正常使用,你需要打开设置并开启获取相应权限","打开设置"]},pType:"",pMust:"",authTime:0,timer:null,subForm:{phone:"",short_code:""},subRule:[{name:"phone",checkType:"isMobile",errorMsg:"请输入手机号",regText:"手机号"},{name:"short_code",checkType:"isNotNull",errorMsg:"请输入短信验证码"}],infoForm:{nickName:"",avatarUrl:""},infoRule:[{name:"nickName",checkType:"isNotNull",errorMsg:"请输入用户昵称",regType:2},{name:"avatarUrl",checkType:"isNotNull",errorMsg:"请上传用户头像"}],lockTap:!1}},methods:f(f(f({},(0,s.mapActions)(["getUserInfo","getMineInfo","getAuthUserProfile","getAuthPhone"])),(0,s.mapMutations)(["updateConfigItem","updateUserItem"])),{},{init:function(){var e=this.type,t=this.must,n=this.showAuth;if(this.$set(this,"pType",e),this.$set(this,"pMust",t),n){var r="userInfo"===e?"show_info_item":"show_auth_item";this.$refs[r].open()}},toShowAuth:function(){var e=this.userInfo,t=e.id,n=void 0===t?0:t,r=e.phone,o=void 0===r?"":r;if(!n)return this.updateUserItem({key:"loginPage",val:"/pages/mine?type=1"}),void this.$util.goUrl({url:"/pages/login"});this.infoForm=this.$util.pick(this.userInfo,["nickName","avatarUrl"]);var a=o?"userInfo":"phone";this.$set(this,"pType",a);var i="show_info_item";o||(i="show_auth_item"),this.$refs[i].open()},authPhone:function(e){var t=this;return(0,i.default)(o.default.mark((function n(){var r,a,i,u;return o.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return r=t.pMust,n.next=3,t.getAuthPhone({e:e});case 3:if(a=n.sent,a){n.next=9;break}return t.go(r?2:1),n.abrupt("return",!1);case 9:if(i=t.userInfo.nickName,u=void 0===i?"":i,!u){n.next=13;break}return t.go(1),n.
;(global["webpackJsonp"] = global["webpackJsonp"] || []).push([
'components/auth-create-component',
{
'components/auth-create-component':(function(module, exports, __webpack_require__){
__webpack_require__('df3c')['createComponent'](__webpack_require__("9232"))
})
},
[['components/auth-create-component']]
]);