From 8771da2ccf6f7c3fd2a8c89a1a0e230c6386db7f Mon Sep 17 00:00:00 2001
From: 石广澎 <shiguangpeng@163.com>
Date: 星期一, 17 十一月 2025 15:40:48 +0800
Subject: [PATCH] feat(api): 新增多个API接口并优化配置

---
 pages/pay/paySuccess.vue |   95 ++++++++++++++++++++++++++---------------------
 1 files changed, 52 insertions(+), 43 deletions(-)

diff --git a/pay/paySuccess.vue b/pages/pay/paySuccess.vue
similarity index 81%
rename from pay/paySuccess.vue
rename to pages/pay/paySuccess.vue
index 3afcd17..51aa576 100644
--- a/pay/paySuccess.vue
+++ b/pages/pay/paySuccess.vue
@@ -7,10 +7,10 @@
 					<view class="u-font-32 font-bold u-m-t-10" style="color: #14AF0D;">鏀粯鎴愬姛</view>
 				</view>
 				<view class="shop-info">
-					<view class="u-text-center u-font-32 color-666">{{youHuiInfo.shopName}}</view>
-					<view class="u-text-center u-m-t-20">
-						<text class="u-font-30 lh-1">锟�</text>
-						<text class="u-font-money lh-1">{{$u.priceFormat(youHuiInfo.payMoney/100, 2)}}</text>
+					<view class="u-text-center u-font-32 color-666">{{youHuiInfo.shopName}}娴嬭瘯闂ㄥ簵</view>
+					<view class="u-flex u-col-top u-row-center">
+						<view class="u-font-24 lh-1">锟�</view>
+						<view class="u-font-money lh-1">{{$u.priceFormat(youHuiInfo.payMoney/100, 2)}}</view>
 					</view>
 				</view>
 				<view class="u-flex u-m-t-30 u-font-30">
@@ -19,15 +19,15 @@
 					</view>
 					<view class="u-flex-1 u-text-right">锟{$u.priceFormat(youHuiInfo.money/100, 2)}}</view>
 				</view>
-<!--				<view class="u-flex u-m-t-16 u-font-30">
+				<view class="u-flex u-m-t-16 u-font-30">
 					<view class="color-999 u-flex">
 						<view class="label" style="color: #F69249;">浣跨敤绉垎</view>
 					</view>
 					<view class="u-flex-1 u-text-right" style="color: #F69249;">{{youHuiInfo.score}}绉垎<text
 							v-if="youHuiInfo.score>0">鎶垫墸{{$u.priceFormat(youHuiInfo.scoreDkPrice/100, 2)}}鍏�</text>
 					</view>
-				</view>-->
-				<view v-if="youHuiInfo.couponDkPrice!=0" class="u-flex u-m-t-16 u-font-30">
+				</view>
+				<view class="u-flex u-m-t-16 u-font-30">
 					<view class="color-999 u-flex">
 						<view class="label">浼樻儬鍒�</view>
 					</view>
@@ -62,6 +62,20 @@
 				</view>
 			</view>
 
+			<view v-else-if="!join" class="box bg-fff u-m-t-20">
+				<navigator class="u-flex" url="/pages/pay/shuaKa/shuaKa">
+					<image class="card-logo" :src="bankCardStyle.logo"></image>
+					<view class="u-flex-1">
+						<view class="u-font-30">棰嗗埛{{info.bankCardName}}{{info.totalDiscount/100}}鍏冪珛鍑忛噾</view>
+						<view class="u-font-24 color-999">鍙備笌鍒峰崱鏈夌ぜ锛岄鏇村浼樻儬</view>
+					</view>
+					<view>
+						<u-button type="success" size="mini" text="棰嗗彇"></u-button>
+					</view>
+
+				</navigator>
+			</view>
+
 			<view :url="jumpUrl" class="btn-box">
 				<u-button @click="clickDone" text="瀹屾垚" type="success" plain shape="circle"></u-button>
 			</view>
@@ -80,15 +94,15 @@
 					</view>
 					<view class="u-flex-1">锟{$u.priceFormat(orderInfo.orderPrice/100, 2)}}</view>
 				</view>
-<!--				<view class="u-flex u-m-t-30 u-font-30">
+				<view class="u-flex u-m-t-30 u-font-30">
 					<view class="color-999 u-flex">
 						<view class="label">浣跨敤绉垎</view>锛�
 					</view>
 					<view class="u-flex-1">{{orderInfo.payIntegral}}绉垎<text
 							v-if="orderInfo.payIntegral>0">鎶垫墸{{$u.priceFormat(orderInfo.integralMoney/100, 2)}}鍏�</text>
 					</view>
