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
99228c2b
Commit
99228c2b
authored
Jun 23, 2020
by
ziyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improvement: 活动弹窗功能
parent
163d32b4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
video.wpy
src/components/custom/video.wpy
+1
-1
index.wpy
src/pages/index.wpy
+4
-4
search.wpy
src/pages/search.wpy
+1
-1
No files found.
src/components/custom/video.wpy
View file @
99228c2b
...
@@ -33,7 +33,7 @@
...
@@ -33,7 +33,7 @@
<van-loading slot="loading" type="spinner" size="20" vertical/>
<van-loading slot="loading" type="spinner" size="20" vertical/>
</van-image>
</van-image>
<view class="rightcont" v-show="item.id > 0">
<view class="rightcont" v-show="item.id > 0">
<view class="info">奖品剩余: {{item.stock}}
/{{item.totalStock}}
</view>
<view class="info">奖品剩余: {{item.stock}}</view>
<view class="info">中奖概率: {{item.probability}}</view>
<view class="info">中奖概率: {{item.probability}}</view>
<view class="progress">
<view class="progress">
<view class="text">{{item.progress}}</view>
<view class="text">{{item.progress}}</view>
...
...
src/pages/index.wpy
View file @
99228c2b
...
@@ -221,7 +221,7 @@
...
@@ -221,7 +221,7 @@
<!--活动图片弹窗-->
<!--活动图片弹窗-->
<van-popup show="{{ avtivityModal }}" bind:close="ModalClose" round closeable>
<van-popup show="{{ avtivityModal }}" bind:close="ModalClose" round closeable>
<view class="img-wrapper">
<view class="img-wrapper">
<van-image use-loading-slot src="{{ mainInfo.activity }}" width="400rpx" fit="widthFix" radius="10rpx">
<van-image use-loading-slot src="{{ mainInfo.activity
&& mainInfo.activity.link_url
}}" width="400rpx" fit="widthFix" radius="10rpx">
<van-loading slot="loading" type="spinner" size="30" vertical />
<van-loading slot="loading" type="spinner" size="30" vertical />
</van-image>
</van-image>
</view>
</view>
...
@@ -407,14 +407,14 @@
...
@@ -407,14 +407,14 @@
this.mainInfo = await getMainInfo();
this.mainInfo = await getMainInfo();
this.sign = this.mainInfo && this.mainInfo.signin;
this.sign = this.mainInfo && this.mainInfo.signin;
wx.setStorageSync('hasPhone', this.mainInfo.phone);
wx.setStorageSync('hasPhone', this.mainInfo.phone);
const
show = wx.getStorageSync('hasShowActivity
');
const
activityId = wx.getStorageSync('activityId
');
if (this.mainInfo && this.mainInfo.innerActivity) {
if (this.mainInfo && this.mainInfo.innerActivity) {
wx.setStorageSync('innerActivity', this.mainInfo.innerActivity);
wx.setStorageSync('innerActivity', this.mainInfo.innerActivity);
} else {
} else {
wx.setStorageSync('innerActivity', '');
wx.setStorageSync('innerActivity', '');
}
}
// 弹窗有多个,展示顺序 1、活动弹窗 2、邀请好友 3、购买获得克币 4、开奖宝箱
// 弹窗有多个,展示顺序 1、活动弹窗 2、邀请好友 3、购买获得克币 4、开奖宝箱
if(this.mainInfo.activity &&
!show
) {
if(this.mainInfo.activity &&
this.mainInfo.activity.id && this.mainInfo.activity.id !== +activityId
) {
this.avtivityModal = true;
this.avtivityModal = true;
} else if (this.mainInfo.inviteRecord && this.mainInfo.inviteRecord.length) {
} else if (this.mainInfo.inviteRecord && this.mainInfo.inviteRecord.length) {
this.showModal = 1;
this.showModal = 1;
...
@@ -455,7 +455,7 @@
...
@@ -455,7 +455,7 @@
ModalClose() {
ModalClose() {
this.cornModal && (this.cornModal = false);
this.cornModal && (this.cornModal = false);
if(this.avtivityModal) {
if(this.avtivityModal) {
wx.setStorageSync('
hasShowActivity', 1
);
wx.setStorageSync('
activityId', this.mainInfo.activity.id
);
this.avtivityModal = false;
this.avtivityModal = false;
if (this.mainInfo.inviteRecord && this.mainInfo.inviteRecord.length) {
if (this.mainInfo.inviteRecord && this.mainInfo.inviteRecord.length) {
this.showModal = 1;
this.showModal = 1;
...
...
src/pages/search.wpy
View file @
99228c2b
...
@@ -98,7 +98,7 @@
...
@@ -98,7 +98,7 @@
</script>
</script>
<config>
<config>
{
{
navigationBarTitleText: '
Luckii
',
navigationBarTitleText: '
搜索
',
"usingComponents": {
"usingComponents": {
"van-field": "../components/vant/field/index",
"van-field": "../components/vant/field/index",
"van-image": "../components/vant/image/index",
"van-image": "../components/vant/image/index",
...
...
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