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
370fea12
Commit
370fea12
authored
Nov 02, 2023
by
李智书
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'v_c_application_feature_1031' into 'master'
V c application feature 1031 See merge request
!11
parents
4b26c2c2
7b9ea81f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
18 deletions
+44
-18
src/pages/ApplyConsumption/Home/Home.vue
src/pages/ApplyConsumption/Home/Home.vue
+29
-8
src/pages/ApplyConsumption/campusReport/campusReport.vue
src/pages/ApplyConsumption/campusReport/campusReport.vue
+15
-10
No files found.
src/pages/ApplyConsumption/Home/Home.vue
View file @
370fea12
...
...
@@ -3,7 +3,7 @@
<!-- 头部卡片 -->
<view
class=
"cardInfo"
:style=
"'background-image: url('+this.$ImgUrl + (HomeDataInfo['vipStatus']==1? 'applyCons/bgm.png':'applyCons/bgm1.png')+')'"
>
<view
class=
"userInfo"
>
<view
class=
"userInfo"
v-if=
"!path"
>
<view
class=
"left"
>
<view
class=
"useravatar"
:style=
"'background-image: url('+this.$ImgUrl + 'applyCons/icon.png'+')'"
>
</view>
...
...
@@ -24,7 +24,7 @@
</view>
</view>
<!-- 消费数据 -->
<view
class=
"cdatabox"
>
<view
class=
"cdatabox"
v-if=
"!path"
>
<view
class=
"cdatal"
>
<span
class=
"integer"
>
{{
HomeDataInfo
[
'
schoolConsumption
'
][
'
dailySpend_integer
'
]
}}
</span>
<span
class=
"decimal"
>
.
{{
HomeDataInfo
[
'
schoolConsumption
'
][
'
dailySpend_decimal
'
]
}}
</span>
...
...
@@ -41,7 +41,7 @@
</view>
</view>
<!-- -->
<view
class=
"cdatabox2"
>
<view
class=
"cdatabox2"
v-if=
"!path"
>
<view
class=
"cdatal"
:style=
"HomeDataInfo['schoolConsumption']['pendingcharge_decimal']>0?'color: red;':''"
@
click=
"goToPage(1)"
>
...
...
@@ -72,14 +72,16 @@
</view>
</view>
<!-- 功能菜单 -->
<view
class=
"menuList"
>
<view
class=
"menuList"
v-if=
"!path"
>
<view
class=
"menuitem"
v-for=
"(item,index) in menuList"
:key=
"index"
@
click=
"menuClick(item,index+1)"
>
<view
class=
""
>
<view
class=
"title"
>
{{
item
.
title
||
''
}}
</view>
<view
class=
"sketch"
>
{{
item
.
sketch
||
''
}}
</view>
</view>
<view
class=
"icon"
>
<image
:src=
"index+1 != 5 ? item.icon : 'https://xiaopay2020.oss-cn-shenzhen.aliyuncs.com/static/weapp/applyCons/menu3.png'"
mode=
"aspectFit"
></image>
<image
:src=
"index+1 != 5 ? item.icon : 'https://xiaopay2020.oss-cn-shenzhen.aliyuncs.com/static/weapp/applyCons/menu3.png'"
mode=
"aspectFit"
></image>
</view>
</view>
</view>
...
...
@@ -116,6 +118,8 @@
requestGet
,
requestPost
}
from
'
../common/request.js
'
// 判断是否支付宝小程序
const
AliAppMini
=
navigator
.
userAgent
.
indexOf
(
'
AliApp
'
)
>
-
1
export
default
{
name
:
"
CampusConsumption
"
,
data
()
{
...
...
@@ -176,6 +180,10 @@
},
// 消费会员弹框
contractMenber
:
false
,
// 跳转内部页面path
path
:
''
,
// 支付宝小程序
aliMini
:
AliAppMini
};
},
onLoad
(
options
)
{
...
...
@@ -190,6 +198,9 @@
return
;
}
this
.
UserLogin
(
options
[
'
token
'
])
if
(
options
[
'
path
'
])
{
this
.
path
=
options
[
'
path
'
]
||
""
}
},
methods
:
{
// 弹框点击事情
...
...
@@ -221,7 +232,7 @@
return
}
uni
.
setStorageSync
(
'
token
'
,
data
.
data
[
'
token
'
])
this
.
HomePageData
()
await
this
.
HomePageData
()
},
// 查询消费会员权益项
async
QueryProductContractItem
(
serviceItemCode
=
'
1008
'
)
{
...
...
@@ -270,7 +281,17 @@
sessionStorage
.
setItem
(
'
HomeDataInfo
'
,
JSON
.
stringify
(
this
.
HomeDataInfo
))
sessionStorage
.
setItem
(
'
accountId
'
,
this
.
HomeDataInfo
[
'
accountId
'
])
// 查询消费会员权益项
this
.
QueryProductContractItem
()
await
this
.
QueryProductContractItem
()
// 20231031
if
(
this
[
'
path
'
])
{
if
(
'
/pages/ApplyConsumption/campusReport/campusReport
'
==
this
[
'
path
'
])
{
this
.
menuClick
(
this
.
menuList
[
4
],
5
)
return
}
uni
.
redirectTo
({
url
:
this
[
'
path
'
]
})
}
},
// 跳转页面
async
goToPage
(
value
)
{
...
...
@@ -315,7 +336,7 @@
}
const
query
=
`?name=
${
this
.
HomeDataInfo
[
'
userName
'
]}
&accountId=
${
this
.
HomeDataInfo
[
'
accountId
'
]}
&userId=
${
this
.
userInfo
[
'
userId
'
]}
&schoolId=
${
this
.
userInfo
[
'
schoolId
'
]}
&userType=
${
this
.
userInfo
[
'
userType
'
]}
`
console
.
log
(
item
.
path
+
query
)
console
.
log
(
item
.
path
+
query
)
uni
.
switchTab
({
url
:
item
.
path
+
query
,
fail
:
()
=>
{
...
...
src/pages/ApplyConsumption/campusReport/campusReport.vue
View file @
370fea12
...
...
@@ -81,7 +81,7 @@
</
template
>
</view>
<
template
>
<
template
>
<!-- 生活费额度 -->
<view
class=
"living"
>
<view
class=
"hed"
>
...
...
@@ -227,7 +227,8 @@
class=
"prefer_light"
>
{{
userDealReportListAndSumObj
.
wanSumAmount
||
0
}}
</text>
元
</span>
</view>
<view
class=
"detail_lists"
>
<view
class=
"listsHead"
v-if=
"userDealReportListAndSumObj.list && userDealReportListAndSumObj.list.length"
>
<view
class=
"listsHead"
v-if=
"userDealReportListAndSumObj.list && userDealReportListAndSumObj.list.length"
>
<span>
日期
</span>
<span>
早餐
</span>
<span>
午餐
</span>
...
...
@@ -257,7 +258,7 @@
</
template
>
<!-- 底部部分 -->
<view
class=
"footer"
>
<view
class=
"footer"
:style=
"aliMini?'visibility: hidden;':''"
>
<view
class=
"footer_left"
>
<view
class=
"footer_left_top"
>
到期后将无法查看完整报告
</view>
<view
class=
"footer_left_bottom"
>
有效期至
<span
class=
"special"
>
{{vipExpiredDt}}
</span>
,剩余
<span
...
...
@@ -320,6 +321,8 @@
requestPost
}
from
'
../common/request.js
'
import
config
from
'
../common/config.js
'
// 判断是否支付宝小程序
const
AliAppMini
=
navigator
.
userAgent
.
indexOf
(
'
AliApp
'
)
>
-
1
export
default
{
name
:
'
campusReport
'
,
data
()
{
...
...
@@ -362,6 +365,8 @@
homeDataInfo
:
{},
vipExpiredDt
:
""
,
// 有效期
vipDaysRemaining
:
0
,
//有效天数
// 支付宝小程序
aliMini
:
AliAppMini
}
},
components
:
{
...
...
@@ -396,18 +401,18 @@
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
.
getCateringAbnormalTypeGroupList
()
console
.
log
(
this
.
isVip
,
'
isVip
'
)
this
.
columns
=
this
.
dataRangeArr
.
map
(
x
=>
x
.
month
)
...
...
@@ -416,7 +421,7 @@
methods
:
{
// 查询消费会员权益项
async
QueryProductContractItemDetailResp
(
serviceItemCode
=
'
1002
'
)
{
console
.
log
(
config
[
'
ServiceEnum
'
][
'
Auth2
'
],
'
Auth2
'
,
this
.
homeDataInfo
)
console
.
log
(
config
[
'
ServiceEnum
'
][
'
Auth2
'
],
'
Auth2
'
,
this
.
homeDataInfo
)
const
data
=
await
requestPost
(
'
/cgi-xpay/app/h5/QueryProductContractItemDetail
'
,
{
accountId
:
this
.
homeDataInfo
[
'
accountId
'
],
serviceItemCode
...
...
@@ -491,8 +496,8 @@
this
.
getCampusConsumerReport
()
// if (this.homeDataInfo.vipStatus === 1) {
// this.initPieCharts()
this
.
getCateringAbnormalTypeGroupList
()
this
.
getCateringAbnormalTypeGroupList
()
// }
this
.
pickerShow
=
!
this
.
pickerShow
;
this
.
isShow
=
false
;
...
...
@@ -538,7 +543,7 @@
return
}
this
.
campusConsumerReportInfo
=
data
.
data
;
this
.
initPieCharts
()
this
.
initPieCharts
()
}
catch
(
e
)
{
console
.
warn
(
e
)
//TODO handle the exception
...
...
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