Commit 78421bc6 authored by 袁玲利's avatar 袁玲利

充值和消费界面新增

parents 763c770e 7a08ae19
......@@ -363,7 +363,7 @@
}, 10);
})
const respes = await requestPost('/cgi-xpay/app/h5/ConsumeLimitData', {
accountId: 0
accountId: sessionStorage.getItem('accountId') * 1
})
uni.hideLoading()
if (respes['code'] != 200) {
......@@ -574,10 +574,8 @@
supermarketConsumptionLimit: supermarketConsumptionLimit,
};
// 设置消费限额
let respes = await this.$httpWX.post({
url: '/cgi-xpay/app/user/SetParentConsumeLimitV2'
}, Object.assign({
accountId: this.ConsumptionQuotaUser.id, // 消费用户账户id
const respes = await requestPost('/cgi-xpay/app/h5/SetParentConsumeLimit', Object.assign({
accountId: sessionStorage.getItem('accountId') * 1, // 消费用户账户id
}, params))
if (respes.code != 200) {
uni.showToast({
......
......@@ -96,6 +96,7 @@
Dialog
} from 'vant';
import config from '../common/config.js'
// console.warn(config['ServiceEnum'])
import {
requestGet,
requestPost
......@@ -143,42 +144,58 @@
};
},
onLoad(options) {
uni.setStorageSync('token',
`eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwaG9uZSI6IjE4OTQyNTA4MzY0IiwidXNlcklkIjoiMjA4ODIxMjM4MzI0MDM1MSIsImJpbmRVc2VySWQiOiI2MTMwMCIsImJpbmRVc2VyVHlwZSI6IjIiLCJiaW5kQWNjb3VudElkIjoiMTEzIiwic291cmNlIjoiYWxpcGF5IiwiZXhwIjoxNjg4NzE3MDQyLCJpc3MiOiJhZG1pbiIsIm5iZiI6MTY4ODcxMjQ0Mn0.TJIWWE85hrDLENglp5YVqh8sVFzi5hE-17DjfputrOg`
)
this.HomePageData()
// if (!options['schoolId'] || !options['userId']) {
// Dialog({
// title: '系统提示!',
// message: '学生Id或学校Id为必传参数!',
// confirmButtonText: "知道了"
// }).then(res => {
// window.close()
// })
// return;
// }
if (!options['token']) {
Dialog({
title: '系统提示',
message: 'token为空!',
confirmButtonText: "知道了"
}).then(res => {
window.close()
})
return;
}
this.UserLogin(options['token'])
},
methods: {
//登录获取用户信息
async UserLogin(token) {
let data = await requestPost('/cgi-xpay/app/Login', {
grantType: 'GT_azCloud_h5',
code: token,
})
if (data['code'] != 200) {
await Dialog({
title: '温馨提示',
message: data['message'],
confirmButtonText: "知道了"
})
return
}
uni.setStorageSync('token', data.data['token'])
this.HomePageData()
},
// 查询消费会员权益项
async QueryProductContractItem() {
async QueryProductContractItem(serviceItemCode = '1008') {
const data = await requestPost('/cgi-xpay/app/h5/QueryProductContractItem', {
accountId: this.HomeDataInfo['accountId'],
serviceItemCode: '1008'
serviceItemCode
})
if (data['code'] != 200) {
await Dialog({
title: '温馨提示',
message: data['message'],
confirmButtonText: "知道了"
})
return
}
console.warn(data)
return data.data['result']
},
// 获取首页数据
async HomePageData() {
const data = await requestPost('/cgi-xpay/app/h5/HomePageData', {})
if (data['code'] != 200) {
await Dialog({
title: '温馨提示',
message: data['message'],
confirmButtonText: "知道了"
})
......@@ -196,6 +213,7 @@
}
data.data['schoolConsumption'] = schoolConsumption
this.HomeDataInfo = data.data
sessionStorage.setItem('accountId', this.HomeDataInfo['accountId'])
// 查询消费会员权益项
this.QueryProductContractItem()
},
......@@ -214,7 +232,7 @@
},
// 跳转云平台权益中心
async openAzMenber() {
wx.miniProgram.navigateTo({
jWeixin.miniProgram.navigateTo({
url: '/pages/nationalCenterForLesbianRights/index'
})
},
......
......@@ -23,8 +23,22 @@ if (window.location.host == 'pay.xiaopay.net') {
env = "product";
baseURL = 'https://pay.xiaopay.net'
}
const ServiceEnum = {
Auth1: '1001', //'消费方式-刷脸模式',
Auth2: '1002', //'消费周报/月报',
Auth3: '1003', //'消费方式-刷卡模式',
Auth4: '1004', //'扣款方式-微信代扣',
Auth5: '1005', //'扣款方式-钱包代扣',
Auth6: '1006', //'在线充值',
Auth7: '1007', //'微信垫资',
Auth8: '1008', //'家长自定义限额',
Auth9: '1009', //'微信公众号推送',
Auth10: '1010', //'消费记录明细',
Auth11: '1011', //'每日异常小报告'
}
const json = {
env,
baseURL
baseURL,
ServiceEnum
}
export default json;
\ No newline at end of file
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