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

消费报告和异常报告

parent 00eeff5c
......@@ -89,12 +89,12 @@
"disableHostCheck": true,
"proxy": {
"/": {
"target": "https://fpdev.xiaopay.net",
"target": "https://uat-pay.xiaopay.net",
"changeOrigin": true,
"secure": false
},
"/cgi-xpay": {
"target": "https://fpdev.xiaopay.net",
"target": "https://uat-pay.xiaopay.net",
"changeOrigin": true,
"secure": false,
"pathRewrite": {
......
......@@ -130,7 +130,7 @@
return {
path: ['../ConsumptIoninfo/ConsumptIoninfo', '../ConsumptionQuota/ConsumptionQuota',
'/pages/ConsumptionSystem/AbnormalConsumption/AbnormalConsumption',
'../CommonProblem/CommonProblem', '../campusReport/campusReport'
'../CommonProblem/CommonProblem', '/pages/SchoolReport/SchoolReport'
][index],
title: ['消费记录', '消费限额', '消费异常', '常见问题', '校园报告'][index],
sketch: ['消费记录 笔笔可查', '设置额度 管控消费', '消费异常 每日提醒', '使用疑问 一一解答', '校园报告'][index],
......@@ -183,7 +183,8 @@
// 跳转内部页面path
path: '',
// 支付宝小程序
aliMini: AliAppMini
aliMini: AliAppMini,
fromProgm: 'wechat', // 来源
};
},
onLoad(options) {
......@@ -198,6 +199,8 @@
return;
}
this.UserLogin(options['token'])
console.log(options, 'options')
this.fromProgm = options.from || 'wechat'
if (options['path']) {
this.path = options['path'] || ""
}
......@@ -282,9 +285,10 @@
sessionStorage.setItem('accountId', this.HomeDataInfo['accountId'])
// 查询消费会员权益项
await this.QueryProductContractItem()
console.log(this['path'], 'this[path]')
// 20231031
if (this['path']) {
if ('/pages/ApplyConsumption/campusReport/campusReport' == this['path']) {
if ('/pages/SchoolReport/SchoolReport' == this['path']) {
this.menuClick(this.menuList[4], 5)
return
}
......@@ -324,18 +328,25 @@
if (!item.path) {
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']) {
// 查询消费会员权益项
const result = await this.QueryProductContractItem(item['serviceItemCode'])
if (result == "fail") {
this.contractMenber = true
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']}`
if(index == 5){
//消费报告加鉴权结果
query += '&auth=' + authFlag + "&from=" + this.fromProgm
}
console.log(item.path + query)
uni.switchTab({
url: item.path + query,
......
......@@ -261,7 +261,7 @@ import dayjs from "dayjs";
import { Dialog } from "vant";
let gHost = "https://" + window.location.host;
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") {
gHost = "https://dev-az-cloud-api.xiaopay.net";
......@@ -406,7 +406,7 @@ export default {
},
params
);
if (data.code != 10000) {
if (data.code != 200) {
uni.showToast({
icon: "none",
title: data.message || "发生异常!",
......@@ -474,6 +474,7 @@ export default {
background: #f8f8f8;
display: flex;
flex-direction: column;
border-radius: 12rpx;
.what {
margin-top: 18rpx;
......@@ -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 {
width: 100%;
display: flex;
......@@ -802,6 +795,7 @@ export default {
.week {
display: flex;
height: 56rpx;
line-height: 56rpx;
font-size: 44rpx;
font-weight: 500;
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