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
416941cc
Commit
416941cc
authored
Apr 30, 2020
by
程南
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
样式替换
parent
68ddc37f
Show whitespace changes
Inline
Side-by-side
Showing
63 changed files
with
1742 additions
and
347 deletions
+1742
-347
app.js
src/app.js
+1
-1
app.json
src/app.json
+5
-5
app.wxss
src/app.wxss
+9
-0
attention.wxss
src/component/attention/attention.wxss
+2
-1
authorization-modal-point.wxss
.../authorization-modal-point/authorization-modal-point.wxss
+2
-2
authorization-modal.wxss
src/component/authorization-modal/authorization-modal.wxss
+2
-2
productListStyleTwo.wxss
src/component/productListStyleTwo/productListStyleTwo.wxss
+1
-1
relatedOrderItem.wxss
src/component/relatedOrderItem/relatedOrderItem.wxss
+1
-1
skuPopup.js
src/component/skuPopup/skuPopup.js
+4
-0
skuPopup.wxml
src/component/skuPopup/skuPopup.wxml
+1
-1
statusPoint.wxml
src/component/statusPoint/statusPoint.wxml
+1
-3
statusPoint.wxss
src/component/statusPoint/statusPoint.wxss
+1
-0
index.js
src/config/index.js
+20
-2
category.js
src/pages/category/category.js
+81
-62
category.json
src/pages/category/category.json
+1
-0
category.wxml
src/pages/category/category.wxml
+56
-48
category.wxss
src/pages/category/category.wxss
+83
-12
confirmOrder.wxml
src/pages/confirmOrder/confirmOrder.wxml
+1
-1
couponCodeDetail.wxss
src/pages/couponCodeDetail/couponCodeDetail.wxss
+1
-1
couponDetail.js
src/pages/couponDetail/couponDetail.js
+39
-9
couponDetail.wxml
src/pages/couponDetail/couponDetail.wxml
+4
-2
couponDetail.wxss
src/pages/couponDetail/couponDetail.wxss
+5
-1
coupons.js
src/pages/coupons/coupons.js
+48
-111
coupons.wxml
src/pages/coupons/coupons.wxml
+71
-24
coupons.wxss
src/pages/coupons/coupons.wxss
+28
-7
mySpend.wxss
src/pages/mySpend/mySpend.wxss
+1
-1
pointDetail.js
src/pages/pointDetail/pointDetail.js
+1
-1
productDetail.wxml
src/pages/productDetail/productDetail.wxml
+1
-0
productDetail.wxss
src/pages/productDetail/productDetail.wxss
+2
-2
userCenter.wxml
src/pages/userCenter/userCenter.wxml
+1
-0
project.config.json
src/project.config.json
+15
-1
releaseContent.wxss
...hoppingGuid/page/pages/releaseContent/releaseContent.wxss
+1
-1
IntegralMallGoods.wxss
...ckage/page/pages/IntegralMallGoods/IntegralMallGoods.wxss
+4
-3
couponCenter.wxss
src/subPackage/page/pages/couponCenter/couponCenter.wxss
+2
-1
couponCenterInfo.wxss
...Package/page/pages/couponCenterInfo/couponCenterInfo.wxss
+1
-1
subPage.wxml
src/subPackage/page/pages/subPage/subPage.wxml
+9
-2
valueCard.wxss
src/subPackage/page/pages/valueCard/valueCard.wxss
+2
-2
valueCardInfo.wxss
src/subPackage/page/pages/valueCardInfo/valueCardInfo.wxss
+1
-1
deliveryCode.wxss
src/subPackageA/page/pages/deliveryCode/deliveryCode.wxss
+1
-1
moneyBugCoupon.js
src/subPackageA/page/pages/moneyBuyCoupon/moneyBugCoupon.js
+67
-0
moneyBugCoupon.json
...subPackageA/page/pages/moneyBuyCoupon/moneyBugCoupon.json
+4
-0
moneyBugCoupon.wxml
...subPackageA/page/pages/moneyBuyCoupon/moneyBugCoupon.wxml
+2
-0
moneyBugCoupon.wxss
...subPackageA/page/pages/moneyBuyCoupon/moneyBugCoupon.wxss
+2
-0
moneyBuyCoupon.js
src/subPackageA/page/pages/moneyBuyCoupon/moneyBuyCoupon.js
+70
-0
moneyBuyCoupon.json
...subPackageA/page/pages/moneyBuyCoupon/moneyBuyCoupon.json
+9
-0
moneyBuyCoupon.wxml
...subPackageA/page/pages/moneyBuyCoupon/moneyBuyCoupon.wxml
+18
-0
moneyBuyCoupon.wxss
...subPackageA/page/pages/moneyBuyCoupon/moneyBuyCoupon.wxss
+65
-0
moneyBuyCouponInfo.js
...kageA/page/pages/moneyBuyCouponInfo/moneyBuyCouponInfo.js
+202
-0
moneyBuyCouponInfo.json
...geA/page/pages/moneyBuyCouponInfo/moneyBuyCouponInfo.json
+6
-0
moneyBuyCouponInfo.wxml
...geA/page/pages/moneyBuyCouponInfo/moneyBuyCouponInfo.wxml
+67
-0
moneyBuyCouponInfo.wxss
...geA/page/pages/moneyBuyCouponInfo/moneyBuyCouponInfo.wxss
+230
-0
moneyBuyCouponRecords.js
...page/pages/moneyBuyCouponRecords/moneyBuyCouponRecords.js
+87
-0
moneyBuyCouponRecords.json
...ge/pages/moneyBuyCouponRecords/moneyBuyCouponRecords.json
+8
-0
moneyBuyCouponRecords.wxml
...ge/pages/moneyBuyCouponRecords/moneyBuyCouponRecords.wxml
+17
-0
moneyBuyCouponRecords.wxss
...ge/pages/moneyBuyCouponRecords/moneyBuyCouponRecords.wxss
+43
-0
payCardInfo.js
src/subPackageA/page/pages/payCardInfo/payCardInfo.js
+88
-0
payCardInfo.json
src/subPackageA/page/pages/payCardInfo/payCardInfo.json
+6
-0
payCardInfo.wxml
src/subPackageA/page/pages/payCardInfo/payCardInfo.wxml
+26
-0
payCardInfo.wxss
src/subPackageA/page/pages/payCardInfo/payCardInfo.wxss
+154
-0
pointExchangeCoupon.wxss
...A/page/pages/pointExchangeCoupon/pointExchangeCoupon.wxss
+4
-3
pointExchangeGoods.wxss
...geA/page/pages/pointExchangeGoods/pointExchangeGoods.wxss
+4
-3
util.js
src/utils/util.js
+46
-7
wxService.js
src/utils/wxService.js
+7
-20
No files found.
src/app.js
View file @
416941cc
...
...
@@ -171,7 +171,7 @@ App({
isPlusVip
:
isPlusVip
,
cityJson
:
cityJson
,
brandId
:
envInfo
.
brandId
,
themeColor
:
'#007d63'
,
//主题颜色
themeColor
:
envInfo
.
themeColor
,
//主题颜色
},
//跳转10级
navigateTo
(
routerObj
){
...
...
src/app.json
View file @
416941cc
...
...
@@ -106,7 +106,11 @@
"pages/shareArticle/shareArticle"
,
"pages/pointActicityGroup/pointActivityGroup"
,
"pages/pointExchangeCoupon/pointExchangeCoupon"
,
"pages/pointExchangeGoods/pointExchangeGoods"
"pages/pointExchangeGoods/pointExchangeGoods"
,
"pages/payCardInfo/payCardInfo"
,
"pages/moneyBuyCoupon/moneyBuyCoupon"
,
"pages/moneyBuyCouponInfo/moneyBuyCouponInfo"
,
"pages/moneyBuyCouponRecords/moneyBuyCouponRecords"
]
},
{
...
...
@@ -141,10 +145,6 @@
"contactPlugin"
:
{
"version"
:
"1.3.0"
,
"provider"
:
"wx104a1a20c3f81ec2"
},
"live-player-plugin"
:
{
"version"
:
"1.0.7"
,
"provider"
:
"wx2b03c6e691cd7370"
}
},
"permission"
:
{
...
...
src/app.wxss
View file @
416941cc
page{
--themecolor: #007d63; /* var(--themecolor) --主题色配置 */
--themeColorRgba01 : rgba(0,125,99,0.1);
--themeColorRgba02 : rgba(0,125,99,0.2);
--themeColorRgba03 : rgba(0,125,99,0.3);
--themeColorRgba04 : rgba(0,125,99,0.4);
--themeColorRgba05 : rgba(0,125,99,0.5);
--themeColorRgba06 : rgba(0,125,99,0.6);
--themeColorRgba07 : rgba(0,125,99,0.7);
--themeColorRgba08 : rgba(0,125,99,0.8);
--themeColorRgba09 : rgba(0,125,99,0.9);
}
...
...
src/component/attention/attention.wxss
View file @
416941cc
...
...
@@ -31,6 +31,6 @@
height: 70rpx;
line-height: 70rpx;
border-radius: 35rpx;
background-color:
rgba(0,125,99, 1
);
background-color:
var(--themecolor
);
text-align: center;
}
\ No newline at end of file
src/component/authorization-modal-point/authorization-modal-point.wxss
View file @
416941cc
...
...
@@ -60,7 +60,7 @@
height: 88rpx;
line-height: 88rpx;
font-size: 30rpx;
background-color:
#05c35b
!important;
background-color:
var(--themecolor)
!important;
margin: 50rpx auto 32rpx;
}
.agree-rule{
...
...
@@ -73,7 +73,7 @@
margin-right: 10rpx;
}
.rule-text{
color:
#05c35b
;
color:
var(--themecolor)
;
}
.rule-wrap{
margin-left: 76rpx;
...
...
src/component/authorization-modal/authorization-modal.wxss
View file @
416941cc
...
...
@@ -60,7 +60,7 @@
height: 88rpx;
line-height: 88rpx;
font-size: 30rpx;
background-color:
#05c35b
!important;
background-color:
var(--themecolor)
!important;
margin: 50rpx auto 32rpx;
}
.agree-rule{
...
...
@@ -73,7 +73,7 @@
margin-right: 10rpx;
}
.rule-text{
color:
#05c35b
;
color:
var(--themecolor)
;
}
.rule-wrap{
margin-left: 76rpx;
...
...
src/component/productListStyleTwo/productListStyleTwo.wxss
View file @
416941cc
...
...
@@ -83,7 +83,7 @@
line-height: 35rpx;
border-radius: 19rpx;
text-align: center;
background-color:
rgba(0,125,99, 1
);
background-color:
var(--themecolor
);
border: 2rpx solid rgba(151, 151, 151, 1);
color: rgba(255, 255, 255, 1);
font-size: 18rpx;
...
...
src/component/relatedOrderItem/relatedOrderItem.wxss
View file @
416941cc
...
...
@@ -165,7 +165,7 @@
line-height: 40rpx;
text-align: center;
border-radius: 5rpx;
background-color:
rgba(0,125,99, 1
);
background-color:
var(--themecolor
);
color: rgba(255, 255, 255, 1);
font-size: 18rpx;
font-family: PingFangSC-Regular;
...
...
src/component/skuPopup/skuPopup.js
View file @
416941cc
...
...
@@ -11,6 +11,10 @@ Component({
type
:
Boolean
,
type
:
false
},
currentHasMobile
:
{
type
:
Boolean
,
type
:
false
},
disableNum
:
{
// 不能改变的数量
type
:
Number
,
observer
:
'_disableNumChange'
,
...
...
src/component/skuPopup/skuPopup.wxml
View file @
416941cc
...
...
@@ -80,7 +80,7 @@
</view>
</scroll-view>
<!-- 按钮状态 -->
<view wx:if="{{!currentHas
UserInfo
}}">
<view wx:if="{{!currentHas
Mobile
}}">
<!-- <button
bindgetuserinfo="_getUserInfo"
data-jflag="false"
...
...
src/component/statusPoint/statusPoint.wxml
View file @
416941cc
<!--component/statusPoint/statusPoint.wxml-->
<!--#05C35B -->
<view class="status" style="height: {{imgHeight}}rpx" wx:if="{{img}}">
<view class="status-tips"
style="background-color:rgba(5, 195, 91, 1);"
wx:if="{{currentStatus == 2 && currentTimeStatus == 1}}">进行中 >></view>
<view class="status-tips" wx:if="{{currentStatus == 2 && currentTimeStatus == 1}}">进行中 >></view>
<view class="status-tips" style="background-color:rgb(170, 170, 170);" wx:elif="{{currentStatus == 3}}"> 已失效 >></view>
<view class="status-tips" style="background-color:rgb(170, 170, 170);" wx:elif="{{currentTimeStatus == 2}}">已结束 >></view>
<view class="status-tips" style="background-color:rgb(170, 170, 170);" wx:elif="{{currentTimeStatus == 3}}">未开始 >></view>
<view class="status-tips" style="background-color:rgb(170, 170, 170);" wx:else>已结束 >></view>
<!--<image class='status-tips' src='/assets/imgs/point/status.png' mode="widthFix"/>-->
<image wx:if="{{img}}" class='status-img' src='{{img}}' />
</view>
src/component/statusPoint/statusPoint.wxss
View file @
416941cc
...
...
@@ -17,6 +17,7 @@
line-height: 58rpx;
font-size: 24rpx;
border-radius: 10rpx 100rpx 100rpx 10rpx;
background-color: var(--themecolor);
}
.status-img {
border-radius: 8rpx;
...
...
src/config/index.js
View file @
416941cc
...
...
@@ -6,7 +6,7 @@
// 修改 BRANCH_ID 为对应的商户id
// app.js 中brandId 修改为对应
const
PROJECT_ENV
=
'
prod
'
// 生产 prod, 开发 dev, 测试 test , 测试门户 test_store, 预生产 pre
const
PROJECT_ENV
=
'
dev
'
// 生产 prod, 开发 dev, 测试 test , 测试门户 test_store, 预生产 pre
//仅生产环境时 配置 :
//3001 3001 , wx313ec36b710125d4 有直播
//2006 泰华 , wx40fec8944623c8b3 有直播
...
...
@@ -25,7 +25,7 @@ const PROJECT_ENV = 'prod' // 生产 prod, 开发 dev, 测试 test , 测试门
//2992 山东盛联微商城 wx53dedc202ae0d0c2
//2002 巴黎贝甜 wx21968cb3a486d4ab
const
BRANCH_ID
=
3
001
const
BRANCH_ID
=
1
001
const
isMall
=
true
// const needMock = '' //
...
...
@@ -76,6 +76,7 @@ const prod_brand_config = {
isNeedGetLocation
:
true
,
//是否开启小程序获取位置(提交订单时获取门店信息)
guiderCanScanQrcode
:
true
,
//导购是否有扫一扫功能
shareTitle
:
'【舞象星品荟-社交商城】'
,
themeColor
:
'#cb3c3c'
,
//主题颜色
logo
:
'https://img3.bigaka.com/prd/3001/202003/20200331/3001842823fb-2601-4b58-a648-79ad799ad425.png'
,
openRefundTips
:
true
,
//是否开启退货须知显示
refundTips
:
'温馨提示:退货通过审核后需将清单随包裹一起寄回或纸条备注(订单号与退货商品款号)【请务必审核通过后24小时内填写寄回运单号,拒签到付/顺丰/EMS/天天快递 不影响二次销售】'
,
//退货须知文本
...
...
@@ -95,6 +96,7 @@ const prod_brand_config = {
isMall
:
isMall
,
hasLiveVideo
:
true
,
//是否有直播功能
orderingMustOpenCard
:
true
,
themeColor
:
'#cb3c3c'
,
//主题颜色
touchPointStorageTime
:
30
*
60
*
1000
,
//单位毫秒
isOpenSelfMention
:
true
,
// 是否开启门店自提
canRefundDaysAfterDelivery
:
15
,
//发货后多少天之内可显示申请退款按钮
...
...
@@ -111,6 +113,7 @@ const prod_brand_config = {
tunnelToken
:
'1ea3f0c0dd0c91ee54e546a99beafbfb'
,
brandId
:
2007
,
plusIsOpen
:
false
,
themeColor
:
'#cb3c3c'
,
//主题颜色
contactUsIsOpen
:
true
,
touchPointStorageTime
:
30
*
60
*
1000
,
//单位毫秒
canUseWechatAddress
:
false
,
//是否使用获取微信地址
...
...
@@ -138,6 +141,7 @@ const prod_brand_config = {
touchPointStorageTime
:
30
*
60
*
1000
,
//单位毫秒
canUseWechatAddress
:
false
,
//是否使用获取微信地址
contactUsPluginId
:
''
,
themeColor
:
'#cb3c3c'
,
//主题颜色
hasTrial
:
false
,
isMall
:
isMall
,
hasLiveVideo
:
false
,
//是否有直播功能
...
...
@@ -159,6 +163,7 @@ const prod_brand_config = {
plusIsOpen
:
false
,
contactUsIsOpen
:
false
,
contactUsPluginId
:
''
,
themeColor
:
'#cb3c3c'
,
//主题颜色
touchPointStorageTime
:
30
*
60
*
1000
,
//单位毫秒
canUseWechatAddress
:
false
,
//是否使用获取微信地址
hasTrial
:
false
,
...
...
@@ -184,6 +189,7 @@ const prod_brand_config = {
contactUsPluginId
:
''
,
//联系我们插件PluginID
hasTrial
:
false
,
// 是否有体验账号
hasLiveVideo
:
false
,
//是否有直播功能
themeColor
:
'#cb3c3c'
,
//主题颜色
canUseWechatAddress
:
false
,
//是否使用获取微信地址
isMall
:
isMall
,
// 商城或门户 true 商城 false 门户
orderingMustOpenCard
:
false
,
//下单是否必须卡开
...
...
@@ -210,6 +216,7 @@ const prod_brand_config = {
hasLiveVideo
:
false
,
//是否有直播功能
canUseWechatAddress
:
false
,
//是否使用获取微信地址
orderingMustOpenCard
:
false
,
themeColor
:
'#007d63'
,
//主题颜色
touchPointStorageTime
:
48
*
60
*
60
*
1000
,
//单位毫秒
guiderCanScanQrcode
:
false
,
//导购是否有扫一扫功能
canRefundDaysAfterDelivery
:
15
,
//发货后多少天之内可显示申请退款按钮
...
...
@@ -231,6 +238,7 @@ const prod_brand_config = {
contactUsPluginId
:
'6d310b33ba27c784fb6872942a57711d'
,
hasTrial
:
false
,
hasLiveVideo
:
true
,
//是否有直播功能
themeColor
:
'#cb3c3c'
,
//主题颜色
touchPointStorageTime
:
30
*
60
*
1000
,
//单位毫秒
isMall
:
isMall
,
orderingMustOpenCard
:
true
,
...
...
@@ -253,6 +261,7 @@ const prod_brand_config = {
contactUsPluginId
:
''
,
hasTrial
:
false
,
hasLiveVideo
:
false
,
//是否有直播功能
themeColor
:
'#cb3c3c'
,
//主题颜色
isMall
:
isMall
,
canUseWechatAddress
:
false
,
//是否使用获取微信地址
touchPointStorageTime
:
30
*
60
*
1000
,
//单位毫秒
...
...
@@ -280,6 +289,7 @@ const prod_brand_config = {
touchPointStorageTime
:
30
*
60
*
1000
,
//单位毫秒
canUseWechatAddress
:
false
,
//是否使用获取微信地址
isMall
:
isMall
,
themeColor
:
'#cb3c3c'
,
//主题颜色
orderingMustOpenCard
:
false
,
guiderCanScanQrcode
:
true
,
//导购是否有扫一扫功能
isOpenSelfMention
:
false
,
// 是否开启门店自提
...
...
@@ -299,6 +309,7 @@ const prod_brand_config = {
contactUsPluginId
:
''
,
hasTrial
:
false
,
isMall
:
isMall
,
themeColor
:
'#cb3c3c'
,
//主题颜色
canUseWechatAddress
:
false
,
//是否使用获取微信地址
touchPointStorageTime
:
30
*
60
*
1000
,
//单位毫秒
orderingMustOpenCard
:
false
,
...
...
@@ -321,6 +332,7 @@ const prod_brand_config = {
contactUsIsOpen
:
true
,
contactUsPluginId
:
''
,
hasTrial
:
false
,
themeColor
:
'#cb3c3c'
,
//主题颜色
isMall
:
isMall
,
hasLiveVideo
:
false
,
//是否有直播功能
canUseWechatAddress
:
false
,
//是否使用获取微信地址
...
...
@@ -345,6 +357,7 @@ const prod_brand_config = {
contactUsPluginId
:
'fbe3bb6f88e7331ca719713910c164a2'
,
//联系我插件
hasLiveVideo
:
false
,
//是否有直播功能
hasTrial
:
false
,
themeColor
:
'#cb3c3c'
,
//主题颜色
canUseWechatAddress
:
false
,
//是否使用获取微信地址
touchPointStorageTime
:
30
*
60
*
1000
,
//单位毫秒
isMall
:
isMall
,
...
...
@@ -368,6 +381,7 @@ const prod_brand_config = {
contactUsPluginId
:
'50934d036dc2051758f4d934d7100b78'
,
hasTrial
:
false
,
isMall
:
isMall
,
themeColor
:
'#cb3c3c'
,
//主题颜色
canUseWechatAddress
:
false
,
//是否使用获取微信地址
touchPointStorageTime
:
30
*
60
*
1000
,
//单位毫秒
orderingMustOpenCard
:
true
,
...
...
@@ -390,6 +404,7 @@ const prod_brand_config = {
contactUsIsOpen
:
false
,
contactUsPluginId
:
''
,
hasTrial
:
true
,
themeColor
:
'#cb3c3c'
,
//主题颜色
isMall
:
isMall
,
canUseWechatAddress
:
false
,
//是否使用获取微信地址
touchPointStorageTime
:
30
*
60
*
1000
,
//单位毫秒
...
...
@@ -507,6 +522,8 @@ let canRefundDaysAfterDelivery = PROJECT_ENV == 'prod' ? prod_brand_config[BRANC
let
touchPointStorageTime
=
PROJECT_ENV
==
'prod'
?
prod_brand_config
[
BRANCH_ID
].
touchPointStorageTime
:
1800000
;
let
openRefundTips
=
PROJECT_ENV
==
'prod'
?
prod_brand_config
[
BRANCH_ID
].
openRefundTips
:
true
;
let
refundTips
=
PROJECT_ENV
==
'prod'
?
prod_brand_config
[
BRANCH_ID
].
refundTips
:
'温馨提示:退货通过审核后需将清单随包裹一起寄回或纸条备注(订单号与退货商品款号)【请务必审核通过后24小时内填写寄回运单号,拒签到付/顺丰/EMS/天天快递 不影响二次销售】'
;
let
themeColor
=
PROJECT_ENV
==
'prod'
?
prod_brand_config
[
BRANCH_ID
].
themeColor
:
'#cb3c3c'
;
//配置信息导出
const
envInfo
=
(()
=>
{
return
{
...
...
@@ -534,6 +551,7 @@ const envInfo = (() => {
touchPointStorageTime
:
touchPointStorageTime
,
openRefundTips
:
openRefundTips
,
refundTips
:
refundTips
,
themeColor
:
themeColor
,
}
})()
...
...
src/pages/category/category.js
View file @
416941cc
...
...
@@ -3,34 +3,55 @@ const app = getApp()
const
wxService
=
require
(
'../../utils/wxService'
)
import
{
Integer
}
from
'../../utils/integerDigitalConvertion'
const
{
memberId
,
member
}
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
const
defaultCategoryImg
=
'https://img3.bigaka.com/prd/3001/202004/20200428/30012dfcf171-5140-40fc-babd-4482da4f7a1a.jpg'
;
const
defaultWidthCategoryImg
=
'https://img3.bigaka.com/prd/3001/202004/20200428/300168439317-6b28-4947-9054-b6d08b9081ce.jpg'
;
wxService
.
page
({
/**
* 页面的初始数据
*/
data
:
{
cur
Menu
:
[
0
,
0
]
,
cur
rentFirstCategory
:
{}
,
navData
:
[],
secondCategory
:
[],
defaultCategoryImg
:
defaultCategoryImg
,
defaultWidthCategoryImg
:
defaultWidthCategoryImg
,
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
:
function
(
options
)
{
let
memberId
=
options
.
memberId
;
if
(
memberId
)
{
let
share_
memberId
=
options
.
memberId
;
if
(
share_
memberId
)
{
let
tentacleInfo
=
{
content
:
'分类'
,
title
:
'分类'
,
tentacleId
:
memberId
,
tentacleId
:
share_
memberId
,
contentType
:
app
.
globalData
.
contants
.
SHARE_TYPE
.
CLASSIFY
,
type
:
3
// 1:门店,2:员工(暂时不做),3:会员,4:第三方外部渠道,5:智能营销
};
this
.
generatePointObject
(
tentacleInfo
);
}
if
(
typeof
this
.
getTabBar
===
'function'
&&
this
.
getTabBar
())
{
this
.
getTabBar
().
setData
({
selected
:
1
})
}
this
.
getCategoryList
();
},
//跳转到商品列表
onTapToGoodsList
(
e
){
let
id
=
e
.
currentTarget
.
dataset
.
id
;
let
name
=
e
.
currentTarget
.
dataset
.
label
;
wx
.
navigateTo
({
url
:
`/subPackage/page/pages/categoryPro/categoryPro?id=
${
id
}
&name=
${
name
}
`
,
});
},
/**
...
...
@@ -44,14 +65,7 @@ wxService.page({
* 生命周期函数--监听页面显示
*/
onShow
:
function
()
{
const
{
memberId
,
member
}
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
if
(
typeof
this
.
getTabBar
===
'function'
&&
this
.
getTabBar
())
{
this
.
getTabBar
().
setData
({
selected
:
1
})
}
this
.
getCategoryList
()
},
// 分类列表
...
...
@@ -60,70 +74,75 @@ wxService.page({
title
:
'加载中'
})
wxService
.
get
(
`/sale/product/mallCategory/buyer/findCategoryTree`
).
then
(
res
=>
{
cons
t
{
result
,
data
}
=
res
.
data
le
t
{
result
,
data
}
=
res
.
data
if
(
result
==
0
)
{
wx
.
hideLoading
()
wx
.
hideLoading
();
data
=
data
?
data
:
[];
data
.
forEach
(
item
=>
{
item
.
active
=
false
;
});
// 处理三级标识
this
.
handleFirstCategoryHasThirdChildren
(
data
);
if
(
data
.
length
>
0
){
data
[
0
].
active
=
true
;
this
.
data
.
currentFirstCategory
=
data
[
0
];
this
.
data
.
secondCategory
=
data
[
0
].
children
?
data
[
0
].
children
:
[];
this
.
data
.
secondCategory
=
this
.
handleSecondCategoryChildren
(
this
.
data
.
secondCategory
);
}
this
.
setData
({
navData
:
data
})
navData
:
data
,
secondCategory
:
this
.
data
.
secondCategory
,
currentFirstCategory
:
this
.
data
.
currentFirstCategory
,
});
}
}).
finally
(()
=>
{
wx
.
hideLoading
()
})
},
selectMenu
:
function
(
event
)
{
const
{
id1
,
id2
,
name1
,
name2
}
=
event
.
target
.
dataset
// xm_bi.Event.stat("classClick", {
// "className": name2,
// "classType": "中类",
// "classID": id2
// })
selectMenu
:
function
(
e
)
{
let
index
=
e
.
currentTarget
.
dataset
.
index
;
this
.
data
.
navData
.
forEach
(
item
=>
{
item
.
active
=
false
;
});
this
.
data
.
navData
[
index
].
active
=
true
;
this
.
data
.
currentFirstCategory
=
this
.
data
.
navData
[
index
];
this
.
data
.
secondCategory
=
this
.
data
.
navData
[
index
].
children
?
this
.
data
.
navData
[
index
].
children
:
[];
this
.
data
.
secondCategory
=
this
.
handleSecondCategoryChildren
(
this
.
data
.
secondCategory
);
this
.
setData
({
curMenu
:
[
event
.
target
.
dataset
.
i
,
event
.
target
.
dataset
.
j
]
})
// app.sr.track('browse_category_detail', {
// first_category: {
// id: id1,
// name: name1
// },
// second_category: {
// id: id2,
// name: name2
// }
// })
navData
:
this
.
data
.
navData
,
secondCategory
:
this
.
data
.
secondCategory
,
currentFirstCategory
:
this
.
data
.
currentFirstCategory
,
});
},
//处理二级分类下的三级 如果没有三级则children 设置为空数组
handleSecondCategoryChildren
(
secondCategory
){
secondCategory
.
forEach
(
item
=>
{
item
.
children
=
item
.
children
?
item
.
children
:
[];
});
/**
* 生命周期函数--监听页面隐藏
*/
onHide
:
function
()
{
return
secondCategory
;
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload
:
function
()
{
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh
:
function
()
{
//处理某一级是不是都有三级分类
handleFirstCategoryHasThirdChildren
(
navData
){
navData
.
forEach
(
first
=>
{
first
.
hasThirdChildren
=
false
;
let
firstChildren
=
first
.
children
?
first
.
children
:
[];
if
(
firstChildren
.
length
>
0
){
for
(
let
i
=
0
;
i
<
firstChildren
.
length
;
i
++
){
firstChildren
[
i
].
children
=
firstChildren
[
i
].
children
?
firstChildren
[
i
].
children
:
[];
if
(
firstChildren
[
i
].
children
.
length
>
0
){
first
.
hasThirdChildren
=
true
;
break
;
}
}
}
});
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom
:
function
()
{
},
/**
* 用户点击右上角分享
...
...
src/pages/category/category.json
View file @
416941cc
{
"navigationBarTitleText"
:
"分类"
,
"disableScroll"
:
true
,
"usingComponents"
:
{
"go-home"
:
"/component/goHome/goHome"
,
"go-guid"
:
"/component/goGuid/goGuid"
...
...
src/pages/category/category.wxml
View file @
416941cc
...
...
@@ -2,64 +2,72 @@
<view class="nav-container search-top">
<scroll-view class="nav-menu" scroll-y="true">
<view
wx:for="{{navData}}"
wx:key="{{j}}"
wx:for-index="j"
wx:for-item="menuSec"
class="menu-item{{j == curMenu[1] ? ' active' : ''}}"
>
<view
class="menu-name{{j == curMenu[1] ? ' theme-text-color' : ''}}"
data-j="{{j}}"
data-name="{{menuSec.label}}"
data-id="{{menuSec.id}}"
bindtap="selectMenu"
>{{menuSec.label}}
<view wx:for="{{navData}}" wx:key="*this" wx:for-index="index" wx:for-item="item" class="menu-item">
<view class="menu-name {{ item.active ? ' theme-text-color' : ''}}"
data-index="{{index}}" data-name="{{item.label}}" data-id="{{item.id}}" bindtap="selectMenu">
{{item.label}}
</view>
</view>
</scroll-view>
<scroll-view class="nav-contents" scroll-y="true">
<view
wx:for="{{navData}}"
wx:key="{{j}}"
wx:for-index="j"
wx:for-item="menuSec"
class="nav-content{{j == curMenu[1] ? ' active' : ''}}"
>
<navigator
hover-class="none"
class="sec-menu-image"
open-type="navigate"
url="/subPackage/page/pages/categoryPro/categoryPro?id={{menuSec.id}}&name={{menuSec.label}}"
>
<image src="{{menuSec.image}}" mode="widthFix" />
</navigator>
<scroll-view class="nav-contents clear-box" scroll-y="true" wx:if="{{currentFirstCategory.id}}">
<!-- 二级分类 -->
<view class="second-category" wx:if="{{!currentFirstCategory.hasThirdChildren}}">
<!-- 无三级分类时 -->
<!-- 显示一级图片 -->
<view class="img-con">
<image
data-id="{{currentFirstCategory.id}}"
data-label="{{currentFirstCategory.label}}"
bindtap="onTapToGoodsList"
src="{{currentFirstCategory.image ? currentFirstCategory.image : defaultWidthCategoryImg}}"
mode="widthFix"></image>
</view>
<view class="menu-list">
<view
wx:for="{{menuSec.children}}"
wx:key="{{k}}"
wx:for-index="k"
wx:for-item="menuThr"
class="menu-third"
>
<view data-id="{{menuThr.id}}" data-name="{{menuThr.label}}" bindtap="navPage">
<navigator
hover-class="none"
class="sec-menu-image"
open-type="navigate"
url="/subPackage/page/pages/categoryPro/categoryPro?id={{menuThr.id}}&name={{menuThr.label}}"
>
<image src="{{menuThr.image}}" class="thr-menu-image" />
<view class="thr-menu-name">{{menuThr.label}}</view>
</navigator>
<view wx:for="{{secondCategory}}" wx:key="*this" wx:for-index="k" wx:for-item="second" class="menu-third">
<view data-id="{{second.id}}" data-name="{{second.label}}"
data-id="{{second.id}}"
data-label="{{second.label}}"
bindtap="onTapToGoodsList">
<image src="{{second.image ? second.image : defaultCategoryImg}}" class="thr-menu-image" mode="aspectFill"/>
<view class="thr-menu-name">{{second.label}}</view>
</view>
</view>
</view>
</view>
<!-- 有三级分类时 -->
<view class="second-category" wx:if="{{currentFirstCategory.hasThirdChildren}}">
<view class="category-item" wx:for="{{secondCategory}}" wx:key="*this" wx:for-item="item">
<view class="img-con">
<image data-id="{{secondCategory.id}}"
data-label="{{secondCategory.label}}"
bindtap="onTapToGoodsList"
src="{{item.image ? item.image : defaultWidthCategoryImg}}" mode="widthFix"></image>
</view>
<view class="more"
data-id="{{secondCategory.id}}"
data-label="{{secondCategory.label}}"
bindtap="onTapToGoodsList">
<label>{{item.label}}</label>
<view class="right-more">
全部 <image src="/assets/imgs/arrow-right.png" mode="aspectFit"></image>
</view>
</view>
<!-- 具体的布局 -->
<view class="menu-list">
<view wx:for="{{item.children}}" wx:key="*this" wx:for-index="k" wx:for-item="third" class="menu-third">
<view data-id="{{third.id}}" data-name="{{third.label}}"
data-id="{{third.id}}"
data-label="{{third.label}}"
bindtap="onTapToGoodsList">
<image src="{{third.image ? third.image : defaultCategoryImg}}" class="thr-menu-image" mode="aspectFill"/>
<view class="thr-menu-name">{{third.label}}</view>
</view>
</view>
</view>
</view>
</view>
</scroll-view>
</view>
<!--goHome-->
...
...
src/pages/category/category.wxss
View file @
416941cc
...
...
@@ -11,27 +11,41 @@ page {
.nav-menu {
flex: 0;
width: 25%;
padding-bottom:
5
0px;
padding-bottom:
2
0px;
}
.nav-menu .menu-item {
position: relative;
/* padding: 0 16rpx; */
padding: 0 28rpx;
font-size: 26rpx;
color: #000000;
line-height: 100rpx;
text-align: center; }
height: 100rpx;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
}
.nav-menu .menu-item .menu-name {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
font-size: 26rpx; }
font-size: 26rpx;
padding: 0 20rpx;
width: 100%;
}
.clear-box{
box-sizing: border-box;
-webkit-box-sizing: border-box;
}
.nav-contents {
flex: 1;
width: 75%; }
width: 75%;
padding: 30rpx;
}
.nav-content {
display: none;
...
...
@@ -61,19 +75,20 @@ page {
}
.menu-list:after{
content: '';
width: 1
5
0rpx;
width: 1
4
0rpx;
}
.menu-third {
width: 1
5
0rpx;
width: 1
4
0rpx;
text-align: center;
padding-bottom: 32rpx; }
padding-bottom: 32rpx;
}
.menu-third image {
width: 1
5
0rpx;
height: 1
5
0rpx;
width: 1
4
0rpx;
height: 1
4
0rpx;
border-radius: 2rpx;
}
}
.thr-menu-name {
font-size: 24rpx;
...
...
@@ -83,3 +98,59 @@ page {
font-stretch: normal;
letter-spacing: -1px;
color: #333; }
.second-category{
width: 100%;
height: auto;
}
.img-con{
width: 100%;
margin-bottom: 30rpx;
}
.img-con img{
width: 100%;
}
.category-item{
width: 100%;
height: auto;
}
.category-item .more{
width: 100%;
height: auto;
padding: 10rpx 0;
display: flex;
align-items: center;
justify-content: space-between;
color: #333333;
padding-bottom: 20rpx;
border-bottom: solid 1rpx #dddddd;
margin-bottom: 20rpx;
}
.category-item .more label{
font-size: 28rpx;
font-weight: bold;
}
.category-item .more .right-more{
font-size: 24rpx;
color: #999999;
display: flex;
align-items: center;
justify-content: flex-end;
font-weight: 500;
}
.category-item .more .right-more image{
width: 18rpx;
height: 24rpx;
margin-left: 10rpx;
}
src/pages/confirmOrder/confirmOrder.wxml
View file @
416941cc
...
...
@@ -154,7 +154,7 @@
</view>
<view class="rg-item-info" bindtap="onTapChangeCheckPointDeductOpenStatus">
<view class="point-info">可用<label>{{avaliablePoint}}</label>积分,抵 <label>{{pointDeductMoney}}</label>元 </view>
<icon color="
rgb(0,125,99)
" size="20" type="{{deductCheckStatus ? 'success' : 'circle'}}" role="img"></icon>
<icon color="
{{themeColor}}
" size="20" type="{{deductCheckStatus ? 'success' : 'circle'}}" role="img"></icon>
</view>
</view>
<!-- -->
...
...
src/pages/couponCodeDetail/couponCodeDetail.wxss
View file @
416941cc
...
...
@@ -62,7 +62,7 @@ page {
.bottom-code{
font-size: 40rpx;
color:
#05c35b
;
color:
var(--themecolor)
;
display: flex;
flex-direction: column;
justify-content: flex-end;
...
...
src/pages/couponDetail/couponDetail.js
View file @
416941cc
...
...
@@ -10,28 +10,56 @@ wxService.page({
*/
data
:
{
couponDetail
:{},
cardno
:
''
cardno
:
''
,
couponType
:
''
,
},
/**
* 生命周期函数--监听页面显示
*/
onShow
()
{
const
{
cardno
}
=
this
.
options
this
.
getCouponDetail
(
cardno
)
this
.
setData
({
cardno
})
},
onLoad
()
{
onLoad
(
options
)
{
wx
.
hideShareMenu
();
const
{
cardno
,
type
}
=
options
this
.
data
.
couponType
=
type
;
this
.
getCouponDetail
(
cardno
,
type
)
this
.
setData
({
cardno
:
cardno
,
couponType
:
type
,
});
},
// 卡券详情
getCouponDetail
(
id
){
getCouponDetail
(
id
,
type
){
wx
.
showLoading
({
title
:
'加载中'
})
});
if
(
!
type
){
this
.
getNormalCouponInfo
(
id
);
}
//支付券
else
if
(
type
==
1
){
this
.
getPayCardInfo
(
id
);
}
//包邮券
else
if
(
type
==
2
){
this
.
getPostalVoucherInfo
(
id
);
}
},
//获取支付券详情
getPayCardInfo
(
id
){
},
//获取包邮券详情
getPostalVoucherInfo
(
id
){
},
//获取优惠券相信
getNormalCouponInfo
(
id
){
wxService
.
post
(
`/coupon/coupon/get?cardNo=
${
id
}
`
).
then
(
res
=>
{
const
{
result
,
data
}
=
res
.
data
if
(
result
==
0
){
...
...
@@ -52,6 +80,8 @@ wxService.page({
wx
.
hideLoading
()
})
},
//展示券码
handelPresentCouponCode
(
e
)
{
// let data = e.currentTarget.dataset
const
{
cardno
}
=
this
.
data
...
...
src/pages/couponDetail/couponDetail.wxml
View file @
416941cc
...
...
@@ -12,7 +12,9 @@
<view class='coupon-name fs-28'>{{couponDetail.couponSetting.title}}</view>
<view class='coupon-desc fs-28'>{{couponDetail.coupon.startTime}} 至 {{couponDetail.coupon.endTime}}</view>
</view>
<view class='coupon-code fs-24' bindtap="handelPresentCouponCode">出示券码</view>
<view class='coupon-code fs-24' bindtap="handelPresentCouponCode" wx:if="{{!couponType}}">出示券码</view>
<view class='coupon-code fs-24' wx:if="{{couponType == 1}}">支付券</view>
<view class='coupon-code fs-24' wx:if="{{couponType == 2}}">包邮券</view>
</view>
<view class='integral-detail'>
<!-- <view class='integral-list'>
...
...
@@ -30,7 +32,7 @@
<!--goHome-->
<go-home/>
<floatNav bind:getAuth="_getUserInfo" bind:updatePage="updatePage"/>
<view class="position-bottom">
<view class="position-bottom"
wx:if="{{!couponType}}"
>
<button type='primary' class="redeem-now" bindtap='handelPresentCouponCode'>出示券码</button>
</view>
...
...
src/pages/couponDetail/couponDetail.wxss
View file @
416941cc
...
...
@@ -42,10 +42,14 @@
color: #ffffff;
position: absolute;
right: 20rpx;
top:
3
0rpx;
top: 0rpx;
width: 24rpx;
word-wrap: break-word;
font-weight: bold;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
.integral-detail{
margin: 90rpx 0 160rpx 0;
...
...
src/pages/coupons/coupons.js
View file @
416941cc
...
...
@@ -9,68 +9,44 @@ wxService.page({
* 页面的初始数据
*/
data
:
{
nav
:[
{
type
:
'1'
,
name
:
'可使用'
},{
type
:
'2'
,
name
:
'已失效'
}
],
pageNo
:
1
,
pageSize
:
10
,
invalidPageNo
:
1
,
totalPages
:
0
,
totalElements
:
0
,
invalidTotalElements
:
0
,
couponList
:
[],
invalidCouponList
:
[],
invalidTotalPages
:
0
,
invalidTotalElements
:
0
,
currentTab
:
0
,
noMoreCoupon
:
false
,
noMoreCouponInvalid
:
false
// 支付券
payCouponList
:
[],
//包邮券
postalVoucherList
:
[]
},
//滑动切换
swiperTab
:
function
(
e
)
{
const
{
current
}
=
e
.
detail
if
(
this
.
data
.
currentTab
==
current
)
{
return
false
;
}
else
{
this
.
setData
({
currentTab
:
current
})
}
// 可使用
if
(
current
==
0
){
this
.
getCouponList
(
1
,
10
,
1
)
}
else
if
(
current
==
1
){
// 失效
this
.
getCouponList
(
1
,
10
,
0
)
}
this
.
tabSwitch
(
current
);
},
// 点击切换
clickTab
:
function
(
e
)
{
const
{
current
}
=
e
.
target
.
dataset
if
(
this
.
data
.
currentTab
==
current
)
{
return
false
;
}
else
{
this
.
tabSwitch
(
current
);
},
//tab栏切换
tabSwitch
(
current
){
if
(
this
.
data
.
currentTab
==
current
)
return
false
;
this
.
data
.
currentTab
=
current
;
this
.
setData
({
currentTab
:
current
,
// couponList: [], // 清空数据
// invalidCouponList: [],
})
}
currentTab
:
this
.
data
.
currentTab
,
});
// 可使用
// 所有可使用优惠券
if
(
current
==
0
){
this
.
getCouponList
(
1
,
10
,
1
)
}
else
if
(
current
==
1
){
//
失效
this
.
getCouponList
(
1
,
10
,
0
)
//
微信支付券
}
},
else
if
(
current
==
2
){
//包邮券
}
}
,
/**
* 生命周期函数--监听页面加载
*/
...
...
@@ -82,13 +58,19 @@ wxService.page({
*/
onShow
()
{
// 可使用 已失效
this
.
getCouponList
(
1
,
10
,
1
)
this
.
getCouponList
(
1
,
10
,
0
)
this
.
getCouponList
(
1
,
10
,
1
);
},
//跳转到卡券详情
handelPresentCouponDetail
(
e
)
{
let
{
cardno
}
=
e
.
currentTarget
.
dataset
wxService
.
router
(
`/pages/couponDetail/couponDetail`
).
search
({
cardno
})
let
{
cardno
,
type
}
=
e
.
currentTarget
.
dataset
if
(
type
){
wxService
.
router
(
`/pages/couponDetail/couponDetail`
).
search
({
cardno
:
cardno
,
type
:
type
});
}
else
{
wxService
.
router
(
`/pages/couponDetail/couponDetail`
).
search
({
cardno
:
cardno
});
}
},
//
handelPresentCouponCode
(
e
)
{
let
{
cardno
}
=
e
.
currentTarget
.
dataset
wxService
.
router
(
`/pages/couponCodeDetail/couponCodeDetail`
).
search
({
cardno
})
...
...
@@ -96,59 +78,32 @@ wxService.page({
//获取优惠券列表
getCouponList
(
pageNo
,
pageSize
,
statusNum
){
//获取我的优惠券
wx
.
showLoading
({
title
:
'加载中'
})
let
params
;
if
(
statusNum
==
1
){
params
=
{
status
:
1
}
if
(
pageNo
==
1
){
this
.
setData
({
pageNo
:
1
,
couponList
:
[],
// 清空数据
})
}
}
else
{
params
=
{
statusNot
:
1
}
if
(
pageNo
==
1
){
this
.
setData
({
invalidCouponList
:
[],
invalidPageNo
:
1
})
}
}
});
let
params
=
{};
params
.
status
=
1
;
this
.
data
.
couponList
=
[];
wxService
.
post
(
`/coupon/coupon/listWithMember4Mina?number=
${
pageNo
}
&size=
${
pageSize
}
`
,
params
).
then
(
res
=>
{
wxService
.
post
(
`/coupon/coupon/listWithMember4Mina?number=
1&size=1000000
`
,
params
).
then
(
res
=>
{
if
(
!
res
)
return
false
const
{
result
,
data
}
=
res
.
data
if
(
result
==
0
){
console
.
log
(
res
)
wx
.
hideLoading
()
// 处理时间显示
if
(
!
data
.
content
)
return
false
data
.
content
.
forEach
(
item
=>
{
item
.
startTime
=
item
.
startTime
.
substring
(
0
,
10
)
item
.
endTime
=
item
.
endTime
.
substring
(
0
,
10
)
})
// 可使用 or 已失效
if
(
statusNum
==
1
)
{
// couponList
this
.
setData
({
couponList
:
this
.
data
.
pageNo
==
1
?
[...
data
.
content
]:
[...
this
.
data
.
couponList
,...
data
.
content
],
totalPages
:
data
.
totalPages
,
totalElements
:
data
.
totalElements
})
}
else
{
// invalidCouponList
});
this
.
setData
({
invalidCouponList
:
this
.
data
.
invalidPageNo
==
1
?
[...
data
.
content
]:
[...
this
.
data
.
invalidCouponList
,...
data
.
content
],
invalidTotalPages
:
data
.
totalPages
,
invalidTotalElements
:
data
.
totalElements
})
}
couponList
:
data
.
content
,
});
}
}).
finally
(()
=>
{
...
...
@@ -164,29 +119,10 @@ wxService.page({
},
//scoll view 触到底部
onBottom
(){
const
{
currentTab
,
pageNo
,
pageSize
,
totalPages
,
invalidPageNo
,
invalidTotalPages
}
=
this
.
data
if
(
currentTab
==
0
)
{
if
(
pageNo
<
totalPages
)
{
this
.
setData
({
pageNo
:
pageNo
+
1
,
})
// status 1
this
.
getCouponList
(
this
.
data
.
pageNo
,
pageSize
,
1
)
}
else
{
this
.
setData
({
noMoreCoupon
:
true
})
}
}
else
{
this
.
setData
({
noMoreCouponInvalid
:
true
})
}
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom
:
function
()
{
//跳转到我的购买优惠券记录
onTapToBuyCouponRecords
(){
},
})
\ No newline at end of file
src/pages/coupons/coupons.wxml
View file @
416941cc
<!--pages/userCenter.wxml-->
<view class='page-coupons'>
<view class="swiper-tab">
<view class="swiper-tab-item {{currentTab==0?'active':''}}" data-current="0" bindtap="clickTab">可使用 ({{totalElements}})</view>
<view class="swiper-tab-item {{currentTab==1?'active':''}}" data-current="1" bindtap="clickTab">已失效 ({{invalidTotalElements}})</view>
<view class="swiper-tab-item {{currentTab==0?'active':''}}"
data-current="0" bindtap="clickTab">优惠券</view>
<view class="swiper-tab-item {{currentTab==1?'active':''}}"
data-current="1" bindtap="clickTab">微信支付券</view>
<view class="swiper-tab-item {{currentTab==2?'active':''}}"
data-current="2" bindtap="clickTab">包邮券</view>
</view>
<!--bindchange="swiperTab"-->
<swiper current="{{currentTab}}" duration="300" bindchange="swiperTab">
<swiper-item>
<scroll-view scroll-y wx:if="{{couponList.length}}" bindscrolltolower="onBottom">
<swiper-item >
<!-- 优惠券 -->
<scroll-view scroll-y wx:if="{{couponList.length}}" bindscrolltolower="onBottom" style="height:86vh;">
<view class='coupon-wrap'>
<view
class='coupon-list'
wx:for="{{couponList}}"
wx:for-item="item"
wx:for-index="k"
wx:key="{{k}}"
>
wx:key="{{k}}">
<view
data-title="{{item.title}}"
data-cardNo="{{item.cardNo}}"
data-id="{{item.couponId}}"
bindtap="handelPresentCouponDetail">
<image class='coupon-bg'
src='https://img3.bigaka.com/prd/3001/202003/20200309/300109875abd-15b0-4de3-9673-18d2d1ee4e20.png' />
<view class='coupon-img'>
<image wx:if="{{item.takeCouponBgimg}}" class='coupon-bg' src='{{item.takeCouponBgimg}}' mode="aspectFit"/>
<image wx:else src='https://img3.bigaka.com/prd/3001/202003/20200309/30018086c13a-4579-47ed-a16e-c74cb8010c1d.png' />
</view>
<view class='coupon-info'>
<view class='coupon-name fs-28'>{{item.title}}</view>
<view class='coupon-time fs-24'>{{item.startTime}} 至 {{item.endTime}}</view>
<!-- <view class='coupon-desc fs-24'>{{item.notice}}</view> -->
</view>
<view class='coupon-code fs-24' data-cardNo="{{item.cardNo}}" catchtap="handelPresentCouponCode">出示劵码</view>
</view>
</view>
</view>
</scroll-view>
<view class='empty-wrap' wx:if="{{!couponList.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>
</swiper-item>
<!-- 微信支付券 -->
<swiper-item>
<scroll-view scroll-y wx:if="{{payCouponList.length}}">
<view class='coupon-wrap'>
<view
class='coupon-list'
wx:for="{{payCouponList}}"
wx:for-item="item"
wx:for-index="k"
wx:key="*this">
<view
data-title="{{item.title}}"
data-cardNo="{{item.cardNo}}"
data-id="{{item.couponId}}"
data-type="1"
bindtap="handelPresentCouponDetail"
>
<image class='coupon-bg'
...
...
@@ -33,37 +77,38 @@
<view class='coupon-time fs-24'>{{item.startTime}} 至 {{item.endTime}}</view>
<!-- <view class='coupon-desc fs-24'>{{item.notice}}</view> -->
</view>
<view class='coupon-code fs-24' data-cardNo="{{item.cardNo}}"
catchtap="handelPresentCouponCode">出示劵码
</view>
<view class='coupon-code fs-24' data-cardNo="{{item.cardNo}}"
>查看详情
</view>
</view>
</view>
</view>
<no-more wx:if="{{noMoreCoupon}}" />
</scroll-view>
<view class='empty-wrap' wx:if="{{!couponList.length}}">
<view class='empty-wrap' wx:if="{{!payCouponList.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 class='empty-text'>没有任何
支付券~
</view>
</view>
</view>
</swiper-item>
<!-- 包邮券 -->
<swiper-item>
<scroll-view scroll-y wx:if="{{
invalidCoupon
List.length}}">
<scroll-view scroll-y wx:if="{{
postalVoucher
List.length}}">
<view class='coupon-wrap'>
<view
class='coupon-list'
wx:for="{{
invalidCoupon
List}}"
wx:for="{{
postalVoucher
List}}"
wx:for-item="item"
wx:for-index="k"
wx:key="{{k}}"
>
<view class='invalid-coupon' />
<!--5 已使用 !5 过期-->
<image wx:if="{{item.status == 5}}"
src='https://img3.bigaka.com/prd/3001/202003/20200309/3001c35498ca-ec0d-42b5-a46a-afb8f66ce996.png' class='invalid-img' />
<image wx:else
src='https://img3.bigaka.com/prd/3001/202003/20200309/30018297bfb0-e2b0-4687-838e-e78463eae06f.png' class='invalid-img' />
<view
data-title="{{item.title}}"
data-cardNo="{{item.cardNo}}"
data-id="{{item.couponId}}"
data-type="2"
bindtap="handelPresentCouponDetail"
>
<image class='coupon-bg'
src='https://img3.bigaka.com/prd/3001/202003/20200309/300109875abd-15b0-4de3-9673-18d2d1ee4e20.png' />
<view class='coupon-img'>
...
...
@@ -75,23 +120,25 @@
<view class='coupon-time fs-24'>{{item.startTime}} 至 {{item.endTime}}</view>
<!-- <view class='coupon-desc fs-24'>{{item.notice}}</view> -->
</view>
<view class='coupon-code fs-24'>出示劵码</view>
<view class='coupon-code fs-24' data-cardNo="{{item.cardNo}}">查看详情</view>
</view>
</view>
</view>
<view class='no-more-exp'>--- 已失效优惠券最多显示10条 ---</view>
<no-more wx:if="{{noMoreCouponInvalid}}" />
</scroll-view>
<view class='empty-wrap' wx:if="{{!
invalidCoupon
List.length}}">
<view class='empty-wrap' wx:if="{{!
postalVoucher
List.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 class='empty-text'>没有任何
包邮券~
</view>
</view>
</view>
</swiper-item>
</swiper>
</view>
<!-- 优惠券购买记录 -->
<view class="coupon-buy-records" wx:if="{{currentTab == 0}}" bindtap="onTapToBuyCouponRecords">优惠券购买记录</view>
<!--goHome-->
<go-home/>
<floatNav bind:getAuth="_getUserInfo" bind:updatePage="updatePage"/>
...
...
src/pages/coupons/coupons.wxss
View file @
416941cc
...
...
@@ -22,14 +22,15 @@ scroll-view{
color: #666666;
}
.nav-active{
color:
#05c35b
;
border-bottom: 3rpx solid
#05c35b
;
color:
var(--themecolor)
;
border-bottom: 3rpx solid
var(--themecolor)
;
}
.empty-wrap{
width: 300rpx;
margin: 190rpx auto 0;
text-align: center;
}
.empty-img{
width: 197rpx;
height: 176rpx;
...
...
@@ -82,7 +83,7 @@ scroll-view{
left: 236rpx;
}
.coupon-name{
color:
#05c35b
;
color:
var(--themecolor)
;
}
.coupon-time{
color:#999999;
...
...
@@ -135,15 +136,34 @@ scroll-view{
text-align: center;
}
.active{
color:
#05c35b
;
border-bottom: 4rpx solid
#05c35b
;
color:
var(--themecolor)
;
border-bottom: 4rpx solid
var(--themecolor)
;
}
swiper {
width: 100%;
flex: 1;
height:9
0
vh;
padding-bottom:20rpx;
height:9
1
vh;
/* padding-bottom:20rpx; */
position: absolute;
overflow: scroll;
top: 100rpx;
}
.coupon-buy-records{
background: var(--themecolor);
width: 100%;
height: 80rpx;
color: #ffffff;
font-size: 28rpx;
position: fixed;
bottom: 0;
left: 0;
z-index: 999;
display: flex;
align-items: center;
justify-content: center;
}
.coupon-buy-records:active{
opacity: 0.7;
}
\ No newline at end of file
src/pages/mySpend/mySpend.wxss
View file @
416941cc
...
...
@@ -20,7 +20,7 @@ page{
position: relative;
}
.spend-status{
color:
#05c35b
;
color:
var(--themecolor)
;
position: absolute;
right: 0;
bottom: 0;
...
...
src/pages/pointDetail/pointDetail.js
View file @
416941cc
...
...
@@ -201,7 +201,7 @@ wxService.page({
content
:
'恭喜您获得一个集点'
,
showCancel
:
false
,
confirmText
:
'确认领取'
,
confirmColor
:
'#05C35B'
,
confirmColor
:
themecolor
,
success
(
res
)
{
if
(
res
.
confirm
){
self
.
userConfirmGetCollectionPoint
(
id
);
...
...
src/pages/productDetail/productDetail.wxml
View file @
416941cc
...
...
@@ -181,6 +181,7 @@
<sku-popup
bind:getMobile="userGetMobile"
currentHasMobile="{{currentHasMobile}}"
product-name="{{productInfo.productName}}"
spec-item="{{productInfo.specItemList}}"
good-type="{{productInfo.productType}}"
...
...
src/pages/productDetail/productDetail.wxss
View file @
416941cc
...
...
@@ -54,7 +54,7 @@ page{
width: 88rpx;
height: 30rpx;
border-radius: 3rpx;
background-color:
rgba(0,125,99, 0.08
);
background-color:
var(--themeColorRgba01
);
font-size: 13rpx;
color: var(--themecolor);
line-height: 30rpx;
...
...
@@ -238,7 +238,7 @@ page{
width: 240rpx;
}
.product-footer .footer-buttons button.btn-cart {
background:
rgba(0,125,99,0.71
);
background:
var(--themeColorRgba07
);
}
.product-footer .footer-buttons button.buy-button {
...
...
src/pages/userCenter/userCenter.wxml
View file @
416941cc
...
...
@@ -13,6 +13,7 @@
<view class="" wx:if="{{pItem.type == 2}}">
<person-center isVip="{{isVip}}" bind:getAuth="_getUserInfo"
bind:getMobile="userGetMobile"
currentHasMobile="{{currentHasMobile}}"
currentHasUserInfo="{{currentHasUserInfo}}" base-user-info="{{baseUserInfo}}"
person-data="{{pItem.customer}}" integral-num="{{integralNum}}"
valueCardNum="{{valueCardNum}}" coupon-num="{{couponNum}}" token="{{token}}"/>
...
...
src/project.config.json
View file @
416941cc
...
...
@@ -13,7 +13,7 @@
},
"compileType"
:
"miniprogram"
,
"libVersion"
:
"2.8.2"
,
"appid"
:
"wx
313ec36b710125d4
"
,
"appid"
:
"wx
c3b64b09b1d3dfc2
"
,
"projectname"
:
"%E5%BE%AE%E5%95%86%E5%9F%8E"
,
"debugOptions"
:
{
"hidedInDevtools"
:
[]
...
...
@@ -645,6 +645,20 @@
"pathName"
:
"pages/pointList/pointList"
,
"query"
:
""
,
"scene"
:
null
},
{
"id"
:
-1
,
"name"
:
"现金购券"
,
"pathName"
:
"subPackageA/page/pages/moneyBuyCoupon/moneyBuyCoupon"
,
"query"
:
""
,
"scene"
:
null
},
{
"id"
:
-1
,
"name"
:
"支付券详情"
,
"pathName"
:
"subPackageA/page/pages/payCardInfo/payCardInfo"
,
"query"
:
"id= 704753070554353664"
,
"scene"
:
null
}
]
}
...
...
src/shoppingGuid/page/pages/releaseContent/releaseContent.wxss
View file @
416941cc
...
...
@@ -170,7 +170,7 @@ view{
justify-content: center;
font-size: 22rpx;
padding: 0 10rpx;
background:
rgba(0,125,99, 0.
2);
background:
var(--themeColorRgba0
2);
color: var(--themecolor);
border-radius: 5rpx;
}
...
...
src/subPackage/page/pages/IntegralMallGoods/IntegralMallGoods.wxss
View file @
416941cc
...
...
@@ -50,8 +50,8 @@ page {
width: 153.8rpx;
height: 48rpx;
border-radius: 33rpx;
background-color:
rgba(5, 195, 91, 1
);
box-shadow: 0rpx 3rpx 10rpx 0rpx
rgba(5, 195, 91, 0.
3);
background-color:
var(--themecolor
);
box-shadow: 0rpx 3rpx 10rpx 0rpx
var(--themeColorRgba0
3);
line-height: 48rpx;
color: rgba(255, 255, 255, 1);
font-size: 24rpx;
...
...
@@ -222,5 +222,5 @@ page {
border-right: 1rpx solid rgba(102, 102, 102, 1);
}
.tab-active {
color:
rgba(5, 195, 91, 1
);
color:
var(--themecolor
);
}
\ No newline at end of file
src/subPackage/page/pages/couponCenter/couponCenter.wxss
View file @
416941cc
...
...
@@ -226,5 +226,5 @@ page {
border-right: 1rpx solid rgba(102, 102, 102, 1);
}
.tab-active {
color:
rgba(5, 195, 91, 1
);
color:
var(--themecolor
);
}
\ No newline at end of file
src/subPackage/page/pages/couponCenterInfo/couponCenterInfo.wxss
View file @
416941cc
...
...
@@ -107,7 +107,7 @@ view{
width: 100%;
height: 90rpx;
margin-top: 80rpx;
background: -webkit-linear-gradient(left,
rgb(0,125,99,0.7),rgb(0,125,99,1
));
background: -webkit-linear-gradient(left,
var(--themeColorRgba07),var(--themeColor
));
border-radius: 8rpx;
color: #ffffff;
font-size: 28rpx;
...
...
src/subPackage/page/pages/subPage/subPage.wxml
View file @
416941cc
...
...
@@ -4,10 +4,17 @@
<!-- {{pages}} -->
<block wx:for="{{pages}}" wx:key="{{index}}" wx:for-item="pItem">
<view wx:if="{{pItem.type == 1}}">
<image-swiper image-data="{{pItem.rotationchart.images}}" bind:updatePage="updatePage" bind:getAuth="_getUserInfo" currentHasUserInfo="{{currentHasUserInfo}}"/>
<image-swiper image-data="{{pItem.rotationchart.images}}"
bind:updatePage="updatePage" bind:getAuth="_getUserInfo"
currentHasUserInfo="{{currentHasUserInfo}}"/>
</view>
<view class="" wx:if="{{pItem.type == 2}}">
<person-center bind:getMobile="userGetMobile" bind:getAuth="_getUserInfo" currentHasUserInfo="{{currentHasUserInfo}}" base-user-info="{{baseUserInfo}}" person-data="{{pItem.customer}}" valueCardNum="{{valueCardNum}}" integral-num="{{integralNum}}" coupon-num="{{couponNum}}" token="{{token}}"/>
<person-center bind:getMobile="userGetMobile"
currentHasMobile="{{currentHasMobile}}" bind:getAuth="_getUserInfo"
currentHasUserInfo="{{currentHasUserInfo}}"
base-user-info="{{baseUserInfo}}" person-data="{{pItem.customer}}"
valueCardNum="{{valueCardNum}}"
integral-num="{{integralNum}}" coupon-num="{{couponNum}}" token="{{token}}"/>
</view>
<view class="" wx:if="{{pItem.type == 3}}">
<pic-nav pic-nav="{{pItem.navigation.images}}" bind:getAuth="_getUserInfo" currentHasUserInfo="{{currentHasUserInfo}}" bind:updatePage="updatePage"/>
...
...
src/subPackage/page/pages/valueCard/valueCard.wxss
View file @
416941cc
...
...
@@ -29,8 +29,8 @@ view{
width: 174rpx;
height: 54rpx;
border-radius: 27rpx;
background-color:
rgba(5, 195, 91, 1
);
box-shadow: 0px 3rpx 10rpx 0px
rgba(5, 195, 91, 0.
3);
background-color:
var(--themecolor
);
box-shadow: 0px 3rpx 10rpx 0px
var(--themeColorRgba0
3);
color: #ffffff;
display: flex;
align-items: center;
...
...
src/subPackage/page/pages/valueCardInfo/valueCardInfo.wxss
View file @
416941cc
...
...
@@ -72,7 +72,7 @@ view{
min-width: 200rpx;
max-width: 200rpx;
height: 100%;
background:
#05C35B
;
background:
var(--themecolor)
;
color: #ffffff;
display: flex;
align-items: center;
...
...
src/subPackageA/page/pages/deliveryCode/deliveryCode.wxss
View file @
416941cc
...
...
@@ -281,7 +281,7 @@ view{
.guid-sure{
width: 100%;
height: 80rpx;
background: linear-gradient(to right,
rgba(0,125,99,0.
5) , var(--themecolor));
background: linear-gradient(to right,
var(--themeColorRgba0
5) , var(--themecolor));
display: flex;
align-items: center;
justify-content: center;
...
...
src/subPackageA/page/pages/moneyBuyCoupon/moneyBugCoupon.js
0 → 100644
View file @
416941cc
// subPackageA/page/pages/moneyBuyCoupon/moneyBugCoupon.js
Page
({
/**
* 页面的初始数据
*/
data
:
{
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
:
function
(
options
)
{
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady
:
function
()
{
},
/**
* 生命周期函数--监听页面显示
*/
onShow
:
function
()
{
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide
:
function
()
{
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload
:
function
()
{
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh
:
function
()
{
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom
:
function
()
{
},
/**
* 用户点击右上角分享
*/
onShareAppMessage
:
function
()
{
}
})
\ No newline at end of file
src/subPackageA/page/pages/moneyBuyCoupon/moneyBugCoupon.json
0 → 100644
View file @
416941cc
{
"usingComponents"
:
{}
}
\ No newline at end of file
src/subPackageA/page/pages/moneyBuyCoupon/moneyBugCoupon.wxml
0 → 100644
View file @
416941cc
<!--subPackageA/page/pages/moneyBuyCoupon/moneyBugCoupon.wxml-->
<text>subPackageA/page/pages/moneyBuyCoupon/moneyBugCoupon.wxml</text>
src/subPackageA/page/pages/moneyBuyCoupon/moneyBugCoupon.wxss
0 → 100644
View file @
416941cc
/* subPackageA/page/pages/moneyBuyCoupon/moneyBugCoupon.wxss */
\ No newline at end of file
src/subPackageA/page/pages/moneyBuyCoupon/moneyBuyCoupon.js
0 → 100644
View file @
416941cc
// subPackage/page/pages/valueCard/valueCard.js
const
wxService
=
require
(
'../../../../utils/wxService'
)
const
utils
=
require
(
'../../../../utils/util'
)
wxService
.
page
({
/**
* 页面的初始数据
*/
data
:
{
cardList
:
[]
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
:
function
(
options
)
{
// wx.hideShareMenu();
this
.
getActivityList
();
},
/**
* 生命周期函数--监听页面显示
*/
onShow
:
function
()
{
},
//跳转活动详情
onTapToCardInfo
(
e
){
let
item
=
e
.
currentTarget
.
dataset
.
item
;
wx
.
navigateTo
({
url
:
'/subPackageA/page/pages/moneyBuyCouponInfo/moneyBuyCouponInfo?id='
+
item
.
acvivityId
,
});
},
//获取有效活动列表
getActivityList
(
refresh
){
wx
.
showLoading
({
title
:
'加载中..'
,
});
wxService
.
post
(
`/coupon/couponMoneyBuyActivity/buyer/getValidList`
,{},
null
,
true
).
then
(
res
=>
{
if
(
res
){
let
list
=
res
.
data
.
data
?
res
.
data
.
data
:
[];
this
.
data
.
cardList
=
list
;
this
.
setData
({
cardList
:
this
.
data
.
cardList
});
}
wx
.
hideLoading
();
if
(
refresh
){
setTimeout
(()
=>
{
wx
.
showToast
({
title
:
'刷新成功'
,
});
wx
.
hideNavigationBarLoading
();
wx
.
stopPullDownRefresh
();
},
300
);
}
});
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh
:
function
()
{
wx
.
showNavigationBarLoading
();
this
.
getActivityList
(
true
);
},
})
\ No newline at end of file
src/subPackageA/page/pages/moneyBuyCoupon/moneyBuyCoupon.json
0 → 100644
View file @
416941cc
{
"navigationBarTitleText"
:
"现金购券"
,
"backgroundTextStyle"
:
"dark"
,
"enablePullDownRefresh"
:
true
,
"usingComponents"
:
{
"empty"
:
"../../../../component/empty/empty"
}
}
\ No newline at end of file
src/subPackageA/page/pages/moneyBuyCoupon/moneyBuyCoupon.wxml
0 → 100644
View file @
416941cc
<!--subPackage/page/pages/valueCard/valueCard.wxml-->
<view class='cards-list' wx:if="{{cardList.length > 0}}">
<view class='card-item'
wx:for="{{cardList}}"
wx:for-item="item"
wx:for-index="idx"
wx:key="*this"
data-item="{{item}}"
bindtap='onTapToCardInfo'>
<image src='{{item.listPicture}}' mode='widthFix'></image>
<view class='card-buy-btn'>立即抢购</view>
</view>
</view>
<empty text="暂无超值卡活动~" wx:else/>
<view class='no-more' wx:if="{{cardList.length > 5}}">-- 我也是有底线滴 --</view>
\ No newline at end of file
src/subPackageA/page/pages/moneyBuyCoupon/moneyBuyCoupon.wxss
0 → 100644
View file @
416941cc
/* subPackage/page/pages/valueCard/valueCard.wxss */
page{
background: #ffffff;
box-sizing: border-box;
-webkit-box-sizing: border-box;
}
view{
box-sizing: border-box;
-webkit-box-sizing: border-box;
}
.cards-list{
width: 100%;
height: auto;
padding: 30rpx;
}
.cards-list .card-item{
width: 100%;
margin-bottom: 20rpx;
position: relative;
}
.cards-list .card-item .card-buy-btn{
position: absolute;
bottom: 20rpx;
right: 20rpx;
width: 174rpx;
height: 54rpx;
border-radius: 27rpx;
background-color: var(--themecolor);
box-shadow: 0px 3rpx 10rpx 0px var(--themeColorRgba03);
color: #ffffff;
display: flex;
align-items: center;
font-size: 24rpx;
justify-content: center;
}
.cards-list .card-item .card-buy-btn:active{
opacity: 0.7;
}
.cards-list .card-item:last-child{
margin-bottom: 0;
}
.cards-list .card-item image{
width: 100%;
display: block;
border-radius: 6rpx;
}
.no-more{
width: 100%;
height: auto;
padding: 30rpx 0;
color: #999999;
font-size: 24rpx;
display: flex;
align-items: center;
justify-content: center;
}
\ No newline at end of file
src/subPackageA/page/pages/moneyBuyCouponInfo/moneyBuyCouponInfo.js
0 → 100644
View file @
416941cc
// subPackage/page/pages/valueCardInfo/valueCardInfo.js
const
app
=
getApp
();
const
wxService
=
require
(
'../../../../utils/wxService'
)
const
utils
=
require
(
'../../../../utils/util'
)
wxService
.
page
({
/**
* 页面的初始数据
*/
data
:
{
id
:
null
,
checked
:
false
,
showModal
:
false
,
valueCardInfo
:
{},
userHasBaseInfo
:
false
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
:
function
(
options
)
{
this
.
data
.
id
=
options
.
id
;
console
.
log
(
options
)
// wx.hideShareMenu();
this
.
getValueCardActivityInfo
();
},
/**
* 生命周期函数--监听页面显示
*/
onShow
:
function
()
{
this
.
userHasLogin
();
},
//获取当前用户是否登录
userHasLogin
()
{
const
baseUserInfo
=
wx
.
getStorageSync
(
'_baseUserInfo'
);
if
(
baseUserInfo
)
{
this
.
setData
({
userHasBaseInfo
:
true
})
}
else
{
this
.
setData
({
userHasBaseInfo
:
false
})
}
},
//获取活动详情
getValueCardActivityInfo
()
{
wx
.
showLoading
({
title
:
'加载中..'
,
});
wxService
.
post
(
`/coupon/couponMoneyBuyActivity/getDetail?id=
${
this
.
data
.
id
}
`
,{},
null
,
true
).
then
(
res
=>
{
if
(
res
)
{
let
obj
=
res
.
data
.
data
?
res
.
data
.
data
:
null
;
if
(
obj
)
{
obj
.
activityDesc
=
obj
.
definition
?
JSON
.
parse
(
obj
.
definition
)
:
[];
obj
.
acPayMoney
=
parseFloat
(
obj
.
buyPrice
/
10
/
10
).
toFixed
(
2
);
obj
.
startTime
=
obj
.
startTime
.
substring
(
0
,
10
);
obj
.
endTime
=
obj
.
endTime
.
substring
(
0
,
10
);
obj
.
hasDate
=
obj
.
activityDesc
.
filter
(
item
=>
item
.
type
==
1
).
length
>
0
;
//处理说明文本
let
descArr
=
JSON
.
parse
(
JSON
.
stringify
(
obj
.
activityDesc
));
descArr
=
descArr
.
filter
(
item
=>
item
.
type
!=
1
);
// let tempArr = descArr.map(item => {
// return item.value;
// });
// console.log(obj)
obj
.
descArr
=
descArr
;
this
.
data
.
valueCardInfo
=
obj
;
this
.
setData
({
valueCardInfo
:
this
.
data
.
valueCardInfo
});
}
}
wx
.
hideLoading
();
});
},
//修改选中状态
onTapSwitchChecked
()
{
this
.
data
.
checked
=
!
this
.
data
.
checked
;
this
.
setData
({
checked
:
this
.
data
.
checked
});
},
//关闭modal
onTapCloseModal
()
{
this
.
setData
({
showModal
:
false
,
});
},
//查看rule
onTapViewRule
()
{
this
.
setData
({
showModal
:
true
})
},
//同意并阅读
onTapModalAgree
()
{
this
.
setData
({
showModal
:
false
,
checked
:
true
,
});
},
//立即购买
onTapBuy
()
{
if
(
!
this
.
data
.
checked
)
{
return
;
}
const
{
member
}
=
wx
.
getStorageSync
(
'_baseUserInfo'
);
if
(
!
member
)
{
wx
.
showToast
({
title
:
'请先去登录'
,
icon
:
'none'
})
return
;
}
if
(
!
member
.
cardNoWeixin
){
wx
.
showToast
({
title
:
'请先开卡后购买'
,
});
wxService
.
openCard
()
return
;
}
//buyWayType 1微信 2支付宝
let
memeberId
=
member
.
id
,
buyWayType
=
1
;
let
activityId
=
this
.
data
.
id
;
let
url
=
`/coupon/couponMoneyBuyActivity/buyer/buy?activityId=
${
activityId
}
&memberId=
${
memeberId
}
&buyWayType=
${
buyWayType
}
`
;
wx
.
showLoading
({
title
:
'支付中..'
,
});
wxService
.
post
(
url
).
then
(
res
=>
{
wx
.
hideLoading
();
if
(
res
.
data
.
result
==
0
)
{
console
.
log
(
res
)
this
.
setData
({
checked
:
false
,
});
let
data
=
res
.
data
.
data
?
res
.
data
.
data
:
null
;
if
(
data
)
{
let
wxParams
=
data
.
wxParams
;
wx
.
requestPayment
({
timeStamp
:
wxParams
.
timeStamp
,
nonceStr
:
wxParams
.
nonceStr
,
package
:
wxParams
.
package
,
signType
:
wxParams
.
signType
,
paySign
:
wxParams
.
paySign
,
success
:
res
=>
{
wx
.
showModal
({
title
:
'购买成功提示'
,
content
:
'购买成功,是否到我的优惠券中查看?'
,
showCancel
:
true
,
cancelText
:
'取消'
,
confirmText
:
'确认'
,
confirmColor
:
app
.
globalData
.
themeColor
,
success
:
function
(
modalRes
)
{
if
(
modalRes
.
confirm
)
{
wx
.
navigateTo
({
url
:
'/pages/coupons/coupons'
,
});
}
}
});
},
fail
:
error
=>
{
wx
.
showToast
({
title
:
'已取消支付'
,
icon
:
'none'
});
}
})
}
}
else
{
wx
.
showToast
({
title
:
'购买失败,请稍后再试!'
,
icon
:
'none'
});
}
});
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh
:
function
()
{
},
})
\ No newline at end of file
src/subPackageA/page/pages/moneyBuyCouponInfo/moneyBuyCouponInfo.json
0 → 100644
View file @
416941cc
{
"navigationBarTitleText"
:
"现金购券详情"
,
"enablePullDownRefresh"
:
false
,
"usingComponents"
:
{}
}
\ No newline at end of file
src/subPackageA/page/pages/moneyBuyCouponInfo/moneyBuyCouponInfo.wxml
0 → 100644
View file @
416941cc
<!--subPackage/page/pages/valueCardInfo/valueCardInfo.wxml-->
<image src='{{valueCardInfo.detailPicture ? valueCardInfo.detailPicture : valueCardInfo.listPicture}}'
class='card-info' mode='widthFix'></image>
<view class='card-info-body'>
<view class='card-title'>{{valueCardInfo.activityName}}</view>
<view class='card-desc-item' wx:if="{{valueCardInfo.hasDate}}">
<view class='lf'>活动时间</view>
<view class='rg'>{{valueCardInfo.startTime}} 至 {{valueCardInfo.endTime}}</view>
</view>
<view class='card-desc-item'>
<view class='lf'>现金支付</view>
<view class='rg'>¥{{valueCardInfo.acPayMoney}}</view>
</view>
<view class='card-desc-item'
wx:for="{{valueCardInfo.descArr}}"
wx:for-item="item"
wx:for-index="idx"
wx:key="*this">
<view class='lf'>{{item.label ? item.label : '说明内容'}}</view>
<view class='rg'>
<view class='list-item'> {{item.value}}</view>
</view>
</view>
</view>
<!-- 底部 -->
<view class='bottom-buy'>
<view class='lf-info'>
<!-- 选中 active -->
<view class='check-box {{checked ? "active" : ""}}' bindtap='onTapSwitchChecked'>
<image src='/assets/imgs/tick-success.png' mode='aspectFit'></image>
</view>
<view class='explain'>
<label> 阅读并同意 </label>
<text bindtap='onTapViewRule'>《活动规则》</text>
</view>
</view>
<view class='rg-button positionRe {{checked ? "" : "disabled"}}' wx:if="{{!userHasBaseInfo}}">
<button class="positionAbs clear-btn"
bindgetuserinfo="_getUserInfo" open-type='getUserInfo'></button>
{{buyType == 1 ? "立即购买" : "立即兑换"}}
</view>
<view class='rg-button {{checked ? "" : "disabled"}}'
wx:if="{{userHasBaseInfo}}" bindtap='onTapBuy'>立即购买</view>
</view>
<!-- 超值卡规则 -->
<view class='rule-modal' wx:if="{{showModal}}">
<view class='modal-body'>
<view class='modal-body-title'>
《活动规则》
<image class='modal-body-close' src='/assets/imgs/gray_close.png' mode='aspectFit' bindtap='onTapCloseModal'></image>
</view>
<view class='modal-body-con'>
<image src="{{valueCardInfo.rulePicture}}" mode="widthFix"></image>
</view>
<view class='modal-body-bottom'>
<label bindtap='onTapModalAgree'>阅读并同意</label>
</view>
</view>
</view>
\ No newline at end of file
src/subPackageA/page/pages/moneyBuyCouponInfo/moneyBuyCouponInfo.wxss
0 → 100644
View file @
416941cc
/* subPackage/page/pages/valueCardInfo/valueCardInfo.wxss */
page{
background: #ffffff;
box-sizing: border-box;
-webkit-box-sizing: border-box;
padding-bottom: 100rpx;
}
view{
box-sizing: border-box;
-webkit-box-sizing: border-box;
}
.card-info{
width: 100%;
display: block;
}
.card-info-body{
width: 100%;
padding: 30rpx;
}
.card-title{
font-size: 28rpx;
color: #333333;
font-weight: bold;
margin-bottom: 20rpx;
}
.card-desc-item{
width: 100%;
height: auto;
display: flex;
font-size: 28rpx;
margin-bottom: 10rpx;
}
.card-desc-item .lf{
flex: 0;
min-width: 120rpx;
max-width: 120rpx;
color: #666666;
}
.card-desc-item .rg{
flex: 1;
padding-left: 10rpx;
color: #333333;
}
.card-desc-item .rg .list-item{
margin-bottom: 8rpx;
white-space: pre-line;
}
.bottom-buy{
bottom: 0;
left: 0;
position: fixed;
z-index: 2;
border-top: solid 2rpx #ddd;
width: 100%;
height: 100rpx;
display: flex;
align-items: center;
background: #ffffff;
}
.bottom-buy .rg-button{
flex: 0;
min-width: 200rpx;
max-width: 200rpx;
height: 100%;
background: var(--themecolor);
color: #ffffff;
display: flex;
align-items: center;
justify-content: center;
font-size: 28rpx;
}
.bottom-buy .rg-button:active{
opacity: 0.7;
}
.bottom-buy .rg-button.disabled{
background: #cccccc;
}
.bottom-buy .rg-button.disabled:active{
opacity: 1;
}
.bottom-buy .lf-info{
flex: 1;
padding-left: 30rpx;
display: flex;
justify-content: flex-start;
align-items: center;
}
.check-box{
width: 42rpx;
height: 42rpx;
border-radius: 50%;
border: solid 1px #dddddd;
display: flex;
align-items: center;
justify-content: center;
}
.check-box image{
display: none;
}
.check-box.active{
background: #ff3333;
border: solid 1px #ff3333;
}
.check-box.active image{
display: block;
width: 25rpx;
height: 25rpx;
}
.explain{
display: flex;
flex-direction: column;
justify-content: center;
padding-left: 10rpx;
font-size: 28rpx;
}
.explain label{
color: #333333;
padding-left: 8rpx;
}
.explain text{
color: #558ACB;
font-size: 22rpx;
}
.rule-modal{
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
z-index: 3;
display: flex;
align-items: center;
justify-content: center;
}
.rule-modal .modal-body{
width: 80vw;
height: 80vh;
background: #ffffff;
border-radius: 8rpx;
display: flex;
flex-direction: column;
}
.rule-modal .modal-body .modal-body-title{
flex: 0;
min-height: 80rpx;
max-height: 80rpx;
width: 100%;
border-bottom: solid 2rpx #dddddd;
position: relative;
display: flex;
justify-content: center;
align-items: center;
color: #333333;
font-size: 28rpx;
}
.rule-modal .modal-body .modal-body-title .modal-body-close{
position: absolute;
width: 32rpx;
height: 32rpx;
top: 24rpx;
right: 24rpx;
}
.rule-modal .modal-body .modal-body-title .modal-body-close:active{
opacity: 0.7;
}
.rule-modal .modal-body .modal-body-con{
flex: 1;
padding: 20rpx;
overflow: hidden;
overflow-y: auto;
font-size: 24rpx;
color: #666666;
}
.rule-modal .modal-body .modal-body-con image{
width: 100%;
}
.rule-modal .modal-body .modal-body-bottom{
flex: 0;
min-height: 120rpx;
max-height: 120rpx;
display: flex;
align-items: center;
justify-content: center;
}
.rule-modal .modal-body .modal-body-bottom label{
width: 280rpx;
height: 80rpx;
background: #ff3333;
color: #ffffff;
font-size: 28rpx;
display: flex;
align-items: center;
justify-content: center;
border-radius: 8rpx;
}
.rule-modal .modal-body .modal-body-bottom label:active{
opacity: 0.7;
}
src/subPackageA/page/pages/moneyBuyCouponRecords/moneyBuyCouponRecords.js
0 → 100644
View file @
416941cc
// subPackageA/page/pages/moneyBuyCouponRecords/moneyBuyCouponRecords.js
const
wxService
=
require
(
'../../../../utils/wxService'
)
const
util
=
require
(
'../../../../utils/util'
)
wxService
.
page
({
/**
* 页面的初始数据
*/
data
:
{
recordsList
:
[],
pageSize
:
10
,
pageNo
:
1
,
totalPage
:
0
,
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
:
function
(
options
)
{
wx
.
hideShareMenu
();
this
.
getBuyCouponRecords
();
},
//获取优惠券购买记录
getBuyCouponRecords
(
refresh
){
let
pageNo
=
this
.
data
.
pageNo
,
pageSize
=
this
.
data
.
pageSize
;
if
(
refresh
){
wx
.
stopPullDownRefresh
();
wx
.
showToast
({
title
:
'刷新成功'
,
});
}
const
_baseUserInfo
=
wx
.
getStorageSync
(
'_baseUserInfo'
);
if
(
!
_baseUserInfo
){
wx
.
showToast
({
title
:
'登录已过期,请返回重新登录'
,
icon
:
'none'
});
return
;
}
console
.
log
(
_baseUserInfo
)
let
memberId
=
_baseUserInfo
.
memberId
;
wxService
.
post
(
`/coupon/couponMoneyBuyActivity/buyer/member/buyRecord/getList?memberId=
${
memberId
}
`
).
then
(
res
=>
{
if
(
!
res
)
return
;
let
data
=
res
.
data
.
data
?
res
.
data
.
data
:
[];
data
.
forEach
(
item
=>
{
item
.
buyPrice
=
parseFloat
(
item
.
buyPrice
/
100
).
toFixed
(
2
);
});
this
.
data
.
recordsList
=
data
;
this
.
setData
({
recordsList
:
this
.
data
.
recordsList
});
})
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh
:
function
()
{
this
.
data
.
pageNo
=
1
;
this
.
data
.
recordsList
=
[];
this
.
getBuyCouponRecords
(
true
);
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom
:
function
()
{
if
(
this
.
data
.
pageNo
<
this
.
data
.
totalPage
){
this
.
data
.
pageNo
++
;
this
.
getBuyCouponRecords
();
}
else
{
if
(
this
.
data
.
pageNo
>
1
){
wx
.
showToast
({
title
:
'暂无更多数据了~'
,
icon
:
' none'
});
}
}
},
})
src/subPackageA/page/pages/moneyBuyCouponRecords/moneyBuyCouponRecords.json
0 → 100644
View file @
416941cc
{
"enablePullDownRefresh"
:
true
,
"navigationBarTitleText"
:
"优惠券购买记录"
,
"usingComponents"
:
{
"empty"
:
"/component/empty/empty"
}
}
\ No newline at end of file
src/subPackageA/page/pages/moneyBuyCouponRecords/moneyBuyCouponRecords.wxml
0 → 100644
View file @
416941cc
<!--subPackageA/page/pages/moneyBuyCouponRecords/moneyBuyCouponRecords.wxml-->
<view class="records-list" wx:if="{{recordsList.length > 0}}">
<view class="records-item" wx:for="{{recordsList}}" wx:key="*this" wx:for-item="item">
<view class="records-title">
<label>{{item.activityName}}</label>
<text>¥{{item.buyPrice}}</text>
</view>
<view class="other-info">
<!-- 有效时间: <label>2020-04-30 15:30:30至2020-04-30 15:30:30</label> -->
购买时间: <label>{{item.payOrderTime}}</label>
</view>
</view>
</view>
<!-- 空的时候 -->
<empty text="未查到任何优惠券购买记录~" wx:if="{{recordsList.length == 0}}"/>
\ No newline at end of file
src/subPackageA/page/pages/moneyBuyCouponRecords/moneyBuyCouponRecords.wxss
0 → 100644
View file @
416941cc
/* subPackageA/page/pages/moneyBuyCouponRecords/moneyBuyCouponRecords.wxss */
page{
background: #ffffff;
box-sizing: border-box;
-webkit-box-sizing: border-box;
}
view{
box-sizing: border-box;
-webkit-box-sizing: border-box;
}
.records-list{
width: 100%;
height: auto;
padding: 20rpx;
}
.records-list .records-item{
padding: 20rpx;
border-bottom: solid 1rpx #dddddd;
font-size: 24rpx;
color: #333333;
}
.records-title{
font-size: 28rpx;
font-weight: bold;
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: 10rpx;
}
.other-info{
color: #999999;
font-weight: 24rpx;
}
.records-title text{
color: red;
}
\ No newline at end of file
src/subPackageA/page/pages/payCardInfo/payCardInfo.js
0 → 100644
View file @
416941cc
// subPackage/page/pages/couponCenterInfo/couponCenterInfo.js
const
app
=
getApp
();
const
wxService
=
require
(
'../../../../utils/wxService'
)
const
util
=
require
(
'../../../../utils/util'
)
wxService
.
page
({
/**
* 页面的初始数据
*/
data
:
{
activityId
:
null
,
activityInfo
:
{},
showDialog
:
false
,
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
:
function
(
options
)
{
let
id
=
options
.
id
;
if
(
id
){
this
.
data
.
activityId
=
id
;
this
.
getPayCardInfo
();
}
},
//获取支付券详情
getPayCardInfo
(){
wxService
.
get
(
`/coupon/wechatCouponInfo/get/
${
this
.
data
.
activityId
}
`
).
then
(
res
=>
{
if
(
res
){
let
obj
=
res
.
data
.
data
?
res
.
data
.
data
:
null
;
if
(
obj
){
let
detailInfo
=
obj
.
detailInfo
?
JSON
.
parse
(
obj
.
detailInfo
)
:
[];
this
.
data
.
activityInfo
=
obj
;
this
.
data
.
activityInfo
.
desc
=
detailInfo
;
this
.
setData
({
activityInfo
:
this
.
data
.
activityInfo
});
}
}
})
},
//领取优惠券
onTapGetCoupon
(){
wx
.
showLoading
({
title
:
'领取中..'
,
});
//调用接口领取
let
wechatCouponSetId
=
this
.
data
.
activityInfo
.
id
;
wxService
.
get
(
`/coupon/wechatCoupon/get?wechatCouponSetId=
${
wechatCouponSetId
}
`
).
then
(
res
=>
{
if
(
res
){
if
(
res
.
data
.
result
==
0
){
wx
.
showModal
({
title
:
'领取成功提示'
,
content
:
'领取成功,是否到我的优惠券中查看?'
,
showCancel
:
true
,
cancelText
:
'取消'
,
confirmText
:
'确认'
,
confirmColor
:
app
.
globalData
.
themeColor
,
success
:
function
(
modalRes
)
{
if
(
modalRes
.
confirm
)
{
wx
.
navigateTo
({
url
:
'/pages/coupons/coupons'
,
});
}
}
});
}
}
});
},
/**
* 用户点击右上角分享
*/
onShareAppMessage
:
function
()
{
let
url
=
this
.
data
.
activityInfo
.
activityImgUrl
?
this
.
data
.
activityInfo
.
activityImgUrl
:
'https://img3.bigaka.com/prd/3001/202003/20200331/3001649f2f08-3b4e-4b5b-97c1-30cdf646651c.png'
;
return
{
title
:
`我分享给你一张“
${
this
.
data
.
activityInfo
.
couponName
}
”的支付券,赶快领取吧~`
,
path
:
`/subPackageA/page/pages/payCardInfo/payCardInfo?id=
${
this
.
data
.
activityId
}
`
,
imageUrl
:
url
,
// 可以更换分享的图片
}
}
});
\ No newline at end of file
src/subPackageA/page/pages/payCardInfo/payCardInfo.json
0 → 100644
View file @
416941cc
{
"navigationBarTitleText"
:
"支付券信息"
,
"usingComponents"
:
{
}
}
\ No newline at end of file
src/subPackageA/page/pages/payCardInfo/payCardInfo.wxml
0 → 100644
View file @
416941cc
<!--subPackage/page/pages/couponCenterInfo/couponCenterInfo.wxml-->
<view class="coupon-info-con">
<!-- 修改为新的布局 -->
<view class="coupon-package">
<image src="{{activityInfo.activityImgUrl}}" mode="widthFix"></image>
</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/subPackageA/page/pages/payCardInfo/payCardInfo.wxss
0 → 100644
View file @
416941cc
/* 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-package{
width: 100%;
height: auto;
}
.coupon-package image{
width: 100%;
}
.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,var(--themeColorRgba07),var(--themecolor));
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/subPackageA/page/pages/pointExchangeCoupon/pointExchangeCoupon.wxss
View file @
416941cc
...
...
@@ -50,8 +50,8 @@ page {
width: 153.8rpx;
height: 48rpx;
border-radius: 33rpx;
background-color:
rgba(5, 195, 91, 1
);
box-shadow: 0rpx 3rpx 10rpx 0rpx
rgba(5, 195, 91, 0.
3);
background-color:
var(--themecolor
);
box-shadow: 0rpx 3rpx 10rpx 0rpx
var(--themeColorRgba0
3);
line-height: 48rpx;
color: rgba(255, 255, 255, 1);
font-size: 24rpx;
...
...
@@ -222,5 +222,5 @@ page {
border-right: 1rpx solid rgba(102, 102, 102, 1);
}
.tab-active {
color:
rgba(5, 195, 91, 1
);
color:
var(--themecolor
);
}
\ No newline at end of file
src/subPackageA/page/pages/pointExchangeGoods/pointExchangeGoods.wxss
View file @
416941cc
...
...
@@ -50,8 +50,8 @@ page {
width: 153.8rpx;
height: 48rpx;
border-radius: 33rpx;
background-color:
rgba(5, 195, 91, 1
);
box-shadow: 0rpx 3rpx 10rpx 0rpx
rgba(5, 195, 91, 0.
3);
background-color:
var(--themecolor
);
box-shadow: 0rpx 3rpx 10rpx 0rpx
var(--themeColorRgba0
3);
line-height: 48rpx;
color: rgba(255, 255, 255, 1);
font-size: 24rpx;
...
...
@@ -222,5 +222,5 @@ page {
border-right: 1rpx solid rgba(102, 102, 102, 1);
}
.tab-active {
color:
rgba(5, 195, 91, 1
);
color:
var(--themecolor
);
}
\ No newline at end of file
src/utils/util.js
View file @
416941cc
...
...
@@ -302,17 +302,54 @@ class Logger {
}
// 通过点击按钮 获取用户信息并登陆注册到crm系统中
function
getUserInfoByBtn
(
userInfo
)
{
function
getUserInfoByBtn
(
userInfo
,
authType
)
{
const
logger
=
new
Logger
()
const
app
=
getApp
()
if
(
Object
.
keys
(
userInfo
).
length
===
1
)
{
return
wxService
.
Promise
.
reject
(
userInfo
.
errMsg
)
}
if
(
authType
==
'phoneNumber'
){
return
wxService
.
login
().
then
((
res
)
=>
{
wx
.
setStorageSync
(
'_userInfo'
,
userInfo
)
wx
.
setStorageSync
(
'_wechatInfo'
,
userInfo
)
wx
.
setStorageSync
(
'reLoginErr'
,
false
)
wx
.
showLoading
({
title
:
'正在加载...'
,
icon
:
'none'
,
mask
:
true
})
let
currentLoginUrl
=
`/member/minaLogin`
let
param
=
{
code
:
res
.
code
,
wechatInfo
:
userInfo
,
brandId
:
app
.
globalData
.
brandId
};
param
.
wechatInfo
.
authType
=
authType
;
if
(
!
envInfo
.
isMall
)
{
param
.
appid
=
app
.
globalData
.
appId
}
return
wxService
.
post
(
`
${
currentLoginUrl
}
`
,
param
);
}).
then
(
response
=>
{
logger
.
log
(
'getCrmUserInfo response'
,
response
)
if
(
response
.
data
.
data
.
rspCode
===
-
1
)
{
return
Promise
.
reject
(
response
.
data
.
data
)
}
return
Promise
.
resolve
(
response
.
data
.
data
)
}).
finally
(()
=>
{
wx
.
hideLoading
()
});
}
else
{
return
wxService
.
login
().
then
((
res
)
=>
{
logger
.
log
(
' wx getUserInfoByBtn success res --->'
,
res
)
return
Promise
.
all
([
Promise
.
resolve
(
userInfo
),
Promise
.
resolve
(
res
)])
}).
then
((
res
)
=>
{
logger
.
log
(
' wx _userInfo success res --->'
,
res
)
wx
.
setStorageSync
(
'_userInfo'
,
res
[
0
].
userInfo
)
wx
.
setStorageSync
(
'_wechatInfo'
,
res
[
0
])
...
...
@@ -328,14 +365,14 @@ function getUserInfoByBtn(userInfo) {
let
param
=
{
code
:
res
[
1
].
code
,
wechatInfo
:
res
[
0
],
brandId
:
app
.
globalData
.
brandId
,
brandId
:
app
.
globalData
.
brandId
// appid: app.globalData.appId
};
param
.
wechatInfo
.
authType
=
authType
;
if
(
!
envInfo
.
isMall
)
{
param
.
appid
=
app
.
globalData
.
appId
}
return
wxService
.
post
(
`
${
currentLoginUrl
}
`
,
param
)
return
wxService
.
post
(
`
${
currentLoginUrl
}
`
,
param
)
},
(
err
)
=>
{
return
Promise
.
reject
(
err
)
}).
then
(
response
=>
{
...
...
@@ -347,6 +384,8 @@ function getUserInfoByBtn(userInfo) {
}).
finally
(()
=>
{
wx
.
hideLoading
()
})
}
}
...
...
@@ -359,9 +398,9 @@ function getSum(preValue,curValue,index, array) {
return
preValue
+
curValue
;
}
function
_getUserInfo
(
ev
)
{
function
_getUserInfo
(
ev
,
authType
)
{
const
userInfo
=
ev
.
detail
||
ev
return
getUserInfoByBtn
(
userInfo
).
then
((
data
=
{})
=>
{
return
getUserInfoByBtn
(
userInfo
,
authType
).
then
((
data
=
{})
=>
{
const
{
token
}
=
data
wx
.
setStorageSync
(
'_accreditUserInfo'
,
userInfo
)
wx
.
hideNavigationBarLoading
()
...
...
src/utils/wxService.js
View file @
416941cc
...
...
@@ -117,6 +117,7 @@ class WXService extends Http {
code
:
result
.
code
,
wechatInfo
:
null
,
brandId
:
app
.
globalData
.
brandId
,
authType
:
'userInfo'
};
if
(
!
envInfo
.
isMall
)
{
param
.
appid
=
app
.
globalData
.
appId
...
...
@@ -617,28 +618,14 @@ class WXService extends Http {
config
.
data
.
canRefundDaysAfterDelivery
=
envInfo
.
canRefundDaysAfterDelivery
;
config
.
data
.
openRefundTips
=
envInfo
.
openRefundTips
;
config
.
data
.
refundTips
=
envInfo
.
refundTips
;
//主题颜色
config
.
data
.
themeColor
=
envInfo
.
themeColor
;
//默认
config
.
data
.
loading
=
true
;
const
CONFIG_PAPGE
=
{
onLoad
:
function
(...
args
)
{
wx
.
login
({
success
:
(
res
)
=>
{
console
.
log
(
'************************************'
)
console
.
log
(
res
)
},
fail
:
(
res
)
=>
{
}
})
const
page
=
this
_self
.
initAppGlobalDataSync
()
watch
.
setWatcher
(
page
);
...
...
@@ -814,7 +801,7 @@ class WXService extends Http {
wx
.
showLoading
({
title
:
'用户登录中..'
,
});
_self
.
getAuthUserInfo
(
res
.
detail
).
then
(
res
=>
{
_self
.
getAuthUserInfo
(
res
.
detail
,
'userInfo'
).
then
(
res
=>
{
this
.
setData
({
currentHasUserInfo
:
true
});
...
...
@@ -825,13 +812,13 @@ class WXService extends Http {
},
//统一处理手机号授权成功
userGetMobile
(
res
){
console
.
log
(
res
)
wx
.
showLoading
({
title
:
'用户登录中..'
,
});
_self
.
getAuthUserInfo
(
res
.
detail
).
then
(
res
=>
{
_self
.
getAuthUserInfo
(
res
.
detail
,
'phoneNumber'
).
then
(
res
=>
{
this
.
setData
({
currentHasUserInfo
:
true
currentHasMobile
:
true
,
currentHasUserInfo
:
true
,
});
wx
.
hideLoading
();
}).
catch
(
err
=>
{
...
...
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