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
1ef34785
Commit
1ef34785
authored
Jun 15, 2020
by
郝聪敏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加充值克币动画
parent
ca35f130
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
6 deletions
+19
-6
popup.wpy
src/components/custom/popup.wpy
+4
-3
sign.wpy
src/components/custom/sign.wpy
+8
-1
index.wpy
src/pages/index.wpy
+7
-2
No files found.
src/components/custom/popup.wpy
View file @
1ef34785
...
...
@@ -15,7 +15,7 @@
</template>
<script>
import wepy from '@wepy/core';
let showMenusTimer = null;
wepy.component({
props: {
showMenus: {
...
...
@@ -34,7 +34,8 @@
watch: {
showMenus(v) {
if (!v) {
setTimeout(() => {
if (showMenusTimer) clearTimeout(showMenusTimer);
showMenusTimer = setTimeout(() => {
this.show = false;
}, 300);
} else {
...
...
@@ -61,7 +62,7 @@
created() {
let statusHeight = this.$app.$options.globalData.statusBarHeight || '';
statusHeight && (this.popupStyle = 'top:' + (statusHeight + 56) + 'px');
}
}
,
});
</script>
<style lang="less">
...
...
src/components/custom/sign.wpy
View file @
1ef34785
...
...
@@ -57,6 +57,7 @@
share: '/static/images/share@2x.png',
lottery: '/static/images/lottery@2x.png'
};
let addGoldTimer = null;
wepy.component({
store,
data: {
...
...
@@ -126,7 +127,13 @@
},
watch: {
isReceive(newVal, oldVal) {
this.addGold = true;
this.addGold = newVal;
if (newVal) {
if (addGoldTimer) clearTimeout(addGoldTimer);
addGoldTimer = setTimeout(() => {
this.$emit('resetAddGold');
}, 1000);
}
},
des(newVal, oldVal) {
if (this.type === 'gold') {
...
...
src/pages/index.wpy
View file @
1ef34785
...
...
@@ -171,7 +171,7 @@
<image v-if="!authmodal" @tap="showMenu(!showModal)" :src="userInfo.avatarUrl" mode="cover" class="userimage"></image>
</view>
<view>
<gold type="gold" :des="mainInfo && mainInfo.account && mainInfo.account.quantity || 0" :gold="sign" :isReceive="isReceive" @showCorn="cornModalShow"></gold>
<gold type="gold" :des="mainInfo && mainInfo.account && mainInfo.account.quantity || 0" :gold="sign" :isReceive="isReceive" @
resetAddGold="resetAddGold" @
showCorn="cornModalShow"></gold>
<sign type="sign" des="签到" :sign="sign" @sign-in="signIn"></sign>
<lottery type="lottery" des="抽奖" @getAwards="getAwards" @getUserInfo="getUserInfo" :authmodal="authmodal"></lottery>
<share type="share" des="分享"></share>
...
...
@@ -220,7 +220,7 @@
isReceive: false, // 是否显示领取克币动画
cornModal:false,
cornCode: '', //克币充值码
cornText:'',
cornText:'
充值码无效,请重新输入
',
cornTextShow: false,
},
...
...
@@ -420,6 +420,8 @@
if(data.code === 0){
//充值成功
this.cornModal = false;
this.mainInfo.account.quantity = data.accountCoins;
this.isReceive = true;
} else {
const msgindex = data.code+2;
this.cornText = msg[msgindex];
...
...
@@ -428,6 +430,9 @@
});
},
resetAddGold() {
this.isReceive = false;
}
},
async onLoad (options) {
// 获取分享人openid
...
...
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