Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Sign in
Toggle navigation
X
xzf_uniapp-wechat-web
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
李智书
xzf_uniapp-wechat-web
Commits
bceba90f
Commit
bceba90f
authored
Sep 06, 2023
by
袁玲利
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
校园报告鉴权逻辑修改
parent
f10bcbba
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
25 deletions
+46
-25
src/pages/ApplyConsumption/Home/Home.vue
src/pages/ApplyConsumption/Home/Home.vue
+1
-1
src/pages/ApplyConsumption/campusReport/campusReport.vue
src/pages/ApplyConsumption/campusReport/campusReport.vue
+45
-24
No files found.
src/pages/ApplyConsumption/Home/Home.vue
View file @
bceba90f
...
...
@@ -136,7 +136,7 @@
// 鉴权服务项code
serviceItemCode
:
[
config
[
'
ServiceEnum
'
][
'
Auth10
'
],
config
[
'
ServiceEnum
'
][
'
Auth8
'
],
config
[
'
ServiceEnum
'
][
'
Auth11
'
],
''
,
config
[
'
ServiceEnum
'
][
'
Auth
0
2
'
]]
'
ServiceEnum
'
][
'
Auth2
'
]]
[
index
]
}
}),
...
...
src/pages/ApplyConsumption/campusReport/campusReport.vue
View file @
bceba90f
...
...
@@ -66,7 +66,7 @@
</view>
<!-- 遮罩层 -->
<template
v-if=
"
!isVip
"
>
<template
v-if=
"
false
"
>
<div
class=
"Covers"
>
<div
class=
"Covers_head"
@
click=
"openAzMenber"
>
<span>
...
...
@@ -83,7 +83,7 @@
</
template
>
</view>
<
template
v-if=
"isVip"
>
<
template
>
<!-- 生活费额度 -->
<view
class=
"living"
>
<view
class=
"hed"
>
...
...
@@ -223,10 +223,10 @@
<span>
消费明细
</span>
</view>
<view
class=
"consume_detail_mesg"
>
<span>
早餐
<text
class=
"prefer_light"
>
{{
userDealReportListAndSumObj
.
zaoSumAmount
}}
</text>
<span>
早餐
<text
class=
"prefer_light"
>
{{
userDealReportListAndSumObj
.
zaoSumAmount
||
0
}}
</text>
元,午餐
<text
class=
"prefer_light"
>
{{
userDealReportListAndSumObj
.
wuSumAmount
}}
</text>
元,晚餐
<text
class=
"prefer_light"
>
{{
userDealReportListAndSumObj
.
wanSumAmount
}}
</text>
元
</span>
class=
"prefer_light"
>
{{
userDealReportListAndSumObj
.
wuSumAmount
||
0
}}
</text>
元,晚餐
<text
class=
"prefer_light"
>
{{
userDealReportListAndSumObj
.
wanSumAmount
||
0
}}
</text>
元
</span>
</view>
<view
class=
"detail_lists"
>
<view
class=
"listsHead"
v-if=
"userDealReportListAndSumObj.list.length"
>
...
...
@@ -263,7 +263,7 @@
<view
class=
"footer_left"
>
<view
class=
"footer_left_top"
>
到期后将无法查看完整报告
</view>
<view
class=
"footer_left_bottom"
>
有效期至
<span
class=
"special"
>
{{vipExpiredDt}}
</span>
,剩余
<span
class=
"special"
>
{{
homeDataInfo['vipDaysRemaining']
}}
</span>
天
</view>
class=
"special"
>
{{
vipDaysRemaining
}}
</span>
天
</view>
</view>
<view
class=
"footer_right"
@
click=
"openAzMenber"
>
<span>
延长权益
</span>
...
...
@@ -321,6 +321,7 @@
requestGet
,
requestPost
}
from
'
../common/request.js
'
import
config
from
'
../common/config.js
'
export
default
{
name
:
'
campusReport
'
,
data
()
{
...
...
@@ -362,6 +363,7 @@
},
homeDataInfo
:
{},
vipExpiredDt
:
""
,
// 有效期
vipDaysRemaining
:
0
,
//有效天数
}
},
components
:
{
...
...
@@ -389,30 +391,50 @@
},
created
()
{
this
.
dataRangeArr
=
this
.
repastDateTimeFormat
()
this
.
currentDate
.
month
=
moment
(
this
.
dataRangeArr
[
this
.
dataRangeIndex
].
startDate
).
month
()
this
.
currentDate
.
month
=
moment
(
this
.
dataRangeArr
[
this
.
dataRangeIndex
].
startDate
).
month
()
||
0
this
.
currentDate
.
year
=
moment
(
this
.
dataRangeArr
[
this
.
dataRangeIndex
].
startDate
).
year
()
this
.
currentDate
.
date
=
moment
(
this
.
dataRangeArr
[
this
.
dataRangeIndex
].
startDate
).
date
()
this
.
shareDate
=
moment
(
this
.
dataRangeArr
[
this
.
dataRangeIndex
].
startDate
).
format
(
'
YYYY-MM-DD 00:00:00
'
)
this
.
today
.
date
=
(
this
.
currentDate
.
month
+
1
)
+
'
月1日
'
console
.
log
(
this
.
currentDate
,
'
currentDate1111111111111
'
,
this
.
shareDate
,
'
this.homeDataInfo
'
,
this
.
homeDataInfo
)
},
mounted
()
{
console
.
log
(
this
.
dataRangeArr
,
'
dataRangeArr
'
)
this
.
homeDataInfo
=
JSON
.
parse
(
sessionStorage
.
getItem
(
'
HomeDataInfo
'
))
this
.
QueryProductContractItemDetailResp
(
config
[
'
ServiceEnum
'
][
'
Auth2
'
]);
this
.
getCampusConsumerReport
()
if
(
this
.
homeDataInfo
.
vipStatus
===
1
)
{
this
.
isVip
=
true
;
this
.
vipExpiredDt
=
moment
(
this
.
homeDataInfo
.
vipExpiredDt
).
format
(
'
YYYY年MM月DD日
'
)
console
.
log
(
this
.
vipExpiredDt
,
'
this.vipExpiredDt
'
)
this
.
initPieCharts
()
this
.
getCateringAbnormalTypeGroupList
()
}
this
.
getCateringAbnormalTypeGroupList
()
console
.
log
(
this
.
isVip
,
'
isVip
'
)
this
.
columns
=
this
.
dataRangeArr
.
map
(
x
=>
x
.
month
)
console
.
log
(
this
.
columns
,
'
columns
'
)
},
methods
:
{
// 查询消费会员权益项
async
QueryProductContractItemDetailResp
(
serviceItemCode
=
'
1002
'
)
{
console
.
log
(
config
[
'
ServiceEnum
'
][
'
Auth2
'
],
'
Auth2
'
,
this
.
homeDataInfo
)
const
data
=
await
requestPost
(
'
/cgi-xpay/app/h5/QueryProductContractItemDetail
'
,
{
accountId
:
this
.
homeDataInfo
[
'
accountId
'
],
serviceItemCode
})
if
(
data
[
'
code
'
]
!=
200
)
{
await
Dialog
({
title
:
'
温馨提示
'
,
message
:
data
[
'
message
'
],
confirmButtonText
:
"
知道了
"
})
return
}
this
.
vipExpiredDt
=
data
.
data
.
expiredDt
?
(
moment
(
data
.
data
.
expiredDt
).
format
(
'
YYYY年MM月DD日
'
))
:
''
this
.
vipDaysRemaining
=
data
.
data
.
daysRemaining
||
0
console
.
log
(
data
.
data
,
'
result
'
)
},
shareHandler
:
function
()
{
let
htmlCanvasImg
=
document
.
getElementsByClassName
(
"
htmlCanvasImg
"
)[
0
];
if
(
htmlCanvasImg
)
{
...
...
@@ -444,7 +466,7 @@
},
// 切换日期
changeToday
(
today
)
{
this
.
today
.
date
=
(
today
.
month
+
1
)
+
'
月
'
+
today
.
date
+
'
日
'
this
.
today
.
date
=
(
today
.
month
+
1
)
+
'
月
'
+
(
today
.
date
||
'
1
'
)
+
'
日
'
if
(
Reflect
.
has
(
today
,
'
unrecordedZao
'
))
{
this
.
today
.
zao
=
today
.
unrecordedZao
}
...
...
@@ -469,10 +491,11 @@
console
.
log
(
this
.
currentDate
,
'
currentDate222222222222222
'
,
this
.
shareDate
)
console
.
log
(
obj
,
'
obj
'
,
this
.
dataRangeIndex
)
this
.
getCampusConsumerReport
()
if
(
this
.
homeDataInfo
.
vipStatus
===
1
)
{
this
.
initPieCharts
()
// if (this.homeDataInfo.vipStatus === 1) {
// this.initPieCharts()
this
.
getCateringAbnormalTypeGroupList
()
}
//
}
this
.
pickerShow
=
!
this
.
pickerShow
;
},
choosePicker
()
{
...
...
@@ -516,6 +539,7 @@
return
}
this
.
campusConsumerReportInfo
=
data
.
data
;
this
.
initPieCharts
()
}
catch
(
e
)
{
console
.
warn
(
e
)
//TODO handle the exception
...
...
@@ -622,9 +646,6 @@
getDataRangeArr
()
{
console
.
log
(
this
.
dataRangeArr
,
'
dataRangeArr
'
)
},
init
()
{
this
.
initPieCharts
();
},
show
()
{
this
.
getUserDealReportListAndSum
()
this
.
isShow
=
!
this
.
isShow
;
...
...
@@ -657,15 +678,15 @@
series
:
[{
type
:
'
pie
'
,
data
:
[{
value
:
this
.
campusConsumerReportInfo
.
supermarketAmountF
,
value
:
this
.
campusConsumerReportInfo
.
supermarketAmountF
||
0
,
name
:
'
超市
'
},
{
value
:
this
.
campusConsumerReportInfo
.
canteenAmountF
,
value
:
this
.
campusConsumerReportInfo
.
canteenAmountF
||
0
,
name
:
'
食堂
'
},
{
value
:
this
.
campusConsumerReportInfo
.
otherAmountF
,
value
:
this
.
campusConsumerReportInfo
.
otherAmountF
||
0
,
name
:
'
其他
'
}
],
...
...
@@ -733,13 +754,13 @@
{
type
:
'
pie
'
,
data
:
[{
value
:
62
0
,
value
:
this
.
campusConsumerReportInfo
.
supermarketAmountF
||
0
,
},
{
value
:
24
0
,
value
:
this
.
campusConsumerReportInfo
.
canteenAmountF
||
0
,
},
{
value
:
10
0
,
value
:
this
.
campusConsumerReportInfo
.
otherAmountF
||
0
,
}
],
radius
:
[
'
69%
'
,
'
82%
'
],
...
...
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