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
d5cc1861
Commit
d5cc1861
authored
Jun 08, 2020
by
ziyu
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of git.quantgroup.cn:ui/mini-program-wepy into feature/animation
parents
c6c5d9ae
f7bb2b98
Changes
17
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
156 additions
and
142 deletions
+156
-142
app.wpy
src/app.wpy
+4
-2
wxRequest.js
src/common/wxRequest.js
+2
-2
network.wpy
src/components/custom/network.wpy
+7
-6
openAnimation.wpy
src/components/custom/openAnimation.wpy
+10
-9
popup.wpy
src/components/custom/popup.wpy
+4
-3
prizeList.wpy
src/components/custom/prizeList.wpy
+6
-5
sharedPopup.wpy
src/components/custom/sharedPopup.wpy
+6
-5
sign.wpy
src/components/custom/sign.wpy
+18
-17
dialog.js
src/components/vant/dialog/dialog.js
+1
-0
notify.js
src/components/vant/notify/notify.js
+1
-1
test.js
src/mixins/test.js
+0
-18
help.wpy
src/pages/help.wpy
+4
-4
index.wpy
src/pages/index.wpy
+13
-12
myraffles.wpy
src/pages/myraffles.wpy
+11
-10
prize.wpy
src/pages/prize.wpy
+20
-20
raffle.wpy
src/pages/raffle.wpy
+27
-28
common.less
src/style/common.less
+22
-0
No files found.
src/app.wpy
View file @
d5cc1861
<style>
<style lang="less">
@import "./style/common.less";
page {
page {
font-family: 'PingFangSC-Regular',monospace;
font-family: 'PingFangSC-Regular',monospace;
width:100%;
width:100%;
height:100%;
height:100%;
background-color:#F1F1F1;
background-color:@greyback;
color:@fontcolor;
}
}
</style>
</style>
<script>
<script>
...
...
src/common/wxRequest.js
View file @
d5cc1861
...
@@ -41,10 +41,10 @@ const request = async (url, options) => {
...
@@ -41,10 +41,10 @@ const request = async (url, options) => {
if
(
res
.
data
.
code
===
2000
)
{
if
(
res
.
data
.
code
===
2000
)
{
return
res
.
data
.
data
;
return
res
.
data
.
data
;
}
}
Notify
({
message
:
'
服务器异常,请稍后重试
'
,
background
:
'
#FF5D15
'
,
safeAreaInsetTop
});
Notify
({
message
:
'
服务器异常,请稍后重试
'
,
safeAreaInsetTop
});
throw
new
Error
(
res
.
data
.
msg
||
'
服务器异常,请求url:
'
+
url
);
throw
new
Error
(
res
.
data
.
msg
||
'
服务器异常,请求url:
'
+
url
);
}
}
Notify
({
message
:
'
服务器异常,请稍后重试
'
,
background
:
'
#FF5D15
'
,
safeAreaInsetTop
});
Notify
({
message
:
'
服务器异常,请稍后重试
'
,
safeAreaInsetTop
});
throw
new
Error
(
res
.
data
.
msg
||
'
服务器异常,请求url:
'
+
url
);
throw
new
Error
(
res
.
data
.
msg
||
'
服务器异常,请求url:
'
+
url
);
});
});
};
};
...
...
src/components/custom/network.wpy
View file @
d5cc1861
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<div class="network-wrapper">
<div class="network-wrapper">
<span class="network-text">网络状况不佳,请刷新重试</span>
<span class="network-text">网络状况不佳,请刷新重试</span>
<van-button custom-class="network-button" round type="info" @tap="setIsConnected">刷新</van-button>
<van-button custom-class="network-button" round type="info" @tap="setIsConnected">刷新</van-button>
</div>
</div>
</div>
</div>
</template>
</template>
<script>
<script>
...
@@ -25,6 +25,7 @@
...
@@ -25,6 +25,7 @@
});
});
</script>
</script>
<style lang="less">
<style lang="less">
@import "../../style/common";
.network-container {
.network-container {
position: fixed;
position: fixed;
width: 100%;
width: 100%;
...
@@ -40,17 +41,17 @@
...
@@ -40,17 +41,17 @@
align-items: center;
align-items: center;
flex-direction: column;
flex-direction: column;
.network-text {
.network-text {
color:
#AAA
;
color:
@darkgrey
;
font-size:
24rpx
;
font-size:
@font-normal
;
}
}
.network-button {
.network-button {
margin-top: 20rpx;
margin-top: 20rpx;
width: 180rpx;
width: 180rpx;
font-size:
24rpx
;
font-size:
@font-normal
;
height: 56rpx;
height: 56rpx;
line-height: 56rpx;
line-height: 56rpx;
background:
#FF6600
;
background:
@maincolor
;
border-color:
#FF6600
;
border-color:
@maincolor
;
}
}
}
}
}
}
...
...
src/components/custom/openAnimation.wpy
View file @
d5cc1861
...
@@ -105,6 +105,7 @@
...
@@ -105,6 +105,7 @@
});
});
</script>
</script>
<style lang="less">
<style lang="less">
@import "../../style/common";
.open-container {
.open-container {
position: fixed;
position: fixed;
width: 100%;
width: 100%;
...
@@ -184,7 +185,7 @@
...
@@ -184,7 +185,7 @@
width: 500rpx;
width: 500rpx;
height: 500rpx;
height: 500rpx;
border-radius: 20rpx;
border-radius: 20rpx;
color:
#fff
;
color:
@whitecolor
;
background: linear-gradient(#FF5D15 5%, #FDA13E 60%, rgba(255, 255, 255, 0.8) 100%),
background: linear-gradient(#FF5D15 5%, #FDA13E 60%, rgba(255, 255, 255, 0.8) 100%),
;
;
padding: 39rpx 40rpx 0rpx 40rpx;
padding: 39rpx 40rpx 0rpx 40rpx;
...
@@ -299,7 +300,7 @@
...
@@ -299,7 +300,7 @@
white-space: nowrap;
white-space: nowrap;
overflow: hidden;
overflow: hidden;
text-overflow: ellipsis;
text-overflow: ellipsis;
font-size:
24rpx
;
font-size:
@font-normal
;
text-align: center;
text-align: center;
}
}
}
}
...
@@ -311,11 +312,11 @@
...
@@ -311,11 +312,11 @@
height: 158rpx;
height: 158rpx;
z-index: 11;
z-index: 11;
.btn {
.btn {
font-size:
24rpx
;
font-size:
@font-normal
;
width: 160rpx;
width: 160rpx;
height: 70rpx;
height: 70rpx;
line-height: 70rpx;
line-height: 70rpx;
border: 1rpx solid
#FF5D15
;
border: 1rpx solid
@maincolor
;
z-index: 11;
z-index: 11;
border-radius: 10rpx;
border-radius: 10rpx;
&:after {
&:after {
...
@@ -323,11 +324,11 @@
...
@@ -323,11 +324,11 @@
};
};
&:nth-child(1) {
&:nth-child(1) {
background: #fff;
background: #fff;
color:
#FF5D15
;
color:
@maincolor
;
}
}
&:nth-child(2) {
&:nth-child(2) {
background:
#FF5D15
;
background:
@maincolor
;
color: #fff;
color: #fff;
}
}
}
}
...
@@ -439,7 +440,7 @@
...
@@ -439,7 +440,7 @@
bottom:160rpx;
bottom:160rpx;
left:0rpx;
left:0rpx;
content:"";
content:"";
background:
#fff
;
background:
@whiteback
;
border-left:#e59c00 2rpx solid;
border-left:#e59c00 2rpx solid;
border-right:#e59c00 2rpx solid;
border-right:#e59c00 2rpx solid;
box-sizing:border-box;
box-sizing:border-box;
...
@@ -448,7 +449,7 @@
...
@@ -448,7 +449,7 @@
position: relative;
position: relative;
z-index: 2;
z-index: 2;
text-align: center;
text-align: center;
font-size:
22rpx
;
font-size:
@font-common
;
padding-bottom: 20rpx;
padding-bottom: 20rpx;
.gift-image {
.gift-image {
width: 140rpx;
width: 140rpx;
...
@@ -467,7 +468,7 @@
...
@@ -467,7 +468,7 @@
height: 50rpx;
height: 50rpx;
line-height: 50rpx;
line-height: 50rpx;
border-radius: 6rpx;
border-radius: 6rpx;
font-size:
22rpx
;
font-size:
@font-common
;
&:active{
&:active{
background-image: -webkit-gradient(linear, left top, left bottom, from(#f09902), to(#f09902));
background-image: -webkit-gradient(linear, left top, left bottom, from(#f09902), to(#f09902));
}
}
...
...
src/components/custom/popup.wpy
View file @
d5cc1861
...
@@ -65,6 +65,7 @@
...
@@ -65,6 +65,7 @@
});
});
</script>
</script>
<style lang="less">
<style lang="less">
@import "../../style/common";
.popup-container {
.popup-container {
position: fixed;
position: fixed;
width: 100%;
width: 100%;
...
@@ -81,7 +82,7 @@
...
@@ -81,7 +82,7 @@
position: absolute;
position: absolute;
left: 20rpx;
left: 20rpx;
top: 155rpx;
top: 155rpx;
background:
#fff
;
background:
@whiteback
;
border-radius: 10rpx;
border-radius: 10rpx;
padding: 10rpx 19rpx;
padding: 10rpx 19rpx;
box-sizing: border-box;
box-sizing: border-box;
...
@@ -108,8 +109,8 @@
...
@@ -108,8 +109,8 @@
height: 50rpx;
height: 50rpx;
}
}
.desc {
.desc {
color:
#FF5D15
;
color:
@maincolor
;
font-size:
20rpx
;
font-size:
@font-small
;
margin-top: 9rpx
margin-top: 9rpx
}
}
}
}
...
...
src/components/custom/prizeList.wpy
View file @
d5cc1861
<style lang="less">
<style lang="less">
@import "../../style/common";
.container,.video-swiper{
.container,.video-swiper{
width:100%;
width:100%;
height:100%;
height:100%;
...
@@ -22,13 +23,13 @@
...
@@ -22,13 +23,13 @@
width: 100%;
width: 100%;
}
}
.rightcont {
.rightcont {
font-size:
24rpx
;
font-size:
@font-normal
;
position: absolute;
position: absolute;
z-index: 9;
z-index: 9;
bottom: 415rpx;
bottom: 415rpx;
width:30%;
width:30%;
right: 30rpx;
right: 30rpx;
color:
#fff
;
color:
@whitecolor
;
.info {
.info {
line-height: 40rpx;
line-height: 40rpx;
}
}
...
@@ -36,9 +37,9 @@
...
@@ -36,9 +37,9 @@
.progress {
.progress {
width: 180rpx;
width: 180rpx;
height: 20rpx;
height: 20rpx;
background-color:
#fff
;
background-color:
@whiteback
;
margin-top: 10rpx;
margin-top: 10rpx;
color:
#666
;
color:
@greycolor
;
position: relative;
position: relative;
.text {
.text {
position: absolute;
position: absolute;
...
@@ -56,7 +57,7 @@
...
@@ -56,7 +57,7 @@
width: 0;
width: 0;
height:100%;
height:100%;
transition:all .6s;
transition:all .6s;
background-color:
#FF5D15
;
background-color:
@maincolor
;
}
}
}
}
.images {
.images {
...
...
src/components/custom/sharedPopup.wpy
View file @
d5cc1861
...
@@ -69,6 +69,7 @@
...
@@ -69,6 +69,7 @@
});
});
</script>
</script>
<style lang="less">
<style lang="less">
@import "../../style/common";
.share-container {
.share-container {
position: fixed;
position: fixed;
width: 100%;
width: 100%;
...
@@ -83,7 +84,7 @@
...
@@ -83,7 +84,7 @@
width: 530rpx;
width: 530rpx;
height: 530rpx;
height: 530rpx;
border-radius: 20rpx;
border-radius: 20rpx;
color:
#fff
;
color:
@whitecolor
;
background: linear-gradient(#E6401F, #FDA13E),
background: linear-gradient(#E6401F, #FDA13E),
;
;
padding: 39rpx 40rpx 0rpx 40rpx;
padding: 39rpx 40rpx 0rpx 40rpx;
...
@@ -227,7 +228,7 @@
...
@@ -227,7 +228,7 @@
white-space: nowrap;
white-space: nowrap;
overflow: hidden;
overflow: hidden;
text-overflow: ellipsis;
text-overflow: ellipsis;
font-size:
28rpx
;
font-size:
@font-middle
;
text-align: center;
text-align: center;
}
}
.user {
.user {
...
@@ -261,14 +262,14 @@
...
@@ -261,14 +262,14 @@
height: 120rpx;
height: 120rpx;
z-index: 11;
z-index: 11;
.btn {
.btn {
font-size:
30rpx
;
font-size:
@font-large
;
width: 200rpx;
width: 200rpx;
height: 70rpx;
height: 70rpx;
line-height: 70rpx;
line-height: 70rpx;
z-index: 11;
z-index: 11;
border-radius: 10rpx;
border-radius: 10rpx;
background:
#FF5D15
;
background:
@maincolor
;
color:
#FFF
;
color:
@whitecolor
;
&:before {
&:before {
content: '';
content: '';
width: 73rpx;
width: 73rpx;
...
...
src/components/custom/sign.wpy
View file @
d5cc1861
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
<image class="share-image" :src="shareUrl"></image>
<image class="share-image" :src="shareUrl"></image>
</button>
</button>
<span class="title">{{des}}</span>
<span class="title">{{des}}</span>
</div>
</div>
<div v-if="type === 'lottery'" class="lottery">
<div v-if="type === 'lottery'" class="lottery">
<button v-if="authmodal" open-type="getUserInfo" bindgetuserinfo="getUserInfo" plain="true" class="lottery-button">
<button v-if="authmodal" open-type="getUserInfo" bindgetuserinfo="getUserInfo" plain="true" class="lottery-button">
<image class="lottery-button-image" :src="lotteryUrl"></image>
<image class="lottery-button-image" :src="lotteryUrl"></image>
...
@@ -176,6 +176,7 @@
...
@@ -176,6 +176,7 @@
});
});
</script>
</script>
<style lang="less">
<style lang="less">
@import "../../style/common";
.icon-container {
.icon-container {
.lottery {
.lottery {
...
@@ -202,11 +203,11 @@
...
@@ -202,11 +203,11 @@
width: 100%;
width: 100%;
text-align: center;
text-align: center;
display: block;
display: block;
color:
#fff
;
color:
@whitecolor
;
font-size:
22rpx
;
font-size:
@font-common
;
}
}
}
}
.share {
.share {
position: absolute;
position: absolute;
top: 635rpx;
top: 635rpx;
...
@@ -225,8 +226,8 @@
...
@@ -225,8 +226,8 @@
width: 100%;
width: 100%;
text-align: center;
text-align: center;
display: block;
display: block;
color:
#fff
;
color:
@whitecolor
;
font-size:
22rpx
;
font-size:
@font-common
;
}
}
}
}
...
@@ -265,7 +266,7 @@
...
@@ -265,7 +266,7 @@
text-align: center;
text-align: center;
z-index: 3;
z-index: 3;
border-radius: 50%;
border-radius: 50%;
transform: rotate(-50deg);
transform: rotate(-50deg);
animation: jump1 1.2s infinite ease;
animation: jump1 1.2s infinite ease;
&::before {
&::before {
content: "";
content: "";
...
@@ -296,8 +297,8 @@
...
@@ -296,8 +297,8 @@
width: 100%;
width: 100%;
text-align: center;
text-align: center;
display: block;
display: block;
color:
#fff
;
color:
@whitecolor
;
font-size:
22rpx
;
font-size:
@font-common
;
}
}
@keyframes swift {
@keyframes swift {
...
@@ -314,13 +315,13 @@
...
@@ -314,13 +315,13 @@
}
}
@keyframes shine1 {
@keyframes shine1 {
0% {
0% {
transform: translateX(40rpx);
transform: translateX(40rpx);
}
}
50% {
50% {
transform: translateX(0);
transform: translateX(0);
}
}
100% {
100% {
transform: translateX(40rpx);
transform: translateX(40rpx);
}
}
}
}
}
}
...
@@ -375,7 +376,7 @@
...
@@ -375,7 +376,7 @@
animation:addGoldRotate .6s linear infinite;
animation:addGoldRotate .6s linear infinite;
}
}
.add-gold-num {
.add-gold-num {
color:
#fff
;
color:
@whitecolor
;
font-size: 16rpx;
font-size: 16rpx;
vertical-align: middle;
vertical-align: middle;
}
}
...
@@ -400,14 +401,14 @@
...
@@ -400,14 +401,14 @@
flex-direction: column;
flex-direction: column;
.show-gold-image {
.show-gold-image {
width: 60rpx;
width: 60rpx;
height: 60rpx;
height: 60rpx;
z-index: 2;
z-index: 2;
}
}
.show-gold-num {
.show-gold-num {
margin-top: -10rpx;
margin-top: -10rpx;
color:
#fff
;
color:
@whitecolor
;
font-size:
22rpx
;
font-size:
@font-common
;
}
}
}
}
.sunshine {
.sunshine {
...
...
src/components/vant/dialog/dialog.js
View file @
d5cc1861
...
@@ -42,6 +42,7 @@ Dialog.defaultOptions = {
...
@@ -42,6 +42,7 @@ Dialog.defaultOptions = {
showCancelButton
:
false
,
showCancelButton
:
false
,
closeOnClickOverlay
:
false
,
closeOnClickOverlay
:
false
,
confirmButtonOpenType
:
''
,
confirmButtonOpenType
:
''
,
confirmButtonColor
:
'
#FF5D15
'
,
};
};
Dialog
.
alert
=
Dialog
;
Dialog
.
alert
=
Dialog
;
Dialog
.
confirm
=
(
options
)
=>
Dialog
.
confirm
=
(
options
)
=>
...
...
src/components/vant/notify/notify.js
View file @
d5cc1861
...
@@ -3,7 +3,7 @@ const defaultOptions = {
...
@@ -3,7 +3,7 @@ const defaultOptions = {
selector
:
'
#van-notify
'
,
selector
:
'
#van-notify
'
,
type
:
'
danger
'
,
type
:
'
danger
'
,
message
:
''
,
message
:
''
,
background
:
''
,
background
:
'
#FF5D15
'
,
duration
:
3000
,
duration
:
3000
,
zIndex
:
110
,
zIndex
:
110
,
top
:
0
,
top
:
0
,
...
...
src/mixins/test.js
deleted
100644 → 0
View file @
c6c5d9ae
export
default
{
data
:
{
mixin
:
'
MixinText
'
},
methods
:
{
mixintap
()
{
this
.
mixin
=
'
MixinText
'
+
(
Math
.
random
()
+
''
).
substring
(
3
,
7
);
console
.
log
(
'
mixin method tap
'
);
},
tap
()
{
console
.
log
(
'
tap in mixin
'
);
}
},
created
()
{
console
.
log
(
'
created in mixin
'
);
}
};
src/pages/help.wpy
View file @
d5cc1861
<style lang="less">
<style lang="less">
@import "../style/common.less";
.help-cont {
.help-cont {
padding:30rpx;
padding:30rpx;
padding-top:0;
padding-top:0;
background-color:
#fff
;
background-color:
@whiteback
;
.help-title{
.help-title{
font-size: 30rpx;
font-size: @font-large;
color:#333;
font-weight:bold;
font-weight:bold;
padding-top:30rpx;
padding-top:30rpx;
}
}
.help-info {
.help-info {
color:
#666
;
color:
@greycolor
;
font-size: 26rpx;
font-size: 26rpx;
padding-left:20rpx;
padding-left:20rpx;
line-height: 40rpx;
line-height: 40rpx;
...
...
src/pages/index.wpy
View file @
d5cc1861
<style lang="less">
<style lang="less">
@import "../style/common";
page{
page{
height: 100%;
height: 100%;
background-color: #000;
background-color: #000;
...
@@ -54,7 +55,7 @@
...
@@ -54,7 +55,7 @@
z-index: 9;
z-index: 9;
bottom: 400rpx;
bottom: 400rpx;
width: 100%;
width: 100%;
color:
white
;
color:
@whitecolor
;
clear: both;
clear: both;
&.anima {
&.anima {
animation:fadeout 2s;
animation:fadeout 2s;
...
@@ -66,7 +67,7 @@
...
@@ -66,7 +67,7 @@
.leftcont {
.leftcont {
width: 44%;
width: 44%;
float: left;
float: left;
font-size:
24rpx
;
font-size:
@font-normal
;
margin-left: 30rpx;
margin-left: 30rpx;
}
}
.list-wrapper {
.list-wrapper {
...
@@ -87,7 +88,7 @@
...
@@ -87,7 +88,7 @@
vertical-align: middle;
vertical-align: middle;
border-radius: 20rpx;
border-radius: 20rpx;
display: inline-block;
display: inline-block;
font-size:
20rpx
;
font-size:
@font-small
;
box-sizing: border-box;
box-sizing: border-box;
padding:6rpx 15rpx;
padding:6rpx 15rpx;
background-color:rgba(238, 238, 238, 0.2);
background-color:rgba(238, 238, 238, 0.2);
...
@@ -105,7 +106,7 @@
...
@@ -105,7 +106,7 @@
.list-item{
.list-item{
width:220rpx;
width:220rpx;
/*height: 330rpx;*/
/*height: 330rpx;*/
background-color:
#fff
;
background-color:
@whiteback
;
border-radius: 10rpx;
border-radius: 10rpx;
transform: scale(0.7,0.7) translateY(65rpx);
transform: scale(0.7,0.7) translateY(65rpx);
transition: all 0.5s;
transition: all 0.5s;
...
@@ -122,7 +123,7 @@
...
@@ -122,7 +123,7 @@
border-radius: 10rpx;
border-radius: 10rpx;
}
}
.list-item .text {
.list-item .text {
font-size:
20rpx
;
font-size:
@font-small
;
text-overflow: ellipsis;
text-overflow: ellipsis;
display: -webkit-box;
display: -webkit-box;
-webkit-line-clamp: 2; //行数
-webkit-line-clamp: 2; //行数
...
@@ -132,13 +133,13 @@
...
@@ -132,13 +133,13 @@
margin-top:10rpx;
margin-top:10rpx;
}
}
.list-item .price{
.list-item .price{
color:
#FF5D15
;
color:
@maincolor
;
font-size:
22rpx
;
font-size:
@font-common
;
margin-top:2rpx;
margin-top:2rpx;
}
}
.list-item .buy{
.list-item .buy{
font-size: 16rpx;
font-size: 16rpx;
color:
#AAA
;
color:
@darkgrey
;
}
}
.list-item.subright {
.list-item.subright {
transform: scale(0.85,0.85) translateY(26rpx) translateX(25rpx);
transform: scale(0.85,0.85) translateY(26rpx) translateX(25rpx);
...
@@ -166,7 +167,7 @@
...
@@ -166,7 +167,7 @@
position: relative;
position: relative;
top:200px;
top:200px;
padding: 50rpx 0;
padding: 50rpx 0;
background-color:
#fff
;
background-color:
@whiteback
;
border-radius: 20rpx;
border-radius: 20rpx;
.text {
.text {
color:#333;
color:#333;
...
@@ -272,7 +273,7 @@
...
@@ -272,7 +273,7 @@
<open-animation v-if="showAwardsModal" :joinRecord="mainInfo && mainInfo.joinRecord"></open-animation>
<open-animation v-if="showAwardsModal" :joinRecord="mainInfo && mainInfo.joinRecord"></open-animation>
<shared-popup v-if="showShareModal" :inviteinfo="mainInfo && mainInfo.inviteRecord" @getSharedGold="getSharedGold"></shared-popup>
<shared-popup v-if="showShareModal" :inviteinfo="mainInfo && mainInfo.inviteRecord" @getSharedGold="getSharedGold"></shared-popup>
<popup @showMenu="showMenu" :showMenus="showMenus"></popup>
<popup @showMenu="showMenu" :showMenus="showMenus"></popup>
<van-dialog id="van-dialog"
confirmButtonColor="#FF5D15"
/>
<van-dialog id="van-dialog"/>
</view>
</view>
</template>
</template>
...
@@ -580,11 +581,11 @@
...
@@ -580,11 +581,11 @@
getAwards: function() {
getAwards: function() {
const { id, photoUrl, quantity, name, chance } = this.awardsInfo;
const { id, photoUrl, quantity, name, chance } = this.awardsInfo;
if (!id || !this.mainInfo || !this.mainInfo.account) {
if (!id || !this.mainInfo || !this.mainInfo.account) {
Notify({ message: '服务器异常,请稍后重试',
background: '#FF5D15',
safeAreaInsetTop: true });
Notify({ message: '服务器异常,请稍后重试', safeAreaInsetTop: true });
return;
return;
}
}
if (this.mainInfo && this.mainInfo.account && this.mainInfo.account.quantity === 0) {
if (this.mainInfo && this.mainInfo.account && this.mainInfo.account.quantity === 0) {
Notify({ message: '您的克币数为0, 无法参与抽奖',
background: '#FF5D15',
safeAreaInsetTop: true });
Notify({ message: '您的克币数为0, 无法参与抽奖', safeAreaInsetTop: true });
return;
return;
}
}
wx.navigateTo({
wx.navigateTo({
...
...
src/pages/myraffles.wpy
View file @
d5cc1861
<style lang="less">
<style lang="less">
@import "../style/common";
.raffles-list{
.raffles-list{
padding-bottom:30rpx;
padding-bottom:30rpx;
}
}
.raffle-none{
.raffle-none{
font-size:
28rpx
;
font-size:
@font-middle
;
padding-top:300rpx;
padding-top:300rpx;
text-align: center;
text-align: center;
}
}
.raffle-item{
.raffle-item{
background-color:
#fff
;
background-color:
@whiteback
;
padding:30rpx 0 0 30rpx;
padding:30rpx 0 0 30rpx;
overflow: hidden;
overflow: hidden;
.item-img{
.item-img{
...
@@ -33,8 +34,8 @@
...
@@ -33,8 +34,8 @@
overflow: hidden;
overflow: hidden;
}
}
.item-corn{
.item-corn{
color:
#FF5D15
;
color:
@maincolor
;
font-size:
28rpx
;
font-size:
@font-middle
;
position: absolute;
position: absolute;
bottom:30rpx;
bottom:30rpx;
}
}
...
@@ -42,22 +43,22 @@
...
@@ -42,22 +43,22 @@
position: absolute;
position: absolute;
right:30rpx;
right:30rpx;
top:30%;
top:30%;
font-size:
28rpx
;
font-size:
@font-middle
;
}
}
.item-button{
.item-button{
height:60rpx;
height:60rpx;
color:
#fff
;
color:
@whitecolor
;
background-color:
#FF5D15
;
background-color:
@maincolor
;
border-radius: 10rpx;
border-radius: 10rpx;
text-align: center;
text-align: center;
line-height: 60rpx;
line-height: 60rpx;
font-size:
28rpx
;
font-size:
@font-middle
;
}
}
.grey{
.grey{
color:
#999
;
color:
@lightgrey
;
}
}
.red{
.red{
color:
#FF1212
color:
@redcolor;
}
}
.green{
.green{
color:#097A00;
color:#097A00;
...
...
src/pages/prize.wpy
View file @
d5cc1861
<style lang="less">
<style lang="less">
@import "../style/common.less";
.prize-top {
.prize-top {
background-color:
#fff
;
background-color:
@whiteback
;
padding:30rpx 50rpx;
padding:30rpx 50rpx;
.img{
.img{
display: block;
display: block;
margin:0 auto;
margin:0 auto;
width: 400rpx;
width: 400rpx;
.van-image {
.van-image {
box-shadow:0
px
3rpx 13rpx 1rpx rgba(163,163,163,0.38);
box-shadow:0 3rpx 13rpx 1rpx rgba(163,163,163,0.38);
}
}
}
}
.goodsname{
.goodsname{
padding:25rpx 0;
padding:25rpx 0;
font-size: 28rpx;
font-size: @font-middle;
color:#333;
}
}
.prize-info{
.prize-info{
color:
#999
;
color:
@lightgrey
;
font-size: 26rpx;
font-size: 26rpx;
.red {
.red {
color:
#FF1212
;
color:
@redcolor
;
}
}
}
}
}
}
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
padding-top:50rpx;
padding-top:50rpx;
.address-title {
.address-title {
font-size: 32rpx;
font-size: 32rpx;
color:
#666
;
color:
@greycolor
;
padding-left:30rpx;
padding-left:30rpx;
}
}
.address-cont{
.address-cont{
...
@@ -40,7 +40,7 @@
...
@@ -40,7 +40,7 @@
.footer{
.footer{
width:100%;
width:100%;
height: 110rpx;
height: 110rpx;
background-color:
#fff
;
background-color:
@whiteback
;
position: fixed;
position: fixed;
bottom:0;
bottom:0;
left:0;
left:0;
...
@@ -48,18 +48,18 @@
...
@@ -48,18 +48,18 @@
position: absolute;
position: absolute;
width:160rpx;
width:160rpx;
height:70rpx;
height:70rpx;
color:
#fff
;
color:
@whitecolor
;
border-radius: 10rpx;
border-radius: 10rpx;
background-color:
#FF5D15
;
background-color:
@maincolor
;
right:30rpx;
right:30rpx;
top:20rpx;
top:20rpx;
line-height: 70rpx;
line-height: 70rpx;
text-align: center;
text-align: center;
font-size:
30rpx
;
font-size:
@font-large
;
}
}
}
}
.van-picker .van-picker__cancel,.van-picker .van-picker__confirm{
.van-picker .van-picker__cancel,.van-picker .van-picker__confirm{
color:
#FF5D15
;
color:
@maincolor
;
}
}
</style>
</style>
<template>
<template>
...
@@ -91,7 +91,7 @@
...
@@ -91,7 +91,7 @@
<view class="footer">
<view class="footer">
<button class="getprize" bindtap="goprize">{{btnfont}}</button>
<button class="getprize" bindtap="goprize">{{btnfont}}</button>
</view>
</view>
<van-dialog id="van-dialog"
confirmButtonColor="#FF5D15"
/>
<van-dialog id="van-dialog"/>
<van-notify id="van-notify" />
<van-notify id="van-notify" />
</view>
</view>
</template>
</template>
...
@@ -124,28 +124,28 @@
...
@@ -124,28 +124,28 @@
goprize() {
goprize() {
if (!this.prize.cash) {
if (!this.prize.cash) {
if (!this.name) {
if (!this.name) {
Notify({message: '请填写收货人'
, background: '#FF5D15'
});
Notify({message: '请填写收货人'});
return;
return;
}
}
let reg = /^1\d{10}$/;
let reg = /^1\d{10}$/;
if (!this.phone) {
if (!this.phone) {
Notify({message: '请填写手机号码'
, background: '#FF5D15'
});
Notify({message: '请填写手机号码'});
return;
return;
}
}
if (!reg.test(this.phone)) {
if (!reg.test(this.phone)) {
Notify({message: '请填写正确的手机号码'
, background: '#FF5D15'
});
Notify({message: '请填写正确的手机号码'});
return;
return;
}
}
if (!this.idNumber) {
if (!this.idNumber) {
Notify({message: '请填写身份证号'
, background: '#FF5D15'
});
Notify({message: '请填写身份证号'});
return;
return;
}
}
if (!this.city) {
if (!this.city) {
Notify({message: '请选择所在地区'
, background: '#FF5D15'
});
Notify({message: '请选择所在地区'});
return;
return;
}
}
if (!this.address) {
if (!this.address) {
Notify({message: '请填写详细地址'
, background: '#FF5D15'
});
Notify({message: '请填写详细地址'});
return;
return;
}
}
}
}
...
@@ -199,7 +199,7 @@
...
@@ -199,7 +199,7 @@
onLoad (query) {
onLoad (query) {
let joinRecordId = query.joinRecordId || '';
let joinRecordId = query.joinRecordId || '';
this.joinRecordId = joinRecordId;
this.joinRecordId = joinRecordId;
if (!joinRecordId) Notify({message: '缺少参数错误!'
, background: '#FF5D15'
});
if (!joinRecordId) Notify({message: '缺少参数错误!'});
// 请求接口得到数据
// 请求接口得到数据
getOneRaffle({joinRecordId: joinRecordId}).then(data => {
getOneRaffle({joinRecordId: joinRecordId}).then(data => {
let dat = data || {};
let dat = data || {};
...
...
src/pages/raffle.wpy
View file @
d5cc1861
<style lang="less">
<style lang="less">
@import "../style/common.less";
.raffle-wrapper {
.raffle-wrapper {
width:100%;
width:100%;
height:100%;
height:100%;
background-color:
#F1F1F1
;
background-color:
@greyback
;
padding-top:40rpx;
padding-top:40rpx;
-webkit-box-sizing: border-box;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
box-sizing: border-box;
}
}
.raffle-content {
.raffle-content {
background-color:
#fff
;
background-color:
@whiteback
;
width: 94%;
width: 94%;
-webkit-box-sizing: border-box;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
box-sizing: border-box;
margin:0 auto;
margin:0 auto;
padding:50rpx 50rpx 40rpx 50rpx;
padding:50rpx 50rpx 40rpx 50rpx;
border-radius: 10rpx;
border-radius: 10rpx;
box-shadow:0
px 2rpx 20rpx 0px
rgba(188,188,188,0.75);
box-shadow:0
2rpx 20rpx 0
rgba(188,188,188,0.75);
.img .van-image {
.img .van-image {
box-shadow:0
px
3rpx 13rpx 1rpx rgba(163,163,163,0.38);
box-shadow:0 3rpx 13rpx 1rpx rgba(163,163,163,0.38);
}
}
}
}
.goodsinfo {
.goodsinfo {
margin-top:15rpx;
margin-top:15rpx;
overflow: hidden;
overflow: hidden;
.text {
.text {
font-size:
28rpx
;
font-size:
@font-middle
;
text-overflow: ellipsis;
text-overflow: ellipsis;
display: -webkit-box;
display: -webkit-box;
-webkit-line-clamp: 2; //行数
-webkit-line-clamp: 2; //行数
...
@@ -40,48 +39,48 @@
...
@@ -40,48 +39,48 @@
.money{
.money{
float: right;
float: right;
width:30%;
width:30%;
color:
#FF5D15
;
color:
@maincolor
;
font-size:
30rpx
;
font-size:
@font-large
;
text-align: right;
text-align: right;
font-weight:bold;
font-weight:bold;
}
}
}
}
.raffle-chance {
.raffle-chance {
font-size:
24rpx
;
font-size:
@font-normal
;
color:
#666
;
color:
@greycolor
;
margin-top:20rpx;
margin-top:20rpx;
}
}
.raffle-progress {
.raffle-progress {
font-size:
24rpx
;
font-size:
@font-normal
;
color:
#666
;
color:
@greycolor
;
}
}
.progress {
.progress {
width: 298rpx;
width: 298rpx;
height:18rpx;
height:18rpx;
background-color:
#fff
;
background-color:
@whiteback
;
border:1px solid
#FF5D15
;
border:1px solid
@maincolor
;
border-radius: 4rpx;
border-radius: 4rpx;
color:
#666
;
color:
@greycolor
;
display: inline-block;
display: inline-block;
position: relative;
position: relative;
top:3rpx;
top:3rpx;
.orange {
.orange {
height:100%;
height:100%;
transition:all 1s;
transition:all 1s;
background-color:
#FF5D15
;
background-color:
@maincolor
;
}
}
}
}
.pronumber{
.pronumber{
font-size:
20rpx
;
font-size:
@font-small
;
color:
#666
;
color:
@greycolor
;
margin-left:10rpx;
margin-left:10rpx;
position: relative;
position: relative;
top:-3rpx;
top:-3rpx;
}
}
.user-wish {
.user-wish {
padding-left:35rpx;
padding-left:35rpx;
font-size:
24rpx
;
font-size:
@font-normal
;
color:
#aaa
;
color:
@darkgrey
;
margin-top:25rpx;
margin-top:25rpx;
height:50rpx;
height:50rpx;
line-height: 50rpx;
line-height: 50rpx;
...
@@ -94,8 +93,8 @@
...
@@ -94,8 +93,8 @@
vertical-align: middle;
vertical-align: middle;
position: relative;
position: relative;
&.checked{
&.checked{
background-color:
#FF5D15
;
background-color:
@maincolor
;
border:3rpx solid
#FF5D15
;
border:3rpx solid
@maincolor
;
}
}
}
}
.checkicon {
.checkicon {
...
@@ -117,12 +116,12 @@
...
@@ -117,12 +116,12 @@
width:380rpx;
width:380rpx;
height:70rpx;
height:70rpx;
line-height: 70rpx;
line-height: 70rpx;
background-color:
#FF5D15
;
background-color:
@maincolor
;
border-radius:10rpx;
border-radius:10rpx;
margin:0 auto;
margin:0 auto;
margin-top:80rpx;
margin-top:80rpx;
font-size: 34rpx;
font-size: 34rpx;
color:
#fff
;
color:
@whitecolor
;
}
}
</style>
</style>
<template>
<template>
...
@@ -151,7 +150,7 @@
...
@@ -151,7 +150,7 @@
</view>
</view>
<button class="joinin" open-type="{{opentype}}" bindtap="joinin" bindgetphonenumber="getPhoneNumber">{{btnfont}}</button>
<button class="joinin" open-type="{{opentype}}" bindtap="joinin" bindgetphonenumber="getPhoneNumber">{{btnfont}}</button>
<van-notify id="van-notify" />
<van-notify id="van-notify" />
<van-dialog id="van-dialog"
confirmButtonColor="#FF5D15"
/>
<van-dialog id="van-dialog"/>
</view>
</view>
</template>
</template>
<script>
<script>
...
@@ -197,7 +196,7 @@
...
@@ -197,7 +196,7 @@
await login(code);
await login(code);
goprize();
goprize();
} else {
} else {
Notify({message: '参与失败,请重新授权!'
, background: '#FF5D15'
});
Notify({message: '参与失败,请重新授权!'});
}
}
},
},
async confirmRaff() {
async confirmRaff() {
...
@@ -226,7 +225,7 @@
...
@@ -226,7 +225,7 @@
},
},
joinin() {
joinin() {
if (!this.isCheck) {
if (!this.isCheck) {
Notify({message: '勾选同意后才可以抽奖!'
, background: '#FF5D15'
});
Notify({message: '勾选同意后才可以抽奖!'});
return;
return;
}
}
if (this.hasPhone) {
if (this.hasPhone) {
...
...
src/style/common.less
0 → 100644
View file @
d5cc1861
// 主颜色
@maincolor: #ff5d15;
@redcolor: #FF1212;
//字体颜色
@fontcolor:#333;
@greycolor: #666;
@lightgrey: #999;
@whitecolor: #fff;
@darkgrey: #aaa;
//背景颜色
@whiteback:#fff;
@greyback: #f1f1f1;
//字体大小
@font-normal: 24rpx;
@font-small:20rpx;
@font-common:22rpx;
@font-middle:28rpx;
@font-large:30rpx;
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