Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
7
7-Eleven
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
高淑倩
7-Eleven
Commits
748ed1cc
Commit
748ed1cc
authored
Apr 23, 2020
by
谢中龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
集点优化,领取中心
parent
7375d501
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
799 additions
and
51 deletions
+799
-51
app.json
src/app.json
+3
-1
app.wxss
src/app.wxss
+6
-1
pointDetail.js
src/pages/pointDetail/pointDetail.js
+62
-3
project.config.json
src/project.config.json
+17
-3
couponCenter.js
src/subPackage/page/pages/couponCenter/couponCenter.js
+92
-0
couponCenter.json
src/subPackage/page/pages/couponCenter/couponCenter.json
+9
-0
couponCenter.wxml
src/subPackage/page/pages/couponCenter/couponCenter.wxml
+51
-0
couponCenter.wxss
src/subPackage/page/pages/couponCenter/couponCenter.wxss
+234
-0
couponCenterInfo.js
...ubPackage/page/pages/couponCenterInfo/couponCenterInfo.js
+83
-0
couponCenterInfo.json
...Package/page/pages/couponCenterInfo/couponCenterInfo.json
+5
-0
couponCenterInfo.wxml
...Package/page/pages/couponCenterInfo/couponCenterInfo.wxml
+39
-0
couponCenterInfo.wxss
...Package/page/pages/couponCenterInfo/couponCenterInfo.wxss
+145
-0
valueCard.wxml
src/subPackage/page/pages/valueCard/valueCard.wxml
+5
-2
valueCard.wxss
src/subPackage/page/pages/valueCard/valueCard.wxss
+17
-0
wxService.js
src/utils/wxService.js
+31
-41
No files found.
src/app.json
View file @
748ed1cc
...
@@ -32,7 +32,9 @@
...
@@ -32,7 +32,9 @@
"pages/valueCardInfo/valueCardInfo"
,
"pages/valueCardInfo/valueCardInfo"
,
"pages/myValueCard/myValueCard"
,
"pages/myValueCard/myValueCard"
,
"pages/myValueCardInfo/myValueCardInfo"
,
"pages/myValueCardInfo/myValueCardInfo"
,
"pages/valueCardRecords/valueCardRecords"
"pages/valueCardRecords/valueCardRecords"
,
"pages/couponCenter/couponCenter"
,
"pages/couponCenterInfo/couponCenterInfo"
]
]
},
},
{
{
...
...
src/app.wxss
View file @
748ed1cc
...
@@ -32,7 +32,11 @@ page {
...
@@ -32,7 +32,11 @@ page {
.clear-btn{
.clear-btn{
appearance: none;
appearance: none;
border: none;
border: none
!important
;
background: transparent;
background: transparent;
margin: 0;
margin: 0;
}
.theme-color{
background-color: #cb3c3c;
}
}
\ No newline at end of file
src/pages/pointDetail/pointDetail.js
View file @
748ed1cc
...
@@ -44,7 +44,6 @@ wxService.page({
...
@@ -44,7 +44,6 @@ wxService.page({
* 生命周期函数--监听页面加载
* 生命周期函数--监听页面加载
*/
*/
onLoad
(
options
)
{
onLoad
(
options
)
{
},
},
watch
:
{
watch
:
{
experAccessible
(
newVal
,
oldVal
)
{
experAccessible
(
newVal
,
oldVal
)
{
...
@@ -103,7 +102,7 @@ wxService.page({
...
@@ -103,7 +102,7 @@ wxService.page({
getPointDetail
(
id
)
{
getPointDetail
(
id
)
{
wx
.
showLoading
({
wx
.
showLoading
({
title
:
'加载中'
title
:
'加载中'
})
})
;
wxService
.
get
(
`/sale/touchpoints/pointConsumptionActivity/findById/
${
id
}
`
).
then
(
res
=>
{
wxService
.
get
(
`/sale/touchpoints/pointConsumptionActivity/findById/
${
id
}
`
).
then
(
res
=>
{
if
(
res
)
{
if
(
res
)
{
const
{
result
,
data
}
=
res
.
data
const
{
result
,
data
}
=
res
.
data
...
@@ -151,13 +150,72 @@ wxService.page({
...
@@ -151,13 +150,72 @@ wxService.page({
this
.
showTimeStatus
(
'活动已经失效啦,看看其他的'
)
this
.
showTimeStatus
(
'活动已经失效啦,看看其他的'
)
}
else
{
}
else
{
// 会员集点活动统计信息 进行中且有效
// 会员集点活动统计信息 进行中且有效
this
.
getPointConsumptionCount
(
id
)
this
.
getPointConsumptionCount
(
id
);
//限制必须是扫码进来的才调用
// let scene = wx.getLaunchOptionsSync().scene;
// if(scene == 1011){
this
.
getUserShowRewardCollectionPoint
(
id
);
// }
}
}
})
})
}
}
}
}
})
})
},
},
//获取用户扫码进来是否需要弹出领取集点的
getUserShowRewardCollectionPoint
(
id
){
wxService
.
post
(
`/sale/touchpoints/pointConsumptionActivity/verifyWhetherReward?id=
${
id
}
`
).
then
(
res
=>
{
if
(
res
)
{
const
{
result
,
data
}
=
res
.
data
if
(
result
==
0
)
{
//如果需要 弹出提示框
if
(
data
==
1
){
this
.
showConfirmModal
(
id
);
}
}
}
})
},
//弹出原生提示框让用户去点击
showConfirmModal
(
id
){
let
self
=
this
;
if
(
this
.
showModal
){
return
;
}
this
.
showModal
=
true
;
wx
.
showModal
({
title
:
'集点领取提示'
,
content
:
'恭喜您获得一个集点'
,
showCancel
:
false
,
confirmText
:
'确认领取'
,
confirmColor
:
'#05C35B'
,
success
(
res
)
{
if
(
res
.
confirm
){
self
.
userConfirmGetCollectionPoint
(
id
);
}
self
.
showModal
=
false
;
}
})
},
//调用领取接口
userConfirmGetCollectionPoint
(
id
){
wxService
.
post
(
`/sale/touchpoints/pointConsumptionActivity/award?id=
${
id
}
`
).
then
(
res
=>
{
if
(
res
)
{
const
{
result
,
data
}
=
res
.
data
if
(
result
==
0
)
{
//如果需要 弹出提示框
wx
.
showToast
({
title
:
'领取成功~'
,
});
this
.
getPointDetail
(
this
.
data
.
id
);
}
}
});
},
//显示状态
showTimeStatus
(
status
)
{
showTimeStatus
(
status
)
{
wx
.
showToast
({
wx
.
showToast
({
title
:
`
${
status
}
`
,
title
:
`
${
status
}
`
,
...
@@ -218,6 +276,7 @@ wxService.page({
...
@@ -218,6 +276,7 @@ wxService.page({
const
{
id
}
=
this
.
data
const
{
id
}
=
this
.
data
if
(
id
)
this
.
getPointDetail
(
id
)
if
(
id
)
this
.
getPointDetail
(
id
)
},
},
handleGo
()
{
handleGo
()
{
// 跳转 popupType: 0 默认不跳转 1 优惠券 2 积分
// 跳转 popupType: 0 默认不跳转 1 优惠券 2 积分
const
{
popupType
,
id
}
=
this
.
data
const
{
popupType
,
id
}
=
this
.
data
...
...
src/project.config.json
View file @
748ed1cc
...
@@ -133,16 +133,16 @@
...
@@ -133,16 +133,16 @@
},
},
{
{
"id"
:
14
,
"id"
:
14
,
"name"
:
"
pages/pointList/pointList
"
,
"name"
:
"
消费集点活动列表
"
,
"pathName"
:
"pages/pointList/pointList"
,
"pathName"
:
"pages/pointList/pointList"
,
"query"
:
""
,
"query"
:
""
,
"scene"
:
null
"scene"
:
null
},
},
{
{
"id"
:
15
,
"id"
:
15
,
"name"
:
"
pages/pointDetail/pointDetail
"
,
"name"
:
"
集点详情
"
,
"pathName"
:
"pages/pointDetail/pointDetail"
,
"pathName"
:
"pages/pointDetail/pointDetail"
,
"query"
:
"id=
6238141455187435
52"
,
"query"
:
"id=
7022143279560171
52"
,
"scene"
:
null
"scene"
:
null
},
},
{
{
...
@@ -237,6 +237,20 @@
...
@@ -237,6 +237,20 @@
"pathName"
:
"subPackageA/page/pages/pointExchangeCoupon/pointExchangeCoupon"
,
"pathName"
:
"subPackageA/page/pages/pointExchangeCoupon/pointExchangeCoupon"
,
"query"
:
""
,
"query"
:
""
,
"scene"
:
null
"scene"
:
null
},
{
"id"
:
-1
,
"name"
:
"领券中心"
,
"pathName"
:
"subPackage/page/pages/couponCenter/couponCenter"
,
"query"
:
""
,
"scene"
:
null
},
{
"id"
:
-1
,
"name"
:
"领券中心详情"
,
"pathName"
:
"subPackage/page/pages/couponCenterInfo/couponCenterInfo"
,
"query"
:
""
,
"scene"
:
null
}
}
]
]
}
}
...
...
src/subPackage/page/pages/couponCenter/couponCenter.js
0 → 100644
View file @
748ed1cc
// pages/userCenter.js
const
wxService
=
require
(
'../../../../utils/wxService'
)
wxService
.
page
({
/**
* 页面的初始数据
*/
data
:
{
query
:
''
,
integralCouponList
:
[],
// 积分兑换优惠券列表
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
:
function
(
options
)
{
wx
.
hideShareMenu
();
this
.
initIntegralCouponList
();
},
// 获取优惠券活动列表
initIntegralCouponList
(
refresh
)
{
wx
.
showLoading
({
title
:
'加载中'
});
wxService
.
post
(
`/coupon/couponCenterActivity/buyer/getValidList`
).
then
(
res
=>
{
if
(
res
)
{
const
{
result
,
data
}
=
res
.
data
if
(
result
==
0
)
{
wx
.
hideLoading
()
this
.
data
.
integralCouponList
=
data
?
data
:
[];
this
.
setData
({
integralCouponList
:
this
.
data
.
integralCouponList
});
}
}
if
(
refresh
){
wx
.
showToast
({
title
:
'刷新成功'
,
});
wx
.
stopPullDownRefresh
();
}
}).
finally
(()
=>
{
wx
.
hideLoading
();
})
},
//立即兑换优惠券
exchange
(
e
)
{
wx
.
showLoading
({
title
:
'领取中..'
,
});
const
{
id
}
=
e
.
currentTarget
.
dataset
;
wxService
.
post
(
`/coupon/couponCenterActivity/buyer/coupon/draw?id=
${
id
}
`
).
then
(
res
=>
{
wx
.
hideLoading
();
if
(
res
){
if
(
res
.
data
.
result
==
0
){
wx
.
showToast
({
title
:
'领取成功'
,
});
}
else
{
wx
.
showToast
({
title
:
'领取失败,请稍后再试'
,
icon
:
'none'
});
}
}
});
},
//跳转到详情
goCouponDetail
(
e
)
{
const
{
id
}
=
e
.
currentTarget
.
dataset
wxService
.
router
(
`/subPackage/page/pages/couponCenterInfo/couponCenterInfo?id=
${
id
}
`
)
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh
:
function
()
{
this
.
initIntegralCouponList
(
true
);
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom
:
function
()
{
},
})
\ No newline at end of file
src/subPackage/page/pages/couponCenter/couponCenter.json
0 → 100644
View file @
748ed1cc
{
"navigationBarTitleText"
:
"领券中心"
,
"backgroundTextStyle"
:
"dark"
,
"enablePullDownRefresh"
:
true
,
"usingComponents"
:
{
"no-more"
:
"/component/noMore/noMore"
}
}
\ No newline at end of file
src/subPackage/page/pages/couponCenter/couponCenter.wxml
0 → 100644
View file @
748ed1cc
<!--pages/userCenter.wxml-->
<view class='page-integral-mall'>
<!-- 优惠券列表-->
<view>
<view class='coupon-wrap' wx:if="{{integralCouponList.length}}">
<view
class='coupon-list'
wx:for="{{integralCouponList}}"
wx:for-item="item"
wx:for-index="k"
wx:key="{{k}}"
data-id="{{item.acvivityId}}"
>
<view class="coupon-item">
<view class='coupon-img-title' data-id="{{item.acvivityId}}" bindtap="goCouponDetail">
<view class='coupon-img'>
<image wx:if="{{item.listPicture}}" src='{{item.listPicture}}' mode="aspectFit"/>
<image wx:else src='https://img3.bigaka.com/prd/3001/202003/20200331/3001649f2f08-3b4e-4b5b-97c1-30cdf646651c.png' />
</view>
<view class='coupon-info'>
<view class='coupon-name fs-28'>{{item.activityName}}</view>
<view class='coupon-desc text-align-left fs-24'>查看详情</view>
</view>
</view>
<view class='coupon-btn positionRe'>
<button wx:if="{{!currentHasUserInfo}}"
bindgetuserinfo="_getUserInfo"
open-type='getUserInfo'
class="clear-btn positionAbs"></button>
<view class='coupon-btn-click theme-color'
data-id="{{item.acvivityId}}"
bindtap='exchange'>立即领取</view>
<!-- <view class='ac-date'>{{item.startTime}}至{{item.endTime}}</view> -->
</view>
</view>
</view>
</view>
<view class='empty-wrap' wx:if="{{!integralCouponList.length}}">
<view class='empty-info'>
<image class='empty-img'
src='https://img3.bigaka.com/prd/3001/202003/20200309/30012bce7628-f373-4fa7-a6a4-ada9c1c721d6.png' />
<view class='empty-text'>没有任何领劵活动</view>
</view>
</view>
</view>
</view>
src/subPackage/page/pages/couponCenter/couponCenter.wxss
0 → 100644
View file @
748ed1cc
/* subPackage/page/pages/couponCenter/couponCenter.wxss */
/* subPackage/page/pages/couponCenter/couponCenter.wxss */
/* pages/userCenter.wxss */
@import "/base/base.wxss";
page {
/* background-color: rgba(0, 0, 0, 0.05); */
background: #ffffff;
}
.page-integral-mall {
border-top: 1px solid rgba(151, 151, 151, 0.1);
}
.empty-wrap {
width: 300rpx;
margin: 190rpx auto 0;
text-align: center;
}
.empty-img {
width: 197rpx;
height: 176rpx;
margin-bottom: 48rpx;
}
.empty-text {
color: #cccccc;
font-size: 28rpx;
}
/* 卡劵列表 */
.coupon-wrap {
padding: 20rpx;
clear: both;
}
.coupon-list {
margin-bottom: 10rpx;
border-bottom: solid 1px #eeeeee;
}
.coupon-img-title {
display: flex;
align-items: center;
}
.coupon-item {
display: flex;
align-items: center;
height: 144rpx;
background-color: #fff;
justify-content: space-between;
}
.coupon-btn {
margin-right: 30rpx;
}
.coupon-btn-click {
width: 153.8rpx;
height: 50rpx;
border-radius: 25rpx;
color: #ffffff;
font-size: 24rpx;
display: flex;
justify-content: center;
align-items: center;
background-color: #cb3c3c;
}
.coupon-btn-click.disabled{
background-color: #dddddd !important;
box-shadow: none;
}
.coupon-btn-num {
width: 153.8rpx;
height: 22rpx;
color: rgba(250, 100, 0, 1);
font-size: 22rpx;
text-align: center;
margin-top: 10rpx;
}
.coupon-img {
box-sizing: border-box;
margin-left: 30rpx;
}
.coupon-img image {
width: 80rpx;
height: 80rpx;
}
.coupon-info {
padding: 42rpx 39rpx;
box-sizing: border-box;
}
.coupon-name {
color: #333;
}
.coupon-time {
color: #fc921e;
margin-bottom: 18rpx;
font-size: 26rpx;
}
.coupon-desc {
/* color: #999;
margin-top: 11rpx;
width: 360rpx;
font-size: 24rpx; */
color: rgba(118, 161, 213, 1);
font-size: 22rpx;
text-align: right;
margin-top: 18rpx;
}
.ac-date{
font-size: 22rpx;
color: #999999;
}
.text-align-left{
text-align: left !important;
}
.coupon-code {
color: #ffffff;
word-wrap: break-word;
font-weight: bold;
margin: 0 10rpx;
padding: 35rpx 20rpx;
box-sizing: content-box;
width: 40rpx;
line-height: 35rpx;
}
.invalid-coupon {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
background-color: rgba(0, 0, 0, 0.5);
z-index: 3;
border-radius: 7rpx;
}
.invalid-img {
position: absolute;
width: 147rpx;
height: 147rpx;
right: 81rpx;
top: 31rpx;
z-index: 4;
}
.point-img {
width: 28rpx;
height: 36rpx;
}
.title-img-point {
display: flex;
align-items: center;
}
.point-exchange-goods-records{
font-size: 28rpx;
color: #ffffff;
display: flex;
justify-content: center;
align-items: center;
height: 80rpx;
position: fixed;
left: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.65);
z-index: 2;
width: 100%;
}
.point-exchange-goods-records:active{
opacity: 0.7;
}
.text-point {
color: rgba(51, 51, 51, 1);
font-size: 42rpx;
margin-left: 10rpx;
}
.mall-title {
height: 150rpx;
padding-left: 50rpx;
padding-right: 42rpx;
box-sizing: border-box;
background-color: rgba(255, 255, 255, 1);
box-shadow: 0px 0px 8px 5px rgba(0, 0, 0, 0.05),
0px 0px 3px 0px rgba(0, 0, 0, 0.03);
}
.title-num-point {
padding-top: 30rpx;
display: flex;
justify-content: space-between;
align-items: center;
}
.integral-vip-rules {
width: 133rpx;
height: 42rpx;
line-height: 42rpx;
border-radius: 34rpx;
font-size: 23rpx;
text-align: center;
border: 1px solid rgba(204, 204, 204, 1);
}
.title-time-point {
color: rgba(102, 102, 102, 1);
font-size: 20rpx;
text-align: left;
padding-top: 3rpx;
margin-top: 15rpx;
}
.mall-tab {
height: 80rpx;
display: flex;
align-items: center;
background-color: #fff;
padding: 5rpx 0;
box-sizing: border-box;
margin-top: 10rpx;
border-bottom: solid 1px #eeeeee;
}
.tab-coupon, .tab-goods,.tab-coupon-goods {
flex: 1;
text-align: center;
color: rgba(102, 102, 102, 1);
font-size: 26rpx;
}
.tab-coupon {
border-right: 1rpx solid rgba(102, 102, 102, 1);
}
.tab-active {
color: rgba(5, 195, 91, 1);
}
\ No newline at end of file
src/subPackage/page/pages/couponCenterInfo/couponCenterInfo.js
0 → 100644
View file @
748ed1cc
// subPackage/page/pages/couponCenterInfo/couponCenterInfo.js
const
wxService
=
require
(
'../../../../utils/wxService'
)
wxService
.
page
({
/**
* 页面的初始数据
*/
data
:
{
activityId
:
null
,
activityInfo
:
{}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
:
function
(
options
)
{
let
id
=
options
.
id
;
this
.
data
.
activityId
=
id
;
this
.
getACtivityInfo
();
},
/**
* 生命周期函数--监听页面显示
*/
onShow
:
function
()
{
},
//获取活动详情
getACtivityInfo
(){
wxService
.
post
(
`/coupon/couponCenterActivity/buyer/getDetail?id=
${
this
.
data
.
activityId
}
`
).
then
(
res
=>
{
if
(
res
){
let
obj
=
res
.
data
.
data
?
res
.
data
.
data
:
null
;
if
(
obj
){
let
arr
=
obj
.
definition
?
JSON
.
parse
(
obj
.
definition
)
:
[];
obj
.
desc
=
arr
.
filter
(
item
=>
item
.
type
==
2
);
obj
.
hasExpDate
=
arr
.
filter
(
item
=>
item
.
type
==
1
).
length
>
0
;
this
.
data
.
activityInfo
=
obj
;
this
.
setData
({
activityInfo
:
this
.
data
.
activityInfo
});
}
}
})
},
//领取优惠券
onTapGetCoupon
(){
wx
.
showLoading
({
title
:
'领取中..'
,
});
let
id
=
this
.
data
.
activityId
;
wxService
.
post
(
`/coupon/couponCenterActivity/buyer/coupon/draw?id=
${
id
}
`
).
then
(
res
=>
{
wx
.
hideLoading
();
if
(
res
)
{
if
(
res
.
data
.
result
==
0
)
{
wx
.
showToast
({
title
:
'领取成功'
,
});
}
else
{
wx
.
showToast
({
title
:
'领取失败,请稍后再试'
,
icon
:
'none'
});
}
}
});
},
/**
* 用户点击右上角分享
*/
onShareAppMessage
:
function
()
{
let
url
=
this
.
data
.
activityInfo
.
listPicture
?
this
.
data
.
activityInfo
.
listPicture
:
'https://img3.bigaka.com/prd/3001/202003/20200331/3001649f2f08-3b4e-4b5b-97c1-30cdf646651c.png'
;
return
{
title
:
`我分享给你一张“
${
this
.
data
.
activityInfo
.
couponName
}
”的优惠券,赶快领取吧~`
,
path
:
`/subPackage/page/pages/couponCenterInfo/couponCenterInfo?id=
${
this
.
data
.
activityId
}
`
,
imageUrl
:
url
,
// 可以更换分享的图片
}
}
})
\ No newline at end of file
src/subPackage/page/pages/couponCenterInfo/couponCenterInfo.json
0 → 100644
View file @
748ed1cc
{
"navigationBarTitleText"
:
"优惠券信息"
,
"usingComponents"
:
{}
}
\ No newline at end of file
src/subPackage/page/pages/couponCenterInfo/couponCenterInfo.wxml
0 → 100644
View file @
748ed1cc
<!--subPackage/page/pages/couponCenterInfo/couponCenterInfo.wxml-->
<view class="coupon-info-con">
<view class="coupon-info-bg" style="background-image:url('https://img3.bigaka.com/prd/3001/202003/20200331/3001df30305c-f4fe-4c35-bd73-5d87d4882f7a.png')">
<view class="lf-coupon-Bg">
<image wx:if="{{activityInfo.listPicture}}" mode="aspectFit" src="{{activityInfo.listPicture}}"></image>
<image wx:else src='https://img3.bigaka.com/prd/3001/202003/20200331/3001649f2f08-3b4e-4b5b-97c1-30cdf646651c.png' />
</view>
<view class="rg-coupon-info">
<view class="coupon-title">{{activityInfo.couponName}}</view>
<view class="coupon-date">{{activityInfo.startTime}} 至 {{activityInfo.endTime}}</view>
<view class="coupon-price theme-text-color">
{{activityInfo.couponInfoDTO.couponSetting.typeDesc}} {{activityInfo.couponInfoDTO.couponSetting.faceAmountDesc}}
</view>
</view>
</view>
<!-- 活动说明 -->
<view class='integral-detail' wx:if="{{activityInfo.hasExpDate}}">
<view class='integral-list'>
<text class='integral-title'>有效时间</text>
<text class='integral-desc wpl'>{{activityInfo.startTime}}至{{activityInfo.endTime}}</text>
</view>
</view>
<view class='integral-detail' style="margin-top:20rpx;" wx:if="{{activityInfo.desc.length > 0}}">
<view class='integral-list' wx:for="{{activityInfo.desc}}" wx:key="*this">
<text class='integral-title'>{{item.label}}</text>
<text class='integral-desc wpl'>{{item.value}}</text>
</view>
</view>
<!-- 按钮 -->
<view class="get-btn positionRe">
<button wx:if="{{!currentHasUserInfo}}"
bindgetuserinfo="_getUserInfo"
open-type='getUserInfo'
class="clear-btn positionAbs">立即领取</button>
<view wx:else class="view-btn" bindtap="onTapGetCoupon">立即领取</view>
</view>
</view>
src/subPackage/page/pages/couponCenterInfo/couponCenterInfo.wxss
0 → 100644
View file @
748ed1cc
/* subPackage/page/pages/couponCenterInfo/couponCenterInfo.wxss */
/* subPackage/page/pages/couponCenterInfo/couponCenterInfo.wxss */
page{
background: #ffffff;
box-sizing: border-box;
-webkit-box-sizing: border-box;
}
view{
box-sizing: border-box;
-webkit-box-sizing: border-box;
}
.coupon-info-con{
padding: 30rpx;
}
.coupon-info-bg{
width: 100%;
height: 174rpx;
background-position: center;
background-size: 100%;
background-repeat: no-repeat;
position: relative;
padding-left: 170rpx;
}
.coupon-info-bg .lf-coupon-Bg{
position: absolute;
left: 0;
top: 0;
width: 170rpx;
height: 100%;
padding: 15rpx;
}
.coupon-info-bg .lf-coupon-Bg image{
width: 100%;
height: 100%;
}
.coupon-info-bg .rg-coupon-info{
width: 100%;
height: 100%;
padding: 15rpx;
font-size: 24rpx;
}
.coupon-title{
font-size: 28rpx;
color: #333333;
margin-bottom: 8rpx;
font-weight: 550;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
overflow: hidden;
}
.coupon-date{
font-size: 22rpx;
color: #999999;
margin-bottom: 5rpx;
}
.exp-intro{
margin-top: 60rpx;
}
.exp-intro .exp-intro-item{
display: flex;
font-size: 28rpx;
color: #333333;
}
.exp-intro .exp-intro-item .intro-title{
flex: 0;
min-width: 100rpx;
max-width: 100rpx;
}
.exp-intro .exp-intro-item .intro-desc{
flex: 1;
color: #999999;
}
.integral-detail{
margin-top: 60rpx;
}
.integral-list{
margin-bottom: 20rpx;
font-size: 24rpx;
color: #999999;
}
.integral-title{
font-size: 24rpx;
color: #333333;
margin-right: 8rpx;
}
.integral-title,.integral-desc{
display: inline-block;
}
.get-btn{
width: 100%;
height: 90rpx;
margin-top: 80rpx;
background: -webkit-linear-gradient(left,rgb(203,60,60,0.7),rgb(203,60,60,1));
border-radius: 8rpx;
color: #ffffff;
font-size: 28rpx;
display: flex;
justify-content: center;
align-items: center;
}
.get-btn button{
color: #ffffff;
font-size: 28rpx;
display: flex;
align-items: center;
justify-content: center;
}
.get-btn .view-btn{
color: #ffffff;
font-size: 28rpx;
display: flex;
align-items: center;
justify-content: center;
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
z-index: 1;
}
.get-btn:active{
opacity: 0.7;
}
\ No newline at end of file
src/subPackage/page/pages/valueCard/valueCard.wxml
View file @
748ed1cc
...
@@ -14,4 +14,7 @@
...
@@ -14,4 +14,7 @@
<empty text="暂无任何超值卡活动哦~" wx:else/>
<empty text="暂无任何超值卡活动哦~" wx:else/>
<!-- <view class='no-more'>-- 我也是有底线滴 --</view> -->
<!-- <view class='no-more'>-- 我也是有底线滴 --</view> -->
\ No newline at end of file
<!-- <view class="float-bottom">
我的超值卡
</view> -->
\ No newline at end of file
src/subPackage/page/pages/valueCard/valueCard.wxss
View file @
748ed1cc
...
@@ -3,6 +3,7 @@ page{
...
@@ -3,6 +3,7 @@ page{
background: #ffffff;
background: #ffffff;
box-sizing: border-box;
box-sizing: border-box;
-webkit-box-sizing: border-box;
-webkit-box-sizing: border-box;
/* padding-bottom: 80rpx; */
}
}
view{
view{
...
@@ -61,4 +62,19 @@ view{
...
@@ -61,4 +62,19 @@ view{
display: flex;
display: flex;
align-items: center;
align-items: center;
justify-content: center;
justify-content: center;
}
.float-bottom{
position: fixed;
bottom: 0;
left: 0;
width: 100%;
height: 75rpx;
background: #ff3333;
color: #ffffff;
font-size: 24rpx;
display: flex;
justify-content: center;
align-items: center;
z-index: 9;
}
}
\ No newline at end of file
src/utils/wxService.js
View file @
748ed1cc
...
@@ -567,53 +567,43 @@ class WXService extends Http {
...
@@ -567,53 +567,43 @@ class WXService extends Http {
// 获取当前页
// 获取当前页
let
router
=
getCurrentRouter
()
let
router
=
getCurrentRouter
()
const
baseUserInfo
=
_self
.
getBaseUserInfo
()
const
baseUserInfo
=
_self
.
getBaseUserInfo
()
// this.setData({
if
(
baseUserInfo
&&
wx
.
getStorageSync
(
'token'
)){
// experAccessible: true
page
.
setData
({
// })
currentHasUserInfo
:
true
,
// if (baseUserInfo) {
});
_self
.
trialList
().
then
(
res
=>
{
}
if
(
!
res
.
length
)
{
else
{
page
.
setData
({
currentHasUserInfo
:
false
,
});
}
_self
.
trialList
().
then
(
res
=>
{
if
(
!
res
.
length
)
{
this
.
setData
({
experAccessible
:
true
})
}
const
{
currentPaths
}
=
res
//有版本号
if
(
currentPaths
.
length
>
0
){
// 是体验者
if
(
currentPaths
.
indexOf
(
router
.
route
)
>
-
1
&&
isExperiencer
)
{
this
.
setData
({
this
.
setData
({
experAccessible
:
true
experAccessible
:
true
})
})
}
}
else
{
const
{
currentPaths
}
=
res
//有版本号
if
(
currentPaths
.
length
>
0
){
// 是体验者
if
(
currentPaths
.
indexOf
(
router
.
route
)
>
-
1
&&
isExperiencer
)
{
this
.
setData
({
this
.
setData
({
experAccessible
:
tru
e
experAccessible
:
fals
e
})
})
}
else
{
this
.
setData
({
experAccessible
:
false
})
}
}
else
{
// 不限制
this
.
setData
({
experAccessible
:
true
})
}
}
}
else
{
// // if (currentPaths.indexOf(router.route) > -1 && isExperiencer || currentPaths.length == 0) {
// 不限制
// // this.setData({
this
.
setData
({
// // experAccessible: true
experAccessible
:
true
// // })
})
// // } else {
}
// // this.setData({
})
// // experAccessible: false
// // })
// // }
})
console
.
log
(
'000'
,
this
.
data
.
experAccessible
);
// }
},
},
onReady
:
function
(...
args
)
{
onReady
:
function
(...
args
)
{
config
.
onReady
&&
config
.
onReady
.
apply
(
this
,
args
)
config
.
onReady
&&
config
.
onReady
.
apply
(
this
,
args
)
...
...
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