wanglizhong
2025-05-05 9b8a7157bb9c401de973a4107f74ff3e723ec156
1
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-my-login-login"],{"0995":function(t,n,e){"use strict";var i=e("663d"),a=e.n(i);a.a},4159:function(t,n,e){"use strict";e.r(n);var i=e("9684"),a=e("f040");for(var o in a)"default"!==o&&function(t){e.d(n,t,(function(){return a[t]}))}(o);e("0995");var s,r=e("f0c5"),u=Object(r["a"])(a["default"],i["b"],i["c"],!1,null,"4c67827a",null,!1,i["a"],s);n["default"]=u.exports},"5a04":function(t,n,e){var i=e("24fb");n=i(!1),n.push([t.i,"uni-page-body[data-v-4c67827a], .page[data-v-4c67827a]{background:#fff}.content[data-v-4c67827a]{width:80%;margin:20% 10%;justify-content:center}.content .logo[data-v-4c67827a]{width:50%;margin-bottom:10%}.content .inputView[data-v-4c67827a]{width:94%;padding:3%;border-bottom:1px solid #d6d6d6;justify-content:space-between}.content .inputView .input1[data-v-4c67827a]{width:98%;padding:1%;font-size:%?36?%}.content .inputView .input2[data-v-4c67827a]{width:48%;padding:1%;font-size:%?36?%}.content .inputView .btn[data-v-4c67827a]{width:45%;border-radius:5px;background:#9c1a72;color:#fff;font-size:%?32?%;justify-content:center;align-items:center}.content .inputView .btn.disable[data-v-4c67827a]{background:#999}.content .submitBtn[data-v-4c67827a]{background:#9c1a72;color:#fff;margin-top:5%}.content .submitBtn.green[data-v-4c67827a]{background:#09bb07}.content .submitBtn.disable[data-v-4c67827a]{background:#888}.content .tip[data-v-4c67827a]{margin-top:5%;color:#999;font-size:%?24?%}.loading[data-v-4c67827a]{width:100%;height:100%;background:#fff;position:fixed;top:0;left:0;z-index:10}body.?%PAGE?%[data-v-4c67827a]{background:#fff}",""]),t.exports=n},"663d":function(t,n,e){var i=e("5a04");"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var a=e("4f06").default;a("4125b4b6",i,!0,{sourceMap:!1,shadowMode:!1})},9684:function(t,n,e){"use strict";var i;e.d(n,"b",(function(){return a})),e.d(n,"c",(function(){return o})),e.d(n,"a",(function(){return i}));var a=function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("v-uni-view",{staticClass:"page"},[e("v-uni-view",{staticClass:"content"},[e("v-uni-image",{staticClass:"logo",attrs:{mode:"widthFix",src:"http://wx.966120.com.cn/img/966120logo.jpg"}}),e("v-uni-form",{staticStyle:{width:"100%"},on:{submit:function(n){arguments[0]=n=t.$handleEvent(n),t.login.apply(void 0,arguments)}}},[e("v-uni-view",{staticClass:"inputView"},[e("v-uni-input",{staticClass:"input1",attrs:{name:"phone",placeholder:"请输入您的手机号",type:"number",maxlength:"11"},on:{input:function(n){arguments[0]=n=t.$handleEvent(n),t.inputPhone.apply(void 0,arguments)}}})],1),e("v-uni-view",{staticClass:"inputView"},[e("v-uni-input",{staticClass:"input2",attrs:{name:"code",placeholder:"短信验证码",type:"number"}}),t.countdown>0?e("v-uni-view",{staticClass:"btn disable"},[t._v(t._s(t.countdown)+"s")]):e("v-uni-view",{staticClass:"btn",attrs:{"data-phone":t.phone},on:{click:function(n){arguments[0]=n=t.$handleEvent(n),t.checkPhone.apply(void 0,arguments)}}},[t._v("获取验证码")])],1),e("v-uni-button",{staticClass:"submitBtn",attrs:{"hover-class":"none","form-type":"submit"}},[t._v("登  录")])],1)],1)],1)},o=[]},f040:function(t,n,e){"use strict";e.r(n);var i=e("ff86"),a=e.n(i);for(var o in i)"default"!==o&&function(t){e.d(n,t,(function(){return i[t]}))}(o);n["default"]=a.a},ff86:function(t,n,e){"use strict";e("ac1f"),e("5319"),Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=e("28a8"),a={},o={data:function(){return{loading:!0,isGetPhone:!1,isGetUserInfo:!1,phone:"",countdown:0,isGettingSMS:!1}},onLoad:function(t){if(a.options=t,t.phone){var n={method:"User_Login",APPID:"GDS-0008-fDwr",LoginType:1,UserID:a?a.UserID:"",UserPhone:t.phone,UserSource:t.S},e=i.Sign_link(n);uni.request({url:"https://api.966120.com.cn/user/?"+e,success:function(t){1==t.data.result&&(uni.setStorageSync("userData",t.data),uni.switchTab({url:"/pages/index/index"}))}})}this.getGlobal(0)},methods:{getGlobal:function(t){var n=this;if(i.storage()){var e=i.storage();for(var o in e)a[o]=e[o]}else t<10?(t++,setTimeout((function(){n.getGlobal(t)}),500)):a=!1},getPhoneNumber:function(t){var n=this;"getPhoneNumber:ok"==t.target.errMsg&&(uni.showLoading({title:"授权中",mask:!0}),i.decrypt(t.target.encryptedData,t.target.iv).then((function(t){var e={UserID:a.UserID,UserPhone:t.phoneNumber};i.User_Login(0,1,e).then((function(t){uni.hideLoading(),uni.showToast({title:"授权成功!",icon:"success",mask:!0,duration:800}),uni.setStorageSync("userData",t),n.isGetPhone=!0,""!=t.UserPhone&&uni.switchTab({url:"/pages/index/index"})}),(function(){uni.hideLoading(),uni.showToast({title:"验证失败!",image:"/static/Warnig.png",mask:!0,duration:2500})}))})))},getUserInfo:function(t){var n=this;uni.showLoading({title:"授权中",mask:!0}),"getUserInfo:ok"==t.target.errMsg?i.decrypt(t.target.encryptedData,t.target.iv).then((function(t){uni.hideLoading(),uni.showToast({title:"授权成功!",icon:"success",mask:!0,duration:800});var e={wxOpenid:t.openId,wxUnionID:t.unionId,wxNickName:encodeURI(t.nickName),wxAvatarUrl:t.avatarUrl};n.isGetUserInfo=!0,n.getUserData(3,e)})):uni.hideLoading()},getUserData:function(t,n){var e={More:1,UserID:a.UserID};if(n)for(var o in n)e[o]=n[o];i.User_Login(0,t,e).then((function(t){1==t.result&&(uni.setStorageSync("userData",t),""!=t.UserPhone&&""!=t.UserAvatarUrl&&uni.switchTab({url:"/pages/index/index"}))}))},login:function(t){if(""==t.detail.value.code)return uni.showToast({title:"请输入验证码",image:"/static/Warning.png",mask:!0,duration:1500}),!1;var n={method:"User_Login",APPID:"GDS-0008-fDwr",LoginType:2,UserID:a?a.UserID:"",UserPhone:t.detail.value.phone,UserPhoneVerify:t.detail.value.code},e=i.Sign_link(n);uni.request({url:"https://api.966120.com.cn/user/?"+e,success:function(t){1==t.data.result?(uni.setStorageSync("userData",t.data),uni.showToast({title:"登陆成功",icon:"success",mask:!0,duration:1500}),setTimeout((function(){uni.switchTab({url:"/pages/index/index"})}),1500)):2==t.data.result&&uni.showToast({title:"验证码错误",image:"/static/Warning.png",mask:!0,duration:1500})}})},checkPhone:function(t){var n=t.currentTarget.dataset.phone.replace(/\s+/g,""),e=/(^0{0,1}1[3|4|5|6|7|8|9][0-9]{9}$)/,i=/(2341234)[0-9][0-9][0-9][0-9]$/gi;return""==n?(uni.showToast({title:"请输入手机号",image:"/static/Warning.png",duration:1500}),!1):e.test(n)||i.test(n)?void this.getSMS(t.currentTarget.dataset.phone):(uni.showToast({title:"不合法手机号",image:"/static/Warning.png",duration:1500}),!1)},getSMS:function(t){var n=this,e=59;this.countdown=e,this.isGettingSMS=!0;var o=setInterval((function(){e>0?(e--,n.countdown=e):(clearInterval(o),n.isGettingSMS=!1)}),1e3),s={method:"Send_SMS",APPID:"GDS-0008-fDwr",SendType:2,SendPhone:t,UserID:a?a.UserID:""},r=i.Sign_link(s);uni.request({url:"https://api.966120.com.cn/user/?"+r,success:function(t){}})},inputPhone:function(t){this.phone=t.detail.value}}};n.default=o}}]);