页面回退刷新

This commit is contained in:
尹吉欢
2018-03-30 13:11:15 +08:00
parent 23347d4dd2
commit f06397e90c
4 changed files with 89 additions and 12 deletions
+30 -1
View File
@@ -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);
});
}
}