修改图

main
ihzero 2024-05-28 23:39:23 +08:00
parent a8c7aa3a08
commit 2644ef0dc8
4 changed files with 20 additions and 18 deletions

View File

@ -1,4 +1,4 @@
VITE_API_BASE_URL = 'http://store-manage.hmily.club' VITE_API_BASE_URL = 'https://store.manage.zlgj168.com'

View File

@ -103,12 +103,14 @@ function __SetOption(data) {
lists.push(item[1]) lists.push(item[1])
values.push(__getColorValue(item[1], item[2], index)) values.push(__getColorValue(item[1], item[2], index))
}) })
const max = Math.max(...values.map((e) => e.value))
const maxValue = new Array(values.length).fill(max)
let option = { let option = {
grid: { grid: {
top: '10px', top: '10px',
left: '10px', left: '10px',
right: '40px', right: '70px',
bottom: 0, bottom: 0,
}, },
yAxis: [ yAxis: [
@ -129,19 +131,19 @@ function __SetOption(data) {
axisLabel: { show: false }, axisLabel: { show: false },
}, },
series: [ series: [
// { {
// show: true, show: true,
// type: 'bar', type: 'bar',
// barGap: '-100%', barGap: '-100%',
// barWidth: barWidth, barWidth: barWidth,
// itemStyle: { itemStyle: {
// normal: { normal: {
// color: 'rgba(102, 102, 102,0.5)', color: 'transparent',
// }, },
// }, },
// z: 1, z: 1,
// data: values.map(()=>1), data: maxValue,
// }, },
{ {
name: '排行', name: '排行',
type: 'bar', type: 'bar',
@ -149,7 +151,6 @@ function __SetOption(data) {
data: values, data: values,
animationDuration: 1500, animationDuration: 1500,
zlevel: 2, zlevel: 2,
label: { label: {
normal: { normal: {
show: true, show: true,
@ -174,7 +175,7 @@ function __SetOption(data) {
barGap: '-100%', barGap: '-100%',
animationDuration: 1500, animationDuration: 1500,
zlevel: 2, zlevel: 2,
label:{normal:{show:true, position:"right"}}, label: { normal: { show: true, position: 'right' } },
}, },
], ],
} }

View File

@ -12,7 +12,8 @@ export default defineConfig(({ mode }) => {
host: '0.0.0.0', host: '0.0.0.0',
proxy: { proxy: {
'/api': { '/api': {
target: 'http://store-manage.hmily.club', // target: 'http://store-manage.hmily.club',
target: 'https://store.manage.zlgj168.com',
changeOrigin: true, changeOrigin: true,
ws: true, ws: true,
rewrite: (path) => path.replace(/^\/api/, ''), rewrite: (path) => path.replace(/^\/api/, ''),