diff --git a/App.vue b/App.vue
index d01c9b21..78de416f 100644
--- a/App.vue
+++ b/App.vue
@@ -534,13 +534,14 @@
*/
showToast(msg, status) {
if ((status || 'error') == 'success') {
- uni.showToast({
+ uni.showToast({
+ icon: 'success',
title: msg,
duration: 3000
});
} else {
- uni.showToast({
- image: "/static/images/common/toast-error.png",
+ uni.showToast({
+ icon: 'none',
title: msg,
duration: 3000
});
diff --git a/common/css/page.css b/common/css/page.css
index 63a87e23..5a73caaa 100644
--- a/common/css/page.css
+++ b/common/css/page.css
@@ -606,7 +606,8 @@ button[disabled].bg-gray {
margin-left: 20rpx;
}
.item-operation button {
- padding: 0 35rpx;
+ padding: 0 35rpx;
+ height: 58rpx;
line-height: 58rpx;
display: inline-flex;
}
\ No newline at end of file
diff --git a/pages/buy/buy.css b/pages/buy/buy.css
index cce86627..6c9df430 100644
--- a/pages/buy/buy.css
+++ b/pages/buy/buy.css
@@ -19,14 +19,14 @@
.address-alias,
.goods-group-alias,
.goods-group-map-submit {
- padding: 5rpx 15rpx;
+ padding: 0 15rpx;
line-height: 40rpx;
}
/**
* 商品
*/
-.goods-group-list .goods-item:not(:last-child) {
+.goods-group-list .goods-content .goods-item:not(:last-child) {
border-bottom: 1px dashed #efefef;
}
.goods-group-icon {
@@ -41,9 +41,6 @@
border: 1px solid #3bb4f2;
color: #3bb4f2;
}
-.goods-item {
- padding: 20rpx 0;
-}
.goods-image {
width: 160rpx;
height: 160rpx;
diff --git a/pages/buy/buy.vue b/pages/buy/buy.vue
index 10cfddd1..1c4fef6c 100644
--- a/pages/buy/buy.vue
+++ b/pages/buy/buy.vue
@@ -49,23 +49,25 @@
查看地图
-
-
-
-
- {{item.title}}
-
-
- ;
- {{spec.value}}
-
+
+
+
+
+
+ {{item.title}}
+
+
+ ;
+ {{spec.value}}
+
+
+
+ {{currency_symbol}}{{item.price}}
+ {{currency_symbol}}{{item.original_price}}
+ x{{item.stock}}
+
-
- {{currency_symbol}}{{item.price}}
- {{currency_symbol}}{{item.original_price}}
- x{{item.stock}}
-
-
+
diff --git a/pages/extraction-address/extraction-address.css b/pages/extraction-address/extraction-address.css
index b5aa17cf..35b01429 100644
--- a/pages/extraction-address/extraction-address.css
+++ b/pages/extraction-address/extraction-address.css
@@ -7,7 +7,7 @@
height: 35rpx !important;
}
.address-alias {
- padding: 2rpx 10rpx;
+ padding: 0 10rpx;
}
.address .text {
line-height: 44rpx;
diff --git a/pages/paytips/paytips.css b/pages/paytips/paytips.css
index 7cf10c3e..2a717156 100644
--- a/pages/paytips/paytips.css
+++ b/pages/paytips/paytips.css
@@ -14,6 +14,8 @@ page {
}
.btn-box button {
height: 80rpx;
- line-height: 80rpx;
+ line-height: 80rpx;
+ padding-top: 0;
+ padding-bottom: 0;
width: 300rpx;
}
\ No newline at end of file
diff --git a/pages/plugins/distribution/extraction-switch/extraction-switch.css b/pages/plugins/distribution/extraction-switch/extraction-switch.css
index b5aa17cf..35b01429 100644
--- a/pages/plugins/distribution/extraction-switch/extraction-switch.css
+++ b/pages/plugins/distribution/extraction-switch/extraction-switch.css
@@ -7,7 +7,7 @@
height: 35rpx !important;
}
.address-alias {
- padding: 2rpx 10rpx;
+ padding: 0 10rpx;
}
.address .text {
line-height: 44rpx;
diff --git a/pages/plugins/membershiplevelvip/order/order.vue b/pages/plugins/membershiplevelvip/order/order.vue
index 76f24cd6..6542b135 100644
--- a/pages/plugins/membershiplevelvip/order/order.vue
+++ b/pages/plugins/membershiplevelvip/order/order.vue
@@ -89,9 +89,8 @@
content_list: [
{name: "开通单号", field: "payment_user_order_no"},
{name: "开通时长", field: "period_unit"},
- {name: "充值金额", field: "price", unit: "元"},
- {name: "支付金额", field: "pay_price", unit: "元"},
- {name: "结算状态", field: "settlement_status_name"}
+ {name: "订单金额", field: "price", unit: "元"},
+ {name: "支付金额", field: "pay_price", unit: "元"}
]
};
},
@@ -290,7 +289,6 @@
// 支付方法
pay_handle(order_id, index) {
- var self = this;
uni.showLoading({
title: "请求中..."
});
@@ -305,26 +303,13 @@
success: res => {
uni.hideLoading();
if (res.data.code == 0) {
- var data = res.data.data.data;
- uni.requestPayment({
- timeStamp: data.timeStamp,
- nonceStr: data.nonceStr,
- package: data.package,
- signType: data.signType,
- paySign: data.paySign,
- success: function(res) {
- // 数据设置
- self.order_item_pay_success_handle(index);
-
- // 跳转支付页面
- uni.navigateTo({
- url: "/pages/paytips/paytips?code=9000&total_price=" + self.data_list[index]['price']
- });
- },
- fail: function(res) {
- app.globalData.showToast('支付失败');
- }
- });
+ var data = res.data.data;
+ // #ifdef MP-WEIXIN || MP-ALIPAY || MP-BAIDU || MP-TOUTIAO
+ this.common_pay_handle(this, data, index);
+ // #endif
+ // #ifdef MP-QQ
+ this.qq_pay_handle(this, data, index);
+ // #endif
} else {
app.globalData.showToast(res.data.msg);
}
@@ -334,12 +319,80 @@
app.globalData.showToast("服务器请求出错");
}
});
+ },
+
+ // 微信、支付宝、百度、头条、QQ支付处理
+ common_pay_handle(self, data, index) {
+ uni.requestPayment({
+ // #ifdef MP-ALIPAY || MP-BAIDU || MP-TOUTIAO
+ orderInfo: data.data,
+ // #endif
+ // #ifdef MP-QQ
+ package: data.data,
+ // #endif
+ // #ifdef MP-WEIXIN
+ timeStamp: data.data.timeStamp,
+ nonceStr: data.data.nonceStr,
+ package: data.data.package,
+ signType: data.data.signType,
+ paySign: data.data.paySign,
+ // #endif
+ // #ifdef MP-TOUTIAO
+ service: 5,
+ // #endif
+ success: res => {
+ // #ifdef MP-ALIPAY
+ if (res.resultCode != 9000) {
+ app.globalData.showToast(res.memo || '支付失败');
+ return false;
+ }
+ // #endif
+ // #ifdef MP-TOUTIAO
+ if (res.code != 0) {
+ app.globalData.showToast('支付失败');
+ return false;
+ }
+ // #endif
+
+ // 数据设置
+ self.order_item_pay_success_handle(index);
+
+ // 跳转支付页面
+ uni.navigateTo({
+ url: "/pages/paytips/paytips?code=9000"
+ });
+ },
+ fail: res => {
+ app.globalData.showToast('支付失败');
+ }
+ });
+ },
+
+ // QQ支付处理
+ qq_pay_handle(self, data, index) {
+ // 是否微信支付
+ if(data.payment.payment == 'Weixin') {
+ uni.requestWxPayment({
+ url: data.data,
+ referer: app.globalData.data.request_url,
+ success: function(res) {
+ app.globalData.alert({msg: '支付成功后、请不要重复支付、如果订单状态未成功请联系客服处理', is_show_cancel: 0});
+ self.get_data_list();
+ },
+ fail: function (res) {
+ app.globalData.showToast('支付失败');
+ }
+ });
+ } else {
+ self.common_pay_handle(self, data, index);
+ }
},
// 支付成功数据设置
order_item_pay_success_handle(index) {
// 数据设置
- var temp_data_list = this.data_list;
+ var temp_data_list = this.data_list;
+ temp_data_list[index]['pay_price'] = temp_data_list[index]['price'];
temp_data_list[index]['status'] = 1;
temp_data_list[index]['status_name'] = '已支付';
this.setData({
diff --git a/pages/plugins/wallet/user-recharge/user-recharge.vue b/pages/plugins/wallet/user-recharge/user-recharge.vue
index 9d73a1c5..ea7982c2 100644
--- a/pages/plugins/wallet/user-recharge/user-recharge.vue
+++ b/pages/plugins/wallet/user-recharge/user-recharge.vue
@@ -287,7 +287,6 @@
// 支付方法
pay_handle(recharge_id, index) {
- // 加载loding
uni.showLoading({
title: "请求中..."
});
@@ -302,27 +301,13 @@
success: res => {
uni.hideLoading();
if (res.data.code == 0) {
- var self = this;
- var data = res.data.data.data;
- uni.requestPayment({
- timeStamp: data.timeStamp,
- nonceStr: data.nonceStr,
- package: data.package,
- signType: data.signType,
- paySign: data.paySign,
- success: function(res) {
- // 数据设置
- self.order_item_pay_success_handle(index);
-
- // 跳转支付页面
- uni.navigateTo({
- url: "/pages/paytips/paytips?code=9000&total_price=" + self.data_list[index]['money']
- });
- },
- fail: function(res) {
- app.globalData.showToast('支付失败');
- }
- });
+ var data = res.data.data;
+ // #ifdef MP-WEIXIN || MP-ALIPAY || MP-BAIDU || MP-TOUTIAO
+ this.common_pay_handle(this, data, index);
+ // #endif
+ // #ifdef MP-QQ
+ this.qq_pay_handle(this, data, index);
+ // #endif
} else {
app.globalData.showToast(res.data.msg);
}
@@ -333,11 +318,79 @@
}
});
},
+
+ // 微信、支付宝、百度、头条、QQ支付处理
+ common_pay_handle(self, data, index) {
+ uni.requestPayment({
+ // #ifdef MP-ALIPAY || MP-BAIDU || MP-TOUTIAO
+ orderInfo: data.data,
+ // #endif
+ // #ifdef MP-QQ
+ package: data.data,
+ // #endif
+ // #ifdef MP-WEIXIN
+ timeStamp: data.data.timeStamp,
+ nonceStr: data.data.nonceStr,
+ package: data.data.package,
+ signType: data.data.signType,
+ paySign: data.data.paySign,
+ // #endif
+ // #ifdef MP-TOUTIAO
+ service: 5,
+ // #endif
+ success: res => {
+ // #ifdef MP-ALIPAY
+ if (res.resultCode != 9000) {
+ app.globalData.showToast(res.memo || '支付失败');
+ return false;
+ }
+ // #endif
+ // #ifdef MP-TOUTIAO
+ if (res.code != 0) {
+ app.globalData.showToast('支付失败');
+ return false;
+ }
+ // #endif
+
+ // 数据设置
+ self.order_item_pay_success_handle(index);
+
+ // 跳转支付页面
+ uni.navigateTo({
+ url: "/pages/paytips/paytips?code=9000"
+ });
+ },
+ fail: res => {
+ app.globalData.showToast('支付失败');
+ }
+ });
+ },
+
+ // QQ支付处理
+ qq_pay_handle(self, data, index) {
+ // 是否微信支付
+ if(data.payment.payment == 'Weixin') {
+ uni.requestWxPayment({
+ url: data.data,
+ referer: app.globalData.data.request_url,
+ success: function(res) {
+ app.globalData.alert({msg: '支付成功后、请不要重复支付、如果订单状态未成功请联系客服处理', is_show_cancel: 0});
+ self.get_data_list();
+ },
+ fail: function (res) {
+ app.globalData.showToast('支付失败');
+ }
+ });
+ } else {
+ self.common_pay_handle(self, data, index);
+ }
+ },
// 支付成功数据设置
order_item_pay_success_handle(index) {
// 数据设置
var temp_data_list = this.data_list;
+ temp_data_list[index]['pay_money'] = temp_data_list[index]['money'];
temp_data_list[index]['status'] = 1;
temp_data_list[index]['status_name'] = '已支付';
this.setData({
diff --git a/pages/plugins/wallet/user/user.css b/pages/plugins/wallet/user/user.css
index 9bb20a97..6868ad9c 100644
--- a/pages/plugins/wallet/user/user.css
+++ b/pages/plugins/wallet/user/user.css
@@ -5,9 +5,6 @@
right: 20rpx;
bottom: 20rpx;
}
-.submit-container button {
- display: inline-flex;
-}
/*
* 导航
diff --git a/pages/plugins/wallet/user/user.vue b/pages/plugins/wallet/user/user.vue
index 2c254fb9..958d2750 100644
--- a/pages/plugins/wallet/user/user.vue
+++ b/pages/plugins/wallet/user/user.vue
@@ -19,12 +19,12 @@
{{user_wallet.give_money || '0.00'}}
元
-
+
-
+
-
+
diff --git a/pages/user-address/user-address.css b/pages/user-address/user-address.css
index 3e8932a7..2270018e 100644
--- a/pages/user-address/user-address.css
+++ b/pages/user-address/user-address.css
@@ -6,7 +6,7 @@
height: 35rpx !important;
}
.address-alias {
- padding: 2rpx 10rpx;
+ padding: 0 10rpx;
}
.address .text {
line-height: 44rpx;
diff --git a/pages/user-order-detail/user-order-detail.css b/pages/user-order-detail/user-order-detail.css
index 13cb925e..52848c0d 100644
--- a/pages/user-order-detail/user-order-detail.css
+++ b/pages/user-order-detail/user-order-detail.css
@@ -21,7 +21,7 @@
}
.address-alias,
.address-map-submit {
- padding: 5rpx 15rpx;
+ padding: 0 15rpx;
line-height: 40rpx;
}
.address-map-submit {
diff --git a/pages/user-order/user-order.vue b/pages/user-order/user-order.vue
index 6de2ff24..0c612370 100644
--- a/pages/user-order/user-order.vue
+++ b/pages/user-order/user-order.vue
@@ -348,48 +348,33 @@
success: res => {
uni.hideLoading();
if (res.data.code == 0) {
- var self = this;
// 是否直接支付成功
if ((res.data.data.is_success || 0) == 1) {
- self.order_item_pay_success_handle(order_ids);
+ this.order_item_pay_success_handle(order_ids);
app.globalData.showToast('支付成功', 'success');
} else {
// 支付方式类型
switch (res.data.data.is_payment_type) {
// 正常线上支付
case 0:
- var data = res.data.data;
- uni.requestPayment({
- timeStamp: data.data.timeStamp,
- nonceStr: data.data.nonceStr,
- package: data.data.package,
- signType: data.data.signType,
- paySign: data.data.paySign,
- success: function(res) {
- // 数据设置
- self.order_item_pay_success_handle(
- order_ids);
-
- // 跳转支付页面
- uni.navigateTo({
- url: "/pages/paytips/paytips?code=9000"
- });
- },
- fail: function(res) {
- app.globalData.showToast('支付失败');
- }
- });
+ var data = res.data.data;
+ // #ifdef MP-WEIXIN || MP-ALIPAY || MP-BAIDU || MP-TOUTIAO
+ this.common_pay_handle(this, data, order_ids);
+ // #endif
+ // #ifdef MP-QQ
+ this.qq_pay_handle(this, data, order_ids);
+ // #endif
break;
// 线下支付
case 1:
var order_ids_arr = order_ids.split(',');
- var temp_data_list = self.data_list;
+ var temp_data_list = this.data_list;
for (var i in temp_data_list) {
if (order_ids_arr.indexOf(temp_data_list[i]['id']) != -1) {
temp_data_list[i]['is_under_line'] = 1;
}
}
- self.setData({
+ this.setData({
data_list: temp_data_list
});
app.globalData.alert({
@@ -399,7 +384,7 @@
break;
// 钱包支付
case 2:
- self.order_item_pay_success_handle(order_ids);
+ this.order_item_pay_success_handle(order_ids);
app.globalData.showToast('支付成功', 'success');
break;
// 默认
@@ -416,6 +401,73 @@
app.globalData.showToast('服务器请求出错');
}
});
+ },
+
+ // 微信、支付宝、百度、头条、QQ支付处理
+ common_pay_handle(self, data, order_ids) {
+ uni.requestPayment({
+ // #ifdef MP-ALIPAY || MP-BAIDU || MP-TOUTIAO
+ orderInfo: data.data,
+ // #endif
+ // #ifdef MP-QQ
+ package: data.data,
+ // #endif
+ // #ifdef MP-WEIXIN
+ timeStamp: data.data.timeStamp,
+ nonceStr: data.data.nonceStr,
+ package: data.data.package,
+ signType: data.data.signType,
+ paySign: data.data.paySign,
+ // #endif
+ // #ifdef MP-TOUTIAO
+ service: 5,
+ // #endif
+ success: res => {
+ // #ifdef MP-ALIPAY
+ if (res.resultCode != 9000) {
+ app.globalData.showToast(res.memo || '支付失败');
+ return false;
+ }
+ // #endif
+ // #ifdef MP-TOUTIAO
+ if (res.code != 0) {
+ app.globalData.showToast('支付失败');
+ return false;
+ }
+ // #endif
+
+ // 数据设置
+ self.order_item_pay_success_handle(order_ids);
+
+ // 跳转支付页面
+ uni.navigateTo({
+ url: "/pages/paytips/paytips?code=9000"
+ });
+ },
+ fail: res => {
+ app.globalData.showToast('支付失败');
+ }
+ });
+ },
+
+ // QQ支付处理
+ qq_pay_handle(self, data, order_ids) {
+ // 是否微信支付
+ if(data.payment.payment == 'Weixin') {
+ uni.requestWxPayment({
+ url: data.data,
+ referer: app.globalData.data.request_url,
+ success: function(res) {
+ app.globalData.alert({msg: '支付成功后、请不要重复支付、如果订单状态未成功请联系客服处理', is_show_cancel: 0});
+ self.get_data_list();
+ },
+ fail: function (res) {
+ app.globalData.showToast('支付失败');
+ }
+ });
+ } else {
+ self.common_pay_handle(self, data, order_ids);
+ }
},
// 支付成功数据设置