calm 1 viikko sitten
vanhempi
commit
73e107243d

+ 1 - 1
package-lock.json

@@ -6,7 +6,7 @@
 	"packages": {
 		"": {
 			"dependencies": {
-				"clipboard": "^2.0.11",
+				"clipboard": "^2.0.11", 
 				"dayjs": "^1.11.13",
 				"uview-plus": "^3.5.17",
 				"weixin-js-sdk": "^1.6.5"

+ 19 - 73
pages/group_buying/index.vue

@@ -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);
   }
 };
 

BIN
static/images/tg_detail.png


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 1
unpackage/dist/build/dist/assets/index-NDH1elN4.css


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 2 - 2
unpackage/dist/build/dist/assets/index-IArJN11J.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 1
unpackage/dist/build/dist/assets/index.Bhpsx5Qy.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 1
unpackage/dist/build/dist/assets/index.es2fCgCM.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 1
unpackage/dist/build/dist/assets/pages-article_details-index.DTGZVEoQ.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 1
unpackage/dist/build/dist/assets/pages-goods_details-index.CP8j8SnQ.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 0 - 1
unpackage/dist/build/dist/assets/pages-group_buying-index.DZb6hJ3d.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 0
unpackage/dist/build/dist/assets/pages-group_buying-index.uDjt75rV.js


Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 1 - 1
unpackage/dist/build/dist/assets/pages-index-index.Du1z1qNl.js


BIN
unpackage/dist/build/dist/assets/tg_detail-DWEjKwuQ.png


+ 1 - 1
unpackage/dist/build/dist/index.html

@@ -15,7 +15,7 @@
     <title>shuibei</title>
     <!--preload-links-->
     <!--app-context-->
-    <script type="module" crossorigin src="./assets/index-IArJN11J.js"></script>
+    <script type="module" crossorigin src="./assets/index-hnuRUB9x.js"></script>
     <link rel="stylesheet" crossorigin href="./assets/index-Bk9DSHPB.css">
   </head>
   <body>

BIN
unpackage/dist/build/dist/static/images/tg_detail.png