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
ffb14807
Commit
ffb14807
authored
Apr 29, 2020
by
谢中龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增公优化
parent
176c5f5f
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
109 additions
and
78 deletions
+109
-78
category.js
src/pages/category/category.js
+22
-11
category.wxml
src/pages/category/category.wxml
+22
-5
confirmOrder.js
src/pages/confirmOrder/confirmOrder.js
+9
-6
project.config.json
src/project.config.json
+1
-1
moneyBuyCouponRecords.js
...page/pages/moneyBuyCouponRecords/moneyBuyCouponRecords.js
+26
-2
moneyBuyCouponRecords.wxml
...ge/pages/moneyBuyCouponRecords/moneyBuyCouponRecords.wxml
+5
-4
payCardInfo.js
src/subPackageA/page/pages/payCardInfo/payCardInfo.js
+23
-3
wxService.js
src/utils/wxService.js
+1
-46
No files found.
src/pages/category/category.js
View file @
ffb14807
...
...
@@ -22,18 +22,36 @@ wxService.page({
* 生命周期函数--监听页面加载
*/
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
}
`
,
});
},
/**
...
...
@@ -47,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
()
},
// 分类列表
...
...
src/pages/category/category.wxml
View file @
ffb14807
...
...
@@ -16,11 +16,19 @@
<!-- 无三级分类时 -->
<!-- 显示一级图片 -->
<view class="img-con">
<image src="{{currentFirstCategory.image ? currentFirstCategory.image : defaultWidthCategoryImg}}" mode="widthFix"></image>
<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="{{secondCategory}}" wx:key="*this" wx:for-index="k" wx:for-item="second" class="menu-third">
<view data-id="{{second.id}}" data-name="{{second.label}}" bindtap="navPage">
<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>
...
...
@@ -31,9 +39,15 @@
<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 src="{{item.image ? item.image : defaultWidthCategoryImg}}" mode="widthFix"></image>
<image data-id="{{secondCategory.id}}"
data-label="{{secondCategory.label}}"
bindtap="onTapToGoodsList"
src="{{item.image ? item.image : defaultWidthCategoryImg}}" mode="widthFix"></image>
</view>
<view class="more">
<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>
...
...
@@ -42,7 +56,10 @@
<!-- 具体的布局 -->
<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}}" bindtap="navPage">
<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>
...
...
src/pages/confirmOrder/confirmOrder.js
View file @
ffb14807
...
...
@@ -927,14 +927,17 @@ wxService.page({
},
//下单
order
(
isSelect
,
params
)
{
if
(
this
.
data
.
orderStoreInfo
)
{
if
(
this
.
data
.
orderStoreInfo
.
storeId
)
{
params
.
storeId
=
this
.
data
.
orderStoreInfo
.
storeId
;
}
if
(
this
.
data
.
orderStoreInfo
.
storeInfo
)
{
params
.
storeInfo
=
this
.
data
.
orderStoreInfo
.
storeInfo
;
if
(
params
.
orderType
==
1
){
if
(
this
.
data
.
orderStoreInfo
)
{
if
(
this
.
data
.
orderStoreInfo
.
storeId
)
{
params
.
storeId
=
this
.
data
.
orderStoreInfo
.
storeId
;
}
if
(
this
.
data
.
orderStoreInfo
.
storeInfo
)
{
params
.
storeInfo
=
this
.
data
.
orderStoreInfo
.
storeInfo
;
}
}
}
//处理积分抵扣
if
(
this
.
data
.
deductCheckStatus
){
params
.
pointPayInfo
=
this
.
data
.
pointPayInfo
;
...
...
src/project.config.json
View file @
ffb14807
...
...
@@ -650,7 +650,7 @@
"id"
:
89
,
"name"
:
"支付券信息"
,
"pathName"
:
"subPackageA/page/pages/payCardInfo/payCardInfo"
,
"query"
:
"id=704
05342265527910
4"
,
"query"
:
"id=704
75307055435366
4"
,
"scene"
:
null
},
{
...
...
src/subPackageA/page/pages/moneyBuyCouponRecords/moneyBuyCouponRecords.js
View file @
ffb14807
...
...
@@ -31,6 +31,31 @@ wxService.page({
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
});
})
},
/**
...
...
@@ -59,4 +84,4 @@ wxService.page({
}
}
},
})
\ No newline at end of file
})
src/subPackageA/page/pages/moneyBuyCouponRecords/moneyBuyCouponRecords.wxml
View file @
ffb14807
<!--subPackageA/page/pages/moneyBuyCouponRecords/moneyBuyCouponRecords.wxml-->
<view class="records-list" wx:if="{{recordsList.length > 0}}">
<view class="records-item">
<view class="records-item"
wx:for="{{recordsList}}" wx:key="*this" wx:for-item="item"
>
<view class="records-title">
<label>
活动名称活动名称活动名称活动名称
</label>
<text>¥
50.00
</text>
<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>2020-04-30 15:30:30至2020-04-30 15:30:30</label> -->
购买时间: <label>{{item.payOrderTime}}</label>
</view>
</view>
</view>
...
...
src/subPackageA/page/pages/payCardInfo/payCardInfo.js
View file @
ffb14807
...
...
@@ -24,7 +24,7 @@ wxService.page({
//获取支付券详情
getPayCardInfo
(){
wxService
.
get
(
`/coupon/wechatCoupon
Set
/get/
${
this
.
data
.
activityId
}
`
).
then
(
res
=>
{
wxService
.
get
(
`/coupon/wechatCoupon
Info
/get/
${
this
.
data
.
activityId
}
`
).
then
(
res
=>
{
if
(
res
){
let
obj
=
res
.
data
.
data
?
res
.
data
.
data
:
null
;
if
(
obj
){
...
...
@@ -47,8 +47,28 @@ wxService.page({
});
//调用接口领取
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
:
'#cb3c3c'
,
success
:
function
(
modalRes
)
{
if
(
modalRes
.
confirm
)
{
wx
.
navigateTo
({
url
:
'/pages/coupons/coupons'
,
});
}
}
});
}
}
});
},
...
...
src/utils/wxService.js
View file @
ffb14807
...
...
@@ -960,35 +960,6 @@ class WXService extends Http {
_self
.
showOpenCardModelLock
=
false
}
})
// wx.showModal({
// title: '请激活会员卡',
// content: '为了您更好的购物体验,请您先完善会员信息',
// showCancel: true,
// success: res => {
// if (res.confirm) {
// wx.navigateToMiniProgram({
// appId: 'wxeb490c6f9b154ef9', // 固定为此 appid,不可改动
// extraData: options, // 包括 encrypt_card_id, outer_str, biz三个字段,须从 step3 中获得的链接中获取参数
// success: function (data) {
// console.log('navigateToMiniProgram success data is %o', data)
// _self.lock = false
// },
// fail: function (data) {
// console.log('navigateToMiniProgram fail data is %o', data)
// _self.lock = false
// reject(data)
// }
// })
// } else {
// this.router('/pages/welcome/welcome')
// console.log('取消开卡跳转')
// }
// },
// complete: () => {
// this.showOpenCardModelLock = false
// }
// })
}
/**
* 开卡
...
...
@@ -1021,23 +992,7 @@ class WXService extends Http {
})
}
})
// 注释原因 所有跳转前 判断新老会员
// return new Promise((resolve, reject) => {
// if (baseUserInfo && baseUserInfo.member && baseUserInfo.member.mobile) {
// console.log('已开卡')
// wxService.openCardList()
// resolve(baseUserInfo)
// } else if (!baseUserInfo || !baseUserInfo.member || !baseUserInfo.member.mobile) {
// console.log('去开卡')
// return this.navigateToMiniProgram({
// biz: baseUserInfo.biz,
// encrypt_card_id: baseUserInfo.encryptCardId,
// outer_str: baseUserInfo.outerStr
// })
// } else {
// reject({ state: 0 })
// }
// })
}
/**
* 查看微信卡包中的卡券
...
...
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