diff --git a/.env.production b/.env.production index 46804f0..3ee3e16 100644 --- a/.env.production +++ b/.env.production @@ -1,2 +1,2 @@ -VITE_BASE_URL = '/' -# VITE_BASE_URL = 'https://shop.lihaink.cn/api' \ No newline at end of file +# VITE_BASE_URL = '/' +VITE_BASE_URL = 'https://shop.lihaink.cn/api' \ No newline at end of file diff --git a/src/api/index.js b/src/api/index.js index 5b73164..fe14281 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -32,6 +32,11 @@ export const orderRanking = (data) => { return axios.get('dataview/order_ranking', { params: data }); } +// 三轮车订单排行 +export const vehicleOrderRanking = (data) => { + return axios.get('dataview/vehicle_order_ranking', { params: data }); +} + // 配送商品排行 export const deliveredProductRanking = (data) => { return axios.get('dataview/delivered_product_ranking', { params: data }); diff --git a/src/assets/img/bg.png b/src/assets/img/bg.png index 5c45ea7..134fa39 100644 Binary files a/src/assets/img/bg.png and b/src/assets/img/bg.png differ diff --git a/src/components/Businesses2.vue b/src/components/Businesses2.vue index 15a3b65..052d183 100644 --- a/src/components/Businesses2.vue +++ b/src/components/Businesses2.vue @@ -21,6 +21,22 @@ const hdClick = (e) => { // } } +const formatTimestamp = (timestamp)=> { + const date = new Date(timestamp); + const year = date.getFullYear(); + const month = ('0' + (date.getMonth() + 1)).slice(-2); + const day = ('0' + date.getDate()).slice(-2); + const hours = ('0' + date.getHours()).slice(-2); + const minutes = ('0' + date.getMinutes()).slice(-2); + const seconds = ('0' + date.getSeconds()).slice(-2); + + const formattedDate = `${year}-${month}-${day}`; + const formattedTime = `${hours}:${minutes}:${seconds}`; + + return `${formattedDate} ${formattedTime}`; +} + + const initData = (data) => { let arr = []; for (let i = 0; i < data.length; i++) { @@ -31,14 +47,14 @@ const initData = (data) => { arr.push( [ `
${data[i].order_sn || '-'}
`, + `
${data[i].receiver_name || '-'}
`, + `
${data[i].receiver_phone || '-'}
`, + `
${data[i].receiver_address || '-'}
`, + `
${data[i].product_name || '-'}
`, + `
${data[i].shop_name || '-'}
`, + `
${formatTimestamp(data[i].create_time*1000) || '-'}
`, + `
${titleText.value || '-'}
`, `
${data[i].captain_name || '-'}
`, - `
${data[i].user_phone || '-'}
`, - `
${data[i].user_address || '-'}
`, - `
${data[i].store_name || '-'}
`, - `
${data[i].mer_name || '-'}
`, - `
${data[i].create_time || '-'}
`, - `
${data[i].status || '-'}
`, - `
${data[i].courier || '-'}
`, ] ) } diff --git a/src/view/index/components/leftItme2.vue b/src/view/index/components/leftItme2.vue index f7c422b..6818a12 100644 --- a/src/view/index/components/leftItme2.vue +++ b/src/view/index/components/leftItme2.vue @@ -1,7 +1,7 @@