From 21b7938ae0b63ba2f17913874a7d4ff682145fc7 Mon Sep 17 00:00:00 2001 From: liujiangyong Date: Tue, 17 Oct 2023 15:39:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E7=A4=BA=E4=BE=8B=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- weapp/package/pie/index.js | 64 ------------------------------ weapp/package/pie/index.json | 5 --- weapp/package/pie/index.wxml | 4 -- weapp/package/pie/index.wxss | 5 --- weapp/pages/overview/overview.js | 5 --- weapp/pages/overview/overview.wxml | 6 --- 6 files changed, 89 deletions(-) delete mode 100644 weapp/package/pie/index.js delete mode 100644 weapp/package/pie/index.json delete mode 100644 weapp/package/pie/index.wxml delete mode 100644 weapp/package/pie/index.wxss diff --git a/weapp/package/pie/index.js b/weapp/package/pie/index.js deleted file mode 100644 index 4d090cb..0000000 --- a/weapp/package/pie/index.js +++ /dev/null @@ -1,64 +0,0 @@ -import * as echarts from '../components/ec-canvas/echarts'; - -const app = getApp(); - -function initChart(canvas, width, height, dpr) { - const chart = echarts.init(canvas, null, { - width: 300, - height: 300, - devicePixelRatio: dpr // new - }); - canvas.setChart(chart); - - var option = { - backgroundColor: "#ffffff", - series: [{ - label: { - normal: { - fontSize: 14 - } - }, - type: 'pie', - center: ['50%', '50%'], - radius: ['20%', '40%'], - data: [{ - value: 55, - name: '北京' - }, { - value: 20, - name: '武汉' - }, { - value: 10, - name: '杭州' - }, { - value: 20, - name: '广州' - }, { - value: 38, - name: '上海' - }] - }] - }; - - chart.setOption(option); - return chart; -} - -Page({ - onShareAppMessage: function (res) { - return { - title: 'ECharts 可以在微信小程序中使用啦!', - path: '/pages/index/index', - success: function () { }, - fail: function () { } - } - }, - data: { - ec: { - onInit: initChart - } - }, - - onReady() { - } -}); diff --git a/weapp/package/pie/index.json b/weapp/package/pie/index.json deleted file mode 100644 index ca9c622..0000000 --- a/weapp/package/pie/index.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "usingComponents": { - "ec-canvas": "../components/ec-canvas/ec-canvas" - } -} diff --git a/weapp/package/pie/index.wxml b/weapp/package/pie/index.wxml deleted file mode 100644 index 4308aed..0000000 --- a/weapp/package/pie/index.wxml +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/weapp/package/pie/index.wxss b/weapp/package/pie/index.wxss deleted file mode 100644 index f3b1594..0000000 --- a/weapp/package/pie/index.wxss +++ /dev/null @@ -1,5 +0,0 @@ -/**index.wxss**/ -.pie { - width: 300px; - height: 300px; -} diff --git a/weapp/pages/overview/overview.js b/weapp/pages/overview/overview.js index 1a7495c..c0bacf1 100644 --- a/weapp/pages/overview/overview.js +++ b/weapp/pages/overview/overview.js @@ -26,11 +26,6 @@ Page({ url: '/package/inspectionReport/inspectionReport', }) }, - toPie () { - wx.navigateTo({ - url: '/package/pie/index', - }) - }, /** * 生命周期函数--监听页面加载 diff --git a/weapp/pages/overview/overview.wxml b/weapp/pages/overview/overview.wxml index ba77dc1..ae6b7c2 100644 --- a/weapp/pages/overview/overview.wxml +++ b/weapp/pages/overview/overview.wxml @@ -19,11 +19,5 @@ 巡检报告 - - - - 图表示例 - - \ No newline at end of file