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
1d6691a9
Commit
1d6691a9
authored
Jun 15, 2020
by
ziyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improvement: 修改bug
parent
bb711080
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
16 additions
and
9 deletions
+16
-9
raffleProbability.js
src/common/raffleProbability.js
+1
-1
activityList.wpy
src/components/custom/activityList.wpy
+9
-6
index.wpy
src/pages/index.wpy
+1
-1
prize.wpy
src/pages/prize.wpy
+1
-1
raffle.wpy
src/pages/raffle.wpy
+4
-0
No files found.
src/common/raffleProbability.js
View file @
1d6691a9
...
@@ -16,7 +16,7 @@ function getProbability (quantity, coinQuantity) {
...
@@ -16,7 +16,7 @@ function getProbability (quantity, coinQuantity) {
var
value2
=
coinQuantity
/
divisor
;
var
value2
=
coinQuantity
/
divisor
;
// 如果分子比分母大说明中奖概率是100%,那么返回中奖概率
// 如果分子比分母大说明中奖概率是100%,那么返回中奖概率
if
(
value
>=
value2
)
{
if
(
value
>=
value2
)
{
return
coinQuantity
+
'
/
'
+
coinQuantity
;
return
'
100%
'
;
}
else
{
}
else
{
return
value
+
'
/
'
+
value2
;
return
value
+
'
/
'
+
value2
;
}
}
...
...
src/components/custom/activityList.wpy
View file @
1d6691a9
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<swiper
<swiper
class="list-wrapper"
class="list-wrapper"
vertical="{{true}}"
vertical="{{true}}"
circular="{{
tru
e}}"
circular="{{
fals
e}}"
display-multiple-items="{{activityDisplayItems}}"
display-multiple-items="{{activityDisplayItems}}"
bindchange="onActivityChange"
bindchange="onActivityChange"
autoplay="{{isAuto}}"
autoplay="{{isAuto}}"
...
@@ -45,11 +45,14 @@
...
@@ -45,11 +45,14 @@
onActivityChange(e) {
onActivityChange(e) {
const lastIndex = this.list.length - this.activityDisplayItems;
const lastIndex = this.list.length - this.activityDisplayItems;
if (e.$wx.detail.current === lastIndex) {
if (e.$wx.detail.current === lastIndex) {
this.isActiveDone = 'anima';
this.isAuto = false;
setTimeout(() => {
//当最后一个出来的时候等一秒再消失
this.isActiveDone = 'anima hide';
setTimeout(()=>{
this.isAuto = false;
this.isActiveDone = 'anima';
}, 2000);
setTimeout(() => {
this.isActiveDone = 'anima hide';
}, 2000);
},2000)
}
}
}
}
}
}
...
...
src/pages/index.wpy
View file @
1d6691a9
...
@@ -470,10 +470,10 @@
...
@@ -470,10 +470,10 @@
this.videoList = await getPrizeList(options.prizeId);
this.videoList = await getPrizeList(options.prizeId);
},
},
async onShow() {
async onShow() {
this.getMainInfo();
let join = wx.getStorageSync('userJoin');
let join = wx.getStorageSync('userJoin');
if (join === 1) {
if (join === 1) {
wx.removeStorageSync('userJoin');
wx.removeStorageSync('userJoin');
this.getMainInfo();
this.showActivity();
this.showActivity();
}
}
}
}
...
...
src/pages/prize.wpy
View file @
1d6691a9
...
@@ -79,7 +79,7 @@
...
@@ -79,7 +79,7 @@
<view class="address-cont">
<view class="address-cont">
<van-field value="{{name}}" data-form="name" placeholder="收货人" bind:input ="setValue"></van-field>
<van-field value="{{name}}" data-form="name" placeholder="收货人" bind:input ="setValue"></van-field>
<van-field value="{{phone}}" data-form="phone" placeholder="手机号码" bind:input ="setValue"></van-field>
<van-field value="{{phone}}" data-form="phone" placeholder="手机号码" bind:input ="setValue"></van-field>
<van-field value="{{idNumber}}" data-form="idNumber" placeholder="收货人身份证号" bind:input ="setValue"></van-field>
<van-field value="{{idNumber}}" data-form="idNumber" placeholder="收货人身份证号
(应监管要求,必须填写)
" bind:input ="setValue"></van-field>
<van-field value="{{cityValue}}" placeholder="所在地区" bindtap="onClose" is-link readonly></van-field>
<van-field value="{{cityValue}}" placeholder="所在地区" bindtap="onClose" is-link readonly></van-field>
<van-field value="{{address}}" data-form="address" placeholder="详细地址:如街道、小区、门牌号、楼栋号等" bind:input ="setValue"></van-field>
<van-field value="{{address}}" data-form="address" placeholder="详细地址:如街道、小区、门牌号、楼栋号等" bind:input ="setValue"></van-field>
</view>
</view>
...
...
src/pages/raffle.wpy
View file @
1d6691a9
...
@@ -319,6 +319,10 @@
...
@@ -319,6 +319,10 @@
await register(store.state.userInfo);
await register(store.state.userInfo);
wx.setStorageSync('isRegister', true);
wx.setStorageSync('isRegister', true);
}
}
if(!this.batchId) {
Notify({message: '数据加载中,请稍后重试!'});
return;
}
this.btnfont = '参与中...';
this.btnfont = '参与中...';
confirmRaffle({batchId: this.batchId}).then(data => {
confirmRaffle({batchId: this.batchId}).then(data => {
this.btnfont = '立即参与';
this.btnfont = '立即参与';
...
...
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