From 8a70b6f369fdee32ceabefdd5abaf42f3c1d25bb Mon Sep 17 00:00:00 2001
From: peng <peng.com>
Date: 星期一, 13 十月 2025 14:57:42 +0800
Subject: [PATCH] 定制商品
---
pages/order/myOrder.vue | 93 +++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 87 insertions(+), 6 deletions(-)
diff --git a/pages/order/myOrder.vue b/pages/order/myOrder.vue
index 7e00d25..25c3d35 100644
--- a/pages/order/myOrder.vue
+++ b/pages/order/myOrder.vue
@@ -112,6 +112,17 @@
>
浼樻儬鍒稿崱鍖�
</view>
+ <!-- 鏂板锛氬畾鍒跺晢鍝佹牱寮� -->
+ <view
+ ripple
+ shape="circle"
+ class="cancel-btn"
+ size="mini"
+ v-if="order.customizeFlag === 'CUSTOMIZE'"
+ @click="opencustomize(order)"
+ >
+ 瀹氬埗鍟嗗搧
+ </view>
<!-- 鍙栨秷璁㈠崟 -->
<!-- <view
ripple
@@ -161,7 +172,7 @@
shape="circle"
class="cancel-btn"
size="mini"
- v-if="order.orderStatus === 'COMPLETED'&& order.orderType !=='VIRTUAL'"
+ v-if="order.orderStatus === 'COMPLETED'&& order.orderType !=='VIRTUAL'&& order.customizeFlag !=='CUSTOMIZE'"
@click="buyBack(order)"
>
鍐嶆潵涓�鍗�
@@ -175,6 +186,14 @@
</u-button> -->
</view>
</view>
+ <view style="display: flex;justify-content: space-around;">
+ <view class="" @click="callPhone">
+ 瀹㈡湇鐑嚎: 19980834650
+ </view>
+ <view class="" @click="copyToClipboard">
+ 瀹㈡湇寰俊: meiyikuang
+ </view>
+ </view>
</view>
</view>
<uni-load-more :status="tabItem.loadStatus"></uni-load-more>
@@ -241,6 +260,7 @@
import { getClearReason } from "@/api/after-sale.js";
import LiLiWXPay from "@/js_sdk/lili-pay/wx-pay.js";
import {buyBack} from "@/api/trade.js";
+import { getSessionId, userAction } from "@/api/userAction.js";
export default {
data() {
@@ -327,6 +347,16 @@
reason: "", //鍙栨秷鍘熷洜
cancelList: "", //鍙栨秷鍒楄〃
rogShow: false, //鏄剧ず鏄惁鏀惰揣
+ pageSessionNo:"",
+ actionParam:{
+ sessionId:'',
+ actionType:"PAGE",
+ joinType:"SELF",
+ pageCode:"ORDER_LIST",
+ pageParams:"{}",
+ pageStatus:"JOIN",
+ pageType:"DETAIL"
+ }
};
},
@@ -349,7 +379,28 @@
}
// this.loadData(this.status);
},
+ 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)
+ }
+ })
if(this.$options.filters.tipsToLogin()){
if (!this.tabCurrentIndex) {
this.initData(0);
@@ -359,6 +410,7 @@
},
onLoad(options) {
+ this.actionParam.pageParams = JSON.stringify(options)
/**
* 淇app绔偣鍑婚櫎鍏ㄩ儴璁㈠崟澶栫殑鎸夐挳杩涘叆鏃朵笉鍔犺浇鏁版嵁鐨勯棶棰�
* 鏇挎崲onLoad涓嬩唬鐮佸嵆鍙�
@@ -386,11 +438,40 @@
},
},
methods: {
+ copyToClipboard(){
+ uni.setClipboardData({
+ data:'meiyikuang',
+ success() {
+ uni.showToast({
+ title: '澶嶅埗鎴愬姛',
+ icon: 'none'
+ })
+ }
+ })
+ },
+ callPhone(){
+ uni.showModal({
+ title:'纭鑱旂郴瀹㈡湇鍚�?',
+ success(e) {
+ if(e.confirm){
+ uni.makePhoneCall({
+ phoneNumber:'19980834650'
+ })
+ }
+ }
+ })
+ },
openCouponPackage(order){
console.log(order)
uni.navigateTo({
url:"/pages/order/cardPack?sn=" + order.sn
})
+ },
+ opencustomize(order){
+ console.log(order)
+ uni.navigateTo({
+ url:"/pages/order/constomize/constomize?sn=" + order.sn
+ })
},
//鍐嶆潵涓�鍗�
buyBack(order){
@@ -650,14 +731,14 @@
* 鏌ョ湅鐗╂祦
*/
navigateToLogistics(order) {
+ uni.navigateTo({
+ url:
+ "/pages/mine/msgTips/packageMsg/logisticsDetail?order_sn=" + order.sn,
+ });
// uni.navigateTo({
// url:
- // "/pages/mine/msgTips/packageMsg/logisticsDetail?order_sn=" + order.sn,
+ // `/pages/order/deliverDetail?order_sn=${order.sn}`,
// });
- uni.navigateTo({
- url:
- `/pages/order/deliverDetail?order_sn=${order.sn}`,
- });
},
},
};
--
Gitblit v1.8.0