wanglizhong
2025-05-05 41332c9a8b1164dba70930f93f6a67abad4fc7fd
1
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-my-login-login"],{"47d3":function(t,n,e){var i=e("24fb");n=i(!1),n.push([t.i,"uni-page-body[data-v-354b976e], .page[data-v-354b976e]{background:#fff}.content[data-v-354b976e]{width:80%;margin:20% 10%;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center}.content .logo[data-v-354b976e]{width:50%;margin-bottom:10%}.content .inputView[data-v-354b976e]{width:94%;padding:3%;border-bottom:1px solid #d6d6d6;-webkit-box-pack:justify;-webkit-justify-content:space-between;justify-content:space-between}.content .inputView .input1[data-v-354b976e]{width:98%;padding:1%;font-size:%?36?%}.content .inputView .input2[data-v-354b976e]{width:48%;padding:1%;font-size:%?36?%}.content .inputView .btn[data-v-354b976e]{width:45%;border-radius:5px;background:#9c1a72;color:#fff;font-size:%?32?%;-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;align-items:center}.content .inputView .btn.disable[data-v-354b976e]{background:#999}.content .submitBtn[data-v-354b976e]{background:#9c1a72;color:#fff;margin-top:5%}.content .submitBtn.green[data-v-354b976e]{background:#09bb07}.content .submitBtn.disable[data-v-354b976e]{background:#888}.content .submitBtn1[data-v-354b976e]{margin-top:5%}.content .submitBtn1.green[data-v-354b976e]{background:#09bb07}.content .submitBtn1.disable[data-v-354b976e]{background:#888}.content .tip[data-v-354b976e]{margin-top:5%;color:#999;font-size:%?24?%}.loading[data-v-354b976e]{width:100%;height:100%;background:#fff;position:fixed;top:0;left:0;z-index:10}body.?%PAGE?%[data-v-354b976e]{background:#fff}",""]),t.exports=n},7771:function(t,n,e){"use strict";e("ac1f"),e("5319"),Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=e("8ae4"),a={},o={data:function(){return{loading:!0,isGetPhone:!1,isGetUserInfo:!1,isOtherPhone:!0,phone:"",countdown:0,isGettingSMS:!1,loqinURL:"/pages/my/my"}},onLoad:function(t){a.options=t,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];if(this.loading=!0,uni.showLoading({title:"加载中"}),""!=a.userData.UserPhone){a.options.loqinURL||(a.options.loqinURL="/pages/index/index");var s=a.options.loqinURL.replace(/\@/g,"=").replace(/\|/g,"&");uni.reLaunch({url:s})}else this.loading=!1;uni.hideLoading()}else t<10?(t++,setTimeout((function(){n.getGlobal(t)}),500)):a=!1},OtherPhone:function(t){this.isOtherPhone=!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){console.log(t);var e={UserID:a.UserID,UserPhone:t.phoneNumber};i.User_Login(0,1,e).then((function(t){if(uni.hideLoading(),uni.showToast({title:"授权成功!",icon:"success",mask:!0,duration:800}),uni.setStorageSync("userData",t),n.isGetPhone=!0,""!=t.UserPhone){a.options.loqinURL||(a.options.loqinURL="/pages/index/index");var e=a.options.loqinURL.replace(/\@/g,"=").replace(/\|/g,"&").replace(/\#/g,"?");"/pages/order/list/list"==e||"/pages/index/index"==e||"/pages/my/my"==e?uni.switchTab({url:e}):uni.reLaunch({url:e})}}),(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){console.log(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){if(1==t.result&&(uni.setStorageSync("userData",t),""!=t.UserPhone&&""!=t.UserAvatarUrl)){a.options.loqinURL||(a.options.loqinURL="/pages/index/index");var n=a.options.loqinURL.replace(/\@/g,"=").replace(/\|/g,"&").replace(/\#/g,"?");"/pages/order/list/list"==n||"/pages/index/index"==n||"/pages/my/my"==n?uni.switchTab({url:n}):uni.reLaunch({url:n})}}))},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){console.log(t.data),1==t.data.result?(uni.setStorageSync("userData",t.data),uni.showToast({title:"登陆成功",icon:"success",mask:!0,duration:1500}),setTimeout((function(){a.options.loqinURL||(a.options.loqinURL="/pages/index/index");var t=a.options.loqinURL.replace(/\@/g,"=").replace(/\|/g,"&").replace(/\#/g,"?");"/pages/order/list/list"==t||"/pages/index/index"==t||"/pages/my/my"==t?uni.switchTab({url:t}):uni.reLaunch({url:t})}),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){console.log(t)}})},inputPhone:function(t){this.phone=t.detail.value}}};n.default=o},"923a":function(t,n,e){"use strict";e.r(n);var i=e("7771"),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},9733:function(t,n,e){"use strict";var i=e("e45f"),a=e.n(i);a.a},aec1:function(t,n,e){"use strict";e.r(n);var i=e("c590"),a=e("923a");for(var o in a)"default"!==o&&function(t){e.d(n,t,(function(){return a[t]}))}(o);e("9733");var s,r=e("f0c5"),u=Object(r["a"])(a["default"],i["b"],i["c"],!1,null,"354b976e",null,!1,i["a"],s);n["default"]=u.exports},c590:function(t,n,e){"use strict";var i,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=[];e.d(n,"b",(function(){return a})),e.d(n,"c",(function(){return o})),e.d(n,"a",(function(){return i}))},e45f:function(t,n,e){var i=e("47d3");"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var a=e("4f06").default;a("329b2696",i,!0,{sourceMap:!1,shadowMode:!1})}}]);