页面回退刷新
This commit is contained in:
@@ -84,6 +84,7 @@ $.config = {router: false}
|
||||
<script type="text/javascript" src="../../config.js"></script>
|
||||
<script type="text/javascript" src="../../js/axios.min.js"></script>
|
||||
<script type="text/javascript" src="../../js/axiosPlugin.js"></script>
|
||||
<script type="text/javascript" src="../../js/plus.info.js" ></script>
|
||||
<script>
|
||||
|
||||
timer = {
|
||||
@@ -147,12 +148,40 @@ new Vue({
|
||||
$(".waiting").show();
|
||||
$(".sendCode").hide();
|
||||
timer.start();
|
||||
axios.post("/rest/user/sendMobileCode", {
|
||||
mobile:this.mobile, type:'binding'
|
||||
})
|
||||
.then(function (response) {
|
||||
var resData = response.data;
|
||||
if (resData.status) {
|
||||
$.toast(resData.message);
|
||||
} else {
|
||||
$.toast(resData.message);
|
||||
timer.cancel()
|
||||
}
|
||||
})
|
||||
.catch(function (error) {
|
||||
$.toast(error);
|
||||
});
|
||||
}
|
||||
},
|
||||
// 绑定手机
|
||||
binding: function() {
|
||||
if (this.checkMobile() && this.checkSmsCode()) {
|
||||
|
||||
axios.post("/rest/user/bindMobile", {
|
||||
mobile:this.mobile, smsCode:this.smsCode, province:province, city:city, region:region, pushClientId:getPushInfo()
|
||||
})
|
||||
.then(function (response) {
|
||||
var resData = response.data;
|
||||
if (resData.status) {
|
||||
$.toast(resData.message);
|
||||
} else {
|
||||
$.toast(resData.message);
|
||||
}
|
||||
})
|
||||
.catch(function (error) {
|
||||
$.toast(error);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user