|
|
@@ -88,7 +88,7 @@
|
|
|
>重量: {{ specExtraList[0].weight }}克</view
|
|
|
>
|
|
|
<view class="label-item">
|
|
|
- 附加费{{ specExtraList[0].additionalAmount || 0 }}元</view
|
|
|
+ 附加费{{ specExtraList[0].additionalFee || 0 }}元</view
|
|
|
>
|
|
|
</view>
|
|
|
<view
|
|
|
@@ -151,36 +151,6 @@
|
|
|
<view style="height: 120rpx"></view>
|
|
|
</scroll-view>
|
|
|
</view>
|
|
|
- <view class="footer acea-row row-between-wrapper">
|
|
|
- <navigator
|
|
|
- open-type="switchTab"
|
|
|
- class="animated item"
|
|
|
- url="/pages/mall/index"
|
|
|
- hover-class="none"
|
|
|
- >
|
|
|
- <uni-icons
|
|
|
- size="22"
|
|
|
- color="#666"
|
|
|
- customPrefix="iconfont"
|
|
|
- type="icon-shouye"
|
|
|
- ></uni-icons>
|
|
|
- <view>首页</view>
|
|
|
- </navigator>
|
|
|
- <button
|
|
|
- @click="toMessagePage"
|
|
|
- open-type="contact"
|
|
|
- hover-class="none"
|
|
|
- class="item"
|
|
|
- >
|
|
|
- <uni-icons
|
|
|
- size="22"
|
|
|
- color="#666"
|
|
|
- customPrefix="iconfont"
|
|
|
- type="icon-kefu1"
|
|
|
- ></uni-icons>
|
|
|
- <view>客服</view>
|
|
|
- </button>
|
|
|
- </view>
|
|
|
<view class="footer acea-row row-between-wrapper">
|
|
|
<view class="toAPP">
|
|
|
<wx-open-launch-app
|
|
|
@@ -207,34 +177,6 @@
|
|
|
</component>
|
|
|
</wx-open-launch-app>
|
|
|
</view>
|
|
|
- <navigator
|
|
|
- open-type="switchTab"
|
|
|
- class="animated item bounceIn"
|
|
|
- hover-class="none"
|
|
|
- >
|
|
|
- <uni-icons
|
|
|
- size="22"
|
|
|
- color="#666"
|
|
|
- customPrefix="iconfont"
|
|
|
- type="icon-shouye"
|
|
|
- ></uni-icons>
|
|
|
- <view>首页</view>
|
|
|
- </navigator>
|
|
|
- <button
|
|
|
- @click="toMessagePage"
|
|
|
- open-type="contact"
|
|
|
- hover-class="none"
|
|
|
- class="item"
|
|
|
- >
|
|
|
- <uni-icons
|
|
|
- size="22"
|
|
|
- color="#666"
|
|
|
- customPrefix="iconfont"
|
|
|
- type="icon-kefu1"
|
|
|
- ></uni-icons>
|
|
|
-
|
|
|
- <view>客服</view>
|
|
|
- </button>
|
|
|
</view>
|
|
|
</view>
|
|
|
</template>
|
|
|
@@ -280,6 +222,14 @@ const initwxlaunch = () => {
|
|
|
}
|
|
|
);
|
|
|
};
|
|
|
+const goShuiBei = () => {
|
|
|
+ let url = `shuibei://`;
|
|
|
+ let errUrl = "https://a.app.qq.com/o/simple.jsp?pkgname=uni.app.UNI9DE338F";
|
|
|
+ window.location.href = url;
|
|
|
+ setTimeout(() => {
|
|
|
+ window.location.href = errUrl;
|
|
|
+ }, 3000);
|
|
|
+};
|
|
|
initwxlaunch();
|
|
|
// const appStore = useAppStore();
|
|
|
// const isLogin = computed(() => appStore.isLogin);
|
|
|
@@ -287,7 +237,7 @@ initwxlaunch();
|
|
|
|
|
|
const attrTxt = ref("请选择");
|
|
|
const attrValue = ref("");
|
|
|
-const id = ref(0);
|
|
|
+const id = ref("");
|
|
|
const productInfo = ref({});
|
|
|
const productValue = ref([]);
|
|
|
const productAttr = ref([]);
|
|
|
@@ -328,12 +278,6 @@ onLoad((options) => {
|
|
|
},
|
|
|
});
|
|
|
|
|
|
- if (!options.scene && !options.id) {
|
|
|
- Toast({ title: "缺少参数无法查看商品", icon: "none" });
|
|
|
- uni.navigateTo({ url: "/pages/mall/index" });
|
|
|
- return;
|
|
|
- }
|
|
|
-
|
|
|
if (options.id || options.scene) {
|
|
|
if (options.scene) {
|
|
|
const qrCodeValue = $util.getUrlParams(decodeURIComponent(options.scene));
|
|
|
@@ -344,10 +288,9 @@ onLoad((options) => {
|
|
|
id.value = options.id;
|
|
|
}
|
|
|
type.value = options.type ?? "normal";
|
|
|
- appStore.$patch({ productType: type.value });
|
|
|
}
|
|
|
|
|
|
- getGoodsDetails();
|
|
|
+ getGoodsDetails(id.value);
|
|
|
});
|
|
|
|
|
|
onShow(() => {});
|
|
|
@@ -399,19 +342,21 @@ const ChangeAttr = (res) => {
|
|
|
}
|
|
|
};
|
|
|
|
|
|
-const getGoodsDetails = async () => {
|
|
|
+const getGoodsDetails = async (productId) => {
|
|
|
try {
|
|
|
- const res = await getGroupBuyingProductDetail(id.value);
|
|
|
+ const res = await getGroupBuyingProductDetail(productId);
|
|
|
const product = res.data.storeCombination;
|
|
|
msTime.value = res.data.stopTime;
|
|
|
- specExtraList.value = res.data.specExtraList;
|
|
|
- productAttr.value = res.data.productAttr;
|
|
|
+ specExtraList.value = res.data.specExtraList || [];
|
|
|
sliderImage.value = JSON.parse(product.sliderImage);
|
|
|
productInfo.value = product;
|
|
|
description.value = product.content;
|
|
|
userJoinPink.value = res.data.userJoinPink;
|
|
|
attr.value.productAttr = res.data.productAttr;
|
|
|
productValue.value = res.data.productValue;
|
|
|
+ console.log("API Response:", res.data);
|
|
|
+ console.log("specExtraList:", specExtraList.value);
|
|
|
+ console.log("productInfo:", productInfo.value);
|
|
|
uni.setNavigationBarTitle({
|
|
|
title: product.storeName.substring(0, 7) + "...",
|
|
|
});
|
|
|
@@ -424,9 +369,10 @@ const getGoodsDetails = async () => {
|
|
|
type: item.type,
|
|
|
}));
|
|
|
downloadFilestoreImage();
|
|
|
- DefaultSelect();
|
|
|
+ // DefaultSelect();
|
|
|
} catch (err) {
|
|
|
Toast({ title: err.toString(), icon: "none" });
|
|
|
+ console.error("getGoodsDetails error:", err);
|
|
|
}
|
|
|
};
|
|
|
|