Commit fbf2af39 by 胡悦

概览

1 parent 9d4de07b
...@@ -12,11 +12,12 @@ let cfg = require('./conf.js') ...@@ -12,11 +12,12 @@ let cfg = require('./conf.js')
import { Http } from 'glsx-common' import { Http } from 'glsx-common'
let timeout = 30000 //超时时间 let timeout = 30000 //超时时间
export const fetchConfig = function (isEnv = true) { export const fetchConfig = function (isEnv = true) {
if (isEnv) { // console.log(1111111)
let { request } = cfg // if (isEnv) {
Object.assign(request, { timeout }) // let { request } = cfg
return Promise.resolve(cfg) // Object.assign(request, { timeout })
} // return Promise.resolve(cfg)
// }
//return window.fetch('https://', {}).then(res => res.json()) //return window.fetch('https://', {}).then(res => res.json())
// request({ url: 'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config/oss_commodity_center', method: 'get' }) // request({ url: 'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config/oss_commodity_center', method: 'get' })
return new Http().get('https://oss-config.test.glsx.com.cn/mock/619c87331072f92988f05a29/marketing/config') return new Http().get('https://oss-config.test.glsx.com.cn/mock/619c87331072f92988f05a29/marketing/config')
......
...@@ -24,7 +24,7 @@ export async function start() { ...@@ -24,7 +24,7 @@ export async function start() {
// .forEach(item => { // .forEach(item => {
// urlParams[item.split('=')[0]] = item.split('=')[1] // urlParams[item.split('=')[0]] = item.split('=')[1]
// }) // })
var token = Object.keys(urlParams).includes('sessionId') ? urlParams.sessionId : 'mini-f4e9b4ba-b16f-491f-bf84-40f2b896dc93-rop' var token = Object.keys(urlParams).includes('sessionId') ? urlParams.sessionId : 'mini-983e626d-4250-42b0-be9c-a9845552ae20-rop'
Vue.prototype.$http = new Http({ response, request, sign, secret, alert: message.error, headers: { token: token } }) Vue.prototype.$http = new Http({ response, request, sign, secret, alert: message.error, headers: { token: token } })
Vue.use(GLButton, { permissions: ['1-1-1-1', '2-1-1-1', '3-1-1-1'] }) Vue.use(GLButton, { permissions: ['1-1-1-1', '2-1-1-1', '3-1-1-1'] })
render('/', routes) render('/', routes)
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
<div class="table-btns" slot="optionBtns" slot-scope="scope"> <div class="table-btns" slot="optionBtns" slot-scope="scope">
<el-button <el-button
type="text" type="text"
:disabled="scope.scope.isRemind == 0" :disabled="scope.scope.isRemind == 1"
@click="btnClick('remind', 1, scope.scope)" @click="btnClick('remind', 1, scope.scope)"
>提醒发送</el-button> >提醒发送</el-button>
<el-button type="text" @click="btnClick('detail', 1, scope.scope)">详情</el-button> <el-button type="text" @click="btnClick('detail', 1, scope.scope)">详情</el-button>
......
<template>
<div id="bar" class="chart-bar"></div>
</template>
<script>
import * as echarts from 'echarts'
export default {
name: 'BarChart',
data() {
return {}
},
methods: {
getChart() {
let chartDom = document.getElementById('bar')
let myChart = echarts.init(chartDom)
let option
const data = []
for (let i = 0; i < 5; ++i) {
data.push(Math.round(Math.random() * 200))
}
option = {
xAxis: {
max: 'dataMax'
},
yAxis: {
type: 'category',
data: ['A', 'B', 'C', 'D', 'E'],
inverse: true,
animationDuration: 300,
animationDurationUpdate: 300,
max: 2 // only the largest 3 bars will be displayed
},
series: [
{
realtimeSort: true,
name: 'X',
type: 'bar',
data: data,
label: {
show: true,
position: 'right',
valueAnimation: true,
normal: [20, 0]
}
}
],
// legend: {
// show: true
// },
animationDuration: 0,
animationDurationUpdate: 3000,
animationEasing: 'linear',
animationEasingUpdate: 'linear'
}
option && myChart.setOption(option)
}
},
mounted() {
this.getChart()
}
}
</script>
<style lang="scss" scoped>
.chart-bar {
width: 235px;
height: 207px;
}
</style>
...@@ -5,13 +5,13 @@ ...@@ -5,13 +5,13 @@
import * as echarts from 'echarts' import * as echarts from 'echarts'
export default { export default {
name: 'PieChart', name: 'LineChart',
data() { data() {
return {} return {}
}, },
methods: { methods: {
getChart() { getChart() {
let chartDom = document.getElementById('pie') let chartDom = document.getElementById('line')
let myChart = echarts.init(chartDom) let myChart = echarts.init(chartDom)
let option let option
option = { option = {
...@@ -40,7 +40,8 @@ export default { ...@@ -40,7 +40,8 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.chart-pie { .chart-line {
height: 260px; height: 260px;
width: 880px;
} }
</style> </style>
...@@ -28,6 +28,7 @@ export default { ...@@ -28,6 +28,7 @@ export default {
// orient: 'vertical', // orient: 'vertical',
// left: 'left' // left: 'left'
// }, // },
series: [ series: [
{ {
name: '券类营销', name: '券类营销',
...@@ -36,6 +37,14 @@ export default { ...@@ -36,6 +37,14 @@ export default {
label: { label: {
formatter: '{b}\n \n{c} 张' formatter: '{b}\n \n{c} 张'
}, },
itemStyle: {
normal: {
color: function(params) {
var colorList = ['#5850FF', '#FE9C1C']
return colorList[params.dataIndex]
}
}
},
data: [ data: [
{ value: 1048, name: '折扣券' }, { value: 1048, name: '折扣券' },
{ value: 75, name: '兑换券' } { value: 75, name: '兑换券' }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!