Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
严立
/
mini-shimao
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
2ad473a2
authored
Sep 21, 2020
by
严立
Browse files
Options
_('Browse Files')
Download
Plain Diff
Merge branch 'master' of
http://120.77.182.185/yanl/mini-shimao
parents
028b08b9
451e5518
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
64 additions
and
20 deletions
pages/mine/home/home.js
pages/mine/home/home.wxml
pages/mine/order/order.js
pages/pay/coupon-detail/coupon-detail.js
pages/pay/coupon-input/coupon-input.js
pages/pay/coupon-input/coupon-input.wxml
pages/pay/coupon-input/coupon-input.wxss
pages/mine/home/home.js
View file @
2ad473a2
...
...
@@ -60,6 +60,13 @@ Page({
shopConfig
:
App
.
globalData
.
shopId
,
isYearCard
:
true
,
isMonthCard
:
false
,
authInfo
:
null
,
goodTypeCountData
:
{}
},
goQuestion
:
function
()
{
wx
.
navigateTo
({
url
:
'/pages/mine/question/question'
,
})
},
// 跳转订单详情
onOrderDetail
:
function
(
event
)
{
...
...
@@ -97,7 +104,7 @@ Page({
// 去核销
goCouponInput
(
event
)
{
wx
.
navigateTo
({
url
:
'/pages/pay/coupon-input/coupon-input
'
,
url
:
'/pages/pay/coupon-input/coupon-input
?authInfo='
+
JSON
.
stringify
(
this
.
data
.
authInfo
)
,
})
},
// 获取核销权限
...
...
@@ -113,7 +120,11 @@ Page({
console
.
log
(
res
,
'核销'
);
let
data
=
res
.
data
let
isPer
=
false
if
(
data
.
length
>
0
)
{
let
authInfo
=
{
officeName
:
data
.
officeName
,
roleName
:
data
.
roleNames
[
0
],
}
if
(
data
.
permissions
.
length
>
0
)
{
//有核销权限
isPer
=
true
}
else
{
...
...
@@ -124,7 +135,8 @@ Page({
that
.
setData
({
isCheckPermission
:
isPer
isCheckPermission
:
isPer
,
authInfo
:
authInfo
})
}
})
...
...
@@ -197,7 +209,7 @@ Page({
},
success
:
function
(
res
)
{
let
list
=
res
.
data
.
map
(
item
=>
{
let
shopFilter
=
that
.
data
.
shopConfig
.
filter
(
k
=>
{
...
...
@@ -225,6 +237,25 @@ Page({
}
})
},
//获取分类统计
getCountByGoodType
()
{
let
that
=
this
App
.
wxRequest
({
url
:
'/api/v1/order/getCountByGoodType'
,
data
:
{
status
:
""
,
//0已过期1待使用2已使用(""全部)
pageNo
:
1
,
pageSize
:
-
1
},
success
:
function
(
res
)
{
console
.
log
(
res
,
'获取分类统计'
);
let
data
=
res
.
data
?
res
.
data
:
{}
that
.
setData
({
goodTypeCountData
:
data
})
}
})
},
setUserInfo
:
function
()
{
let
funcUserInfo
=
wx
.
getStorageSync
(
'userInfo'
)
...
...
@@ -265,6 +296,8 @@ Page({
this
.
getWillUseOrders
()
this
.
getPermissions
()
this
.
getIntegral
()
this
.
getList
()
this
.
getCountByGoodType
()
},
})
}
else
{
...
...
@@ -418,7 +451,6 @@ Page({
id
:
item
.
id
,
mobile
:
item
.
mobile
,
name
:
item
.
name
,
}
tmpArr
.
push
(
obj
)
})
...
...
pages/mine/home/home.wxml
View file @
2ad473a2
This diff is collapsed.
Click to expand it.
pages/mine/order/order.js
View file @
2ad473a2
...
...
@@ -132,7 +132,7 @@ Page({
// 映射门店信息
for
(
let
i
=
0
,
l
=
App
.
globalData
.
shopId
.
length
;
i
<
l
;
i
++
)
{
if
(
funcItem
.
shopName
===
App
.
globalData
.
shopId
[
i
].
name
)
{
if
(
funcItem
.
shopName
.
toLowerCase
()
===
App
.
globalData
.
shopId
[
i
].
name
.
toLowerCase
()
)
{
funcItem
.
shopId
=
App
.
globalData
.
shopId
[
i
].
id
funcItem
.
shopAppId
=
App
.
globalData
.
shopId
[
i
].
appId
funcItem
.
shopLogo
=
App
.
globalData
.
shopId
[
i
].
logo
...
...
pages/pay/coupon-detail/coupon-detail.js
View file @
2ad473a2
...
...
@@ -117,7 +117,12 @@ Page({
volumeId
:
that
.
data
.
couponDetail
.
volumeId
,
},
success
:
function
(
res
)
{
if
(
res
.
data
.
code
*
1
==
200
)
{
if
(
res
.
data
&&
res
.
data
.
code
*
1
==
500
)
{
wx
.
lin
.
showToast
({
image
:
'/image/error.png'
,
title
:
res
.
data
.
msg
,
})
}
else
{
wx
.
lin
.
showToast
({
image
:
'/image/success.png'
,
title
:
'核销成功'
,
...
...
@@ -125,11 +130,6 @@ Page({
setTimeout
(()
=>
{
wx
.
navigateBack
()
},
2000
);
}
else
{
wx
.
lin
.
showToast
({
image
:
'/image/error.png'
,
title
:
res
.
data
.
msg
,
})
}
},
...
...
pages/pay/coupon-input/coupon-input.js
View file @
2ad473a2
...
...
@@ -2,13 +2,24 @@ const App = getApp()
Page
({
data
:
{
bgUrl
:
'/pages/mine/home/image/mine.png'
,
avatarUrl
:
'/pages/mine/home/image/avatar.png'
,
name
:
'姓名'
,
idString
:
'前台核销'
,
shop
:
'艺术花坊'
,
showDialog
:
false
,
showDialogSmg
:
'非本店券码,无法使用'
,
couponCode
:
''
,
},
onLoad
:
function
(
options
)
{
let
userInfo
=
wx
.
getStorageSync
(
'userInfo'
)
let
authInfo
=
JSON
.
parse
(
options
.
authInfo
)
this
.
setData
({
avatarUrl
:
userInfo
.
avatar
?
userInfo
.
avatar
:
'/pages/mine/home/image/avatar.png'
,
name
:
userInfo
.
name
,
idString
:
authInfo
.
roleName
,
shop
:
authInfo
.
officeName
,
})
},
handleWriteOff
()
{
this
.
getVolumeDetails
(
this
.
data
.
couponCode
)
...
...
pages/pay/coupon-input/coupon-input.wxml
View file @
2ad473a2
...
...
@@ -4,21 +4,21 @@
<!-- 头像信息 -->
<view class="header col align-c">
<view class="header-bg">
<image src=""></image>
<image src="
{{bgUrl}}
"></image>
</view>
<view class="header-avatar">
<l-avatar size="160" src="{{avatarUrl}}"></l-avatar>
</view>
<view class="header-info">
<view class="info-name">
文碧海
</view>
<view class="info-name">
{{name}}
</view>
<view class="info-text col con-b">
<view class="row con-b">
<text class="info-left">工作身份</text>
<text class="info-right">
前台核销
</text>
<text class="info-right">
{{idString}}
</text>
</view>
<view class="row con-b">
<text class="info-left">所属门店</text>
<text class="info-right">
艺术花坊
</text>
<text class="info-right">
{{shop}}
</text>
</view>
</view>
</view>
...
...
pages/pay/coupon-input/coupon-input.wxss
View file @
2ad473a2
...
...
@@ -12,7 +12,7 @@
.header-info {
position: absolute;
top: 472rpx;
width: 232rpx;
/* width: 232rpx; */
height: 205rpx;
}
.info-name {
...
...
@@ -33,6 +33,7 @@
.info-right {
color: #15191F;
font-size: 26rpx;
margin-left: 10rpx;
}
.coupon-input-wrapper {
width: 668rpx;
...
...
@@ -83,9 +84,9 @@
min-width: 262rpx !important;
min-height: 262prx !important;
}
.toast-image {
/*
.toast-image {
}
}
*/
.coupon-scan-wrapper {
width: 668rpx;
...
...
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