Commit 22886f97 authored by ziyu's avatar ziyu

improvement: 修改bug,优化

parent 18d15417
...@@ -269,7 +269,7 @@ ...@@ -269,7 +269,7 @@
isInnerDone: 'hide', isInnerDone: 'hide',
innerActivity: '', innerActivity: '',
isError: false, isError: false,
code: '' code: '',
}, },
methods: { methods: {
check() { check() {
...@@ -282,9 +282,9 @@ ...@@ -282,9 +282,9 @@
let detail = e.$wx.detail || {}; let detail = e.$wx.detail || {};
function goprize() { function goprize() {
updateUserPhone(detail).then(() => { updateUserPhone(detail).then(() => {
that.confirmRaff();
wx.setStorageSync('hasPhone', true); wx.setStorageSync('hasPhone', true);
that.hasPhone = true; that.hasPhone = true;
that.joinin();
}).catch(() => { }).catch(() => {
that.btnfont = '立即参与'; that.btnfont = '立即参与';
}); });
...@@ -371,6 +371,10 @@ ...@@ -371,6 +371,10 @@
this.code = ''; this.code = '';
}, },
checkCode () { checkCode () {
if(this.code === '') {
this.isError = true;
return;
}
checkInnerCode({code: this.code}).then(data => { checkInnerCode({code: this.code}).then(data => {
if (+data.checkCode === 0) { if (+data.checkCode === 0) {
this.closeModal(); this.closeModal();
...@@ -391,8 +395,8 @@ ...@@ -391,8 +395,8 @@
} }
}, },
watch: { watch: {
code(val) { code(val,oldval) {
if (!val.length && this.isError) { if (val!==oldval && this.isError) {
this.isError = false; this.isError = false;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment