From 93ac148ba80ab5f0f7c3595f62b7fad73f4fdc27 Mon Sep 17 00:00:00 2001 From: weipengfei <2187978347@qq.com> Date: Wed, 26 Jun 2024 09:26:24 +0800 Subject: [PATCH] 1 --- package-lock.json | 14 ++ package.json | 1 + src/api.js | 4 +- src/components/datePicker.vue | 4 - src/components/datePickerOne.vue | 122 ++++++++++ src/components/header.vue | 4 +- src/components/townDetail/bottomCenter.vue | 86 +++---- src/components/townDetail/bottomRight.vue | 42 ++-- src/components/townDetail/bottomleft.vue | 2 +- src/components/townDetail/topCenter.vue | 4 +- src/components/townDetail/topLeft.vue | 2 +- src/components/townDetail/topRight.vue | 261 +++++---------------- src/components/townDetail/topRight2.vue | 225 ++++++++++++++++++ src/store/index.js | 4 + src/view/index.vue | 40 ++-- src/view/townDetail.vue | 24 +- vite.config.js | 4 +- 17 files changed, 545 insertions(+), 298 deletions(-) create mode 100644 src/components/datePickerOne.vue create mode 100644 src/components/townDetail/topRight2.vue diff --git a/package-lock.json b/package-lock.json index 83295ef..03dc393 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,6 +16,7 @@ "echarts": "^5.4.3", "element-plus": "^2.4.4", "mitt": "^3.0.1", + "moment": "^2.30.1", "pinia": "^2.1.7", "postcss-pxtorem": "^5.1.1", "vue": "^3.3.8", @@ -2470,6 +2471,14 @@ "resolved": "https://registry.npmjs.org/mitt/-/mitt-3.0.1.tgz", "integrity": "sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==" }, + "node_modules/moment": { + "version": "2.30.1", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.30.1.tgz", + "integrity": "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==", + "engines": { + "node": "*" + } + }, "node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.2.tgz", @@ -4891,6 +4900,11 @@ "resolved": "https://registry.npmjs.org/mitt/-/mitt-3.0.1.tgz", "integrity": "sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==" }, + "moment": { + "version": "2.30.1", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.30.1.tgz", + "integrity": "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==" + }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmmirror.com/ms/-/ms-2.1.2.tgz", diff --git a/package.json b/package.json index 83aad56..81ecf45 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ "echarts": "^5.4.3", "element-plus": "^2.4.4", "mitt": "^3.0.1", + "moment": "^2.30.1", "pinia": "^2.1.7", "postcss-pxtorem": "^5.1.1", "vue": "^3.3.8", diff --git a/src/api.js b/src/api.js index 36521ba..2b1c18f 100644 --- a/src/api.js +++ b/src/api.js @@ -8,8 +8,8 @@ let expire = localStorage.getItem("TRADE_USER") ? JSON.parse(localStorage.getIte // 创建axios 实例 const instacne = axios.create({ - baseURL: "http://192.168.1.22:8545", - // baseURL: "https://multi-store.lihaink.cn", + // baseURL: "http://192.168.1.22:8545", + baseURL: "https://multi-store.lihaink.cn", // baseURL: "https://shop.lihaink.cn/", timeout: 30000, }); diff --git a/src/components/datePicker.vue b/src/components/datePicker.vue index a11ae90..d951ddf 100644 --- a/src/components/datePicker.vue +++ b/src/components/datePicker.vue @@ -31,12 +31,8 @@ const getTime = (time) => { const date = ref([areaStore.time[0], areaStore.time[1]]) const changeDate = (e) => { areaStore.changeTime([getTime(e[0]),getTime(e[1])]) - } - - - diff --git a/src/components/datePickerOne.vue b/src/components/datePickerOne.vue new file mode 100644 index 0000000..a3c06de --- /dev/null +++ b/src/components/datePickerOne.vue @@ -0,0 +1,122 @@ + + + + + + + + \ No newline at end of file diff --git a/src/components/header.vue b/src/components/header.vue index 913dfb3..55ea1b8 100644 --- a/src/components/header.vue +++ b/src/components/header.vue @@ -55,7 +55,8 @@ {{ headerTitle }}
- + +
{{ area }}
@@ -94,6 +95,7 @@ import { useRouter, useRoute } from 'vue-router' import MapLoader from "@/view/utils/position.js" import { areaObj } from "@/store/index.js" import datePicker from "@/components/datePicker.vue" +import datePickerOne from "@/components/datePickerOne.vue" import mitt from '@/view/utils/mitt.js' const areaStore = areaObj() let area = ref('') diff --git a/src/components/townDetail/bottomCenter.vue b/src/components/townDetail/bottomCenter.vue index 4bd4f8e..aedf27a 100644 --- a/src/components/townDetail/bottomCenter.vue +++ b/src/components/townDetail/bottomCenter.vue @@ -4,23 +4,29 @@ diff --git a/src/components/townDetail/bottomRight.vue b/src/components/townDetail/bottomRight.vue index 68f362e..1775ec5 100644 --- a/src/components/townDetail/bottomRight.vue +++ b/src/components/townDetail/bottomRight.vue @@ -5,8 +5,8 @@ 商品销售排行 店铺销量排行
--> - - + + + + - \ No newline at end of file + \ No newline at end of file diff --git a/src/components/townDetail/topRight2.vue b/src/components/townDetail/topRight2.vue new file mode 100644 index 0000000..83cf787 --- /dev/null +++ b/src/components/townDetail/topRight2.vue @@ -0,0 +1,225 @@ + + + + + \ No newline at end of file diff --git a/src/store/index.js b/src/store/index.js index 9214618..fd85257 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -43,6 +43,7 @@ export const areaObj = defineStore('counter', { // streetCode: 51052410 }, + date: now(), time: [lastMouth(), now()], // 商户请求的参数 store: { @@ -74,6 +75,9 @@ export const areaObj = defineStore('counter', { }, storeLogin(obj) { this.userInfo.user = obj + }, + setDate(date){ + this.date = date } } diff --git a/src/view/index.vue b/src/view/index.vue index e203597..3c003aa 100644 --- a/src/view/index.vue +++ b/src/view/index.vue @@ -4,7 +4,7 @@
-
+