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

1.提交更新;

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