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
101ca0a1
Commit
101ca0a1
authored
May 27, 2020
by
ziyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improvement: ui优化
parent
59228abc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
5 deletions
+12
-5
raffleProbability.js
src/common/raffleProbability.js
+4
-0
openAnimation.wpy
src/components/custom/openAnimation.wpy
+6
-5
prize.wpy
src/pages/prize.wpy
+2
-0
No files found.
src/common/raffleProbability.js
View file @
101ca0a1
...
...
@@ -8,6 +8,10 @@ function getCommonDivisor(FirstNum,SecondNum) {
function
getProbability
(
quantity
,
coinQuantity
)
{
//如果用户克币数是0
if
(
quantity
==
0
)
{
return
'
0/
'
+
coinQuantity
;
}
var
divisor
=
getCommonDivisor
(
quantity
,
coinQuantity
);
var
value
=
quantity
/
divisor
;
var
value2
=
coinQuantity
/
divisor
;
...
...
src/components/custom/openAnimation.wpy
View file @
101ca0a1
...
...
@@ -57,7 +57,6 @@
},
computed: {
isWin() {
console.log('this.joinRecord.status.value', this.joinRecord);
if (!this.joinRecord.id) return false;
return +this.joinRecord.status.value === 3;
}
...
...
@@ -90,10 +89,12 @@
go() {
this.showAnimation = false;
//如果得奖了走
let id = 7;
wx.navigateTo({url:'/pages/prize?joinRecordId='+id})
//如果没得奖走
//wx.navigateTo({url:'/pages/myraffles'})
if(this.isWin) {
let id = 7;
wx.navigateTo({url:'/pages/prize?joinRecordId='+id})
} else {
wx.navigateTo({url:'/pages/myraffles'})
}
}
},
created() {
...
...
src/pages/prize.wpy
View file @
101ca0a1
...
...
@@ -63,6 +63,8 @@
}
</style>
<template>
<!--解决wepy打包之后picker没有toolbar的问题-->
<import src="../components/vant/picker/toolbar.wxml" />
<view class="prize-wrapper">
<view class="prize-top">
<van-image use-loading-slot src="{{prize.photoUrl}}" class="img" width="400rpx" height="400rpx" radius="10rpx">
...
...
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