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
0033ee65
Commit
0033ee65
authored
Mar 23, 2020
by
谢中龙
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化功能
parent
c4dd258a
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
177 additions
and
39 deletions
+177
-39
app.json
src/app.json
+0
-4
personCenter.js
src/component/personCenter/personCenter.js
+56
-1
personCenter.wxml
src/component/personCenter/personCenter.wxml
+6
-0
personCenter.wxss
src/component/personCenter/personCenter.wxss
+45
-3
logistics.js
src/pages/logistics/logistics.js
+3
-1
logistics.wxml
src/pages/logistics/logistics.wxml
+1
-2
order.js
src/pages/order/order.js
+20
-2
order.wxml
src/pages/order/order.wxml
+2
-0
order.wxss
src/pages/order/order.wxss
+15
-0
orderDetail.js
src/pages/orderDetail/orderDetail.js
+17
-2
orderDetail.wxml
src/pages/orderDetail/orderDetail.wxml
+8
-20
productDetail.js
src/pages/productDetail/productDetail.js
+1
-1
refund.wxml
src/pages/refund/refund.wxml
+1
-2
project.config.json
src/project.config.json
+1
-1
const.js
src/utils/const.js
+1
-0
No files found.
src/app.json
View file @
0033ee65
...
@@ -132,10 +132,6 @@
...
@@ -132,10 +132,6 @@
"contactPlugin"
:
{
"contactPlugin"
:
{
"version"
:
"1.3.0"
,
"version"
:
"1.3.0"
,
"provider"
:
"wx104a1a20c3f81ec2"
"provider"
:
"wx104a1a20c3f81ec2"
},
"live-player-plugin"
:
{
"version"
:
"1.0.2"
,
"provider"
:
"wx2b03c6e691cd7370"
}
}
},
},
"permission"
:
{
"permission"
:
{
...
...
src/component/personCenter/personCenter.js
View file @
0033ee65
...
@@ -66,6 +66,8 @@ Component({
...
@@ -66,6 +66,8 @@ Component({
storgeUserInfo
:
wx
.
getStorageSync
(
'_baseUserInfo'
),
storgeUserInfo
:
wx
.
getStorageSync
(
'_baseUserInfo'
),
isPlusVip
:
false
,
isPlusVip
:
false
,
currentPlusStyle
:
null
,
currentPlusStyle
:
null
,
memberIsOpen
:
false
,
levelName
:
''
},
},
observers
:
{
observers
:
{
'**'
:
function
(
e
)
{
'**'
:
function
(
e
)
{
...
@@ -81,9 +83,62 @@ Component({
...
@@ -81,9 +83,62 @@ Component({
baseImgUrl
:
imageUrl
,
baseImgUrl
:
imageUrl
,
isPlusVip
:
isVip
,
isPlusVip
:
isVip
,
currentPlusStyle
:
isVip
?
personData
.
plus
.
filter
(
item
=>
item
.
purchased
==
1
)[
0
]
:
personData
.
plus
.
filter
(
item
=>
item
.
purchased
==
0
)[
0
]
currentPlusStyle
:
isVip
?
personData
.
plus
.
filter
(
item
=>
item
.
purchased
==
1
)[
0
]
:
personData
.
plus
.
filter
(
item
=>
item
.
purchased
==
0
)[
0
]
})
});
this
.
getLevelOpenStatus
();
},
},
methods
:
{
methods
:
{
//获取配置的开关
getLevelOpenStatus
(){
wxService
.
get
(
`/merchant/brandSwitchSetting/getOpenStatus?businessType=2`
).
then
(
res
=>
{
const
{
result
,
data
}
=
res
.
data
if
(
result
==
0
)
{
console
.
log
(
data
)
if
(
data
){
this
.
getLevelList
();
}
else
{
this
.
setData
({
memberIsOpen
:
false
,
})
}
}
}).
finally
(()
=>
{
wx
.
hideLoading
()
})
},
//获取等级列表
getLevelList
(){
wxService
.
post
(
'/merchant/settingLevel/get'
).
then
(
res
=>
{
console
.
log
(
res
)
if
(
res
){
let
levelList
=
res
.
data
.
data
?
res
.
data
.
data
:
[];
if
(
levelList
.
length
==
0
){
this
.
setData
({
memberIsOpen
:
false
,
})
}
else
{
console
.
log
(
this
.
data
)
let
index
=
this
.
data
.
baseUserInfo
.
member
.
level
?
this
.
data
.
baseUserInfo
.
member
.
level
:
0
;
let
filterLevel
=
levelList
.
filter
(
item
=>
item
.
index
==
index
);
if
(
filterLevel
.
length
>
0
){
this
.
data
.
levelName
=
filterLevel
[
0
].
name
;
this
.
setData
({
memberIsOpen
:
true
,
levelName
:
this
.
data
.
levelName
,
})
}
else
{
//未找到等级对应数据 则认为等级被删除了或者等级出现错误数据
this
.
setData
({
memberIsOpen
:
false
,
})
}
}
}
})
},
toPlusPay
(
e
)
{
toPlusPay
(
e
)
{
const
{
row
}
=
e
.
currentTarget
.
dataset
const
{
row
}
=
e
.
currentTarget
.
dataset
let
toPlus
=
typeof
(
row
)
==
'string'
?
JSON
.
parse
(
row
)
:
row
let
toPlus
=
typeof
(
row
)
==
'string'
?
JSON
.
parse
(
row
)
:
row
...
...
src/component/personCenter/personCenter.wxml
View file @
0033ee65
...
@@ -27,8 +27,14 @@
...
@@ -27,8 +27,14 @@
>
>
<view class='user-info' wx:if='{{currentMobile}}'>
<view class='user-info' wx:if='{{currentMobile}}'>
<view class="user-avatar">
<view class="user-avatar">
<view class="avator">
<open-data type="userAvatarUrl" />
<open-data type="userAvatarUrl" />
</view>
</view>
<view class="user-level" wx:if="{{memberIsOpen}}">
<image src="/assets/imgs/crown.png" mode="aspectFit"></image>
<view class="user-level-name">{{levelName}}</view>
</view>
</view>
<view class='user-name-content'>
<view class='user-name-content'>
<view class='user-name'>
<view class='user-name'>
<!-- 1 浅色 2 黑色-->
<!-- 1 浅色 2 黑色-->
...
...
src/component/personCenter/personCenter.wxss
View file @
0033ee65
...
@@ -45,11 +45,53 @@
...
@@ -45,11 +45,53 @@
.user-avatar{
.user-avatar{
width: 100rpx;
width: 100rpx;
height: 100rpx;
height: 100rpx;
overflow:hidden;
/* overflow:hidden; */
border-radius: 50%;
display: inline-block;
display: inline-block;
margin-right: 46rpx;
margin-right: 30rpx;
position: relative;
}
.user-avatar .avator{
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;
border-radius: 50%;
overflow: hidden;
}
.user-avatar .user-level{
position: absolute;
left: 50%;
margin-left: -70rpx;
bottom: -28rpx;
width: 140rpx;
height: 25rpx;
z-index: 2;
font-size: 20rpx;
color: #fff;
display: flex;
align-items: center;
}
}
.user-avatar .user-level .user-level-name{
flex: 1;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
text-overflow: ellipsis;
overflow: hidden;
}
.user-avatar .user-level image{
flex: 0;
min-width: 22rpx;
max-width: 22rpx;
height: 22rpx;
margin-right: 4rpx;
}
.user-name-content{
.user-name-content{
display: inline-block;
display: inline-block;
}
}
...
...
src/pages/logistics/logistics.js
View file @
0033ee65
...
@@ -18,13 +18,14 @@ wxService.page({
...
@@ -18,13 +18,14 @@ wxService.page({
hasLogisticInfo
:
false
,
hasLogisticInfo
:
false
,
logisticCompanyName
:
''
,
logisticCompanyName
:
''
,
logisticNo
:
''
,
logisticNo
:
''
,
status
:
''
,
},
},
/**
/**
* 生命周期函数--监听页面加载
* 生命周期函数--监听页面加载
*/
*/
onLoad
:
function
(
options
)
{
onLoad
:
function
(
options
)
{
wx
.
hideShareMenu
()
wx
.
hideShareMenu
()
},
},
...
@@ -41,6 +42,7 @@ wxService.page({
...
@@ -41,6 +42,7 @@ wxService.page({
this
.
setData
({
this
.
setData
({
params
,
params
,
orderId
:
detail
.
id
,
orderId
:
detail
.
id
,
status
:
detail
.
status
,
orderCode
:
detail
.
logistic
.
supplierCode
,
orderCode
:
detail
.
logistic
.
supplierCode
,
orderLogisticsNo
:
detail
.
logistic
.
code
,
orderLogisticsNo
:
detail
.
logistic
.
code
,
logisticCompanyName
:
this
.
data
.
logisticCompanyName
,
logisticCompanyName
:
this
.
data
.
logisticCompanyName
,
...
...
src/pages/logistics/logistics.wxml
View file @
0033ee65
...
@@ -38,9 +38,8 @@
...
@@ -38,9 +38,8 @@
</view>
</view>
</view>
</view>
<!-- <view class="button-wrap">
<!-- <view class="button-wrap"
wx:if="{{status == 'D'}}"
>
<button class="btn btn-primary btn-lg" bindtap="handelConfirmReceipt">确认收货</button>
<button class="btn btn-primary btn-lg" bindtap="handelConfirmReceipt">确认收货</button>
<button class="btn btn-lg btn-gray" bindtap="handelReturnGood">申请退款</button>
</view> -->
</view> -->
</view>
</view>
<!-- <view wx:if="{{!orderId || !hasLogisticInfo}}" class="df no-logis">
<!-- <view wx:if="{{!orderId || !hasLogisticInfo}}" class="df no-logis">
...
...
src/pages/order/order.js
View file @
0033ee65
...
@@ -63,6 +63,20 @@ wxService.page({
...
@@ -63,6 +63,20 @@ wxService.page({
wx
.
hideShareMenu
()
wx
.
hideShareMenu
()
},
},
//复制
onTapCopy
(
e
){
wx
.
setClipboardData
({
//准备复制的数据
data
:
e
.
currentTarget
.
dataset
.
no
,
success
:
function
(
res
)
{
wx
.
showToast
({
title
:
'复制成功'
,
icon
:
'none'
});
}
});
},
/**
/**
* 生命周期函数--监听页面显示
* 生命周期函数--监听页面显示
*/
*/
...
@@ -211,10 +225,14 @@ wxService.page({
...
@@ -211,10 +225,14 @@ wxService.page({
item
.
count
=
item
.
canRefundNum
;
item
.
count
=
item
.
canRefundNum
;
});
});
delete
copyOrderInfo
.
orderStore
;
let
params
=
JSON
.
stringify
(
copyOrderInfo
);
let
obj
=
{
id
:
copyOrderInfo
.
id
,
logistic
:
copyOrderInfo
.
logistic
,
status
:
copyOrderInfo
.
status
,
}
let
params
=
JSON
.
stringify
(
obj
);
// 退款申请
// 退款申请
wxService
.
router
(
`/pages/logistics/logistics`
).
search
({
params
})
wxService
.
router
(
`/pages/logistics/logistics`
).
search
({
params
})
},
},
...
...
src/pages/order/order.wxml
View file @
0033ee65
...
@@ -25,10 +25,12 @@
...
@@ -25,10 +25,12 @@
<view class="order-number" wx:if="{{currentIndex == 5}}">
<view class="order-number" wx:if="{{currentIndex == 5}}">
<text>退单号</text>
<text>退单号</text>
<text class="number"> {{item.id}}</text>
<text class="number"> {{item.id}}</text>
<view class="copy" data-no="{{item.id}}" bindtap="onTapCopy">复制</view>
</view>
</view>
<view class="order-number" wx:else>
<view class="order-number" wx:else>
<text>订单号</text>
<text>订单号</text>
<text class="number">{{item.id}}</text>
<text class="number">{{item.id}}</text>
<view class="copy" data-no="{{item.id}}" bindtap="onTapCopy">复制</view>
</view>
</view>
<!--订单状态(C:取消;N:新建,P:已支付;D:已发货;R:已收货) 关闭 取消 新建 待付款 已支付 待发货 已发货 待收货 已完成 已收货 交易关闭 取消-->
<!--订单状态(C:取消;N:新建,P:已支付;D:已发货;R:已收货) 关闭 取消 新建 待付款 已支付 待发货 已发货 待收货 已完成 已收货 交易关闭 取消-->
...
...
src/pages/order/order.wxss
View file @
0033ee65
...
@@ -70,10 +70,25 @@ scroll-view{
...
@@ -70,10 +70,25 @@ scroll-view{
.order-number{
.order-number{
color: #808080;
color: #808080;
font-size: 25rpx;
font-size: 25rpx;
display: flex;
}
}
.order-number .number{
.order-number .number{
margin-left: 32rpx;
margin-left: 32rpx;
}
}
.order-number .copy{
width: 50rpx;
height: 30rpx;
border: solid 1px #cb3c3c;
color: #cb3c3c;
font-size: 22rpx;
border-radius: 5rpx;
display: flex;
align-items: center;
justify-content: center;
margin-left: 20rpx;
}
.order-status{
.order-status{
font-size: 26rpx;
font-size: 26rpx;
color: #333333;
color: #333333;
...
...
src/pages/orderDetail/orderDetail.js
View file @
0033ee65
...
@@ -57,12 +57,23 @@ wxService.page({
...
@@ -57,12 +57,23 @@ wxService.page({
data
.
createOrderTime
=
new
Date
(
data
.
createTime
.
replace
(
/-/g
,
'/'
)).
getTime
()
||
[];
data
.
createOrderTime
=
new
Date
(
data
.
createTime
.
replace
(
/-/g
,
'/'
)).
getTime
()
||
[];
data
.
countDownOrderTime
=
7200000
;
// 2时(h)=7200000毫秒(ms)
data
.
countDownOrderTime
=
7200000
;
// 2时(h)=7200000毫秒(ms)
// 订单倒计时 超多两小时 刷新当前页
// 订单倒计时 超多两小时 刷新当前页
data
.
orderCanRefund
=
true
;
// 本地时间 - 创建时间 > 2小时 刷新当前页
// 本地时间 - 创建时间 > 2小时 刷新当前页
if
(
data
.
logistic
){
if
(
data
.
logistic
){
let
receiverInfoArr
=
data
.
logistic
.
receiverInfo
.
split
(
','
).
reverse
().
filter
(
item
=>
item
);
let
receiverInfoArr
=
data
.
logistic
.
receiverInfo
.
split
(
','
).
reverse
().
filter
(
item
=>
item
);
data
.
logistic
.
receiverName
=
receiverInfoArr
[
1
];
data
.
logistic
.
receiverName
=
receiverInfoArr
[
1
];
data
.
logistic
.
receiverMobile
=
receiverInfoArr
[
0
];
data
.
logistic
.
receiverMobile
=
receiverInfoArr
[
0
];
data
.
logistic
.
receiverAddress
=
receiverInfoArr
[
2
]
+
receiverInfoArr
[
3
];
data
.
logistic
.
receiverAddress
=
receiverInfoArr
[
2
]
+
receiverInfoArr
[
3
];
let
deliverTime
=
data
.
logistic
.
deliverTime
?
data
.
logistic
.
deliverTime
:
null
;
if
(
deliverTime
){
let
diffObj
=
utils
.
getDateDiff
(
deliverTime
);
if
(
diffObj
.
days
<=
this
.
data
.
canRefundDaysAfterDelivery
){
data
.
orderCanRefund
=
true
;
}
else
{
data
.
orderCanRefund
=
false
;
}
}
}
}
else
{
else
{
data
.
logistic
=
null
;
data
.
logistic
=
null
;
...
@@ -288,9 +299,13 @@ wxService.page({
...
@@ -288,9 +299,13 @@ wxService.page({
item
.
count
=
item
.
canRefundNum
;
item
.
count
=
item
.
canRefundNum
;
});
});
delete
copyOrderInfo
.
orderStore
;
let
obj
=
{
id
:
copyOrderInfo
.
id
,
logistic
:
copyOrderInfo
.
logistic
,
status
:
copyOrderInfo
.
status
,
}
let
params
=
JSON
.
stringify
(
copyOrderInfo
);
let
params
=
JSON
.
stringify
(
obj
);
// 退款申请
// 退款申请
wxService
.
router
(
`/pages/logistics/logistics`
).
search
({
params
})
wxService
.
router
(
`/pages/logistics/logistics`
).
search
({
params
})
},
},
...
...
src/pages/orderDetail/orderDetail.wxml
View file @
0033ee65
...
@@ -135,36 +135,23 @@
...
@@ -135,36 +135,23 @@
<button class="btn btn-primary btn-lg" data-id="{{detail.id}}" bindtap="handelToPay">立即支付</button>
<button class="btn btn-primary btn-lg" data-id="{{detail.id}}" bindtap="handelToPay">立即支付</button>
<button class="btn btn-lg btn-gray" data-id="{{detail.id}}" bindtap="handelCancelOrder">取消订单</button>
<button class="btn btn-lg btn-gray" data-id="{{detail.id}}" bindtap="handelCancelOrder">取消订单</button>
</view>
</view>
<view class="button-wrap" wx
-if="{{detail.status == 'P' && canApplyRefund
}}">
<view class="button-wrap" wx
:if="{{detail.orderCanRefund || detail.status == 'D'
}}">
<button
<button
class="btn btn-
lg btn-gray
"
class="btn btn-
gray btn-lg
"
data-id="{{detail.id}}"
data-id="{{detail.id}}"
wx:if="{{detail.orderCanRefund}}"
data-detail="{{detail}}"
data-detail="{{detail}}"
bindtap="handelRequestRefund"
bindtap="handelRequestRefund"
>申请退款
>申请退款
</button>
</button>
</view>
<view class="button-wrap" wx-if="{{detail.status == 'D' && canApplyRefund}}">
<button
<button
class="btn btn-primary btn-lg"
wx:if="{{detail.status == 'D'}}"
class="btn btn-lg btn-primary "
data-id="{{detail.id}}"
data-id="{{detail.id}}"
data-detail="{{detail}}"
bindtap="handelConfirmReceipt">确认收货</button>
bindtap="handelRequestRefund"
>申请退款
</button>
<button class="btn btn-lg btn-gray" data-id="{{detail.id}}" bindtap="handelConfirmReceipt">确认收货</button>
</view>
</view>
<!-- <view class="button-wrap" wx-if="{{detail.status == 'R'}}">
<button
class="btn btn-lg btn-gray"
data-id="{{detail.id}}"
data-detail="{{detail}}"
bindtap="handelRequestRefund"
>申请退款
</button>
</view> -->
</view>
</view>
<!--goHome-->
<go-home/>
<go-home/>
<floatNav bind:getAuth="_getUserInfo" bind:updatePage="updatePage"/>
<floatNav bind:getAuth="_getUserInfo" bind:updatePage="updatePage"/>
<go-guid/>
<go-guid/>
\ No newline at end of file
src/pages/productDetail/productDetail.js
View file @
0033ee65
...
@@ -204,7 +204,7 @@ wxService.page({
...
@@ -204,7 +204,7 @@ wxService.page({
this
.
setData
({
this
.
setData
({
productInfo
:
this
.
data
.
productInfo
productInfo
:
this
.
data
.
productInfo
})
})
;
}
}
}
}
}).
finally
(()
=>
{})
}).
finally
(()
=>
{})
...
...
src/pages/refund/refund.wxml
View file @
0033ee65
...
@@ -13,8 +13,7 @@
...
@@ -13,8 +13,7 @@
/>
/>
</view>
</view>
<view class="pro-info">
<view class="pro-info">
<image class="pro-img"
<image class="pro-img" src="{{item.skuImgUrl ? item.skuImgUrl: item.mainImgUrl }}" mode="aspectFit" />
src="{{item.skuImgUrl ? item.skuImgUrl: 'https://bigaka-xie.oss-cn-shanghai.aliyuncs.com/icon.png'}}" mode="aspectFit" />
<view class="pro-right-info">
<view class="pro-right-info">
<view class="pro-name">{{item.productName}}</view>
<view class="pro-name">{{item.productName}}</view>
<view class="pro-sku">{{item.skuSpec}}</view>
<view class="pro-sku">{{item.skuSpec}}</view>
...
...
src/project.config.json
View file @
0033ee65
...
@@ -205,7 +205,7 @@
...
@@ -205,7 +205,7 @@
"id"
:
24
,
"id"
:
24
,
"name"
:
"订单详情"
,
"name"
:
"订单详情"
,
"pathName"
:
"pages/orderDetail/orderDetail"
,
"pathName"
:
"pages/orderDetail/orderDetail"
,
"query"
:
"id=6
89550313044185088
"
,
"query"
:
"id=6
59705656785375232
"
,
"scene"
:
null
"scene"
:
null
},
},
{
{
...
...
src/utils/const.js
View file @
0033ee65
...
@@ -21,6 +21,7 @@ const contants = {
...
@@ -21,6 +21,7 @@ const contants = {
ENJOY
:
17
,
// "点赞统计"
ENJOY
:
17
,
// "点赞统计"
READ
:
18
,
//"阅读统计"
READ
:
18
,
//"阅读统计"
STAFF_RECOMMAND
:
19
,
//员工推荐
STAFF_RECOMMAND
:
19
,
//员工推荐
OFFICIAL_ACCOUNT
:
20
,
//公众号
}
}
}
}
...
...
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