From 3a2524692711cf35fc142881b2837368ae2c3d25 Mon Sep 17 00:00:00 2001
From: peng <peng.com>
Date: 星期一, 13 十月 2025 14:57:19 +0800
Subject: [PATCH] 定制商品
---
pages/commodity-square/commoditySquare.vue | 51 ++++++++++++++++++++++++++++++++++++++++++++-------
1 files changed, 44 insertions(+), 7 deletions(-)
diff --git a/pages/commodity-square/commoditySquare.vue b/pages/commodity-square/commoditySquare.vue
index 78e087b..a8dec07 100644
--- a/pages/commodity-square/commoditySquare.vue
+++ b/pages/commodity-square/commoditySquare.vue
@@ -51,10 +51,10 @@
<view class="goodsContent" style="font-size: 24rpx;">
{{item.sellingPoint}}
</view>
- <view
- style="display: flex; justify-content: space-between;align-items:center; 100%;width: 100%;">
- <view class="goodsPrice">锟{item.price}}</view>
- <view class="addCard" style="display: flex; align-items: center;">
+ <view
+ style="display: flex; justify-content: space-between;align-items:center;height: 100%;width: 100%;">
+ <view class="goodsPrice" style="padding: 20rpx 0;">锟{item.price}}</view>
+ <view class="addCard" style="display: flex; align-items: center;" v-if="item.goodsType !=='VIRTUAL_GOODS'&& item.customizeFlag!=='CUSTOMIZE'">
<view style="padding: 20rpx 0 20rpx 20rpx;" v-show="item.cardNum && item.cardNum>0"
@click.stop="miousCardNum($event,item.id)">
<uni-icons type="minus" size="30" color="#96a6bc"></uni-icons>
@@ -77,7 +77,7 @@
<view class="settlement">鍘昏喘鐗╄溅缁撶畻</view>
</view> -->
</view>
- <view class="squareFotter" style="width: 750rpx; display: flex;align-items: center;
+ <view @click="gotoCardList()" class="squareFotter" style="width: 750rpx; display: flex;align-items: center;
justify-content: space-between;padding: 0 32rpx;box-sizing: border-box;">
<view style="display: flex;align-items: center;justify-content: center;">
<view class="icon" style="position: relative;">
@@ -93,13 +93,14 @@
<view style="margin-left: 10rpx;color: #e06c75;font-size: 48rpx;font-weight: bold;">
锟{priceInfo.price}}</view>
</view>
- <view class="settlement" @click="gotoCardList()">鍘荤粨绠�</view>
+ <view class="settlement">鍘荤粨绠�</view>
</view>
</view>
</template>
<script>
import TopBar from "@/components/TopBar.vue";
+ import { getSessionId, userAction } from "@/api/userAction.js";
import {
getCategoryList,
getGoodsList,
@@ -155,6 +156,17 @@
order: 'asc',
sort: 'goodsSort'
},
+ pageSessionNo:"",
+ sendOnShow:false,
+ actionParam:{
+ sessionId:'',
+ actionType:"PAGE",
+ joinType:"SELF",
+ pageCode:"SHOPPING_SQUARE",
+ pageParams:"{}",
+ pageStatus:"JOIN",
+ pageType:"LIST"
+ }
}
},
methods: {
@@ -413,8 +425,32 @@
console.log(this.maxPages)
}
},
+ 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)
+ }
+ })
+ },
+ async onLoad(options) {
+ this.actionParam.pageParams = JSON.stringify(options)
- async onLoad() {
await this.getCartList();
// 鑾峰彇鐘舵�佹爮楂樺害
const systemInfo = uni.getSystemInfoSync();
@@ -518,6 +554,7 @@
overflow: hidden;
text-overflow: ellipsis;
vertical-align: middle;
+ color: #e7c463;
}
.goodsPrice {
--
Gitblit v1.8.0