Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
mini-program
/
hmd
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit a47e1d8e
authored
Jul 18, 2023
by
杨北旺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
权益联调
1 parent
b954d408
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
351 additions
and
497 deletions
api/env/index.js
app.js
app.json
components/commodityItem/index.wxss
packageEquity/pages/directional/directional.js
packageEquity/pages/directional/directional.scss
packageEquity/pages/directional/directional.wxml
packageEquity/pages/package/package.scss
packageEquity/pages/package/package.wxml
packageEquity/pages/receiveCoupons/index.js
packageEquity/pages/receiveCoupons/index.json
packageEquity/pages/receiveCoupons/index.scss
packageEquity/pages/receiveCoupons/index.wxml
pages/tab/equity/index.js
pages/tab/equity/index.scss
pages/tab/equity/index.wxml
project.config.json
api/env/index.js
View file @
a47e1d8
...
...
@@ -17,7 +17,7 @@ const systemInfo = wx.getSystemInfoSync()
const
manual
=
false
const
release
=
false
let
index
=
2
let
index
=
1
// 判断小程序环境
// develop:开发版(正常开发工具,测试时)
...
...
@@ -106,8 +106,8 @@ const pathEnum = {
busassistant
:
'/rop-scrm-busassistant/'
}
const
defaultMerchantId
=
{
ip
:
'4421
0895
'
,
dev
:
'4421
0895
'
,
ip
:
'4421
1227
'
,
dev
:
'4421
1227
'
,
uat
:
'44210895'
,
prod
:
'44189923'
}[
target
[
index
]]
...
...
app.js
View file @
a47e1d8
// app.js
// 初始化sentry
import
sentryInit
from
"~/utils/sentryConfig/sentryInit"
;
sentryInit
();
//
import sentryInit from "~/utils/sentryConfig/sentryInit";
//
sentryInit();
import
api
from
"./api/index"
;
import
{
router
}
from
"./router/index"
;
// 判断小程序是否需要更新
...
...
@@ -10,7 +10,7 @@ import utils from "./utils/index";
// 埋点 有需要再引入
// import './utils/track/Track'
/**分享 */
import
'.
/utils/share'
// import '~
/utils/share'
App
({
onLaunch
(
options
)
{
getUpdateManager
();
...
...
app.json
View file @
a47e1d8
...
...
@@ -76,7 +76,6 @@
"pages/commodity/list/list"
,
"pages/commodity/charge/charge"
,
"pages/commodity/chargeDetail/chargeDetail"
,
"pages/receiveCoupons/index"
,
"pages/freecard/freecard"
]
},
...
...
components/commodityItem/index.wxss
View file @
a47e1d8
...
...
@@ -73,7 +73,7 @@
.address_icon {
width: 40rpx;
height: 40rpx;
background: linear-gradient(129deg, #FFC08B 0%, #FA8A59 100%);
/* background: linear-gradient(129deg, #FFC08B 0%, #FA8A59 100%); */
border-radius: 50%;
margin-left: 12rpx;
}
...
...
@@ -86,11 +86,11 @@
.latest_sign {
border-radius: 4rpx;
border: 2rpx solid #
FC5B32
;
border: 2rpx solid #
8A303A
;
padding: 6rpx 8rpx;
font-size: 20rpx;
font-weight: 400;
color: #
FC5B32
;
color: #
8A303A
;
margin-left: 14rpx;
}
...
...
@@ -151,7 +151,7 @@
.color_text {
font-size: 36rpx;
font-weight: 600;
color: #
FC5B32
;
color: #
8A303A
;
}
.min_color_text {
...
...
packageEquity/pages/directional/directional.js
View file @
a47e1d8
...
...
@@ -2,35 +2,174 @@ Page({
data
:
{
IMGURL
:
'https://img02.glsx.com.cn/weapp/resource/miniprogram/hmd/'
,
IMGURKBASE
:
'equity/version/1_0_0/'
,
show
:
false
,
statusMap
:{
0
:{
img
:
'direct_vip_icon'
},
1
:{
img
:
'direct_sliver_vip_icon'
},
2
:{
img
:
'direct_gold_vip_icon'
show
:
false
,
showPage
:
false
,
// 背景图-映射值 1不送会员 2送会员
pageBg
:
{
1
:
{
max
:
'wine_c_bg_icon'
,
mid
:
'wine_bg_icon'
,
footer
:
'direct_r_bg_icon'
,
int
:
'direct_bg_icon_2_r'
,
modal
:
'c_bag_r_icon'
},
2
:
{
max
:
'direction_bg_icon'
,
mid
:
'direct_vip_icon'
,
footer
:
'direct_bg_icon_1'
,
int
:
'direct_bg_icon_2'
,
modal
:
'c_bag_g_icon'
}
},
status
:
0
giveMemberFlag
:
2
,
couponsList
:
[]
},
onLoad
(
options
)
{
if
(
options
)
{
let
para
=
{
id
:
options
.
id
}
if
(
options
.
childId
)
{
para
.
childId
=
options
.
childId
this
.
childId
=
childId
}
if
(
options
.
staffUUID
)
{
const
{
staffUUID
,
staffName
}
=
options
this
.
staff
=
{
staffUUID
,
staffName
}
}
if
(
!
para
.
id
)
return
wx
.
p
.
wxApi
.
showToast
(
'缺少参数ID'
)
this
.
getGiftsDetailData
(
para
)
}
},
// 领取定向礼包
toRecivedGifts
()
{
const
{
giftsData
}
=
this
.
data
const
mPattern
=
/^
[
1
]([
3-9
])[
0-9
]{9}
$/
const
{
merchantId
}
=
wx
.
p
.
storage
.
get
(
'merchant_info'
)
const
userInfo
=
wx
.
p
.
storage
.
get
(
'userInfo'
)
const
receiveWay
=
giftsData
.
receiveWay
if
(
!
this
.
userPhone
&&
receiveWay
==
1
)
return
wx
.
p
.
wxApi
.
showToast
(
'请输入手机号码'
)
if
(
receiveWay
==
1
&&
this
.
userPhone
.
match
(
mPattern
))
return
wx
.
p
.
wxApi
.
showToast
(
'请输入正确的手机号'
)
if
(
!
this
.
userPhone
&&
receiveWay
==
2
)
return
wx
.
p
.
wxApi
.
showToast
(
'请输入您车架号后6位领取'
)
if
(
this
.
userPhone
.
length
<
6
&&
receiveWay
==
2
)
return
wx
.
p
.
wxApi
.
showToast
(
'请输入您车架号后6位领取'
)
let
para
=
{
directionalGiftId
:
giftsData
.
id
,
nickName
:
userInfo
.
nickName
,
nickUrl
:
userInfo
.
headImgUrl
,
phone
:
userInfo
.
phone
,
receiveCondition
:
this
.
userPhone
,
merchantId
:
merchantId
,
directionalGiftChildId
:
this
.
childId
}
if
(
this
.
staff
)
{
Object
.
assign
(
para
,
this
.
staff
)
}
wx
.
p
.
wxApi
.
showLoading
(
'领取中'
)
wx
.
p
.
api
.
couponsApi
.
giftsRecive
(
para
).
then
(
res
=>
{
wx
.
hideLoading
();
if
(
res
)
{
res
.
forEach
(
item
=>
{
item
.
receiveStartTime
=
new
Date
(
item
.
receiveStartTime
).
format
(
'yyyy.MM.dd'
)
if
(
item
.
effectiveType
==
1
)
{
item
.
receiveEndTime
=
new
Date
(
item
.
receiveEndTime
).
format
(
'yyyy.MM.dd hh:mm:ss'
)
}
else
{
item
.
receiveEndTime
=
new
Date
(
item
.
receiveEndTime
).
format
(
'yyyy.MM.dd'
)
}
// 这是为了适应详情跳转
item
.
couponId
=
item
.
id
item
.
id
=
item
.
userCouponId
})
this
.
toShowSuccess
(
res
)
}
})
},
// 查询定向礼包详情
getGiftsDetailData
(
para
)
{
wx
.
p
.
wxApi
.
showLoading
()
wx
.
p
.
api
.
couponsApi
.
giftsDetail
(
para
)
.
then
(
res
=>
{
wx
.
hideLoading
()
this
.
setNaviTitle
(
res
.
name
)
this
.
handlerPageShow
(
res
)
})
},
onLoad
()
{
// 处理页面展示内容
handlerPageShow
(
info
)
{
if
(
!
info
)
return
wx
.
p
.
wxApi
.
showToast
(
+
JSON
.
stringify
(
info
))
const
{
giveMemberFlag
,
giveMemberType
}
=
info
let
{
pageBg
}
=
this
.
data
// 送会员 giveMemberType 1 普通会员;2 银卡会员;3 金卡会员
if
(
giveMemberFlag
==
2
)
{
const
IMAGETYPE
=
{
1
:
'direct_vip_icon'
,
2
:
'direct_sliver_vip_icon'
,
3
:
'direct_gold_vip_icon'
,
}
pageBg
[
2
].
mid
=
IMAGETYPE
[
giveMemberType
]
}
this
.
setData
({
showPage
:
true
,
giveMemberFlag
:
giveMemberFlag
||
1
,
pageBg
,
giftsData
:
info
})
},
toMineCoupons
()
{
wx
.
navigateTo
({
url
:
'/packageMine/pages/coupon/index/index'
})
},
// 去使用
toUseGifts
(
e
)
{
let
{
item
}
=
e
.
currentTarget
.
dataset
let
temp
=
JSON
.
stringify
(
item
)
let
{
discountType
,
useChannel
,
id
}
=
item
if
(
discountType
==
2
||
discountType
==
4
)
{
wx
.
p
.
router
.
go
(
'/packageMall/pages/coupon/coupon'
,
{
userCouponId
:
id
,
useMemberType
:
item
.
useMemberType
})
return
}
/**线上商品代金券 */
if
(
discountType
==
3
&&
useChannel
==
1
)
{
if
(
item
.
useMemberType
==
1
)
{
wx
.
p
.
wxApi
.
showToast
(
'代金券已使用'
)
return
}
wx
.
p
.
router
.
go
(
'/packageMine/pages/coupon/recommend/recommend'
,
{
couponInfo
:
item
})
return
}
wx
.
navigateTo
({
url
:
'/packageMine/pages/coupon/detail/detail?item='
+
temp
})
},
setNaviTitle
(
title
)
{
wx
.
setNavigationBarTitle
({
title
})
},
// getScreenInfo(){
// const system = wx.p.storage.get('system_info')
// this.setData({
// screenW:system.safeArea.width,
// screenH:system.safeArea.height
// })
// }
toGetMemeber
(){
this
.
toShowSuccess
()
intPhone
(
e
)
{
this
.
userPhone
=
e
.
detail
.
value
},
toShowSuccess
()
{
toShowSuccess
(
list
)
{
this
.
setData
({
show
:
true
show
:
true
,
couponsList
:
list
})
wx
.
setPageStyle
({
style
:
{
...
...
packageEquity/pages/directional/directional.scss
View file @
a47e1d8
.container
{
position
:
relative
;
min-height
:
1448rpx
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
}
.page_title
{
background
:
linear-gradient
(
125deg
,
#FEE2CB
0%
,
#E8AD80
100%
)
!
important
;
-webkit-background-clip
:
text
!
important
;
background-clip
:
text
!
important
;
color
:
transparent
!
important
;
font-weight
:
600
;
font-size
:
76rpx
;
position
:
absolute
;
top
:
128rpx
;
left
:
50%
;
transform
:
translateX
(
-50%
);
width
:
100%
;
text-align
:
center
;
width
:
494rpx
;
height
:
196rpx
;
margin-top
:
38rpx
;
}
.page_bg_icon
{
width
:
100%
;
height
:
576rpx
;
position
:
absolute
;
left
:
50%
;
top
:
72rpx
;
transform
:
translateX
(
-50%
);
}
.footer_bg_icon
{
position
:
absolute
;
bottom
:
0
;
right
:
0
;
left
:
0
;
height
:
261
.64rpx
;
.page_bg_icon_wine
{
width
:
702rpx
;
height
:
528rpx
;
margin-top
:
48rpx
;
}
.btn_wrap_bg
{
position
:
absolute
;
left
:
50%
;
bottom
:
128rpx
;
transform
:
translateX
(
-50%
);
margin-top
:
88
.48rpx
;
height
:
528rpx
;
width
:
calc
(
100%
-
48rpx
);
display
:
flex
;
...
...
@@ -91,6 +75,11 @@
padding-left
:
32rpx
;
}
.input_wrap_wine
{
background
:
#7C3C3C
;
border
:
2rpx
solid
#492424
;
}
.input-placeholder
{
font-weight
:
400
;
font-size
:
28rpx
;
...
...
@@ -109,6 +98,15 @@
}
}
.footer_bg_icon
{
position
:
absolute
;
bottom
:
0
;
right
:
0
;
left
:
0
;
width
:
100%
;
height
:
261
.64rpx
;
}
.modal_container
{
position
:
fixed
;
left
:
0
;
...
...
@@ -120,14 +118,13 @@
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
justify-content
:
center
;
width
:
100%
;
.modal_close_icon
{
position
:
absolute
;
right
:
40rpx
;
top
:
108rpx
;
width
:
60rpx
;
height
:
60rpx
;
transform
:
translate
(
140rpx
,-
40rpx
);
}
.inner
{
...
...
@@ -137,7 +134,6 @@
border
:
2rpx
solid
#979797
;
box-shadow
:
0
2rpx
198rpx
0
#eec996
2e
;
border-radius
:
32rpx
;
margin-top
:
320rpx
;
box-sizing
:
border-box
;
padding
:
40rpx
;
position
:
relative
;
...
...
@@ -215,6 +211,10 @@
background
:
#343845
;
}
.circle_wine
{
background
:
#582E2E
;
}
.line
{
width
:
2rpx
;
height
:
86rpx
;
...
...
@@ -268,4 +268,10 @@
}
}
.inner_wine
{
background
:
#582E2E
;
border
:
2rpx
solid
#9E6D6D
;
box-shadow
:
0
2rpx
198rpx
0
#eec996
2e
;
}
}
\ No newline at end of file
packageEquity/pages/directional/directional.wxml
View file @
a47e1d8
...
...
@@ -20,40 +20,44 @@
</view>
<view wx:if="{{errorMsg}}" class="error_msg">{{errorMsg}}</view>
</view> -->
<view style="height:1448rpx;background: url({{IMGURL}}{{IMGURKBASE}}direction_bg_icon.png);background-size: 100% 100%;" class="container">
<view class="page_title">生活权益会员</view>
<view style="background: url({{IMGURL}}{{IMGURKBASE}}direct_bg_icon_2.png);background-size: 100% 100%;" class="btn_wrap_bg">
<view class="title">领取会员</view>
<view class="input_wrap">
<input maxlength="11" class="int_widget" placeholder="请输入领取手机号" placeholder-class="input-placeholder" />
<block wx:if="{{showPage}}">
<view style="background: url({{IMGURL}}{{IMGURKBASE}}{{pageBg[giveMemberFlag].max}}.png);background-size: 100% 100%;" class="container">
<glsx-image webp class="page_title" src="{{IMGURKBASE}}direct_title_icon.png" />
<glsx-image webp class="page_bg_icon {{giveMemberFlag==1?'page_bg_icon_wine':''}}" src="{{IMGURKBASE}}{{pageBg[giveMemberFlag].mid}}.png" />
<view style="background: url({{IMGURL}}{{IMGURKBASE}}{{pageBg[giveMemberFlag].int}}.png);background-size: 100% 100%;" class="btn_wrap_bg">
<view class="title">领取会员</view>
<view class="input_wrap {{giveMemberFlag==1?'input_wrap_wine':''}}">
<input maxlength="{{giftsData.receiveWay==1?'11':'6'}}" bind:input="intPhone" class="int_widget" placeholder="{{giftsData.receiveWay==1?'请输入手机号领取':'请输入您车架号后6位领取'}}" placeholder-class="input-placeholder" />
</view>
<glsx-image bind:tap="toRecivedGifts" webp class="btn_icon" src="{{IMGURKBASE}}direct_btn_bg.png" />
</view>
<glsx-image bind:tap="toGetMemeber" webp class="btn_icon" src="{{IMGURKBASE}}direct_btn_bg.png" />
</view>
<glsx-image webp class="page_bg_icon" src="{{IMGURKBASE}}{{statusMap[status].img}}.png" />
<glsx-image webp class="footer_bg_icon" src="{{IMGURKBASE}}direct_bg_icon_1.png?v=1.0" />
<!-- 弹框 -->
<view wx:if="{{show}}" class="modal_container">
<glsx-image catch:tap="toCloseModal" webp class="modal_close_icon" src="{{IMGURKBASE}}modal_close_icon.png" />
<view class="inner">
<view class="list_wrap">
<block wx:for="{{[1,2,3,4,5]}}" wx:key="index">
<view class="coupons_item">
<view class="left_box">
<view class="c_title">优惠券名称</view>
<view class="c_tip">有效期:4444444444</view>
<glsx-image webp class="footer_bg_icon" src="{{IMGURKBASE}}{{pageBg[giveMemberFlag].footer}}.png?v=1.0" />
<view style="height:160rpx"></view>
<view wx:if="{{show}}" class="modal_container">
<glsx-image catch:tap="toCloseModal" webp class="modal_close_icon" src="{{IMGURKBASE}}modal_close_icon.png" />
<view class="inner {{giveMemberFlag==1?'inner_wine':''}}">
<view class="list_wrap">
<block wx:for="{{couponsList}}" wx:key="index">
<view class="coupons_item">
<view class="left_box">
<view class="c_title">{{item.couponName}}</view>
<view wx:if="{{item.effectiveType==3}}" class="c_tip">无限期</view>
<view wx:if="{{item.effectiveType==2}}" class="c_tip">有效期:{{item.receiveStartTime}}-{{item.receiveEndTime}}</view>
<view wx:if="{{item.effectiveType==1}}" class="c_tip">有效至{{item.receiveEndTime}}</view>
</view>
<view bind:tap="toUseGifts" data-item="{{item}}" class="right_box">去使用</view>
<view class="circle_up {{giveMemberFlag==1?'circle_wine':''}}"></view>
<view class="circle_bottom {{giveMemberFlag==1?'circle_wine':''}}"></view>
<view class="line"></view>
</view>
<view class="right_box">去使用</view>
<view class="circle_up"></view>
<view class="circle_bottom"></view>
<view class="line"></view>
</view>
</block>
<view style="height: 120rpx;"></view>
</view>
<view style="background: url({{IMGURL}}{{IMGURKBASE}}c_bag_g_icon.png);background-size: 100% 100%;" class="footer">
<view class="successText">恭喜您获得了三张优惠券!</view>
<view class="look_btn">去查看</view>
</block>
<view style="height: 120rpx;"></view>
</view>
<view style="background: url({{IMGURL}}{{IMGURKBASE}}{{pageBg[giveMemberFlag].modal}}.png);background-size: 100% 100%;" class="footer">
<view class="successText">恭喜您获得了{{couponsList.length}}张优惠券!</view>
<view bind:tap="toMineCoupons" class="look_btn">去查看</view>
</view>
</view>
</view>
</view>
</view>
\ No newline at end of file
</block>
\ No newline at end of file
packageEquity/pages/package/package.scss
View file @
a47e1d8
...
...
@@ -114,6 +114,9 @@
font-size
:
28rpx
;
color
:
#FFFFFF
;
}
.grey-btn
{
background
:
#ccc
;
}
.auth-button
{
position
:
absolute
;
...
...
packageEquity/pages/package/package.wxml
View file @
a47e1d8
<view class="package-container">
<view class="top_wrapper">{{packageInfo.packageName }}</view>
<view class="title_widget">
现在购买尊享<text class="title_num">{{packageInfo.count }}项</text
>超值权益
</view>
<view class="package_content_wrapper">
<block wx:for="{{packageInfo.couponsDetailList}}" wx:key="index">
<view class="package_element">
<view class="ele_top">{{ index + 1 }}、{{ item.couponName }}</view>
<view class="ele_right">数量:x{{ item.serviceQuantity }}</view>
<view wx:if="{{item.effectiveType == 3}}" class="ele_left">
有效期:无有效期
</view>
<view wx:if="{{item.effectiveType == 1}}" class="ele_left">
有效期:{{ item.effectiveDays }}天
</view>
<view wx:if="{{item.effectiveType == 2}}" class="ele_left">
有效期:{{item.effectiveEndTime}}
</view>
<view wx:if="{{item.useType == 1}}" class="ele_bottom">
可用{{ item.useAmount }}次
</view>
<view wx:if="{{item.useType == 2}}" class="ele_bottom">
{{ item.useLimitDays }}天可用{{ item.useAmount }}次
</view>
<view wx:if="{{item.useType == 0}}" class="ele_bottom">不限次数</view>
</view>
</block>
<view wx:if="{{packageInfo.notes}}" class="content_tip">
附:{{ packageInfo.notes }}
<view class="top_wrapper">{{packageInfo.packageName }}</view>
<view class="title_widget">
现在购买尊享
<text class="title_num">{{packageInfo.count }}项</text>
超值权益
</view>
<view class="package_content_wrapper">
<block wx:for="{{packageInfo.couponsDetailList}}" wx:key="index">
<view class="package_element">
<view class="ele_top">{{ index + 1 }}、{{ item.couponName }}</view>
<view class="ele_right">数量:x{{ item.serviceQuantity }}</view>
<view wx:if="{{item.effectiveType == 3}}" class="ele_left">有效期:无有效期</view>
<view wx:if="{{item.effectiveType == 1}}" class="ele_left">
有效期:{{ item.effectiveDays }}天
</view>
</view>
<!-- <block wx:if="{{packageInfo.switchStatus}}">
<view wx:if="{{item.effectiveType == 2}}" class="ele_left">
有效期:{{item.effectiveEndTime}}
</view>
<view wx:if="{{item.useType == 1}}" class="ele_bottom">可用{{ item.useAmount }}次</view>
<view wx:if="{{item.useType == 2}}" class="ele_bottom">
{{ item.useLimitDays }}天可用{{ item.useAmount }}次
</view>
<view wx:if="{{item.useType == 0}}" class="ele_bottom">不限次数</view>
</view>
</block>
<view wx:if="{{packageInfo.notes}}" class="content_tip">附:{{ packageInfo.notes }}</view>
</view>
<!-- <block wx:if="{{packageInfo.switchStatus}}">
<view class="price_total_title">权益计价器</view>
<view class="total_desc"> 套餐内权益实际价值总计约<text class="price_text">{{packageInfo.totalPrice}}</text>元</view>
<view class="statistical_wrapper">
...
...
@@ -48,11 +43,14 @@
</block>
</view>
</block> -->
<view class="fixed-button-wrap">
<block wx:if="{{showAuthBtn}}">
<button open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber" class="auth-button"></button>
</block>
<view class="button-item" bind:tap="toCreatePackageNum"> 限时特价仅需¥{{packageInfo.packagePrice }},点击购买</view>
<view class="fixed-button-wrap">
<block wx:if="{{showAuthBtn}}">
<button open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber" class="auth-button"></button>
</block>
<view wx:if="{{packageInfo.isPayFlag}}" class="button-item" bind:tap="toCreatePackageNum">
限时特价仅需¥{{packageInfo.packagePrice }},点击购买
</view>
<view style="height: 164rpx"></view>
<view wx:if="{{!packageInfo.isPayFlag}}" class="button-item grey-btn">非指定用户不可购买</view>
</view>
<view style="height: 164rpx"></view>
</view>
\ No newline at end of file
packageEquity/pages/receiveCoupons/index.js
deleted
100644 → 0
View file @
b954d40
Page
({
data
:
{
IMGURL
:
'https://img02.glsx.com.cn/weapp/resource/miniprogram/hmd/'
,
IMGURKBASE
:
'equity/version/1_0_0/'
,
show
:
false
,
},
onLoad
()
{
},
toGetMemeber
(){
this
.
toShowSuccess
()
},
toShowSuccess
()
{
this
.
setData
({
show
:
true
})
wx
.
setPageStyle
({
style
:
{
overflow
:
'hidden'
}
})
},
// 关闭弹框放开页面滚动
toCloseModal
()
{
this
.
setData
({
show
:
false
})
wx
.
setPageStyle
({
style
:
{
overflow
:
'unset'
}
})
},
})
packageEquity/pages/receiveCoupons/index.json
deleted
100644 → 0
View file @
b954d40
{
"usingComponents"
:
{},
"navigationBarTitleText"
:
"领取优惠券"
}
\ No newline at end of file
packageEquity/pages/receiveCoupons/index.scss
deleted
100644 → 0
View file @
b954d40
.container
{
position
:
relative
;
min-height
:
1448rpx
;
}
.page_title
{
background
:
linear-gradient
(
125deg
,
#FEE2CB
0%
,
#E8AD80
100%
)
!
important
;
-webkit-background-clip
:
text
!
important
;
background-clip
:
text
!
important
;
color
:
transparent
!
important
;
font-weight
:
600
;
font-size
:
76rpx
;
position
:
absolute
;
top
:
128rpx
;
left
:
50%
;
transform
:
translateX
(
-50%
);
width
:
100%
;
text-align
:
center
;
}
.page_bg_icon
{
width
:
100%
;
height
:
576rpx
;
position
:
absolute
;
left
:
50%
;
top
:
72rpx
;
transform
:
translateX
(
-50%
);
}
.footer_bg_icon
{
position
:
absolute
;
bottom
:
0
;
right
:
0
;
left
:
0
;
height
:
261
.64rpx
;
}
.btn_wrap_bg
{
position
:
absolute
;
left
:
50%
;
bottom
:
128rpx
;
transform
:
translateX
(
-50%
);
height
:
528rpx
;
width
:
calc
(
100%
-
48rpx
);
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
background-image
:
linear-gradient
(
180deg
,
#9D4A4A
25%
,
#762626
100%
);
box-shadow
:
inset
0
4rpx
6rpx
0
#ffffff
80
;
border-radius
:
32rpx
;
.
title
:
:
before
{
content
:
""
;
position
:
absolute
;
top
:
50%
;
left
:
-70%
;
transform
:
translate
(
0
,
-50%
);
width
:
62rpx
;
height
:
2rpx
;
background
:
linear-gradient
(
125deg
,
#FEE2CB
0%
,
#E8AD80
100%
);
}
.title
{
margin-top
:
68rpx
;
background
:
linear-gradient
(
125deg
,
#FEE2CB
0%
,
#E8AD80
100%
)
!
important
;
-webkit-background-clip
:
text
!
important
;
background-clip
:
text
!
important
;
color
:
transparent
!
important
;
font-weight
:
600
;
font-size
:
40rpx
;
position
:
relative
;
}
.
title
:
:
after
{
content
:
""
;
position
:
absolute
;
top
:
50%
;
right
:
-70%
;
transform
:
translate
(
0
,
-50%
);
width
:
62rpx
;
height
:
2rpx
;
background
:
linear-gradient
(
125deg
,
#E8AD80
0%
,
#FEE2CB
100%
);
}
.input_wrap
{
width
:
606rpx
;
height
:
104rpx
;
background
:
#30343E
;
border
:
2rpx
solid
#A9A9A9
;
border-radius
:
16rpx
;
margin-top
:
48rpx
;
box-sizing
:
border-box
;
padding-left
:
32rpx
;
}
.input-placeholder
{
font-weight
:
400
;
font-size
:
28rpx
;
color
:
#A2A2A2
;
}
.int_widget
{
color
:
white
;
height
:
104rpx
;
}
.btn_icon
{
width
:
460
.98rpx
;
height
:
104rpx
;
margin-top
:
30rpx
;
}
}
.modal_container
{
position
:
fixed
;
left
:
0
;
right
:
0
;
bottom
:
0
;
top
:
0
;
background
:
rgba
(
$color
:
#000000
,
$alpha
:
0
.5
);
z-index
:
99
;
display
:
flex
;
flex-direction
:
column
;
align-items
:
center
;
width
:
100%
;
.modal_close_icon
{
position
:
absolute
;
right
:
40rpx
;
top
:
108rpx
;
width
:
60rpx
;
height
:
60rpx
;
}
.inner
{
width
:
580rpx
;
height
:
682rpx
;
background
:
#582E2E
;
border
:
2rpx
solid
#9E6D6D
;
box-shadow
:
0
2rpx
198rpx
0
#eec996
2e
;
border-radius
:
32rpx
;
margin-top
:
320rpx
;
box-sizing
:
border-box
;
padding
:
40rpx
;
position
:
relative
;
.list_wrap
{
height
:
364rpx
;
overflow
:
hidden
;
overflow-y
:
scroll
;
}
.coupons_item
{
width
:
500rpx
;
height
:
120rpx
;
background-image
:
linear-gradient
(
86deg
,
#FFE1C8
0%
,
#FFF8EC
28%
,
#FFC49A
98%
);
margin-bottom
:
24rpx
;
border-radius
:
8rpx
;
position
:
relative
;
.left_box
{
padding-left
:
16rpx
;
display
:
flex
;
flex-direction
:
column
;
justify-content
:
center
;
height
:
100%
;
.c_title
{
font-weight
:
500
;
font-size
:
24rpx
;
color
:
#333333
;
}
.c_tip
{
font-weight
:
400
;
font-size
:
20rpx
;
color
:
#333333
;
margin-top
:
8rpx
;
}
}
.right_box
{
width
:
120rpx
;
height
:
48rpx
;
background-image
:
linear-gradient
(
180deg
,
#FFE5C0
0%
,
#F7DCBC
23%
,
#E5BB90
99%
);
border-radius
:
46rpx
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
font-weight
:
500
;
font-size
:
20rpx
;
color
:
#333333
;
position
:
absolute
;
right
:
22rpx
;
top
:
50%
;
transform
:
translateY
(
-50%
);
}
.circle_up
{
position
:
absolute
;
top
:
-10rpx
;
right
:
161rpx
;
width
:
20rpx
;
height
:
20rpx
;
border-radius
:
50%
;
background
:
#343845
;
}
.circle_bottom
{
position
:
absolute
;
bottom
:
-10rpx
;
right
:
161rpx
;
width
:
20rpx
;
height
:
20rpx
;
border-radius
:
50%
;
background
:
#343845
;
}
.line
{
width
:
2rpx
;
height
:
86rpx
;
opacity
:
0
.32
;
background
:
#C59A7A
;
position
:
absolute
;
top
:
50%
;
right
:
171rpx
;
transform
:
translateY
(
-50%
);
}
}
.footer
{
width
:
580rpx
;
height
:
318rpx
;
border-radius
:
0
0
0
32rpx
32rpx
;
position
:
absolute
;
left
:
0
;
right
:
0
;
bottom
:
0
;
.successText
{
position
:
absolute
;
left
:
50%
;
transform
:
translateX
(
-50%
);
bottom
:
172
.32rpx
;
font-weight
:
600
;
font-size
:
36rpx
;
width
:
100%
;
text-align
:
center
;
color
:
#F9DBB5
;
}
.look_btn
{
width
:
290rpx
;
height
:
92rpx
;
background-image
:
linear-gradient
(
180deg
,
#FAE6CA
0%
,
#F7DCBC
24%
,
#E2B795
39%
,
#D7A682
61%
,
#C79C78
78%
,
#CFAC87
100%
);
box-shadow
:
inset
0
2rpx
6rpx
0
#624e34
80
;
border-radius
:
46rpx
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
font-weight
:
600
;
font-size
:
36rpx
;
color
:
#353946
;
position
:
absolute
;
left
:
50%
;
transform
:
translateX
(
-50%
);
bottom
:
37
.2rpx
;
}
}
}
}
\ No newline at end of file
packageEquity/pages/receiveCoupons/index.wxml
deleted
100644 → 0
View file @
b954d40
<view style="height:1448rpx;background: url({{IMGURL}}{{IMGURKBASE}}wine_c_bg_icon.png);background-size: 100% 100%;" class="container">
<view class="page_title">生活权益会员</view>
<view style="background: url({{IMGURL}}{{IMGURKBASE}}direct_bg_icon_2.png);background-size: 100% 100%;" class="btn_wrap_bg">
<view class="title">领取会员</view>
<view class="input_wrap">
<input maxlength="11" class="int_widget" placeholder="请输入领取手机号" placeholder-class="input-placeholder" />
</view>
<glsx-image bind:tap="toGetMemeber" webp class="btn_icon" src="{{IMGURKBASE}}direct_btn_bg.png" />
</view>
<glsx-image webp class="page_bg_icon" src="{{IMGURKBASE}}wine_bg_icon.png" />
<glsx-image webp class="footer_bg_icon" src="{{IMGURKBASE}}direct_bg_icon_1.png?v=1.0" />
<!-- 弹框 -->
<view wx:if="{{show}}" class="modal_container">
<glsx-image catch:tap="toCloseModal" webp class="modal_close_icon" src="{{IMGURKBASE}}modal_close_icon.png" />
<view class="inner">
<view class="list_wrap">
<block wx:for="{{[1,2,3,4,5]}}" wx:key="index">
<view class="coupons_item">
<view class="left_box">
<view class="c_title">优惠券名称</view>
<view class="c_tip">有效期:4444444444</view>
</view>
<view class="right_box">去使用</view>
<view class="circle_up"></view>
<view class="circle_bottom"></view>
<view class="line"></view>
</view>
</block>
<view style="height: 120rpx;"></view>
</view>
<view style="background: url({{IMGURL}}{{IMGURKBASE}}c_bag_r_icon.png);background-size: 100% 100%;" class="footer">
<view class="successText">恭喜您获得了三张优惠券!</view>
<view class="look_btn">去查看</view>
</view>
</view>
</view>
</view>
\ No newline at end of file
pages/tab/equity/index.js
View file @
a47e1d8
import
mapApi
from
'../../../utils/mapapi/mapapi'
const
MERCHANT_ID
=
44210895
Component
({
options
:
{
styleIsolation
:
'shared'
...
...
@@ -55,10 +54,23 @@ Component({
showPage
:
true
,
// 会员类型-背景
vipStatus
:
{
0
:
''
,
1
:
'pt_vip_bg'
,
1
:
'gold_vip_bg'
,
2
:
'silver_vip_bg'
,
3
:
'gold_vip_bg'
3
:
'pt_vip_bg'
},
// 普通会员3 银卡2 金卡1 非会员 0
identity
:
0
,
titleClass
:{
0
:
''
,
1
:
'gold_title'
,
2
:
'sliver_title'
,
3
:
'card_title'
,
},
dateClass
:{
0
:
''
,
1
:
'gold_date'
,
2
:
'sliver_date'
,
3
:
'card_date'
,
}
},
...
...
@@ -228,8 +240,9 @@ Component({
},
// 获取门店套餐
getShopPackage
()
{
const
{
merchantId
}
=
wx
.
p
.
storage
.
get
(
'merchant_info'
)
let
para
=
{
merchantId
:
MERCHANT_ID
merchantId
}
wx
.
p
.
api
.
equityApi
.
storePackage
(
para
).
then
(
res
=>
{
this
.
setData
({
...
...
@@ -258,25 +271,36 @@ Component({
return
}
wx
.
p
.
api
.
equityApi
.
checkOpenMember
().
then
(
res
=>
{
let
flag
=
false
let
flag
=
false
,
identity
=
0
// 普通会员3 银卡2 金卡1 非会员 0
if
(
res
.
data
&&
res
.
data
.
validitDate
)
{
res
.
data
.
time
=
new
Date
(
res
.
data
.
validitDate
).
format
(
'yyyy.MM.dd'
)
}
if
(
res
.
data
&&
res
.
data
.
endTime
){
res
.
data
.
endTime
=
new
Date
(
res
.
data
.
endTime
).
format
(
'yyyy.MM.dd'
)
}
// 普通会员
if
(
res
.
code
==
0
&&
res
.
data
)
{
flag
=
true
identity
=
3
if
(
res
.
data
&&
res
.
data
.
cardTypeSpecial
){
identity
=
res
.
data
.
cardTypeSpecial
}
}
wx
.
p
.
storage
.
set
(
'isVIP'
,
flag
)
this
.
setData
({
isOpen
:
flag
,
vipInfo
:
res
.
data
,
identity
})
})
},
// 获取门店会员卡信息
getMemberCardData
()
{
const
{
merchantId
}
=
wx
.
p
.
storage
.
get
(
'merchant_info'
)
let
para
=
{
merchantId
:
MERCHANT_ID
merchantId
}
wx
.
p
.
api
.
equityApi
.
memberCard
(
para
).
then
(
res
=>
{
this
.
setData
({
...
...
pages/tab/equity/index.scss
View file @
a47e1d8
...
...
@@ -74,6 +74,22 @@ page {
font-weight
:
500
;
font-size
:
32rpx
;
}
.sliver_title
{
background
:
linear-gradient
(
125deg
,
#C99113
100%
,
#A9790B
100%
)
!
important
;
-webkit-background-clip
:
text
!
important
;
background-clip
:
text
!
important
;
color
:
transparent
!
important
;
font-weight
:
600
;
font-size
:
32rpx
;
}
.gold_title
{
background
:
linear-gradient
(
125deg
,
#645E54
100%
,
#29271E
100%
)
!
important
;
-webkit-background-clip
:
text
!
important
;
background-clip
:
text
!
important
;
color
:
transparent
!
important
;
font-weight
:
600
;
font-size
:
32rpx
;
}
.card_date
{
position
:
absolute
;
left
:
40rpx
;
...
...
@@ -85,6 +101,18 @@ page {
font-weight
:
400
;
font-size
:
20rpx
;
}
.sliver_date
{
background
:
linear-gradient
(
125deg
,
#C99113
100%
,
#A9790B
100%
)
!
important
;
-webkit-background-clip
:
text
!
important
;
background-clip
:
text
!
important
;
color
:
transparent
!
important
;
}
.gold_date
{
background
:
linear-gradient
(
125deg
,
#645E54
100%
,
#29271E
100%
)
!
important
;
-webkit-background-clip
:
text
!
important
;
background-clip
:
text
!
important
;
color
:
transparent
!
important
;
}
}
// 金刚区
...
...
@@ -548,9 +576,9 @@ page {
}
.commodity_list_widget
{
margin-top
:
20rpx
;
//
margin-top: 20rpx;
box-sizing
:
border-box
;
padding
:
32rpx
;
//
padding: 32rpx;
}
.reLocation_wrap
{
...
...
pages/tab/equity/index.wxml
View file @
a47e1d8
...
...
@@ -50,10 +50,11 @@
<view bind:tap="toBuyMember" class="open_btn flex_cc">开通会员</view>
</view>
<!-- 会员 -->
<view wx:else style="background: url({{IMGURL}}{{IMGURKBASE}}pt_vip_bg.png);background-size: 100% 100%;" class="vip_pannel">
<view class="card_title">{{memberInfo.equityName}}</view>
<view wx:if="{{isOpen&&vipInfo.cardNo}}" class="card_date">{{vipInfo.time}}</view>
<view wx:elif="{{isOpen&&!vipInfo.cardNo}}" class="card_date"> {{vipInfo.renewDay}}天后到期</view>
<view wx:else style="background: url({{IMGURL}}{{IMGURKBASE}}{{vipStatus[identity]}}.png);background-size: 100% 100%;" class="vip_pannel">
<view class="card_title {{titleClass[identity]}}">{{memberInfo.equityName}}</view>
<view wx:if="{{isOpen&&vipInfo.cardNo&&identity==3}}" class="card_date {{dateClass[identity]}}">{{vipInfo.time}}</view>
<view wx:elif="{{isOpen&&vipInfo.cardNo&&identity<3}}" class="card_date {{dateClass[identity]}}">{{vipInfo.endTime}}</view>
<view wx:elif="{{isOpen&&!vipInfo.cardNo}}" class="card_date {{dateClass[identity]}}"> {{vipInfo.renewDay}}天后到期</view>
<view wx:else class="card_date">开通会员尊享优质权益</view>
</view>
<!-- 金刚区 -->
...
...
project.config.json
View file @
a47e1d8
...
...
@@ -57,6 +57,6 @@
],
"include"
:
[]
},
"appid"
:
"wx
6e40cfb83ce4ffb1
"
,
"appid"
:
"wx
e10067a63c1856ac
"
,
"projectname"
:
"hmd"
}
\ No newline at end of file
Write
Preview
Markdown
is supported
Attach a file
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 post a comment