Commit 93e07448 authored by 袁玲利's avatar 袁玲利

消费报告和异常报告

parent 00eeff5c
...@@ -89,12 +89,12 @@ ...@@ -89,12 +89,12 @@
"disableHostCheck": true, "disableHostCheck": true,
"proxy": { "proxy": {
"/": { "/": {
"target": "https://fpdev.xiaopay.net", "target": "https://uat-pay.xiaopay.net",
"changeOrigin": true, "changeOrigin": true,
"secure": false "secure": false
}, },
"/cgi-xpay": { "/cgi-xpay": {
"target": "https://fpdev.xiaopay.net", "target": "https://uat-pay.xiaopay.net",
"changeOrigin": true, "changeOrigin": true,
"secure": false, "secure": false,
"pathRewrite": { "pathRewrite": {
......
...@@ -130,7 +130,7 @@ ...@@ -130,7 +130,7 @@
return { return {
path: ['../ConsumptIoninfo/ConsumptIoninfo', '../ConsumptionQuota/ConsumptionQuota', path: ['../ConsumptIoninfo/ConsumptIoninfo', '../ConsumptionQuota/ConsumptionQuota',
'/pages/ConsumptionSystem/AbnormalConsumption/AbnormalConsumption', '/pages/ConsumptionSystem/AbnormalConsumption/AbnormalConsumption',
'../CommonProblem/CommonProblem', '../campusReport/campusReport' '../CommonProblem/CommonProblem', '/pages/SchoolReport/SchoolReport'
][index], ][index],
title: ['消费记录', '消费限额', '消费异常', '常见问题', '校园报告'][index], title: ['消费记录', '消费限额', '消费异常', '常见问题', '校园报告'][index],
sketch: ['消费记录 笔笔可查', '设置额度 管控消费', '消费异常 每日提醒', '使用疑问 一一解答', '校园报告'][index], sketch: ['消费记录 笔笔可查', '设置额度 管控消费', '消费异常 每日提醒', '使用疑问 一一解答', '校园报告'][index],
...@@ -183,7 +183,8 @@ ...@@ -183,7 +183,8 @@
// 跳转内部页面path // 跳转内部页面path
path: '', path: '',
// 支付宝小程序 // 支付宝小程序
aliMini: AliAppMini aliMini: AliAppMini,
fromProgm: 'wechat', // 来源
}; };
}, },
onLoad(options) { onLoad(options) {
...@@ -198,6 +199,8 @@ ...@@ -198,6 +199,8 @@
return; return;
} }
this.UserLogin(options['token']) this.UserLogin(options['token'])
console.log(options, 'options')
this.fromProgm = options.from || 'wechat'
if (options['path']) { if (options['path']) {
this.path = options['path'] || "" this.path = options['path'] || ""
} }
...@@ -282,9 +285,10 @@ ...@@ -282,9 +285,10 @@
sessionStorage.setItem('accountId', this.HomeDataInfo['accountId']) sessionStorage.setItem('accountId', this.HomeDataInfo['accountId'])
// 查询消费会员权益项 // 查询消费会员权益项
await this.QueryProductContractItem() await this.QueryProductContractItem()
console.log(this['path'], 'this[path]')
// 20231031 // 20231031
if (this['path']) { if (this['path']) {
if ('/pages/ApplyConsumption/campusReport/campusReport' == this['path']) { if ('/pages/SchoolReport/SchoolReport' == this['path']) {
this.menuClick(this.menuList[4], 5) this.menuClick(this.menuList[4], 5)
return return
} }
...@@ -324,18 +328,25 @@ ...@@ -324,18 +328,25 @@
if (!item.path) { if (!item.path) {
return return
} }
if (this.HomeDataInfo['membershipStatus'] == 1) { const result = await this.QueryProductContractItem(item['serviceItemCode'])
const authFlag = result == 'pass' ? 'true' : 'false'
console.log(result, 'this.homeDataInfo')
if (this.HomeDataInfo['membershipStatus'] == 1 && index != 5) { // 消费报告不弹弹窗
if (item['auth'] && item['serviceItemCode']) { if (item['auth'] && item['serviceItemCode']) {
// 查询消费会员权益项 // 查询消费会员权益项
const result = await this.QueryProductContractItem(item['serviceItemCode'])
if (result == "fail") { if (result == "fail") {
this.contractMenber = true this.contractMenber = true
throw ('您还未开通消费会员,') throw ('您还未开通消费会员,')
} }
} }
} }
const query = let query =
`?name=${this.HomeDataInfo['userName']}&accountId=${this.HomeDataInfo['accountId']}&userId=${this.userInfo['userId']}&schoolId=${this.userInfo['schoolId']}&userType=${this.userInfo['userType']}` `?name=${this.HomeDataInfo['userName']}&accountId=${this.HomeDataInfo['accountId']}&userId=${this.userInfo['userId']}&schoolId=${this.userInfo['schoolId']}&userType=${this.userInfo['userType']}`
if(index == 5){
//消费报告加鉴权结果
query += '&auth=' + authFlag + "&from=" + this.fromProgm
}
console.log(item.path + query) console.log(item.path + query)
uni.switchTab({ uni.switchTab({
url: item.path + query, url: item.path + query,
......
...@@ -259,9 +259,9 @@ ...@@ -259,9 +259,9 @@
// 时间处理模块 // 时间处理模块
import dayjs from "dayjs"; import dayjs from "dayjs";
import { Dialog } from "vant"; import { Dialog } from "vant";
let gHost = "https://" + window.location.host; let gHost = "https://" + window.location.host;
if (window.location.protocol != "https:") { if (window.location.protocol != "https:") {
gHost = "https://dev-az-cloud-api.xiaopay.net"; gHost = "https://test-az-cloud-api.xiaopay.net";
} }
if (window.location.host == "fpdev.xiaopay.net") { if (window.location.host == "fpdev.xiaopay.net") {
gHost = "https://dev-az-cloud-api.xiaopay.net"; gHost = "https://dev-az-cloud-api.xiaopay.net";
...@@ -406,7 +406,7 @@ export default { ...@@ -406,7 +406,7 @@ export default {
}, },
params params
); );
if (data.code != 10000) { if (data.code != 200) {
uni.showToast({ uni.showToast({
icon: "none", icon: "none",
title: data.message || "发生异常!", title: data.message || "发生异常!",
...@@ -474,6 +474,7 @@ export default { ...@@ -474,6 +474,7 @@ export default {
background: #f8f8f8; background: #f8f8f8;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
border-radius: 12rpx;
.what { .what {
margin-top: 18rpx; margin-top: 18rpx;
...@@ -760,14 +761,6 @@ export default { ...@@ -760,14 +761,6 @@ export default {
} }
} }
.tips {
padding: 16rpx 50rpx 0 50rpx;
height: 30rpx;
font-size: 22rpx;
color: rgba(0, 0, 0, 0.5);
line-height: 30rpx;
}
.lastBar { .lastBar {
width: 100%; width: 100%;
display: flex; display: flex;
...@@ -802,6 +795,7 @@ export default { ...@@ -802,6 +795,7 @@ export default {
.week { .week {
display: flex; display: flex;
height: 56rpx; height: 56rpx;
line-height: 56rpx;
font-size: 44rpx; font-size: 44rpx;
font-weight: 500; font-weight: 500;
color: rgba(0, 0, 0, 0.85); color: rgba(0, 0, 0, 0.85);
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment