@@ -1099,6 +1099,7 @@ export default { | |||
} | |||
}, | |||
_tap(e,move) { | |||
console.log(e,move,'=========前',this.inScrollView,this.inAli) | |||
let cid = this.cid | |||
let currentIndex = null; | |||
let legendIndex = null; | |||
@@ -1134,9 +1135,13 @@ export default { | |||
} | |||
this.emitMsg({name: 'getIndex', params: { type:"getIndex", event:{ x: e.detail.x - data.left, y: e.detail.y - data.top }, currentIndex: currentIndex, legendIndex: legendIndex, id: cid, opts: cfu.instance[cid].opts}}); | |||
} | |||
console.log(e,move,'=========后2') | |||
}) | |||
.exec(); | |||
} else { | |||
console.log(e,move,'=========后4') | |||
if(move){ | |||
if (this.tooltipShow === true) { | |||
this._showTooltip(e); | |||
@@ -1155,6 +1160,7 @@ export default { | |||
this.emitMsg({name: 'getIndex', params: {type:"getIndex", event:{ x: e.detail.x, y: e.detail.y - e.currentTarget.offsetTop }, currentIndex: currentIndex, legendIndex: legendIndex, id: cid, opts: cfu.instance[cid].opts}}); | |||
} | |||
} | |||
console.log(e,move,'=========后') | |||
}, | |||
_touchStart(e) { | |||
let cid = this.cid |
@@ -18,6 +18,7 @@ | |||
// 主题颜色配置:如每个图表类型需要不同主题,请在对应图表类型上更改color属性 | |||
const color = ['#1890FF', '#91CB74', '#FAC858', '#EE6666', '#73C0DE', '#3CA272', '#FC8452', '#9A60B4', '#ea7ccc']; | |||
const colorMap = ['#1890FF']; | |||
//事件转换函数,主要用作格式化x轴为时间轴,根据需求自行修改 | |||
const formatDateTime = (timeStamp, returnType)=>{ | |||
@@ -196,7 +197,7 @@ const cfu = { | |||
}, | |||
"map":{ | |||
"type": "map", | |||
"color": color, | |||
"color": colorMap, | |||
"padding": [0,0,0,0], | |||
"dataLabel": true, | |||
"extra": { |
@@ -32,13 +32,21 @@ | |||
import qiun from "./qiun-data-charts/components/qiun-data-charts/qiun-data-charts.vue"; | |||
const state = reactive({ | |||
chartData: {}, | |||
opts: { | |||
color: ["#1890FF","#91CB74","#FAC858","#EE6666","#73C0DE","#3CA272","#FC8452","#9A60B4","#ea7ccc"], | |||
opts: { //["贵州省","海南省"] | |||
color: ["#EE6666","#1890FF","#1890FF","#1890FF","#1890FF", | |||
"#1890FF","#1890FF","#1890FF","#1890FF","#1890FF", | |||
"#1890FF","#1890FF","#1890FF","#1890FF","#1890FF", | |||
"#1890FF","#1890FF","#1890FF","#1890FF","#1890FF", | |||
"#1890FF","#1890FF","#1890FF","#1890FF","#EE6666", | |||
"#1890FF","#1890FF","#1890FF","#1890FF","#1890FF", | |||
"#1890FF","#1890FF","#1890FF","#1890FF","#1890FF"], | |||
padding: [0,0,0,0], | |||
dataLabel: true, | |||
fontSize:9, | |||
enableScroll: false, | |||
extra: { | |||
map: { | |||
active:false, | |||
border: true, | |||
borderWidth: 1, | |||
borderColor: "#666666", |
@@ -119,6 +119,25 @@ export function request(code, options = {}) { | |||
//处理请求错误 | |||
reject(err) | |||
} | |||
wx.request(options) | |||
uni.getNetworkType({ | |||
success: function (res) { | |||
if(res.networkType=='none'){ | |||
wx.showModal({ | |||
title: '提示', | |||
content: "网络异常", | |||
success: function(res) { | |||
if (res.confirm) { | |||
console.log('用户点击确定'); | |||
} else if (res.cancel) { | |||
console.log('用户点击取消'); | |||
} | |||
} | |||
}); | |||
}else{ | |||
wx.request(options) | |||
} | |||
console.log("res.networkType",res.networkType); | |||
} | |||
}); | |||
}); | |||
} |