-				</view>-->
-				<view  class="u-flex u-m-t-30 u-font-30">
+				</view>
+				<view class="u-flex u-m-t-30 u-font-30">
 					<view class="color-999 u-flex">
 						<view class="label">浼樻儬鍒�</view>锛�
 					</view>
@@ -102,7 +116,7 @@
 				</view>
 			</view>
 			<view class="btn-box">
-				<u-button @click="clickDone" text="瀹屾垚" type="success" plain shape="circle"></u-button>
+				<u-button @click="doJump" text="瀹屾垚" type="success" plain shape="circle"></u-button>
 			</view>
 		</block>
 
@@ -111,12 +125,17 @@
 
 <script>
 	import {
+		getPayCompleteUrl,
 		getWxOrderInfo,
-	} from 'common/api/index'
+	} from '@/common/api/index'
+	import {
+		activityInfo,
+		myBrushDetail,
+		orderRefBrushNode
+	} from '@/common/api/shuaka'
 	export default {
 		data() {
 			return {
-        plat: this.$utils.getPlat(),
 				info: {
 					bankCardName: '',
 					totalDiscount: 0,
@@ -147,20 +166,33 @@
 			};
 		},
 		onLoad(opt) {
+			activityInfo().then(res => {
+				this.info = res
+			})
+			myBrushDetail().then(res => {
+				if (res) {
+					this.join = true
+				} else {
+					this.join = false
+				}
+			})
 			if (uni.getStorageSync("bankCardStyle")) {
 				this.bankCardStyle = uni.getStorageSync("bankCardStyle")
 			}
 
+			getPayCompleteUrl().then(res => {
+				this.jumpUrl = res
+			})
 			if (opt.youHuiInfo) {
 				this.youHuiInfo = JSON.parse(opt.youHuiInfo)
 			}
 			if (opt.orderId) {
 				this.orderId = opt.orderId
-				/*orderRefBrushNode({
+				orderRefBrushNode({
 					orderId: this.orderId
 				}).then(res => {
 					this.couponList = res.coupIdsMap || []
-				})*/
+				})
 			}
 		},
 		onReady() {
@@ -212,32 +244,9 @@
 				return null;
 			},
 			clickDone() {
-        let browser = navigator.userAgent.toLowerCase();
-        if (browser.match(/Alipay/i) == "alipay") {
-          console.log("鏀粯瀹漚pp鐨勬祻瑙堝櫒");
-          //杩欎釜鍙互鍏抽棴瀹夊崜绯荤粺鐨勬墜鏈�
-          document.addEventListener("AlipayJSBridgeReady", function () {
-                AlipayJSBridge.call("closeWindow");
-              },
-              false
-          );
-          //杩欎釜鍙互鍏抽棴ios绯荤粺鐨勬墜鏈�
-          AlipayJSBridge.call('closeWebview'); //鏀粯瀹�
-        } else if (browser.match(/MicroMessenger/i) == "micromessenger") {
-          //杩欎釜鍙互鍏抽棴瀹夊崜绯荤粺鐨勬墜鏈�
-          document.addEventListener("WeixinJSBridgeReady", function () {
-                WeixinJSBridge.call("closeWindow");
-              },
-              false
-          );
-          //杩欎釜鍙互鍏抽棴ios绯荤粺鐨勬墜鏈�
-          WeixinJSBridge.call("closeWindow");
-        } else {
-          console.log("鍏跺畠娴忚鍣�");
-          window.opener = null;             //濡傛灉娌℃湁杩欒鍜屼笅闈㈢殑涓�琛屽垯浼氬嚭鐜颁笂闈㈢殑绗簩涓闂銆�
-          window.open(' ', '_self', ' ');
-          window.close()
-        }
+				// window.close()
+				WeixinJSBridge.call('closeWindow');
+
 			},
 			doJump() {
 				var mchData = {
@@ -295,7 +304,7 @@
 	.coupon {
 		width: 638rpx;
 		height: 172rpx;
-		background-image: url('~@/static/pay-by-card-coupon.png');
+		background-image: url('~@/static/shuaka/pay-by-card-coupon.png');
 		background-size: cover;
 		margin: 10rpx auto 20rpx;
 		display: flex;
@@ -366,4 +375,4 @@
 	.lh-1 {
 		line-height: 1;
 	}
-</style>
+</style>
\ No newline at end of file

--
Gitblit v1.9.1