From ffc486724a2397843d3595ec745f0f10f9917856 Mon Sep 17 00:00:00 2001 From: woody Date: Tue, 6 May 2025 16:52:17 +0800 Subject: [PATCH] =?UTF-8?q?wip(special-area-list):=20=E6=B7=BB=E5=8A=A0?= =?UTF-8?q?=E4=B8=93=E5=8C=BA=E5=88=97=E8=A1=A8=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/goods.js | 9 + src/components/special-area-list/index.vue | 213 +++++++++++++++++++++ src/views/index/index.vue | 15 +- 3 files changed, 231 insertions(+), 6 deletions(-) create mode 100644 src/components/special-area-list/index.vue diff --git a/src/api/goods.js b/src/api/goods.js index 1574e6e..c5b24f2 100644 --- a/src/api/goods.js +++ b/src/api/goods.js @@ -216,3 +216,12 @@ export function validShop(data) { data, }); } + +// 获取专区商品 +export function getAreaGoods(params) { + return request({ + url: "/sale/api/wares/list-wares", + method: "get", + params, + }); +} diff --git a/src/components/special-area-list/index.vue b/src/components/special-area-list/index.vue new file mode 100644 index 0000000..ee0ab3c --- /dev/null +++ b/src/components/special-area-list/index.vue @@ -0,0 +1,213 @@ + + + + + diff --git a/src/views/index/index.vue b/src/views/index/index.vue index 6bfeff8..10cd4e0 100644 --- a/src/views/index/index.vue +++ b/src/views/index/index.vue @@ -207,7 +207,7 @@ import { forgetPwd, forgetSms } from "@/api/login"; import * as goods from "@/api/goods.js"; import znNewsPopup from "@/components/znNewsPopup.vue"; - +import specialAreaList from "@/components/special-area-list/index.vue"; // import { getAlertUserAgreement } from "@/api/index.js"; export default { name: "Index", @@ -219,6 +219,7 @@ export default { performance, noticePopup, znNewsPopup, + specialAreaList, }, computed: { ...mapGetters(["userInfo"]), @@ -264,12 +265,14 @@ export default { promptFlag: 0, //提示标记(0=弹窗提示,1=不弹窗提示) promptMsg: "", //提示信息 jumpPage: 1, //跳转页面(1=实名认证,2=续约专区) + areaGoodsList: [], }; }, mounted() { this.getBanner(); this.getMenuList(); + this.getAreaGoods(); this.getService(); }, methods: { @@ -435,11 +438,11 @@ export default { this.bannerList = res.rows; }); }, - // getMarket() { - // api.getMyMarket().then((res) => { - // this.marketData = res.data; - // }); - // }, + getAreaGoods() { + goods.getAreaGoods().then((res) => { + this.areaGoodsList = res?.data?.recommendSpecialAreaList || []; + }); + }, }, };