- wx.getUserProfile 调用?
[图片]
2022-06-15 - getUserInfo接口修改后res.authSetting['scope.userInfo']?
getUserInfo接口修改后res.authSetting['scope.userInfo']还有效吗
2021-04-15 - 小程序如何判断两个节点是否相交?
小程序如何判断两个节点是否相交
2021-01-03 - 调试器style那栏老是无辜消失?
[图片] [图片]
2020-04-24 - echarts 安卓机 wx.canvasToTempFilePath第二次生成图片为空白?
echarts 安卓机 wx.canvasToTempFilePath第二次生成图片为空白? echarts底层 canvasToTempFilePath(opt) { if (!opt.canvasId) { opt.canvasId = this.data.canvasId; } const system = wx.getSystemInfoSync().system; console.log(system) console.log(opt) if(/ios/i.test(system)){ console.log("ios") ctx.draw(true, () => { wx.canvasToTempFilePath(opt, this); }); }else{ console.log("android") ctx.draw(true, () => { ctx.draw(true); setTimeout(()=>{ console.log(opt) wx.canvasToTempFilePath(opt, this); },3000); }); } } 调用 //获取报表数据 getReportData: function () { let c = this; wx.showLoading({ title: '加载中...', }) c.setData({ ecList: [], echartsImgList: [], showEcharts: true }) wx.request({ url: app.api.QueryReportList, data: { dateTimeType: parseInt(c.data.dateTimeType) + 1, labelId: c.data.labelId, labelType: c.data.labelType }, success: res => { console.log(res) if (res.data.Code == 0 && res.data.Lst.length > 0) { let data = res.data.Lst; wx.showLoading({ title: '正在生成报表...', }); for (let i = 0; i < data.length; i++) { let item = { onInit: function (canvas, width, height) { const barChart = echarts.init(canvas, null, { width: width, height: 450 }); canvas.setChart(barChart); barChart.on('finished', () => { console.log("finished") let className = `#mychart-dom-line${i}`; try { c.firstChangeImg(className) } catch (e) { console.log(e) } }); barChart.setOption(c.getLineOption(canvas, data[i])); return barChart; } }; c.data.ecList.push(item); } c.setData({ ecList: c.data.ecList }); } else { wx.showToast({ title: "该时间段无上报数据,请选择其他时间", icon: 'none', duration: 3000 }); } }, fail: e => { console.log(e) wx.hideLoading(); } }) }, //首次转换图片 firstChangeImg(className){ let c=this; return new Promise((resolve,reject)=>{ c.selectComponent(className).canvasToTempFilePath({ success: res => { console.log(res) console.log("imgs") let echartsSrc = res.tempFilePath; // c.setData({ // echartImgSrc: res.tempFilePath // }) c.data.echartsImgList.push(echartsSrc); c.setData({ echartsImgList: c.data.echartsImgList, }); resolve(c.data.echartsImgList); wx.hideLoading(); }, fail: res => { console.log('转换图片失败', res); wx.hideLoading(); } }); }); },
2020-01-03 - echarts canvasToTempFilePath 安卓系统只执行一次?
echarts canvasToTempFilePath 安卓系统只执行一次?
2019-12-26 - ec-echarts 循环canvasToTempFilePath 安卓机只执行一次?
ec-echarts 循环canvasToTempFilePath 安卓机只执行一次? for (let i = 0; i < data.length; i++) { let item = { onInit: function (canvas, width, height) { const barChart = echarts.init(canvas, null, { width: width, height: 450 }); canvas.setChart(barChart); barChart.on('finished', () => { console.log("finished") let className = `.line${i}` c.selectComponent(className).canvasToTempFilePath({ success: res => { console.log(res) console.log("imgs") let echartsSrc = res.tempFilePath; // c.setData({ // echartImgSrc: res.tempFilePath // }) c.data.echartsImgList.push(echartsSrc); if(c.data.echartsImgList.length>0){ c.data.showEcharts=false; } console.log(c.data.echartsImgList) c.setData({ echartsImgList:c.data.echartsImgList, showEcharts:c.data.showEcharts }); wx.hideLoading(); }, fail: res => {console.log('转换图片失败', res);wx.hideLoading();} }); }); barChart.setOption(c.getLineOption(canvas, data[i])); return barChart; } }; c.data.ecList.push(item); }
2019-12-25 - echarts小程序 extraCssText:'transform: rotate(90deg)?
echarts小程序 extraCssText:'transform: rotate(90deg)配置项不起作用 tooltip : { // formatter: "{a0}:{c0}\n{a1}:{c1}", trigger: 'axis', extraCssText:'transform:rotate(-90deg);box-shadow: 0 0 3px rgba(1, 1, 1, 1.3);' },
2019-12-21 - ec-canvas 使用transform:rotate 在真机上无效?
ec-canvas {width: 1200rpx;height:100%;transform: rotate(90deg); -ms-transform: rotate(90deg); /* IE 9 */ -moz-transform: rotate(90deg); /* Firefox */ -webkit-transform: rotate(90deg); /* Safari 和 Chrome */ -o-transform: rotate(0deg)} <ec-canvas class="mychart-dom-line" style="" wx:for="{{ecList}}" wx:key="index" canvas-id="mychart-line" ec="{{ item }}"></ec-canvas> [图片][图片]
2019-12-20 - transform:retate 在这机上无效吗?
transform:retate 在这机上无效吗?
2019-12-20