Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
mini-program-wepy
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ui
mini-program-wepy
Commits
438e51d5
Commit
438e51d5
authored
Jun 11, 2020
by
ziyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improvement: 优化
parent
22886f97
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
2 deletions
+15
-2
raffle.wpy
src/pages/raffle.wpy
+15
-2
No files found.
src/pages/raffle.wpy
View file @
438e51d5
...
...
@@ -238,10 +238,10 @@
<view>
<input type="text" class="inner-input" v-model="code">
</view>
<view class="error-text" v-show="isError">
邀请码错误,请重新输入
</view>
<view class="error-text" v-show="isError">
{{errorText}}
</view>
<view class="inner-footer">
<view class="cancel button" bindtap="closeModal">内测结束再抽</view>
<view class="confirm button" bindtap="checkCode">
确定
</view>
<view class="confirm button" bindtap="checkCode">
{{errorBtn}}
</view>
</view>
</view>
</view>
...
...
@@ -270,6 +270,8 @@
innerActivity: '',
isError: false,
code: '',
errorText:'',
errorBtn:'确定',
},
methods: {
check() {
...
...
@@ -372,16 +374,27 @@
},
checkCode () {
if(this.code === '') {
this.errorText = '请输入邀请码';
this.isError = true;
return;
}
if(this.errorBtn !== '确定') {
return;
}
this.errorBtn = '验证中...';
checkInnerCode({code: this.code}).then(data => {
this.errorBtn = '确定';
if (+data.checkCode === 0) {
this.closeModal();
this.confirmRaff();
} else {
let index = data.checkCode+2;
let mesg = ['邀请码错误,请重新输入','该邀请码已被使用,请重新输入']
this.errorText = mesg[index];
this.isError = true;
}
}).catch(()=>{
this.errorBtn = '确定';
});
}
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment