Commit 2663f553 authored by 李智书's avatar 李智书

1.提交更新;

parent b36e40f0
......@@ -69,7 +69,9 @@ function request(params, data) {
resolve(res)
},
fail: function(fail) {
reject(fail)
reject({
message: fail.errMsg
})
}
});
})
......@@ -127,7 +129,8 @@ function postRequest(params, data = {}) {
uni.hideLoading();
resolve(reslt.data)
}).catch(e => {
reject(e.message)
uni.hideLoading();
reject(e)
})
} catch (e) {
console.log(e);
......@@ -181,6 +184,7 @@ function getRequest(params, data) {
uni.hideLoading();
resolve(reslt.data)
}).catch(e => {
uni.hideLoading();
reject(e.message)
})
} catch (e) {
......
......@@ -206,7 +206,7 @@
async queryChargeProDetail() {
try {
let data = await this.$http.post({
url: '/order-charge/app/charge/project/queryChargeProDetail'
url: 'https://dev-az-order-api.xiaopay.net/order-charge/app/charge/project/queryChargeProDetail'
}, {
"chargeId": this.allData.chargeId,
"schoolId": this.allData.schoolId,
......@@ -342,7 +342,7 @@
}
}
let data = await this.$http.post({
url: '/order-charge/app/charge/project/createOrder'
url: 'https://dev-az-order-api.xiaopay.net/order-charge/app/charge/project/createOrder'
}, {
amount: this.selectCount * 100, // 金额 false
chargeItemIds: this.chargeItemIds.join(","), // 交费用项id集合多个交费项之间使用逗号分隔 false
......@@ -382,23 +382,21 @@
// 获取支付参数
async getPayParams(prepayId) {
try {
let data = await this.$http.get({
url: '/order-charge/app/charge/project/getPayParams'
}, {
prepayId
})
if (data.data.code != 200 || !data.data.data) {
let data = await this.$http.post({
url: 'https://dev-az-order-api.xiaopay.net/order-charge/app/charge/project/getPayParams'
}, prepayId)
if (data.code != 200 || !data.data) {
uni.showToast({
icon: "none",
mask: true,
title: data.data.msg || "获取支付参数失败"
title: data.msg || "获取支付参数失败"
})
return
}
data.data.package = encodeURIComponent(data.data.package)
console.warn(`/pages/toPayAuth/main?` + OforS(data.data))
jWeixin.miniProgram.redirectTo({
url: `/pages/toPayAuth/main?` + OforS(data.data),
url: `/pages/toPayAuth/main?` + OforS(data.data)
});
} catch (e) {
//TODO handle the exception
......@@ -414,7 +412,7 @@
async returnPaymentResult(tradeId) {
try {
let data = await this.$http.get({
url: '/order-charge/app/charge/project/returnPaymentResult'
url: 'https://dev-az-order-api.xiaopay.net/order-charge/app/charge/project/returnPaymentResult'
}, {
tradeId
})
......
......@@ -85,7 +85,7 @@
ImgUrl: this.$ImgUrl,
active: 0,
vanTab: ['收费项目', '交费历史'],
PayProjectList: [1, 2, 3, 4, 5],
PayProjectList: [],
PayProjectHistory: [],
pageCurrent: 1,
pageSize: 10,
......@@ -133,7 +133,7 @@
async getPayProject(index) {
try {
let data = await this.$http.post({
url: '/order-charge/app/charge/project/queryChargeProjectPage'
url: 'https://dev-az-order-api.xiaopay.net/order-charge/app/charge/project/queryChargeProjectPage'
}, {
"pageCurrent": this.pageCurrent,
"pageSize": this.pageSize,
......
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