From 73e2580c4374c51d7c15cf20a03b5ca0ef5833c4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=88=9D=E5=BF=83?= <13773726377@163.com>
Date: Sat, 4 Apr 2026 15:07:31 +0800
Subject: [PATCH] 1
---
src/api/url.js | 2 +-
src/components/ContactSelectModal.vue | 8 +-
src/components/TabBar.vue | 14 +-
src/manifest.json | 46 +-
src/pages/client/home/index.vue | 18 +-
src/pages/client/order/create.vue | 7 +-
src/pages/client/shop/components/GoodItem.vue | 18 +-
src/pages/client/shop/index.vue | 1068 +++++++++--------
8 files changed, 606 insertions(+), 575 deletions(-)
diff --git a/src/api/url.js b/src/api/url.js
index 4342b19..6afdf04 100644
--- a/src/api/url.js
+++ b/src/api/url.js
@@ -196,7 +196,7 @@ export const ADD_SERVICE_FEE = "/app/chongwu_order/order_fuwufei";
// 商品分类
export const GET_GOODS_CATEGORY = "/product/type/list";
// 商品列表
-export const GET_GOODS_LIST = "/product/list";
+export const GET_GOODS_LIST = "/douyin/goods/product/online/query";
// 商品详情
export const GET_GOODS_DETAIL = "/product/detail";
diff --git a/src/components/ContactSelectModal.vue b/src/components/ContactSelectModal.vue
index 440101c..5e4e534 100644
--- a/src/components/ContactSelectModal.vue
+++ b/src/components/ContactSelectModal.vue
@@ -178,6 +178,8 @@ export default {
if (this.pendingPhoneNumber) {
this.doMakePhoneCall(this.pendingPhoneNumber)
this.pendingPhoneNumber = null
+ // 拨号后关闭选择弹窗
+ this.$emit('close')
}
},
@@ -282,12 +284,12 @@ export default {
this.checkPrivacyAuthorization(phoneNumber, (authorized) => {
if (authorized) {
this.doMakePhoneCall(phoneNumber)
+ // 已授权拨号后,关闭选择弹窗
+ this.$emit('close')
}
// 未授权时,checkPrivacyAuthorization 已经显示了隐私弹窗
+ // 此时不关闭选择弹窗,让隐私弹窗能够正常显示
})
-
- // 关闭选择弹窗
- this.$emit('close')
}
}
}
diff --git a/src/components/TabBar.vue b/src/components/TabBar.vue
index adeb596..e80b200 100644
--- a/src/components/TabBar.vue
+++ b/src/components/TabBar.vue
@@ -45,13 +45,13 @@
// text: "立即预约",
// isSpecial: true, // 特殊样式标记(中间突出的按钮)
// },
- // {
- // pageId: "shopPage",
- // iconPath: `${imgPrefix}tabBar-mall.png`,
- // selectedIconPath: `${imgPrefix}tabBar-selectdMall.png`,
- // text: "分类",
- // isSpecial: false,
- // },
+ {
+ pageId: "shopPage",
+ iconPath: `${imgPrefix}tabBar-mall.png`,
+ selectedIconPath: `${imgPrefix}tabBar-selectdMall.png`,
+ text: "分类",
+ isSpecial: false,
+ },
{
pageId: "minePage",
iconPath: `${imgPrefix}tabBar-mine.png`,
diff --git a/src/manifest.json b/src/manifest.json
index 6ad9f5f..ff568f5 100644
--- a/src/manifest.json
+++ b/src/manifest.json
@@ -78,31 +78,31 @@
"mp-baidu" : {
"usingComponents" : true
},
- "mp-toutiao" : {
- "usingComponents" : true,
- "appid" : "tte57093cd7a7fbf2401",
- "libVersion" : "2.0.0",
- "setting" : {
- "urlCheck" : false,
- "minified" : true,
- "postcss" : true,
- "es6" : true,
- "minifyJS" : true,
- "minifyWXML" : true,
- "minifyWXSS" : true
- },
- "privacy": {
+ "mp-toutiao": {
+ "usingComponents": true,
+ "appid": "tte57093cd7a7fbf2401",
+ "libVersion": "2.0.0",
+ "setting": {
+ "urlCheck": false,
+ "minified": true,
+ "postcss": true,
+ "es6": true,
+ "minifyJS": true,
+ "minifyWXML": true,
+ "minifyWXSS": true
+ },
+ "privacy": {
"usePrivacyCheck": true,
"requiredPrivateInfos": ["makePhoneCall"]
- },
-
- "plugins" : {
- "myTradePlugin" : {
- "version" : "*",
- "provider" : "tta5a3d31e3aecfb9b11"
- }
- }
- },
+ }
+ },
+ "plugins": {
+ "lifeServicePlugin": {
+ "version": "*",
+ "provider": "tta5a3d31e3aecfb9b11"
+ }
+ },
+
"mp-qq" : {
"usingComponents" : true
}
diff --git a/src/pages/client/home/index.vue b/src/pages/client/home/index.vue
index a6ad104..108c292 100644
--- a/src/pages/client/home/index.vue
+++ b/src/pages/client/home/index.vue
@@ -183,9 +183,9 @@ export default {
}
getGoodsListData(params)
.then((res) => {
- const list = res?.data || [];
- this.goodsList =
- this.goodPage === 1 ? list : [...this.goodsList, ...list];
+ const list = res?.data.data.products || [];
+ this.goodsList = list;
+ console.log(this.goodsList,'???')
this.goodsTotal = res?.count || 0;
})
.finally(() => {
@@ -328,13 +328,13 @@ export default {
res.eventChannel.emit("createOrder", {
goodList: [{
...this.goodsData,
- goods_id:goodsData.product_id,
- price_id:goodsData.prices[0].price_id,
+ goods_id:goodsData.product.out_id,
+ // price_id:goodsData.prices[0].price_id,
number:1,
- goods_name: goodsData.product_name,
- price_name: goodsData?.product_name,
- goods_price: goodsData.prices[0].actual_price,
- product_pic:goodsData.product_pic
+ goods_name: goodsData.product.product_name,
+ price_name: goodsData?.product.product_name,
+ goods_price: goodsData.product.product_type,
+ product_pic:goodsData.product.product_type
}, ],
});
},
diff --git a/src/pages/client/order/create.vue b/src/pages/client/order/create.vue
index b4de32f..0b36401 100644
--- a/src/pages/client/order/create.vue
+++ b/src/pages/client/order/create.vue
@@ -219,7 +219,7 @@ export default {
});
}
const params = {
- id: this.orderData[0].goods_id,
+ id: Number(this.orderData[0].goods_id),
};
// console.log(this.orderData,'???')
@@ -232,12 +232,9 @@ export default {
quantity: 10, // 购买数量 必填
price: 1, // 商品价格 必填
goodsName: "测试商品", // 商品名称 必填
- goodsPhoto:
- "https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fpic.ibaotu.com%2Fgif%2F19%2F48%2F47%2F76Z888piCd6W.gif%21fwpaa50%2Ffw%2F700&refer=http%3A%2F%2Fpic.ibaotu.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1644654365&t=5fc9b5fdad0a16264a9a9c09c14b3af9", // 商品图片链接 必填
+ goodsPhoto:"https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fpic.ibaotu.com%2Fgif%2F19%2F48%2F47%2F76Z888piCd6W.gif%21fwpaa50%2Ffw%2F700&refer=http%3A%2F%2Fpic.ibaotu.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=jpeg?sec=1644654365&t=5fc9b5fdad0a16264a9a9c09c14b3af9", // 商品图片链接 必填
goodsId: "123", // 商品ID 必填(请务必使用小程序商品)
goodsType: 2, // 商品类型 必填
- goodsLabels: ["不可退"], // 商品标签 非必填
- dateRule: "", // 使用规则 非必填
},
],
payment: {
diff --git a/src/pages/client/shop/components/GoodItem.vue b/src/pages/client/shop/components/GoodItem.vue
index 192f51f..b752de0 100644
--- a/src/pages/client/shop/components/GoodItem.vue
+++ b/src/pages/client/shop/components/GoodItem.vue
@@ -2,7 +2,7 @@
- {{ data.product_name || "" }}
+ {{ data.product.product_name || "" }}
-
-
-
-
+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
- {{ item.type_name }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+ {{ item.type_name }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
- (showModal = val)"
- @optAction="optAction" />
-
-
-
+ (showModal = val)"
+ @optAction="optAction"
+ />
+
+
+
\ No newline at end of file