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
a9942f62
Commit
a9942f62
authored
May 22, 2020
by
谢中龙
Browse files
Options
Browse Files
Download
Plain Diff
序偶iigai
parents
14267307
13357225
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
91 additions
and
28 deletions
+91
-28
app.json
src/app.json
+1
-1
index.js
src/config/index.js
+0
-2
category.js
src/pages/category/category.js
+2
-1
category.wxml
src/pages/category/category.wxml
+8
-5
confirmOrder.js
src/pages/confirmOrder/confirmOrder.js
+4
-0
orderDetail.js
src/pages/orderDetail/orderDetail.js
+9
-8
productDetail.js
src/pages/productDetail/productDetail.js
+31
-1
project.config.json
src/project.config.json
+7
-0
categoryPro.js
src/subPackage/page/pages/categoryPro/categoryPro.js
+2
-1
couponCenter.js
src/subPackage/page/pages/couponCenter/couponCenter.js
+16
-4
couponCenter.wxml
src/subPackage/page/pages/couponCenter/couponCenter.wxml
+1
-1
couponCenterInfo.js
...ubPackage/page/pages/couponCenterInfo/couponCenterInfo.js
+7
-3
moneyBuyCouponInfo.wxml
...geA/page/pages/moneyBuyCouponInfo/moneyBuyCouponInfo.wxml
+1
-1
wxService.js
src/utils/wxService.js
+2
-0
No files found.
src/app.json
View file @
a9942f62
...
...
@@ -150,7 +150,7 @@
},
"live-player-plugin"
:
{
"version"
:
"1.0.11"
,
"provider"
:
"wx2b03c6e691cd7370"
"provider"
:
"wx2b03c6e691cd7370"
}
},
"permission"
:
{
...
...
src/config/index.js
View file @
a9942f62
...
...
@@ -26,8 +26,6 @@ const PROJECT_ENV = 'prod' // 生产 prod, 开发 dev, 测试 test , 测试门
//2002 巴黎贝甜 wx21968cb3a486d4ab
//2014 包小姐与鞋先生 wxa00302e2f53dd9c5
//2021 柏草日记 wx0eb4c0bc80001e25
const
BRANCH_ID
=
3001
const
isMall
=
true
...
...
src/pages/category/category.js
View file @
a9942f62
...
...
@@ -73,7 +73,8 @@ wxService.page({
wx
.
showLoading
({
title
:
'加载中'
})
wxService
.
get
(
`/sale/product/mallCategory/buyer/findCategoryTree`
).
then
(
res
=>
{
// wxService.get(`/sale/product/mallCategory/buyer/findCategoryTree`).then(res => {
wxService
.
get
(
`/sale/product/mallCategory/findCategoryTree?state=c`
).
then
(
res
=>
{
let
{
result
,
data
}
=
res
.
data
if
(
result
==
0
)
{
wx
.
hideLoading
();
...
...
src/pages/category/category.wxml
View file @
a9942f62
...
...
@@ -25,8 +25,9 @@
</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}}"
<view data-name="{{second.label}}"
data-id="{{second.id}}"
data-item="{{second}}"
data-label="{{second.label}}"
bindtap="onTapToGoodsList">
<image src="{{second.image ? second.image : defaultCategoryImg}}" class="thr-menu-image" mode="aspectFill"/>
...
...
@@ -39,14 +40,16 @@
<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}}"
<image
data-id="{{item.id}}"
data-item="{{item}}"
data-label="{{item.label}}"
bindtap="onTapToGoodsList"
src="{{item.image ? item.image : defaultWidthCategoryImg}}" mode="widthFix"></image>
</view>
<view class="more"
data-id="{{
secondCategory
.id}}"
data-label="{{
secondCategory
.label}}"
data-id="{{
item
.id}}"
data-label="{{
item
.label}}"
bindtap="onTapToGoodsList">
<label>{{item.label}}</label>
<view class="right-more">
...
...
src/pages/confirmOrder/confirmOrder.js
View file @
a9942f62
...
...
@@ -1044,6 +1044,10 @@ wxService.page({
}
let
_this
=
this
;
params
.
needPayMoney
=
this
.
data
.
orderPrice
*
10
*
10
;
let
url
=
isSelect
?
'/sale/payment/merged/buyer/bill'
:
'/sale/trade/buyer/bill'
wxService
.
post
(
`
${
url
}
`
,
params
).
then
(
res
=>
{
if
(
res
)
{
...
...
src/pages/orderDetail/orderDetail.js
View file @
a9942f62
...
...
@@ -84,14 +84,15 @@ wxService.page({
item
.
canRefundNum
=
(
item
.
count
-
item
.
refundCount
)
>=
0
?
(
item
.
count
-
item
.
refundCount
)
:
0
;
sum
=
sum
+
item
.
price
*
item
.
count
;
});
if
(
data
.
order
.
wechatCouponPrice
){
data
.
order
.
wechatCouponPrice
=
data
.
order
.
wechatCouponPrice
/
10
/
10
;
data
.
payAmount
=
(
data
.
payAmount
*
1
)
-
(
data
.
order
.
wechatCouponPrice
*
1
)
}
if
(
data
.
order
.
postCouponDisCount
){
data
.
order
.
postCouponDisCount
=
data
.
order
.
postCouponDisCount
/
10
/
10
;
if
(
data
.
order
){
if
(
data
.
order
.
wechatCouponPrice
)
{
data
.
order
.
wechatCouponPrice
=
data
.
order
.
wechatCouponPrice
/
10
/
10
;
data
.
payAmount
=
(
data
.
payAmount
*
1
)
-
(
data
.
order
.
wechatCouponPrice
*
1
)
}
if
(
data
.
order
.
postCouponDisCount
)
{
data
.
order
.
postCouponDisCount
=
data
.
order
.
postCouponDisCount
/
10
/
10
;
}
}
...
...
src/pages/productDetail/productDetail.js
View file @
a9942f62
...
...
@@ -171,7 +171,37 @@ wxService.page({
this
.
getProInfo
()
this
.
getOpenStatus
()
this
.
data
.
currentShareContent
=
null
this
.
data
.
currentShareContent
=
null
;
this
.
setUDeskInfo
();
},
//设置uDeskinfo
setUDeskInfo
()
{
const
baseUserInfo
=
wx
.
getStorageSync
(
'_baseUserInfo'
)
if
(
baseUserInfo
)
{
let
cellphones
=
[];
this
.
data
.
udesk
.
nick_name
=
baseUserInfo
.
member
.
name
;
this
.
data
.
udesk
.
avatar
=
app
.
globalData
.
userInfo
.
avatarUrl
;
let
customer_info
=
{
cellphones
:
[],
};
customer_info
.
cellphones
=
[[
""
,
baseUserInfo
.
member
.
mobile
]];
this
.
data
.
udesk
.
customer_info
=
JSON
.
stringify
(
customer_info
);
this
.
setData
({
udesk
:
this
.
data
.
udesk
});
}
else
{
this
.
setData
({
udesk
:
{
nick_name
:
app
.
globalData
.
userInfo
?
app
.
globalData
.
userInfo
.
memberId
:
'游客'
,
avatar
:
app
.
globalData
.
userInfo
?
app
.
globalData
.
userInfo
.
avatarUrl
:
''
,
cellphones
:
[],
}
})
}
},
//获取商品详情
...
...
src/project.config.json
View file @
a9942f62
...
...
@@ -687,6 +687,13 @@
"pathName"
:
"subPackage/page/pages/couponCenterInfo/couponCenterInfo"
,
"query"
:
"id=708696469342916608"
,
"scene"
:
null
},
{
"id"
:
-1
,
"name"
:
"支付券信息"
,
"pathName"
:
"subPackageA/page/pages/payCardInfo/payCardInfo"
,
"query"
:
"id=710195552385654784"
,
"scene"
:
null
}
]
}
...
...
src/subPackage/page/pages/categoryPro/categoryPro.js
View file @
a9942f62
...
...
@@ -144,7 +144,8 @@ wxService.page({
let
pageNo
=
this
.
data
.
pageNo
,
pageSize
=
this
.
data
.
pageSize
;
// wxService.post(`/sale/product/buyer/listPageByCategoryId?pageNo=${pageNo}&pageSize=${pageSize}`, this.data.form).then(res => {
wxService
.
post
(
`/sale/product/buyer/findCategoryTreeIdByProductList?pageNo=
${
pageNo
}
&pageSize=
${
pageSize
}
&id=
${
this
.
data
.
form
.
mallCategoryId
}
`
).
then
(
res
=>
{
this
.
data
.
form
.
state
=
2
;
wxService
.
post
(
`/sale/product/mallCategory/listPageProductByMallCategoryIdAndItsSons?pageNo=
${
pageNo
}
&pageSize=
${
pageSize
}
`
,
this
.
data
.
form
).
then
(
res
=>
{
const
{
result
,
data
}
=
res
.
data
if
(
result
==
0
&&
data
.
content
)
{
wx
.
hideLoading
()
...
...
src/subPackage/page/pages/couponCenter/couponCenter.js
View file @
a9942f62
...
...
@@ -64,24 +64,29 @@ wxService.page({
},
//立即兑换优惠券
exchange
(
e
)
{
wx
.
showLoading
({
title
:
'领取中..'
,
});
let
isStart
=
e
.
currentTarget
.
dataset
.
start
;
const
{
id
}
=
e
.
currentTarget
.
dataset
;
let
item
=
e
.
currentTarget
.
dataset
.
item
;
//先判断是不是老的活动
if
(
!
item
.
couponList
)
{
wx
.
showLoading
({
title
:
'领取中..'
,
});
this
.
getCoupon
(
id
,
item
);
return
;
}
if
(
isStart
)
{
wx
.
showLoading
({
title
:
'领取中..'
,
});
this
.
getCoupon
(
id
,
item
);
}
//预约
else
{
if
(
!
item
.
isAppointMent
){
this
.
orderCouponActivity
(
id
,
item
);
}
}
},
//立即领取
...
...
@@ -116,6 +121,7 @@ wxService.page({
},
//立即预约
orderCouponActivity
(
id
)
{
let
self
=
this
;
let
baseUserInfo
=
wx
.
getStorageSync
(
'_baseUserInfo'
);
wxService
.
post
(
`
${
'/merchant/message/wxSubMsgMapping/getListByParams'
}
`
,
{
scenarioIds
:
[
'usernoticeappointment'
],
...
...
@@ -145,7 +151,13 @@ wxService.page({
}
},
complete
:
(
res
)
=>
{
wx
.
showLoading
({
title
:
'加载中'
,
})
setTimeout
(()
=>
{
self
.
initIntegralCouponList
();
wx
.
hideLoading
();
},
1000
)
}
})
}).
catch
(
err
=>
{
...
...
src/subPackage/page/pages/couponCenter/couponCenter.wxml
View file @
a9942f62
...
...
@@ -32,7 +32,7 @@
data-id="{{item.acvivityId}}"
data-start="{{item.isStart}}"
data-item="{{item}}"
bindtap='exchange'>{{item.isStart ? '立即领取':
'立即预约'
}}</view>
bindtap='exchange'>{{item.isStart ? '立即领取':
(item.isAppointMent?'已预约':'立即预约')
}}</view>
</view>
</view>
</view>
...
...
src/subPackage/page/pages/couponCenterInfo/couponCenterInfo.js
View file @
a9942f62
...
...
@@ -133,9 +133,13 @@ wxService.page({
if
(
tempids
.
length
>
0
)
{
let
status
=
res
[
tempids
[
0
]];
if
(
status
==
'accept'
)
{
this
.
getACtivityInfo
();
wx
.
showToast
({
title
:
'预约成功'
,
this
.
data
.
activityInfo
.
isAppointMent
=
true
;
this
.
setData
({
activityInfo
:
this
.
data
.
activityInfo
},()
=>
{
wx
.
showToast
({
title
:
'预约成功'
,
})
})
}
}
...
...
src/subPackageA/page/pages/moneyBuyCouponInfo/moneyBuyCouponInfo.wxml
View file @
a9942f62
...
...
@@ -41,7 +41,7 @@ class='card-info' mode='widthFix'></image>
<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>
...
...
src/utils/wxService.js
View file @
a9942f62
...
...
@@ -618,6 +618,8 @@ class WXService extends Http {
//默认
config
.
data
.
loading
=
true
;
config
.
data
.
udesk
=
{};
const
CONFIG_PAPGE
=
{
onLoad
:
function
(...
args
)
{
const
page
=
this
...
...
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