From 29851d845f4ab768c78724ab870ecec4ce28c32b Mon Sep 17 00:00:00 2001
From: zxl <763096477@qq.com>
Date: 星期五, 24 十月 2025 11:42:30 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/user_action' into user_action
---
pages/product/goods.vue | 63 +++++++++++++++++++++++--------
1 files changed, 47 insertions(+), 16 deletions(-)
diff --git a/pages/product/goods.vue b/pages/product/goods.vue
index f6eca6c..1e4aea1 100644
--- a/pages/product/goods.vue
+++ b/pages/product/goods.vue
@@ -229,7 +229,7 @@
</div> -->
<!-- 姝e父缁撶畻椤甸潰 -->
<view class="detail-btn" v-if="!isGroup && !takeDownFromSale">
- <view class="to-store-car to-store-btn" v-if="goodsDetail.goodsType != 'VIRTUAL_GOODS'" @click="shutMask(4)">
+ <view class="to-store-car to-store-btn" v-if="goodsDetail.goodsType != 'VIRTUAL_GOODS'&& goodsDetail.customizeFlag!=='CUSTOMIZE'" @click="shutMask(4)">
鍔犲叆璐墿杞�</view>
<view class="to-buy to-store-btn" @click="shutMask(4, 'buy')">绔嬪嵆璐拱</view>
<view class="to-store-car to-store-btn" v-if="startTimer">鏆傛湭寮�濮�</view>
@@ -272,7 +272,7 @@
<!-- 鍟嗗搧瑙勬牸 鍟嗗搧璇︽儏锛屼互鍙婇粯璁ゅ弬涓庢椿鍔ㄧ殑id-->
<popupGoods :addr="delivery" ref="popupGoods" @changed="changedGoods" @closeBuy="closePopupBuy"
- @queryCart="cartCount()" :goodsDetail="goodsDetail" :goodsSpec="goodsSpec" :isGroup="isGroup" :id="productId"
+ @queryCart="cartCount()" :goodsDetail="goodsDetail" :consumizetemplateInfo="consumizetemplateInfo" :goodsSpec="goodsSpec" :isGroup="isGroup" :id="productId"
v-if="goodsDetail.id" :pointDetail="pointDetail" :wholesaleList="wholesaleList" @handleClickSku="selectSku"
:buyMask="buyMask" />
@@ -289,7 +289,7 @@
/************鎺ュ彛API***************/
-import { getGoods, getGoodsList, getMpScene, getGoodsDistribution } from "@/api/goods.js";
+import { getGoods, getGoodsList, getMpScene, getGoodsDistribution,getTemplate } from "@/api/goods.js";
import * as API_trade from "@/api/trade.js";
import * as API_Members from "@/api/members.js";
import * as API_store from "@/api/store.js";
@@ -374,6 +374,7 @@
___type: "other",
},
],
+ consumizetemplateInfo:{},
popupsSwitch: false, //瀵艰埅鏍忓垪琛ㄦ爮寮�鍏�
enableShare: false,
selectedGoods: "", //閫夋嫨鐨勫晢鍝佽鏍兼樀绉�
@@ -572,6 +573,13 @@
this.actionParam.shareId = options.shareId;
this.actionParam.joinType = 'SHARE'
console.log('瑙﹀彂onLoad')
+ uni.setStorage({
+ key: 'shareId',
+ data: options.shareId,
+ success: function () {
+ console.log('缂撳瓨shareId鎴愬姛');
+ }
+ });
}
this.actionParam.pageParams = JSON.stringify(options)
if(options.q){
@@ -601,6 +609,18 @@
// #ifdef MP-WEIXIN
// #endif
+ this.goodsDetail = {};
+ //濡傛灉鏈夊弬鏁癷ds璇存槑浜嬪垎閿�鐭繛鎺ワ紝闇�瑕佽幏鍙栧弬鏁�
+ if (this.routerVal.scene) {
+ getMpScene(this.routerVal.scene).then((res) => {
+ if (res.data.success) {
+ let data = res.data.result.split(","); // skuId,goodsId,distributionId
+ this.init(data[0], data[1], data[2]);
+ }
+ });
+ } else {
+ this.init(this.routerVal.id, this.routerVal.goodsId, this.routerVal.distributionId);
+ }
},
onUnload() {
@@ -620,23 +640,24 @@
getSessionId().then(res=>{
this.pageSessionNo = res.data.data
this.actionParam.sessionId = this.pageSessionNo
+ this.actionParam.sessionId = res.data.data
if(this.pageSessionNo){
let param = Object.assign({}, this.actionParam);
userAction(param)
}
})
- this.goodsDetail = {};
- //濡傛灉鏈夊弬鏁癷ds璇存槑浜嬪垎閿�鐭繛鎺ワ紝闇�瑕佽幏鍙栧弬鏁�
- if (this.routerVal.scene) {
- getMpScene(this.routerVal.scene).then((res) => {
- if (res.data.success) {
- let data = res.data.result.split(","); // skuId,goodsId,distributionId
- this.init(data[0], data[1], data[2]);
- }
- });
- } else {
- this.init(this.routerVal.id, this.routerVal.goodsId, this.routerVal.distributionId);
- }
+ // this.goodsDetail = {};
+ // //濡傛灉鏈夊弬鏁癷ds璇存槑浜嬪垎閿�鐭繛鎺ワ紝闇�瑕佽幏鍙栧弬鏁�
+ // if (this.routerVal.scene) {
+ // getMpScene(this.routerVal.scene).then((res) => {
+ // if (res.data.success) {
+ // let data = res.data.result.split(","); // skuId,goodsId,distributionId
+ // this.init(data[0], data[1], data[2]);
+ // }
+ // });
+ // } else {
+ // this.init(this.routerVal.id, this.routerVal.goodsId, this.routerVal.distributionId);
+ // }
},
methods: {
@@ -749,6 +770,16 @@
this.PromotionList = response.data.result.promotionMap;
this.goodsParams = response.data.result.goodsParamsDTOList || [];
console.log('浼樻儬鍗锋椿鍔�--------------------銆�',response.data.result.promotionMap)
+
+ if(this.goodsDetail.goodsType == 'PHYSICAL_GOODS'&& this.goodsDetail.customizeFlag ==='CUSTOMIZE'){
+ //鑾峰彇妯℃澘淇℃伅
+ this.consumizetemplateInfo = null;
+ console.log('鏄ā鏉胯幏鍙栭渶瑕佽幏鍙栦俊鎭�-------------銆�',this.goodsDetail.id)
+ const template = await getTemplate(this.goodsDetail.id)
+ this.consumizetemplateInfo = template.data.data
+ console.log('鑾峰彇鍒扮殑妯℃澘淇℃伅----------------->',template.data.data)
+
+ }
// 鍒ゆ柇鏄惁鎷煎洟娲诲姩鎴栬�呯Н鍒嗗晢鍝� 濡傛灉鏈夊垯鏄剧ず鎷煎洟娲诲姩淇℃伅
this.PromotionList &&
Object.keys(this.PromotionList).forEach((item) => {
@@ -764,7 +795,6 @@
});
// 杞挱鍥�
this.imgList = this.goodsDetail.goodsGalleryList.filter(i => i.indexOf("\"url\":") === -1 && i.indexOf("\"status\":") === -1);
-
// 鑾峰彇搴楅摵鍩烘湰淇℃伅
this.getStoreBaseInfoFun(this.goodsDetail.storeId);
@@ -781,6 +811,7 @@
if (this.$options.filters.isLogin("auth")) {
this.getGoodsCollectionFun(this.goodsDetail.id);
}
+
// 鑾峰彇IM 闇�瑕佺殑璇濅娇鐢�
// this.getIMDetailMethods();
},
--
Gitblit v1.8.0