|
@@ -65,26 +65,27 @@ export default {
|
|
|
that.$refs.toast.show({model:'warn',label:'请输入手机号'})
|
|
|
return
|
|
|
}
|
|
|
- that.yzmvar.text="已发送";
|
|
|
- setTimeout(function(){
|
|
|
- that.yzmvar.text="发送验证码";
|
|
|
- },15000)
|
|
|
- // myRequest({
|
|
|
- // url: "/api/login/sendCode",
|
|
|
- // method:'get',
|
|
|
- // data:{mobile:that.reqData.mobile}
|
|
|
- // }).then(res => {
|
|
|
- // console.log(res.data)
|
|
|
- // if (res.data.code == 200) {
|
|
|
- // that.$refs.toast.show({model:'success',label:res.data.msg})
|
|
|
- // that.yzmvar.text="已发送";
|
|
|
- // setTimeout(function(){
|
|
|
- // that.yzmvar.text="发送验证码";
|
|
|
- // },15000)
|
|
|
- // }else{
|
|
|
- // that.$refs.toast.show({model:'error',label:res.data.msg})
|
|
|
- // }
|
|
|
- // })
|
|
|
+ uni.request({
|
|
|
+ url: "https://apitest.yitutianxia.com/common/SendSms?mobile="+that.reqData.mobile,
|
|
|
+ method: "get",
|
|
|
+ data:{},
|
|
|
+ dataType:'json',
|
|
|
+ success : function(res) {
|
|
|
+ console.log(res)
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ that.$refs.toast.show({model:'success',label:res.data.msg})
|
|
|
+ that.yzmvar.text="已发送";
|
|
|
+ setTimeout(function(){
|
|
|
+ that.yzmvar.text="发送验证码";
|
|
|
+ },15000)
|
|
|
+ }else{
|
|
|
+ that.$refs.toast.show({model:'error',label:res.data.msg})
|
|
|
+ }
|
|
|
+ },
|
|
|
+ error : function(e) {
|
|
|
+ alert("网络异常,请重试");
|
|
|
+ }
|
|
|
+ });
|
|
|
},
|
|
|
},
|
|
|
}
|