diff --git a/src/App.vue b/src/App.vue
index 8b5379f..a6ec676 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -9,9 +9,11 @@
\ No newline at end of file
diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue
index 1833532..69756a3 100644
--- a/src/pages/index/index.vue
+++ b/src/pages/index/index.vue
@@ -1,25 +1,49 @@
-
- {{$t('index.companyProfile')}}
-
+
+
+
+
+
+
+
+
diff --git a/src/pages/inquiry/index.vue b/src/pages/inquiry/index.vue
new file mode 100644
index 0000000..089c0f0
--- /dev/null
+++ b/src/pages/inquiry/index.vue
@@ -0,0 +1,15 @@
+
+
+ 询盘栏目
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/pages/products/index.vue b/src/pages/products/index.vue
new file mode 100644
index 0000000..ca28135
--- /dev/null
+++ b/src/pages/products/index.vue
@@ -0,0 +1,15 @@
+
+
+ 产品栏目
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/pages/separate/index.vue b/src/pages/separate/index.vue
new file mode 100644
index 0000000..b476e07
--- /dev/null
+++ b/src/pages/separate/index.vue
@@ -0,0 +1,15 @@
+
+
+ 单页面
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/static/aboutus-select.png b/src/static/aboutus-select.png
new file mode 100644
index 0000000..4cf8aa5
Binary files /dev/null and b/src/static/aboutus-select.png differ
diff --git a/src/static/aboutus.png b/src/static/aboutus.png
new file mode 100644
index 0000000..029b8d8
Binary files /dev/null and b/src/static/aboutus.png differ
diff --git a/src/static/contactus-select.png b/src/static/contactus-select.png
new file mode 100644
index 0000000..745f56d
Binary files /dev/null and b/src/static/contactus-select.png differ
diff --git a/src/static/contactus.png b/src/static/contactus.png
new file mode 100644
index 0000000..0c2919d
Binary files /dev/null and b/src/static/contactus.png differ
diff --git a/src/static/home-select.png b/src/static/home-select.png
new file mode 100644
index 0000000..fd2ae32
Binary files /dev/null and b/src/static/home-select.png differ
diff --git a/src/static/home.png b/src/static/home.png
new file mode 100644
index 0000000..25b0c22
Binary files /dev/null and b/src/static/home.png differ
diff --git a/src/static/logo.png b/src/static/logo.png
deleted file mode 100644
index b5771e2..0000000
Binary files a/src/static/logo.png and /dev/null differ
diff --git a/src/static/news-select.png b/src/static/news-select.png
new file mode 100644
index 0000000..5f7a2e0
Binary files /dev/null and b/src/static/news-select.png differ
diff --git a/src/static/news.png b/src/static/news.png
new file mode 100644
index 0000000..fd46437
Binary files /dev/null and b/src/static/news.png differ
diff --git a/src/static/product-select.png b/src/static/product-select.png
new file mode 100644
index 0000000..6300966
Binary files /dev/null and b/src/static/product-select.png differ
diff --git a/src/static/product.png b/src/static/product.png
new file mode 100644
index 0000000..a0ac1c4
Binary files /dev/null and b/src/static/product.png differ
diff --git a/src/stores/index.js b/src/stores/index.js
index a3cd27d..a4eaa14 100644
--- a/src/stores/index.js
+++ b/src/stores/index.js
@@ -1,14 +1,49 @@
import { defineStore } from 'pinia';
-import { reactive, ref } from 'vue';
+import { ref } from 'vue';
+import { menuCategoryApi } from '@/api/index.js';
-export const index = defineStore('index',()=>{
- let num = ref(0);
-
- const countHanderl = () => {
- num.value += 1
+export const useIndex = defineStore('index',()=>{
+ const routeMap = {
+ 'dym': {
+ view: 'separate', // 单页面
+ },
+ 'xp': {
+ view: 'inquiry' // 询盘栏目
+ },
+ 'wz': {
+ view: 'article-page' // 文章栏目
+ },
+ 'cp': {
+ view: 'products' // 产品栏目
+ }
}
+
+ const menuTree = ref([])
+ const menuInit = () => {
+ menuTree.value = [
+ { label: 'Home', to: '/', children: [] },
+ ]
+ menuCategoryApi().then(({data:res}) => {
+ const fn = (list) => {
+ list.forEach(item => {
+ if (item.catgLevel===1) {
+ item.to = `/pages/${routeMap[item.catgType].view}?maxCatgId=${item.id}&title=${item.label}`
+ } else {
+ item.to = `/pages/${routeMap[item.catgType].view}?&catgId=${item.id}&maxCatgId=${item.maxParentId}&title=${item.label}`
+ }
+ if (item.children.length) {
+ fn(item.children)
+ }
+ })
+ }
+ fn(res.data)
+ menuTree.value = [...menuTree.value, ...res.data]
+
+ })
+ }
+
return {
- num,
- countHanderl
+ menuInit,
+ menuTree
}
})
diff --git a/src/utils/request.js b/src/utils/request.js
index 1539986..650da88 100644
--- a/src/utils/request.js
+++ b/src/utils/request.js
@@ -10,9 +10,9 @@ $http.config = {
// web运行端口默认5173;可在manifest进行修改默认端口号
$http.interceptors.request.use(async (config) => { // 可使用async await 做异步操作
config.header = {
- ...config.header,
- 'Token': uni.getStorageSync('annualTicketToken'),
+ ...config.header
}
+ config.params = {...config.params, tenantId: 'main'}
uni.showLoading({
title: '加载中...',
mask: true
@@ -27,17 +27,11 @@ $http.interceptors.request.use(async (config) => { // 可使用async await 做
$http.interceptors.response.use((response) => {
uni.hideLoading()
switch(response.data.code) {
- case 0:
+ case 200:
break;
default:
- // 加入到messageBoxUrl的请求url可触发弹窗形式的提示
- let messageBoxUrl = []
- if (messageBoxUrl.indexOf(response.config.url) !== -1) {
- uni.$showModal('提示',response.data.msg)
- } else {
- if (response.data.msg) {
- uni.$showTost(response.data.msg)
- }
+ if (response.data.msg) {
+ uni.$showTost(response.data.msg)
}
return Promise.reject(response)
}
diff --git a/unpackage/res/icons/1024x1024.png b/unpackage/res/icons/1024x1024.png
new file mode 100644
index 0000000..bfdea13
Binary files /dev/null and b/unpackage/res/icons/1024x1024.png differ
diff --git a/unpackage/res/icons/120x120.png b/unpackage/res/icons/120x120.png
new file mode 100644
index 0000000..92476ef
Binary files /dev/null and b/unpackage/res/icons/120x120.png differ
diff --git a/unpackage/res/icons/144x144.png b/unpackage/res/icons/144x144.png
new file mode 100644
index 0000000..7c414b8
Binary files /dev/null and b/unpackage/res/icons/144x144.png differ
diff --git a/unpackage/res/icons/152x152.png b/unpackage/res/icons/152x152.png
new file mode 100644
index 0000000..823c373
Binary files /dev/null and b/unpackage/res/icons/152x152.png differ
diff --git a/unpackage/res/icons/167x167.png b/unpackage/res/icons/167x167.png
new file mode 100644
index 0000000..de37589
Binary files /dev/null and b/unpackage/res/icons/167x167.png differ
diff --git a/unpackage/res/icons/180x180.png b/unpackage/res/icons/180x180.png
new file mode 100644
index 0000000..6334385
Binary files /dev/null and b/unpackage/res/icons/180x180.png differ
diff --git a/unpackage/res/icons/192x192.png b/unpackage/res/icons/192x192.png
new file mode 100644
index 0000000..e17bc68
Binary files /dev/null and b/unpackage/res/icons/192x192.png differ
diff --git a/unpackage/res/icons/20x20.png b/unpackage/res/icons/20x20.png
new file mode 100644
index 0000000..8fcb484
Binary files /dev/null and b/unpackage/res/icons/20x20.png differ
diff --git a/unpackage/res/icons/29x29.png b/unpackage/res/icons/29x29.png
new file mode 100644
index 0000000..8e0d7cc
Binary files /dev/null and b/unpackage/res/icons/29x29.png differ
diff --git a/unpackage/res/icons/40x40.png b/unpackage/res/icons/40x40.png
new file mode 100644
index 0000000..03115c0
Binary files /dev/null and b/unpackage/res/icons/40x40.png differ
diff --git a/unpackage/res/icons/58x58.png b/unpackage/res/icons/58x58.png
new file mode 100644
index 0000000..5e97530
Binary files /dev/null and b/unpackage/res/icons/58x58.png differ
diff --git a/unpackage/res/icons/60x60.png b/unpackage/res/icons/60x60.png
new file mode 100644
index 0000000..a0a7d71
Binary files /dev/null and b/unpackage/res/icons/60x60.png differ
diff --git a/unpackage/res/icons/72x72.png b/unpackage/res/icons/72x72.png
new file mode 100644
index 0000000..0646eee
Binary files /dev/null and b/unpackage/res/icons/72x72.png differ
diff --git a/unpackage/res/icons/76x76.png b/unpackage/res/icons/76x76.png
new file mode 100644
index 0000000..3c04c4f
Binary files /dev/null and b/unpackage/res/icons/76x76.png differ
diff --git a/unpackage/res/icons/80x80.png b/unpackage/res/icons/80x80.png
new file mode 100644
index 0000000..70645b2
Binary files /dev/null and b/unpackage/res/icons/80x80.png differ
diff --git a/unpackage/res/icons/87x87.png b/unpackage/res/icons/87x87.png
new file mode 100644
index 0000000..a8b0347
Binary files /dev/null and b/unpackage/res/icons/87x87.png differ
diff --git a/unpackage/res/icons/96x96.png b/unpackage/res/icons/96x96.png
new file mode 100644
index 0000000..816afe8
Binary files /dev/null and b/unpackage/res/icons/96x96.png differ