From 4f30734588eb34ea2d7c27856f72ce40da8ab365 Mon Sep 17 00:00:00 2001
From: rk <94314517@qq.com>
Date: 星期六, 28 二月 2026 12:01:10 +0800
Subject: [PATCH] 小程序 接口开发
---
mini-program/pagesA/pages/order-details/order-details.vue | 41 ++++++++++++++++++++++++++++++++++++++---
1 files changed, 38 insertions(+), 3 deletions(-)
diff --git a/mini-program/pagesA/pages/order-details/order-details.vue b/mini-program/pagesA/pages/order-details/order-details.vue
index 11ffc1c..539f579 100644
--- a/mini-program/pagesA/pages/order-details/order-details.vue
+++ b/mini-program/pagesA/pages/order-details/order-details.vue
@@ -376,6 +376,36 @@
this.qrCodeUrl=''
},
methods:{
+ payOrder() {
+ var that = this;
+ this.$u.api.replayPay({
+ orderId: this.id
+ }).then(res => {
+ if (res.code === 200) {
+ wx.requestPayment({
+ timeStamp: res.data.response.timeStamp,
+ nonceStr: res.data.response.nonceStr,
+ package: res.data.response.packageValue,
+ signType: res.data.response.signType,
+ paySign: res.data.response.paySign,
+ success (pay) {
+ if (pay.errMsg === "requestPayment:ok") {
+ if(that.userType === 1){
+ that.shop = {}
+ that.checkShopLogin()
+ that.shop = that.shopInfo || {}
+ that.getShopDetail()
+ }else{
+ that.getUserDetail()
+ }
+ } else {
+ uni.showToast({ title: '璁㈠崟鍙栨秷鏀粯', icon: 'none' })
+ }
+ }
+ })
+ }
+ })
+ },
hexiaoOrder(item){
uni.navigateTo({
url:'/pagesA/pages/write-off-a/write-off-a?id='+this.id
@@ -386,8 +416,6 @@
},
deleteOrder(item){
this.showDelete = !this.showDelete
- },
- payOrder(item){
},
doneOrder(item){
this.showDone = !this.showDone
@@ -445,8 +473,14 @@
}) */
}
},
+ // 鎵撳紑浣嶇疆
jumpMap(){
-
+ uni.openLocation({
+ latitude: this.info.shopInfo.latitude,
+ longitude: this.info.shopInfo.longitude,
+ name: this.info.shopInfo.name,
+ address: this.info.shopInfo.addr
+ })
},
copyText(text) {
try {
@@ -465,6 +499,7 @@
}
},
async getQrcodeByStr(){
+ if (!this.info.exchangeCode) return;
try {
const ocanvas = uni.createOffscreenCanvas({ type: "2d" });
const qrCodeBase64 = await QRCode.toDataURL(ocanvas,this.info.exchangeCode, {
--
Gitblit v1.9.3