From 507deefd69a980e4d0d0c2e8da0dacad800951f7 Mon Sep 17 00:00:00 2001
From: zxl <763096477@qq.com>
Date: 星期五, 24 十月 2025 15:16:19 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/user_action' into user_action
---
pages/cart/payment/payOrder.vue | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++-----
1 files changed, 51 insertions(+), 5 deletions(-)
diff --git a/pages/cart/payment/payOrder.vue b/pages/cart/payment/payOrder.vue
index 32f7f7b..6cdba46 100644
--- a/pages/cart/payment/payOrder.vue
+++ b/pages/cart/payment/payOrder.vue
@@ -43,9 +43,10 @@
</div>
</template>
<script>
- import '@/uview-components/uview-ui'
+ import '@/components/uview-components/uview-ui'
import * as API_Trade from "@/api/trade";
import {payCallback} from '@/api/members'
+ import { getSessionId, userAction } from "@/api/userAction.js";
export default {
data() {
return {
@@ -71,12 +72,46 @@
walletValue: 0.0,
// 鏀粯鍊掕鏃�
autoCancel: 0,
+ pageSessionNo:"",
+ actionParam:{
+ sessionId:'',
+ actionType:"PAGE",
+ joinType:"SELF",
+ pageCode:"PAY_ORDER",
+ pageParams:"{}",
+ pageStatus:"JOIN",
+ pageType:"DETAIL"
+ }
};
},
+ onUnload() {
+ let param = Object.assign({}, this.actionParam);
+ if (this.sendOnShow)return
+ param.pageStatus = "LEAVE"
+ userAction(param)
+ },
+ onHide() {
+ this.startHidenTime = Date.now()
+ let param = Object.assign({}, this.actionParam);
+ this.sendOnShow = true;
+ param.pageStatus = "LEAVE"
+ userAction(param)
+ },
+ onShow() {
+ getSessionId().then(res=>{
+ this.pageSessionNo = res.data.data
+ this.actionParam.sessionId = this.pageSessionNo
+ if(this.pageSessionNo){
+ let param = Object.assign({}, this.actionParam);
+ userAction(param)
+ }
+ })
+ },
onLoad(val) {
this.routerVal = val;
-
+ this.actionParam.pageParams = JSON.stringify(val)
+ console.log('鑾峰彇瑙e瘑鐨勫弬鏁�',JSON.stringify(val),decodeURIComponent(this.routerVal.template))
//鍒濆鍖栧弬鏁�
// #ifdef APP-PLUS
this.paymentType = "APP";
@@ -126,7 +161,7 @@
paymentMethod +
"&payPrice=" +
this.cashierParams.price+
- "&orderType="+this.orderType
+ "&orderType="+this.orderType +"&orderSn="+this.cashierParams.orderSns
});
},
@@ -151,12 +186,23 @@
parms.sn = this.sn;
parms.orderType = this.orderType;
parms.clientType = this.paymentType;
-
+ if(this.routerVal.template){
+ console.log('鑾峰彇璇︽儏鎵ц浜�')
+ const template = JSON.parse(decodeURIComponent(this.routerVal.template))
+ console.log('鑾峰彇璇︽儏鎵ц浜嗚幏鍙栧埌鐨勫��-----------------------銆�',template)
+ parms.templateId = template.templateId;
+ parms.templateName = template.templateName;
+ parms.chooseImage = template.chooseImage;
+ parms.chooseImageId = template.chooseImageId;
+ parms.templateForm = template.templateForm;
+ }
+ console.log('--------------------->鎵ц鐨勫弬鏁颁负',parms)
API_Trade.getCashierData(parms).then((res) => {
if(res.data.success){
this.cashierParams = res.data.result;
-
+
+ console.log('鑾峰彇璁㈠崟淇℃伅------------------>',this.cashierParams.orderSns)
// #ifdef MP-WEIXIN
this.payList = res.data.result.support.filter((item) => {
return item != "ALIPAY";
--
Gitblit v1.8.0