From e951ed48ac58bfdbc88923d82affab7b7a858766 Mon Sep 17 00:00:00 2001 From: zmj <1493694146@qq.com> Date: Fri, 8 Dec 2023 00:06:02 +0800 Subject: [PATCH] *** --- src/api.js | 30 ++- src/components/areaList.vue | 4 +- src/view/Businesses.vue | 81 +++--- src/view/commodity.vue | 72 ++++-- src/view/order.vue | 483 ++++++++++++++++++++++++++++++++++-- 5 files changed, 594 insertions(+), 76 deletions(-) diff --git a/src/api.js b/src/api.js index 0c2470a..c5e9d9b 100644 --- a/src/api.js +++ b/src/api.js @@ -65,5 +65,33 @@ export function getUserTradeCountApi(params) { export function getProductCategoryListApi(params) { return instacne.get('/api/dataview/product_category_list', { params }) } -// api/dataview/view_count?areaCode=510524&streetCode=510524100 + + +export function getProductListApi(params) { + return instacne.get('/api/dataview/product_list', { params }) +} + +export function merchant_listApi(params) { + return instacne.get('/api/dataview/merchant_list', { params }) +} + +export function order_listApi(params) { + return instacne.get('/api/dataview/order_list', { params }) +} +export function order_list_count_titleApi(params) { + return instacne.get('/api/dataview/order_list_count_title', { params }) +} +export function refund_order_listApi(params) { + return instacne.get('/api/dataview/refund_order_list', { params }) +} +export function take_order_listApi(params) { + return instacne.get('/api/dataview/take_order_list', { params }) +} + + +export function take_order_count_titleApi(params) { + return instacne.get('/api/dataview/take_order_count_title', { params }) +} +// +// /api/dataview/take_order_count_title?areaCode=510524&streetCode=510524100&status&page=1&limit=20 diff --git a/src/components/areaList.vue b/src/components/areaList.vue index d8fd1ae..c273cd1 100644 --- a/src/components/areaList.vue +++ b/src/components/areaList.vue @@ -23,9 +23,9 @@ const choseTownFn = (id, name) => { props.choseArea = false emit('offAreaList', name) - router.go(0) + // router.go(0) - // router.replace('/townDetail?code=' + id) + router.replace('/townDetail?code=' + id) } onMounted(() => { diff --git a/src/view/Businesses.vue b/src/view/Businesses.vue index 2ded8b6..d7c346f 100644 --- a/src/view/Businesses.vue +++ b/src/view/Businesses.vue @@ -4,10 +4,10 @@
-
正常开启的商户
-
已关闭的商户
+
正常开启的商户
+
已关闭的商户
-
+
@@ -21,8 +21,28 @@ // 102B3 import { ref, reactive, onMounted } from "vue" import { useRouter } from 'vue-router' +import {merchant_listApi} from "@/api.js" const route = useRouter() +let status =ref(0) + +const changeTable=(num)=>{ + + configs.data.splice(0,configs.data.length) + console.log(configs.data) + status.value=num + merchant_listApi( + { + areaCode: 510524, + streetCode: 510524100, + status:status.value, + limit:50 + } + ).then(res=>{ + addConfigData(res.data.list) + }) + +} const ShwostoreType = ref(true) const test = () => { console.log(6) @@ -37,37 +57,37 @@ const hdClick = (e) => { } -const a = (aaa) => { - for (let i = 0; i < 100; i++) { +const addConfigData = (data) => { + data.forEach((item,i)=>{ if (i % 2 == 0) { - aaa.data.push( + configs.data.push( [ - `
排序
`, - `
排sd序
`, - `
排序
`, - `
排序
`, - `
排序
`, - `
排序
`, - `
排序
`, - `
排序
`, - `
排序
`, - `
排序
`, - `
登录
`, + `
${item.mer_id}
`, + `
${item.mer_name}
`, + `
${item.real_name}
`, + `
${item.mer_address}
`, + `
${item.mark}
`, + `
${item.is_best}
`, + `
${item.create_time}
`, + `
sd
`, + `
${item.merchantCategory.category_name}
`, + `
${item.status?'开启':'关闭'}
`, + `
登录
`, ] ) } else { - aaa.data.push( + configs.data.push( [ + `
${item.mer_id}
`, + `
${item.mer_name}
`, + `
${item.real_name}
`, + `
${item.mer_address}
`, + `
${item.mark}
`, + `
${item.is_best}
`, + `
${item.create_time}
`, `
排序
`, - `
排sd序
`, - `
排序
`, - `
排序
`, - `
排序
`, - `
排序
`, - `
排序
`, - `
排序
`, - `
排序
`, - `
排序
`, + `
${item.merchantCategory.category_name}
`, + `
${item.status?'开启':'关闭'}
`, `
登录
`, ] @@ -75,9 +95,12 @@ const a = (aaa) => { ) } + }) + + } -} + const configs = reactive({ headerBGC: "linear-gradient(to right, #ff0000, #00ff00)", oddRowBGC: '', @@ -100,7 +123,7 @@ const configs = reactive({ ] }) onMounted(() => { - a(configs) + changeTable(0) }) diff --git a/src/view/commodity.vue b/src/view/commodity.vue index a4c5a39..552e282 100644 --- a/src/view/commodity.vue +++ b/src/view/commodity.vue @@ -10,15 +10,15 @@
-
出售中商品
-
仓库中商品
-
待审核商品
-
审核未通过商品
+
出售中商品
+
仓库中商品
+
待审核商品
+
审核未通过商品
-
+
@@ -28,26 +28,42 @@