From 832a4a403c54af796a6736a06109e0714e4a6ab9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E9=97=AB=E6=99=93=E8=8C=B9?= <1935832701@qq.com>
Date: Thu, 2 Nov 2023 15:27:36 +0800
Subject: [PATCH] =?UTF-8?q?=E4=B8=93=E5=AE=B6=E5=92=A8=E8=AF=A2=E8=AE=A2?=
=?UTF-8?q?=E5=8D=95=E8=AF=A6=E6=83=85?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
pagesB/consulted/consulted.scss | 41 ++++++++++++++++++++++-
pagesB/consulted/consulted.vue | 58 +++++++++++++++++++++++++++++++--
2 files changed, 95 insertions(+), 4 deletions(-)
diff --git a/pagesB/consulted/consulted.scss b/pagesB/consulted/consulted.scss
index b0eee72..1a458d8 100644
--- a/pagesB/consulted/consulted.scss
+++ b/pagesB/consulted/consulted.scss
@@ -5,7 +5,46 @@
color: #000000;
padding-top: 20rpx;
// overflow: scroll;
-
+ .buy {
+ background: #FFFFFF;
+ position: fixed;
+ bottom: 0;
+ height: 100rpx;
+ width: 100%;
+ height: 125rpx;
+ background: #FFFFFF;
+ box-shadow: 0rpx -3rpx 13rpx 0rpx rgba(0,0,0,0.1);
+ border-radius: 20rpx;
+ .logistics{
+ width: 216rpx;
+ height: 68rpx;
+ text-align: center;
+ color: #ffffff;
+ border-radius: 5rpx;
+ font-size: 36rpx;
+ line-height: 68rpx;
+ position: absolute;
+ right: 260rpx;
+ top: 50%;
+ background: #E1AE3C;
+ transform: translateY(-50%);
+ z-index: 999;
+ }
+ .pay {
+ width: 216rpx;
+ height: 68rpx;
+ text-align: center;
+ color: #ffffff;
+ background:#26A888;
+ border-radius: 5rpx;
+ font-size: 36rpx;
+ line-height: 68rpx;
+ position: absolute;
+ right: 20rpx;
+ top: 50%;
+ transform: translateY(-50%);
+ }
+ }
.time{
height: 80rpx;
width: 95%;
diff --git a/pagesB/consulted/consulted.vue b/pagesB/consulted/consulted.vue
index 7842ec1..d4eb668 100644
--- a/pagesB/consulted/consulted.vue
+++ b/pagesB/consulted/consulted.vue
@@ -99,8 +99,14 @@
更多
取消订单
+
+
+
+ 去支付
+
+
-
+
@@ -124,6 +130,9 @@
ssgoodsOrder,
} from '@/api/pagesB/CommodityOrder/index.js'
import baseurl from '@/api/baseurl.js'
+ import {
+ appletGoodsOrderPay
+ } from '@/api/pagesB/confirmOrder/index.js'
export default {
data() {
return {
@@ -157,7 +166,7 @@
onLoad(options) {
// if(options.item){
this.list = JSON.parse(options.item)
- console.log(this.list.goodsOrderId, '555')
+ console.log(this.list, '555')
this.orderTypeList.goodsOrderId = this.list.goodsOrderId
// else if(options.goodsOrderId){
@@ -174,7 +183,6 @@
// }
this.goodsOrderinfo()
// console.log(this.list, '99')
- // console.log(options,'88')
this.baseurl = baseurl
},
@@ -184,6 +192,50 @@
delta: 1
})
},
+ //支付
+ pay() {
+ var that = this
+ let paydata = this.list
+ paydata.openid = this.orderTypeList.openid
+ paydata.payType = "WECHAT_PAY"
+ paydata.paymentPrice = this.list.totalPrice
+ paydata.orderChannel = 'WECHAT_APPLET'
+ paydata.orderNo = this.list.goOrderNo
+ appletGoodsOrderPay(paydata).then(response => {
+ if (response.code == 200) {
+ uni.requestPayment({
+ timeStamp: response.data.timeStamp,
+ nonceStr: response.data.nonceStr,
+ package: response.data.prepayId,
+ signType: response.data.signType,
+ paySign: response.data.paySign,
+ success: function(res) {
+ uni.setStorageSync("Refresh", 'Refresh')
+ that.goodsOrderinfo()
+ that.$refs.uToast.show({
+ title: '支付成功',
+ type: 'success',
+ duration: 1500,
+ url: `/pagesB/paysuccess/paysuccess?delta=${2}`
+ })
+ },
+ fail: function(err) {
+ that.$refs.uToast.show({
+ title: '取消支付',
+ type: 'error',
+ duration: 1500
+ })
+ }
+ });
+ } else {
+ that.$refs.uToast.show({
+ title: response.msg,
+ type: 'error',
+ duration: 1500
+ })
+ }
+ })
+ },
goodsOrderinfo() {
ssgoodsOrder(this.orderTypeList).then(
res => {