Commit fc50a519 authored by lijiongliang's avatar lijiongliang

优化支付页面

parent 4329bd4b
......@@ -192,6 +192,10 @@ export default {
addressId: this.addressId,
commodityList: list,
}
uni.showLoading({
title: '加载中',
mask:true
});
let that = this
let opts = {
url: '/app/mall/create/order',
......@@ -213,6 +217,7 @@ export default {
that.http.httpTokenRequest(opts, that.orderSubmit).then(res => {
if (res.data.code == 200) {
let paymentData = res.data.data.invokeResponse;
uni.hideLoading()
uni.requestPayment({
provider: 'wxpay', // 服务提提供商
timeStamp: paymentData.timeStamp,
......
......@@ -107,6 +107,10 @@ export default {
nums: 1,
}],
}
uni.showLoading({
title: '加载中',
mask:true
});
let that = this
let opts = { url: '/app/mall/create/order', method: 'post' };
this.http.httpTokenRequest(opts, this.createOrder).then(res => {
......@@ -123,7 +127,7 @@ export default {
//console.log(res);
if (res.data.code == 200) {
let paymentData = res.data.data.invokeResponse;
uni.hideLoading()
uni.requestPayment({
provider: 'wxpay', // 服务提提供商
timeStamp: paymentData.timeStamp,
......
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