diff --git a/src/App.vue b/src/App.vue
index df93535..f01dedd 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -6,12 +6,31 @@ const areaStroe = areaObj()
if (localStorage.getItem("TRADE_USER")) {
- let userInfo = JSON.parse(localStorage.getItem('TRADE_USER'))
- areaStroe.changeUserInfo(userInfo)
- let { area_code, street_code } = userInfo.user
- areaStroe.changeArea({ areaCode: area_code, streetCode: street_code })
+ let userInfo = JSON.parse(localStorage.getItem('TRADE_USER'))
+ areaStroe.changeUserInfo(userInfo)
+ let { area_code, street_code } = userInfo.user
+ areaStroe.changeArea({ areaCode: area_code, streetCode: street_code })
}
+else {
+ localStorage.setItem('TRADE_USER', JSON.stringify({
+ "user": {
+ "id": 8,
+ "account_type": 2,
+ "area_code": "510524",
+ "street_code": "510524100",
+ "account": "叙永镇",
+ "password": "3f4087bd6bdff7b6a3719ecc165c1a0d"
+ },
+ "token": "345d45fcd348ff02a69137999df2bbd8",
+ "expire": 1718782774,
+ "role": 3
+ }))
+ let userInfo = JSON.parse(localStorage.getItem('TRADE_USER'))
+ areaStroe.changeUserInfo(userInfo)
+ let { area_code, street_code } = userInfo.user
+ areaStroe.changeArea({ areaCode: area_code, streetCode: street_code })
+}
@@ -29,9 +48,9 @@ if (localStorage.getItem("TRADE_USER")) {
-
-
-
+
+
+
@@ -40,14 +59,14 @@ if (localStorage.getItem("TRADE_USER")) {
@import '/static/font/font.css';
* {
- margin: 0;
- padding: 0;
+ margin: 0;
+ padding: 0;
}
.main-box {
- width: 100vw;
- height: 100vh;
- background-color: #000C14;
- overflow: hidden;
+ width: 100vw;
+ height: 100vh;
+ background-color: #000C14;
+ overflow: hidden;
}
\ No newline at end of file
diff --git a/src/api.js b/src/api.js
index 4b00184..ba94c72 100644
--- a/src/api.js
+++ b/src/api.js
@@ -8,7 +8,8 @@ let expire = localStorage.getItem("TRADE_USER") ? JSON.parse(localStorage.getIte
// 创建axios 实例
const instacne = axios.create({
- baseURL: "https://shop.lihaink.cn/",
+ baseURL: "http://192.168.1.22:8545",
+ // baseURL: "https://shop.lihaink.cn/",
timeout: 30000,
});
@@ -44,7 +45,7 @@ instacne.interceptors.request.use(
instacne.interceptors.response.use(
(res) => {
- if (res.data.status != 200) {
+ if (res.data.code != 1) {
ElMessage({
message: res.data.message,
type: 'warning',
@@ -64,7 +65,7 @@ instacne.interceptors.response.use(
export function getUserNumApi(params) {
- return instacne.get('/api/dataview/user_merchat_count', { params })
+ return instacne.get('/statistics/user', { params })
}
@@ -72,7 +73,7 @@ export function getOrderNumApi(params) {
return instacne.get('/api/dataview/order_statistics', { params })
}
export function getSalesRankApi(params) {
- return instacne.get('/api/dataview/sales_ranking', { params })
+ return instacne.get('/statistics/sales_ranking', { params })
}
@@ -82,15 +83,15 @@ export function getTodayOrderAmountApi(params) {
export function getProductCountApi(params) {
- return instacne.get('/api/dataview/product_count', { params })
+ return instacne.get('/statistics/product_count', { params })
}
export function getViewCountApi(params) {
- return instacne.get('/api/dataview/view_count', { params })
+ return instacne.get('/statistics/index', { params })
}
export function getUserTradeCountApi(params) {
- return instacne.get('/api/dataview/user_trade_count', { params })
+ return instacne.get('/statistics/user_trade_count', { params })
}
export function getProductCategoryListApi(params) {
@@ -158,7 +159,7 @@ export function withdraw_listApi(params) {
}
export function street_currday_order_countApi(params) {
- return instacne.get('/api/dataview/street_currday_order_count', { params })
+ return instacne.get('/statistics/street_currday_order_count', { params })
}
export function loginApi(params) {
return instacne.post('/api/dataview/login', params)
@@ -173,7 +174,7 @@ export function merchant_count_mainApi(params) {
return instacne.get('/api/dataview/merchant_count_main', { params })
}
export function order_user_num_countApi(params) {
- return instacne.get('/api/dataview/order_user_num_count', { params })
+ return instacne.get('/statistics/order_user_num_count', { params })
}
export function merchant_product_rankingApi(params) {
diff --git a/src/components/Remake.vue b/src/components/Remake.vue
index fe1359d..fb289c9 100644
--- a/src/components/Remake.vue
+++ b/src/components/Remake.vue
@@ -22,11 +22,16 @@ export default {
}
},
mounted() {
- setTimeout(() => {
- this.toOrderNum(this.num) // 这里输入数字即可调用
- }, 500);
+ // setTimeout(() => {
+ // this.toOrderNum(this.num) // 这里输入数字即可调用
+ // }, 500);
},
+ watch:{
+ num(n,o){
+ this.toOrderNum(this.num) // 这里输入数字即可调用
+ }
+ },
methods: {
// 设置文字滚动
setNumberTransform() {
diff --git a/src/components/header.vue b/src/components/header.vue
index 7d4e37b..4b402df 100644
--- a/src/components/header.vue
+++ b/src/components/header.vue
@@ -2,7 +2,7 @@