Procházet zdrojové kódy

大体能明白了,首页合并,找回密码开始写

ltx529596 před 4 roky
rodič
revize
337705f26b
40 změnil soubory, kde provedl 7312 přidání a 4118 odebrání
  1. 220 222
      package-lock.json
  2. 26 25
      package.json
  3. 2 0
      src/config/routes.config.js
  4. 165 0
      src/js_sdk/u-charts/u-charts/component.vue
  5. 5662 0
      src/js_sdk/u-charts/u-charts/u-charts.js
  6. 0 0
      src/js_sdk/u-charts/u-charts/u-charts.min.js
  7. 1 1
      src/manifest.json
  8. 38 570
      src/pages.json
  9. 720 534
      src/pages/index/index.vue
  10. 0 19
      src/pages/order/create/order.vue
  11. 0 16
      src/pages/order/detail.vue
  12. 0 343
      src/pages/order/evaluation/evaluation.vue
  13. 0 318
      src/pages/order/evaluation/list.vue
  14. 20 310
      src/pages/order/order.vue
  15. 0 139
      src/pages/order/refund.vue
  16. 0 233
      src/pages/order/refund/refund.vue
  17. 0 181
      src/pages/order/search.vue
  18. 0 191
      src/pages/order/shipping/return.vue
  19. 0 635
      src/pages/order/shipping/shipping.vue
  20. 375 381
      src/pages/public/login.vue
  21. 51 0
      src/pages/public/resetpassword.vue
  22. 25 0
      src/pages/shop/shop.vue
  23. binární
      src/static/images/backicon.png
  24. binární
      src/static/images/down.png
  25. binární
      src/static/images/downicon.png
  26. binární
      src/static/images/index.png
  27. binární
      src/static/images/index_active.png
  28. binární
      src/static/images/order.png
  29. binární
      src/static/images/order_active.png
  30. binární
      src/static/images/ordernum.png
  31. binární
      src/static/images/passworddown.png
  32. binární
      src/static/images/purse.png
  33. binární
      src/static/images/scan.png
  34. binární
      src/static/images/sealenum.png
  35. binární
      src/static/images/seticon.png
  36. binární
      src/static/images/shop.png
  37. binární
      src/static/images/shop_active.png
  38. binární
      src/static/images/todayordernum.png
  39. binární
      src/static/images/up.png
  40. 7 0
      src/uni.scss

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 220 - 222
package-lock.json


+ 26 - 25
package.json

@@ -31,58 +31,59 @@
     "vue:lintfix": "vue-cli-service lint --fix"
   },
   "dependencies": {
-    "@dcloudio/uni-app-plus": "^2.0.0-24220191115011",
-    "@dcloudio/uni-h5": "^2.0.0-24220191115011",
+    "@dcloudio/uni-app-plus": "^2.0.0-28220200724002",
+    "@dcloudio/uni-h5": "^2.0.0-28220200724002",
     "@dcloudio/uni-helper-json": "*",
-    "@dcloudio/uni-migration": "^2.0.0-24220191115011",
-    "@dcloudio/uni-mp-alipay": "^2.0.0-24220191115011",
-    "@dcloudio/uni-mp-baidu": "^2.0.0-24220191115011",
-    "@dcloudio/uni-mp-qq": "^2.0.0-24220191115011",
-    "@dcloudio/uni-mp-toutiao": "^2.0.0-24220191115011",
-    "@dcloudio/uni-mp-weixin": "^2.0.0-24220191115011",
-    "@dcloudio/uni-stat": "^2.0.0-24220191115011",
+    "@dcloudio/uni-migration": "^2.0.0-28220200724002",
+    "@dcloudio/uni-mp-alipay": "^2.0.0-28220200724002",
+    "@dcloudio/uni-mp-baidu": "^2.0.0-28220200724002",
+    "@dcloudio/uni-mp-qq": "^2.0.0-28220200724002",
+    "@dcloudio/uni-mp-toutiao": "^2.0.0-28220200724002",
+    "@dcloudio/uni-mp-weixin": "^2.0.0-28220200724002",
+    "@dcloudio/uni-stat": "^2.0.0-28220200724002",
     "@typescript-eslint/eslint-plugin": "^2.27.0",
     "@typescript-eslint/parser": "^2.27.0",
     "axios": "^0.19.0",
+    "echarts": "^4.8.0",
     "flyio": "^0.6.2",
     "node-sass": "^4.13.0",
     "regenerator-runtime": "^0.12.1",
-    "sass": "^1.24.0",
+    "sass": "^1.26.10",
     "sass-loader": "^7.1.0",
     "vue": "^2.6.11",
-    "vuex": "^3.0.1"
+    "vuex": "^3.5.1"
   },
   "devDependencies": {
-    "@dcloudio/uni-cli-shared": "^2.0.0-24220191115011",
-    "@dcloudio/uni-template-compiler": "^2.0.0-24220191115011",
-    "@dcloudio/vue-cli-plugin-hbuilderx": "^2.0.0-24220191115011",
-    "@dcloudio/vue-cli-plugin-uni": "^2.0.0-24220191115011",
-    "@dcloudio/vue-cli-plugin-uni-optimize": "^2.0.0-24220191115011",
-    "@dcloudio/webpack-uni-mp-loader": "^2.0.0-24220191115011",
-    "@dcloudio/webpack-uni-pages-loader": "^2.0.0-24220191115011",
+    "@dcloudio/uni-cli-shared": "^2.0.0-28220200724002",
+    "@dcloudio/uni-template-compiler": "^2.0.0-28220200724002",
+    "@dcloudio/vue-cli-plugin-hbuilderx": "^2.0.0-28220200724002",
+    "@dcloudio/vue-cli-plugin-uni": "^2.0.0-28220200724002",
+    "@dcloudio/vue-cli-plugin-uni-optimize": "^2.0.0-28220200724002",
+    "@dcloudio/webpack-uni-mp-loader": "^2.0.0-28220200724002",
+    "@dcloudio/webpack-uni-pages-loader": "^2.0.0-28220200724002",
     "@types/html5plus": "*",
     "@types/uni-app": "*",
     "@vue/cli-plugin-babel": "3.5.1",
-    "@vue/cli-plugin-eslint": "^4.3.1",
-    "@vue/cli-service": "^4.1.1",
+    "@vue/cli-plugin-eslint": "^4.4.6",
+    "@vue/cli-service": "^4.4.6",
     "@vue/eslint-config-standard": "^5.1.2",
     "babel-eslint": "^10.1.0",
     "babel-plugin-import": "^1.13.0",
+    "commitizen": "^3.1.2",
+    "conventional-changelog-cli": "^2.0.23",
+    "cz-conventional-changelog": "^2.0.0",
     "eslint": "^6.8.0",
-    "eslint-plugin-import": "^2.20.2",
+    "eslint-plugin-import": "^2.22.0",
     "eslint-plugin-node": "^11.1.0",
     "eslint-plugin-promise": "^4.2.1",
     "eslint-plugin-standard": "^4.0.0",
     "eslint-plugin-vue": "^6.2.2",
-    "commitizen": "^3.1.2",
-    "conventional-changelog-cli": "^2.0.23",
-    "cz-conventional-changelog": "^2.0.0",
     "husky": "^3.0.0",
     "lint-staged": "^8.0.0",
     "mini-types": "0.0.5",
-    "release-it": "^10.0.0",
     "miniprogram-api-typings": "^2.9.4",
     "postcss-comment": "^2.0.0",
+    "release-it": "^10.0.0",
     "vue-template-compiler": "^2.6.11"
   },
   "browserslist": [

+ 2 - 0
src/config/routes.config.js

@@ -24,6 +24,8 @@ export default {
 		name: '首页',
 		path: '/pages/index/index'
 	},
+
+	
 	category: {
 		name: '分类',
 		path: '/pages/category/category'

+ 165 - 0
src/js_sdk/u-charts/u-charts/component.vue

@@ -0,0 +1,165 @@
+<template>
+	<canvas v-if="canvasId" :id="canvasId" :canvasId="canvasId" :style="{'width':cWidth*pixelRatio+'px','height':cHeight*pixelRatio+'px', 'transform': 'scale('+(1/pixelRatio)+')','margin-left':-cWidth*(pixelRatio-1)/2+'px','margin-top':-cHeight*(pixelRatio-1)/2+'px'}"
+	 @touchstart="touchStart" @touchmove="touchMove" @touchend="touchEnd" @error="error">
+	</canvas>
+</template>
+
+<script>
+	import uCharts from './u-charts.js';
+	var canvases = {};
+	
+	export default {
+		props: {
+			chartType: {
+				required: true,
+				type: String,
+				default: 'column'
+			},
+			opts: {
+				required: true,
+				type: Object,
+				default () {
+					return null;
+				},
+			},
+			canvasId: {
+				type: String,
+				default: 'u-canvas',
+			},
+			cWidth: {
+				default: 375,
+			},
+			cHeight: {
+				default: 250,
+			},
+			pixelRatio: {
+				type: Number,
+				default: 1,
+			},
+		},
+		mounted() {
+			this.init();
+		},
+		methods: {
+			init() {
+				switch (this.chartType) {
+					case 'column':
+						this.initColumnChart();
+						break;
+					case 'line':
+						this.initLineChart();
+						break;
+					default:
+						break;
+				}
+			},
+			initColumnChart() {
+				canvases[this.canvasId] = new uCharts({
+					$this: this,
+					canvasId: this.canvasId,
+					type: 'column',
+					legend: true,
+					fontSize: 11,
+					background: '#FFFFFF',
+					pixelRatio: this.pixelRatio,
+					animation: true,
+					categories: this.opts.categories,
+					series: this.opts.series,
+					enableScroll: true,
+					xAxis: {
+						disableGrid: true,
+						itemCount: 4,
+						scrollShow: true
+					},
+					yAxis: {
+						//disabled:true
+					},
+					dataLabel: true,
+					width: this.cWidth * this.pixelRatio,
+					height: this.cHeight * this.pixelRatio,
+					extra: {
+						column: {
+							type: 'group',
+						}
+					}
+				});
+			},
+			initLineChart() {
+				canvases[this.canvasId] = new uCharts({
+					$this: this,
+					canvasId: this.canvasId,
+					type: 'line',
+					fontSize: 11,
+					legend: true,
+					dataLabel: false,
+					dataPointShape: true,
+					background: '#FFFFFF',
+					pixelRatio: this.pixelRatio,
+					categories: this.opts.categories,
+					series: this.opts.series,
+					animation: true,
+					enableScroll: true,
+					xAxis: {
+						type: 'grid',
+						gridColor: '#CCCCCC',
+						gridType: 'dash',
+						dashLength: 8,
+						itemCount: 4,
+						scrollShow: true
+					},
+					yAxis: {
+						gridType: 'dash',
+						gridColor: '#CCCCCC',
+						dashLength: 8,
+						splitNumber: 5,
+						min: 10,
+						max: 180,
+						format: (val) => {
+							return val.toFixed(0) + '元'
+						}
+					},
+					width: this.cWidth * this.pixelRatio,
+					height: this.cHeight * this.pixelRatio,
+					extra: {
+						line: {
+							type: 'straight'
+						}
+					}
+				});
+			},
+			// 这里仅作为示例传入两个参数,cid为canvas-id,newdata为更新的数据,需要更多参数请自行修改
+			changeData(cid,newdata) {
+				canvases[cid].updateData({
+					series: newdata.series,
+					categories: newdata.categories
+				});
+			},
+			touchStart(e) {
+				canvases[this.canvasId].showToolTip(e, {
+					format: function(item, category) {
+						return category + ' ' + item.name + ':' + item.data
+					}
+				});
+				canvases[this.canvasId].scrollStart(e);
+			},
+			touchMove(e) {
+				canvases[this.canvasId].scroll(e);
+			},
+			touchEnd(e) {
+				canvases[this.canvasId].scrollEnd(e);
+			},
+			error(e) {
+				console.log(e)
+			}
+		},
+	};
+</script>
+
+<style scoped>
+	.charts {
+		width: 100%;
+		height: 100%;
+		flex: 1;
+		background-color: #FFFFFF;
+	}
+</style>

+ 5662 - 0
src/js_sdk/u-charts/u-charts/u-charts.js

@@ -0,0 +1,5662 @@
+/*
+ * uCharts v1.9.4.20200331
+ * uni-app平台高性能跨全端图表,支持H5、APP、小程序(微信/支付宝/百度/头条/QQ/360)
+ * Copyright (c) 2019 QIUN秋云 https://www.ucharts.cn All rights reserved.
+ * Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
+ * 
+ * uCharts官方网站
+ * https://www.uCharts.cn
+ * 
+ * 开源地址:
+ * https://gitee.com/uCharts/uCharts
+ * 
+ * uni-app插件市场地址:
+ * http://ext.dcloud.net.cn/plugin?id=271
+ * 
+ */
+
+'use strict';
+
+var config = {
+  yAxisWidth: 15,
+  yAxisSplit: 5,
+  xAxisHeight: 15,
+  xAxisLineHeight: 15,
+  legendHeight: 15,
+  yAxisTitleWidth: 15,
+  padding: [10, 10, 10, 10],
+  pixelRatio: 1,
+  rotate: false,
+  columePadding: 3,
+  fontSize: 13,
+  //dataPointShape: ['diamond', 'circle', 'triangle', 'rect'],
+  dataPointShape: ['circle', 'circle', 'circle', 'circle'],
+  colors: ['#1890ff', '#2fc25b', '#facc14', '#f04864', '#8543e0', '#90ed7d'],
+  pieChartLinePadding: 15,
+  pieChartTextPadding: 5,
+  xAxisTextPadding: 3,
+  titleColor: '#333333',
+  titleFontSize: 20,
+  subtitleColor: '#999999',
+  subtitleFontSize: 15,
+  toolTipPadding: 3,
+  toolTipBackground: '#000000',
+  toolTipOpacity: 0.7,
+  toolTipLineHeight: 20,
+  radarLabelTextMargin: 15,
+  gaugeLabelTextMargin: 15
+};
+
+let assign = function (target, ...varArgs) {
+    if (target == null) {
+        throw new TypeError('Cannot convert undefined or null to object');
+    }
+    if (!varArgs || varArgs.length <= 0) {
+        return target;
+    }
+    // 深度合并对象
+    function deepAssign(obj1, obj2) {
+        for (let key in obj2) {
+            obj1[key] = obj1[key] && obj1[key].toString() === "[object Object]" ?
+                deepAssign(obj1[key], obj2[key]) : obj1[key] = obj2[key];
+        }
+        return obj1;
+    }
+
+    varArgs.forEach(val => {
+        target = deepAssign(target, val);
+    });
+    return target;
+};
+
+var util = {
+  toFixed: function toFixed(num, limit) {
+    limit = limit || 2;
+    if (this.isFloat(num)) {
+      num = num.toFixed(limit);
+    }
+    return num;
+  },
+  isFloat: function isFloat(num) {
+    return num % 1 !== 0;
+  },
+  approximatelyEqual: function approximatelyEqual(num1, num2) {
+    return Math.abs(num1 - num2) < 1e-10;
+  },
+  isSameSign: function isSameSign(num1, num2) {
+    return Math.abs(num1) === num1 && Math.abs(num2) === num2 || Math.abs(num1) !== num1 && Math.abs(num2) !== num2;
+  },
+  isSameXCoordinateArea: function isSameXCoordinateArea(p1, p2) {
+    return this.isSameSign(p1.x, p2.x);
+  },
+  isCollision: function isCollision(obj1, obj2) {
+    obj1.end = {};
+    obj1.end.x = obj1.start.x + obj1.width;
+    obj1.end.y = obj1.start.y - obj1.height;
+    obj2.end = {};
+    obj2.end.x = obj2.start.x + obj2.width;
+    obj2.end.y = obj2.start.y - obj2.height;
+    var flag = obj2.start.x > obj1.end.x || obj2.end.x < obj1.start.x || obj2.end.y > obj1.start.y || obj2.start.y < obj1.end.y;
+    return !flag;
+  }
+};
+
+//兼容H5点击事件
+function getH5Offset(e) {
+  e.mp = {
+    changedTouches: []
+  };
+  e.mp.changedTouches.push({
+    x: e.offsetX,
+    y: e.offsetY
+  });
+  return e;
+}
+
+// hex 转 rgba
+function hexToRgb(hexValue, opc) {
+  var rgx = /^#?([a-f\d])([a-f\d])([a-f\d])$/i;
+  var hex = hexValue.replace(rgx, function(m, r, g, b) {
+    return r + r + g + g + b + b;
+  });
+  var rgb = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
+  var r = parseInt(rgb[1], 16);
+  var g = parseInt(rgb[2], 16);
+  var b = parseInt(rgb[3], 16);
+  return 'rgba(' + r + ',' + g + ',' + b + ',' + opc + ')';
+}
+
+function findRange(num, type, limit) {
+  if (isNaN(num)) {
+    throw new Error('[uCharts] unvalid series data!');
+  }
+  limit = limit || 10;
+  type = type ? type : 'upper';
+  var multiple = 1;
+  while (limit < 1) {
+    limit *= 10;
+    multiple *= 10;
+  }
+  if (type === 'upper') {
+    num = Math.ceil(num * multiple);
+  } else {
+    num = Math.floor(num * multiple);
+  }
+  while (num % limit !== 0) {
+    if (type === 'upper') {
+      num++;
+    } else {
+      num--;
+    }
+  }
+  return num / multiple;
+}
+
+function calCandleMA(dayArr, nameArr, colorArr, kdata) {
+  let seriesTemp = [];
+  for (let k = 0; k < dayArr.length; k++) {
+    let seriesItem = {
+      data: [],
+      name: nameArr[k],
+      color: colorArr[k]
+    };
+    for (let i = 0, len = kdata.length; i < len; i++) {
+      if (i < dayArr[k]) {
+        seriesItem.data.push(null);
+        continue;
+      }
+      let sum = 0;
+      for (let j = 0; j < dayArr[k]; j++) {
+        sum += kdata[i - j][1];
+      }
+      seriesItem.data.push(+(sum / dayArr[k]).toFixed(3));
+    }
+    seriesTemp.push(seriesItem);
+  }
+  return seriesTemp;
+}
+
+function calValidDistance(self,distance, chartData, config, opts) {
+  var dataChartAreaWidth = opts.width - opts.area[1] - opts.area[3];
+  var dataChartWidth = chartData.eachSpacing * (opts.chartData.xAxisData.xAxisPoints.length-1);
+  var validDistance = distance;
+  if (distance >= 0) {
+    validDistance = 0;
+		self.event.trigger('scrollLeft');
+  } else if (Math.abs(distance) >= dataChartWidth - dataChartAreaWidth) {
+    validDistance = dataChartAreaWidth - dataChartWidth;
+		self.event.trigger('scrollRight');
+  }
+  return validDistance;
+}
+
+function isInAngleRange(angle, startAngle, endAngle) {
+  function adjust(angle) {
+    while (angle < 0) {
+      angle += 2 * Math.PI;
+    }
+    while (angle > 2 * Math.PI) {
+      angle -= 2 * Math.PI;
+    }
+    return angle;
+  }
+  angle = adjust(angle);
+  startAngle = adjust(startAngle);
+  endAngle = adjust(endAngle);
+  if (startAngle > endAngle) {
+    endAngle += 2 * Math.PI;
+    if (angle < startAngle) {
+      angle += 2 * Math.PI;
+    }
+  }
+  return angle >= startAngle && angle <= endAngle;
+}
+
+function calRotateTranslate(x, y, h) {
+  var xv = x;
+  var yv = h - y;
+  var transX = xv + (h - yv - xv) / Math.sqrt(2);
+  transX *= -1;
+  var transY = (h - yv) * (Math.sqrt(2) - 1) - (h - yv - xv) / Math.sqrt(2);
+  return {
+    transX: transX,
+    transY: transY
+  };
+}
+
+function createCurveControlPoints(points, i) {
+
+  function isNotMiddlePoint(points, i) {
+    if (points[i - 1] && points[i + 1]) {
+      return points[i].y >= Math.max(points[i - 1].y, points[i + 1].y) || points[i].y <= Math.min(points[i - 1].y,points[i + 1].y);
+    } else {
+      return false;
+    }
+  }
+	function isNotMiddlePointX(points, i) {
+	  if (points[i - 1] && points[i + 1]) {
+	    return points[i].x >= Math.max(points[i - 1].x, points[i + 1].x) || points[i].x <= Math.min(points[i - 1].x,points[i + 1].x);
+	  } else {
+	    return false;
+	  }
+	}
+  var a = 0.2;
+  var b = 0.2;
+  var pAx = null;
+  var pAy = null;
+  var pBx = null;
+  var pBy = null;
+  if (i < 1) {
+    pAx = points[0].x + (points[1].x - points[0].x) * a;
+    pAy = points[0].y + (points[1].y - points[0].y) * a;
+  } else {
+    pAx = points[i].x + (points[i + 1].x - points[i - 1].x) * a;
+    pAy = points[i].y + (points[i + 1].y - points[i - 1].y) * a;
+  }
+
+  if (i > points.length - 3) {
+    var last = points.length - 1;
+    pBx = points[last].x - (points[last].x - points[last - 1].x) * b;
+    pBy = points[last].y - (points[last].y - points[last - 1].y) * b;
+  } else {
+    pBx = points[i + 1].x - (points[i + 2].x - points[i].x) * b;
+    pBy = points[i + 1].y - (points[i + 2].y - points[i].y) * b;
+  }
+  if (isNotMiddlePoint(points, i + 1)) {
+    pBy = points[i + 1].y;
+  }
+  if (isNotMiddlePoint(points, i)) {
+    pAy = points[i].y;
+  }
+	if (isNotMiddlePointX(points, i + 1)) {
+	  pBx = points[i + 1].x;
+	}
+	if (isNotMiddlePointX(points, i)) {
+	  pAx = points[i].x;
+	}
+	if (pAy >= Math.max(points[i].y, points[i + 1].y) || pAy <= Math.min(points[i].y, points[i + 1].y)) {
+	pAy = points[i].y;
+	}
+	if (pBy >= Math.max(points[i].y, points[i + 1].y) || pBy <= Math.min(points[i].y, points[i + 1].y)) {
+	pBy = points[i + 1].y;
+	}
+	if (pAx >= Math.max(points[i].x, points[i + 1].x) || pAx <= Math.min(points[i].x, points[i + 1].x)) {
+	pAx = points[i].x;
+	}
+	if (pBx >= Math.max(points[i].x, points[i + 1].x) || pBx <= Math.min(points[i].x, points[i + 1].x)) {
+	pBx = points[i + 1].x;
+	}
+  return {
+    ctrA: {
+      x: pAx,
+      y: pAy
+    },
+    ctrB: {
+      x: pBx,
+      y: pBy
+    }
+  };
+}
+
+function convertCoordinateOrigin(x, y, center) {
+  return {
+    x: center.x + x,
+    y: center.y - y
+  };
+}
+
+function avoidCollision(obj, target) {
+  if (target) {
+    // is collision test
+    while (util.isCollision(obj, target)) {
+      if (obj.start.x > 0) {
+        obj.start.y--;
+      } else if (obj.start.x < 0) {
+        obj.start.y++;
+      } else {
+        if (obj.start.y > 0) {
+          obj.start.y++;
+        } else {
+          obj.start.y--;
+        }
+      }
+    }
+  }
+  return obj;
+}
+
+function fillSeries(series, opts, config) {
+  var index = 0;
+  return series.map(function(item) {
+    if (!item.color) {
+      item.color = config.colors[index];
+      index = (index + 1) % config.colors.length;
+    }
+    if (!item.index) {
+      item.index = 0;
+    }
+    if (!item.type) {
+      item.type = opts.type;
+    }
+    if (typeof item.show == "undefined") {
+      item.show = true;
+    }
+    if (!item.type) {
+      item.type = opts.type;
+    }
+    if (!item.pointShape) {
+      item.pointShape = "circle";
+    }
+    if (!item.legendShape) {
+      switch (item.type) {
+        case 'line':
+          item.legendShape = "line";
+          break;
+        case 'column':
+          item.legendShape = "rect";
+          break;
+        case 'area':
+          item.legendShape = "triangle";
+          break;
+        default:
+          item.legendShape = "circle";
+      }
+    }
+    return item;
+  });
+}
+
+function getDataRange(minData, maxData) {
+  var limit = 0;
+  var range = maxData - minData;
+  if (range >= 10000) {
+    limit = 1000;
+  } else if (range >= 1000) {
+    limit = 100;
+  } else if (range >= 100) {
+    limit = 10;
+  } else if (range >= 10) {
+    limit = 5;
+  } else if (range >= 1) {
+    limit = 1;
+  } else if (range >= 0.1) {
+    limit = 0.1;
+  } else if (range >= 0.01) {
+    limit = 0.01;
+  } else if (range >= 0.001) {
+    limit = 0.001;
+  } else if (range >= 0.0001) {
+    limit = 0.0001;
+  } else if (range >= 0.00001) {
+    limit = 0.00001;
+  } else {
+    limit = 0.000001;
+  }
+  return {
+    minRange: findRange(minData, 'lower', limit),
+    maxRange: findRange(maxData, 'upper', limit)
+  };
+}
+
+function measureText(text) {
+  var fontSize = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : config.fontSize;
+  text = String(text);
+  var text = text.split('');
+  var width = 0;
+  for (let i = 0; i < text.length; i++) {
+    let item = text[i];
+    if (/[a-zA-Z]/.test(item)) {
+      width += 7;
+    } else if (/[0-9]/.test(item)) {
+      width += 5.5;
+    } else if (/\./.test(item)) {
+      width += 2.7;
+    } else if (/-/.test(item)) {
+      width += 3.25;
+    } else if (/[\u4e00-\u9fa5]/.test(item)) {
+      width += 10;
+    } else if (/\(|\)/.test(item)) {
+      width += 3.73;
+    } else if (/\s/.test(item)) {
+      width += 2.5;
+    } else if (/%/.test(item)) {
+      width += 8;
+    } else {
+      width += 10;
+    }
+  }
+  return width * fontSize / 10;
+}
+
+function dataCombine(series) {
+  return series.reduce(function(a, b) {
+    return (a.data ? a.data : a).concat(b.data);
+  }, []);
+}
+
+function dataCombineStack(series, len) {
+  var sum = new Array(len);
+  for (var j = 0; j < sum.length; j++) {
+    sum[j] = 0;
+  }
+  for (var i = 0; i < series.length; i++) {
+    for (var j = 0; j < sum.length; j++) {
+      sum[j] += series[i].data[j];
+    }
+  }
+  return series.reduce(function(a, b) {
+    return (a.data ? a.data : a).concat(b.data).concat(sum);
+  }, []);
+}
+
+function getTouches(touches, opts, e) {
+  let x, y;
+  if (touches.clientX) {
+    if (opts.rotate) {
+      y = opts.height - touches.clientX * opts.pixelRatio;
+      x = (touches.pageY - e.currentTarget.offsetTop - (opts.height / opts.pixelRatio / 2) * (opts.pixelRatio - 1)) *
+        opts.pixelRatio;
+    } else {
+      x = touches.clientX * opts.pixelRatio;
+      y = (touches.pageY - e.currentTarget.offsetTop - (opts.height / opts.pixelRatio / 2) * (opts.pixelRatio - 1)) *
+        opts.pixelRatio;
+    }
+  } else {
+    if (opts.rotate) {
+      y = opts.height - touches.x * opts.pixelRatio;
+      x = touches.y * opts.pixelRatio;
+    } else {
+      x = touches.x * opts.pixelRatio;
+      y = touches.y * opts.pixelRatio;
+    }
+  }
+  return {
+    x: x,
+    y: y
+  }
+}
+
+function getSeriesDataItem(series, index) {
+  var data = [];
+  for (let i = 0; i < series.length; i++) {
+    let item = series[i];
+    if (item.data[index] !== null && typeof item.data[index] !== 'undefined' && item.show) {
+      let seriesItem = {};
+      seriesItem.color = item.color;
+      seriesItem.type = item.type;
+      seriesItem.style = item.style;
+      seriesItem.pointShape = item.pointShape;
+      seriesItem.disableLegend = item.disableLegend;
+      seriesItem.name = item.name;
+      seriesItem.show = item.show;
+      seriesItem.data = item.format ? item.format(item.data[index]) : item.data[index];
+      data.push(seriesItem);
+    }
+  }
+  return data;
+}
+
+function getMaxTextListLength(list) {
+  var lengthList = list.map(function(item) {
+    return measureText(item);
+  });
+  return Math.max.apply(null, lengthList);
+}
+
+function getRadarCoordinateSeries(length) {
+  var eachAngle = 2 * Math.PI / length;
+  var CoordinateSeries = [];
+  for (var i = 0; i < length; i++) {
+    CoordinateSeries.push(eachAngle * i);
+  }
+
+  return CoordinateSeries.map(function(item) {
+    return -1 * item + Math.PI / 2;
+  });
+}
+
+function getToolTipData(seriesData, calPoints, index, categories) {
+  var option = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
+
+  var textList = seriesData.map(function(item) {
+		let titleText=[];
+		if(categories){
+			titleText=categories;
+		}else{
+			titleText=item.data;
+		}
+    return {
+      text: option.format ? option.format(item, titleText[index]) : item.name + ': ' + item.data,
+      color: item.color
+    };
+  });
+  var validCalPoints = [];
+  var offset = {
+    x: 0,
+    y: 0
+  };
+  for (let i = 0; i < calPoints.length; i++) {
+    let points = calPoints[i];
+    if (typeof points[index] !== 'undefined' && points[index] !== null) {
+      validCalPoints.push(points[index]);
+    }
+  }
+  for (let i = 0; i < validCalPoints.length; i++) {
+    let item = validCalPoints[i];
+    offset.x = Math.round(item.x);
+    offset.y += item.y;
+  }
+  offset.y /= validCalPoints.length;
+  return {
+    textList: textList,
+    offset: offset
+  };
+}
+
+function getMixToolTipData(seriesData, calPoints, index, categories) {
+  var option = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
+  var textList = seriesData.map(function(item) {
+    return {
+      text: option.format ? option.format(item, categories[index]) : item.name + ': ' + item.data,
+      color: item.color,
+      disableLegend: item.disableLegend ? true : false
+    };
+  });
+  textList = textList.filter(function(item) {
+    if (item.disableLegend !== true) {
+      return item;
+    }
+  });
+  var validCalPoints = [];
+  var offset = {
+    x: 0,
+    y: 0
+  };
+  for (let i = 0; i < calPoints.length; i++) {
+    let points = calPoints[i];
+    if (typeof points[index] !== 'undefined' && points[index] !== null) {
+      validCalPoints.push(points[index]);
+    }
+  }
+  for (let i = 0; i < validCalPoints.length; i++) {
+    let item = validCalPoints[i];
+    offset.x = Math.round(item.x);
+    offset.y += item.y;
+  }
+  offset.y /= validCalPoints.length;
+  return {
+    textList: textList,
+    offset: offset
+  };
+}
+
+function getCandleToolTipData(series, seriesData, calPoints, index, categories, extra) {
+  var option = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : {};
+  let upColor = extra.color.upFill;
+  let downColor = extra.color.downFill;
+  //颜色顺序为开盘,收盘,最低,最高
+  let color = [upColor, upColor, downColor, upColor];
+  var textList = [];
+  let text0 = {
+    text: categories[index],
+    color: null
+  };
+  textList.push(text0);
+  seriesData.map(function(item) {
+    if (index == 0) {
+      if(item.data[1] - item.data[0] < 0){
+      	color[1] = downColor;
+      }else{
+      	color[1] = upColor;
+      }
+    } else {
+      if (item.data[0] < series[index - 1][1]) {
+        color[0] = downColor;
+      }
+      if (item.data[1] < item.data[0]) {
+        color[1] = downColor;
+      }
+      if (item.data[2] > series[index - 1][1]) {
+        color[2] = upColor;
+      }
+      if (item.data[3] < series[index - 1][1]) {
+        color[3] = downColor;
+      }
+    }
+    let text1 = {
+      text: '开盘:' + item.data[0],
+      color: color[0]
+    };
+    let text2 = {
+      text: '收盘:' + item.data[1],
+      color: color[1]
+    };
+    let text3 = {
+      text: '最低:' + item.data[2],
+      color: color[2]
+    };
+    let text4 = {
+      text: '最高:' + item.data[3],
+      color: color[3]
+    };
+    textList.push(text1, text2, text3, text4);
+  });
+  var validCalPoints = [];
+  var offset = {
+    x: 0,
+    y: 0
+  };
+  for (let i = 0; i < calPoints.length; i++) {
+    let points = calPoints[i];
+    if (typeof points[index] !== 'undefined' && points[index] !== null) {
+      validCalPoints.push(points[index]);
+    }
+  }
+  offset.x = Math.round(validCalPoints[0][0].x);
+  return {
+    textList: textList,
+    offset: offset
+  };
+}
+
+function filterSeries(series) {
+  let tempSeries = [];
+  for (let i = 0; i < series.length; i++) {
+    if (series[i].show == true) {
+      tempSeries.push(series[i])
+    }
+  }
+  return tempSeries;
+}
+
+function findCurrentIndex(currentPoints, calPoints, opts, config) {
+  var offset = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 0;
+  var currentIndex = -1;
+  var spacing = opts.chartData.eachSpacing/2;
+	let xAxisPoints=[];
+	if(calPoints.length>0){
+		if(opts.type=='candle'){
+			for(let i=0;i<calPoints[0].length;i++){
+				xAxisPoints.push(calPoints[0][i][0].x)
+			}
+		}else{
+			for(let i=0;i<calPoints[0].length;i++){
+				xAxisPoints.push(calPoints[0][i].x)
+			}
+		}
+		if((opts.type=='line' || opts.type=='area') && opts.xAxis.boundaryGap=='justify'){
+		  spacing = opts.chartData.eachSpacing/2;
+		}
+		if(!opts.categories){
+			spacing=0
+		}
+		if (isInExactChartArea(currentPoints, opts, config)) {
+		  xAxisPoints.forEach(function(item, index) {
+		    if (currentPoints.x + offset + spacing > item) {
+		      currentIndex = index;
+		    }
+		  });
+		}
+	}
+  return currentIndex;
+}
+
+function findLegendIndex(currentPoints, legendData, opts) {
+  let currentIndex = -1;
+  if (isInExactLegendArea(currentPoints, legendData.area)) {
+    let points = legendData.points;
+    let index = -1;
+    for (let i = 0, len = points.length; i < len; i++) {
+      let item = points[i];
+      for (let j = 0; j < item.length; j++) {
+        index += 1;
+        let area = item[j]['area'];
+        if (currentPoints.x > area[0] && currentPoints.x < area[2] && currentPoints.y > area[1] && currentPoints.y < area[3]) {
+          currentIndex = index;
+          break;
+        }
+      }
+    }
+    return currentIndex;
+  }
+  return currentIndex;
+}
+
+function isInExactLegendArea(currentPoints, area) {
+  return currentPoints.x > area.start.x && currentPoints.x < area.end.x && currentPoints.y > area.start.y &&
+    currentPoints.y < area.end.y;
+}
+
+function isInExactChartArea(currentPoints, opts, config) {
+  return currentPoints.x <= opts.width - opts.area[1] + 10 && currentPoints.x >= opts.area[3] -10 && currentPoints.y >= opts.area[0] && currentPoints.y <= opts.height - opts.area[2];
+}
+
+function findRadarChartCurrentIndex(currentPoints, radarData, count) {
+  var eachAngleArea = 2 * Math.PI / count;
+  var currentIndex = -1;
+  if (isInExactPieChartArea(currentPoints, radarData.center, radarData.radius)) {
+    var fixAngle = function fixAngle(angle) {
+      if (angle < 0) {
+        angle += 2 * Math.PI;
+      }
+      if (angle > 2 * Math.PI) {
+        angle -= 2 * Math.PI;
+      }
+      return angle;
+    };
+
+    var angle = Math.atan2(radarData.center.y - currentPoints.y, currentPoints.x - radarData.center.x);
+    angle = -1 * angle;
+    if (angle < 0) {
+      angle += 2 * Math.PI;
+    }
+
+    var angleList = radarData.angleList.map(function(item) {
+      item = fixAngle(-1 * item);
+
+      return item;
+    });
+
+    angleList.forEach(function(item, index) {
+      var rangeStart = fixAngle(item - eachAngleArea / 2);
+      var rangeEnd = fixAngle(item + eachAngleArea / 2);
+      if (rangeEnd < rangeStart) {
+        rangeEnd += 2 * Math.PI;
+      }
+      if (angle >= rangeStart && angle <= rangeEnd || angle + 2 * Math.PI >= rangeStart && angle + 2 * Math.PI <=
+        rangeEnd) {
+        currentIndex = index;
+      }
+    });
+  }
+
+  return currentIndex;
+}
+
+function findFunnelChartCurrentIndex(currentPoints, funnelData) {
+  var currentIndex = -1;
+  for (var i = 0, len = funnelData.series.length; i < len; i++) {
+    var item = funnelData.series[i];
+    if (currentPoints.x > item.funnelArea[0] && currentPoints.x < item.funnelArea[2] && currentPoints.y > item.funnelArea[1] && currentPoints.y < item.funnelArea[3]) {
+      currentIndex = i;
+      break;
+    }
+  }
+  return currentIndex;
+}
+
+function findWordChartCurrentIndex(currentPoints, wordData) {
+  var currentIndex = -1;
+  for (var i = 0, len = wordData.length; i < len; i++) {
+    var item = wordData[i];
+    if (currentPoints.x > item.area[0] && currentPoints.x < item.area[2] && currentPoints.y > item.area[1] && currentPoints.y < item.area[3]) {
+      currentIndex = i;
+      break;
+    }
+  }
+  return currentIndex;
+}
+
+function findMapChartCurrentIndex(currentPoints, opts) {
+  var currentIndex = -1;
+  var cData=opts.chartData.mapData;
+  var data=opts.series;
+  var tmp=pointToCoordinate(currentPoints.y, currentPoints.x,cData.bounds,cData.scale,cData.xoffset,cData.yoffset);
+  var poi=[tmp.x, tmp.y];
+  for (var i = 0, len = data.length; i < len; i++) {
+    var item = data[i].geometry.coordinates;
+    if(isPoiWithinPoly(poi,item)){
+      currentIndex = i;
+      break;
+    }
+  }
+  return currentIndex;
+}
+
+function findPieChartCurrentIndex(currentPoints, pieData) {
+  var currentIndex = -1;
+  if (isInExactPieChartArea(currentPoints, pieData.center, pieData.radius)) {
+    var angle = Math.atan2(pieData.center.y - currentPoints.y, currentPoints.x - pieData.center.x);
+    angle = -angle;
+    for (var i = 0, len = pieData.series.length; i < len; i++) {
+      var item = pieData.series[i];
+      if (isInAngleRange(angle, item._start_, item._start_ + item._proportion_ * 2 * Math.PI)) {
+        currentIndex = i;
+        break;
+      }
+    }
+  }
+
+  return currentIndex;
+}
+
+function isInExactPieChartArea(currentPoints, center, radius) {
+  return Math.pow(currentPoints.x - center.x, 2) + Math.pow(currentPoints.y - center.y, 2) <= Math.pow(radius, 2);
+}
+
+function splitPoints(points) {
+  var newPoints = [];
+  var items = [];
+  points.forEach(function(item, index) {
+    if (item !== null) {
+      items.push(item);
+    } else {
+      if (items.length) {
+        newPoints.push(items);
+      }
+      items = [];
+    }
+  });
+  if (items.length) {
+    newPoints.push(items);
+  }
+
+  return newPoints;
+}
+
+function calLegendData(series, opts, config, chartData) {
+  let legendData = {
+    area: {
+      start: {
+        x: 0,
+        y: 0
+      },
+      end: {
+        x: 0,
+        y: 0
+      },
+      width: 0,
+      height: 0,
+      wholeWidth: 0,
+      wholeHeight: 0
+    },
+    points: [],
+    widthArr: [],
+    heightArr: []
+  };
+  if (opts.legend.show === false) {
+    chartData.legendData = legendData;
+    return legendData;
+  }
+
+  let padding = opts.legend.padding;
+  let margin = opts.legend.margin;
+  let fontSize = opts.legend.fontSize;
+  let shapeWidth = 15 * opts.pixelRatio;
+  let shapeRight = 5 * opts.pixelRatio;
+  let lineHeight = Math.max(opts.legend.lineHeight * opts.pixelRatio, fontSize);
+  if (opts.legend.position == 'top' || opts.legend.position == 'bottom') {
+    let legendList = [];
+    let widthCount = 0;
+    let widthCountArr = [];
+    let currentRow = [];
+    for (let i = 0; i < series.length; i++) {
+      let item = series[i];
+      let itemWidth = shapeWidth + shapeRight + measureText(item.name || 'undefined', fontSize) + opts.legend.itemGap;
+      if (widthCount + itemWidth > opts.width - opts.padding[1] - opts.padding[3]) {
+        legendList.push(currentRow);
+        widthCountArr.push(widthCount - opts.legend.itemGap);
+        widthCount = itemWidth;
+        currentRow = [item];
+      } else {
+        widthCount += itemWidth;
+        currentRow.push(item);
+      }
+    }
+    if (currentRow.length) {
+      legendList.push(currentRow);
+      widthCountArr.push(widthCount - opts.legend.itemGap);
+      legendData.widthArr = widthCountArr;
+      let legendWidth = Math.max.apply(null, widthCountArr);
+      switch (opts.legend.float) {
+        case 'left':
+          legendData.area.start.x = opts.padding[3];
+          legendData.area.end.x = opts.padding[3] + 2 * padding;
+          break;
+        case 'right':
+          legendData.area.start.x = opts.width - opts.padding[1] - legendWidth - 2 * padding;
+          legendData.area.end.x = opts.width - opts.padding[1];
+          break;
+        default:
+          legendData.area.start.x = (opts.width - legendWidth) / 2 - padding;
+          legendData.area.end.x = (opts.width + legendWidth) / 2 + padding;
+      }
+      legendData.area.width = legendWidth + 2 * padding;
+      legendData.area.wholeWidth = legendWidth + 2 * padding;
+      legendData.area.height = legendList.length * lineHeight + 2 * padding;
+      legendData.area.wholeHeight = legendList.length * lineHeight + 2 * padding + 2 * margin;
+      legendData.points = legendList;
+    }
+  } else {
+    let len = series.length;
+    let maxHeight = opts.height - opts.padding[0] - opts.padding[2] - 2 * margin - 2 * padding;
+    let maxLength = Math.min(Math.floor(maxHeight / lineHeight), len);
+    legendData.area.height = maxLength * lineHeight + padding * 2;
+    legendData.area.wholeHeight = maxLength * lineHeight + padding * 2;
+    switch (opts.legend.float) {
+      case 'top':
+        legendData.area.start.y = opts.padding[0] + margin;
+        legendData.area.end.y = opts.padding[0] + margin + legendData.area.height;
+        break;
+      case 'bottom':
+        legendData.area.start.y = opts.height - opts.padding[2] - margin - legendData.area.height;
+        legendData.area.end.y = opts.height - opts.padding[2] - margin;
+        break;
+      default:
+        legendData.area.start.y = (opts.height - legendData.area.height) / 2;
+        legendData.area.end.y = (opts.height + legendData.area.height) / 2;
+    }
+    let lineNum = len % maxLength === 0 ? len / maxLength : Math.floor((len / maxLength) + 1);
+    let currentRow = [];
+    for (let i = 0; i < lineNum; i++) {
+      let temp = series.slice(i * maxLength, i * maxLength + maxLength);
+      currentRow.push(temp);
+    }
+
+    legendData.points = currentRow;
+
+    if (currentRow.length) {
+      for (let i = 0; i < currentRow.length; i++) {
+        let item = currentRow[i];
+        let maxWidth = 0;
+        for (let j = 0; j < item.length; j++) {
+          let itemWidth = shapeWidth + shapeRight + measureText(item[j].name || 'undefined', fontSize) + opts.legend.itemGap;
+          if (itemWidth > maxWidth) {
+            maxWidth = itemWidth;
+          }
+        }
+        legendData.widthArr.push(maxWidth);
+        legendData.heightArr.push(item.length * lineHeight + padding * 2);
+      }
+      let legendWidth = 0
+      for (let i = 0; i < legendData.widthArr.length; i++) {
+        legendWidth += legendData.widthArr[i];
+      }
+      legendData.area.width = legendWidth - opts.legend.itemGap + 2 * padding;
+      legendData.area.wholeWidth = legendData.area.width + padding;
+    }
+  }
+
+  switch (opts.legend.position) {
+    case 'top':
+      legendData.area.start.y = opts.padding[0] + margin;
+      legendData.area.end.y = opts.padding[0] + margin + legendData.area.height;
+      break;
+    case 'bottom':
+      legendData.area.start.y = opts.height - opts.padding[2] - legendData.area.height - margin;
+      legendData.area.end.y = opts.height - opts.padding[2] - margin;
+      break;
+    case 'left':
+      legendData.area.start.x = opts.padding[3];
+      legendData.area.end.x = opts.padding[3] + legendData.area.width;
+      break;
+    case 'right':
+      legendData.area.start.x = opts.width - opts.padding[1] - legendData.area.width;
+      legendData.area.end.x = opts.width - opts.padding[1];
+      break;
+  }
+  chartData.legendData = legendData;
+  return legendData;
+}
+
+function calCategoriesData(categories, opts, config, eachSpacing) {
+  var result = {
+    angle: 0,
+    xAxisHeight: config.xAxisHeight
+  };
+  var categoriesTextLenth = categories.map(function(item) {
+    return measureText(item,opts.xAxis.fontSize||config.fontSize);
+  });
+  var maxTextLength = Math.max.apply(this, categoriesTextLenth);
+
+  if (opts.xAxis.rotateLabel == true && maxTextLength + 2 * config.xAxisTextPadding > eachSpacing) {
+    result.angle = 45 * Math.PI / 180;
+    result.xAxisHeight = 2 * config.xAxisTextPadding + maxTextLength * Math.sin(result.angle);
+  }
+  return result;
+}
+
+function getXAxisTextList(series, opts, config) {
+  var index = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : -1;
+  var data = dataCombine(series);
+  var sorted = [];
+  // remove null from data
+  data = data.filter(function(item) {
+    //return item !== null;
+    if (typeof item === 'object' && item !== null) {
+      if (item.constructor.toString().indexOf('Array')>-1) {
+        return item !== null;
+      } else {
+        return item.value !== null;
+      }
+    } else {
+      return item !== null;
+    }
+  });
+  data.map(function(item) {
+    if (typeof item === 'object') {
+      if (item.constructor.toString().indexOf('Array')>-1) {
+				if(opts.type=='candle'){
+					item.map(function(subitem) {
+					  sorted.push(subitem);
+					})
+				}else{
+					sorted.push(item[0]);
+				}
+      } else {
+        sorted.push(item.value);
+      }
+    } else {
+      sorted.push(item);
+    }
+  })
+	
+  var minData = 0;
+  var maxData = 0;
+  if (sorted.length > 0) {
+    minData = Math.min.apply(this, sorted);
+    maxData = Math.max.apply(this, sorted);
+  }
+  //为了兼容v1.9.0之前的项目
+  if(index>-1){
+    if (typeof opts.xAxis.data[index].min === 'number') {
+      minData = Math.min(opts.xAxis.data[index].min, minData);
+    }
+    if (typeof opts.xAxis.data[index].max === 'number') {
+      maxData = Math.max(opts.xAxis.data[index].max, maxData);
+    }
+  }else{
+    if (typeof opts.xAxis.min === 'number') {
+      minData = Math.min(opts.xAxis.min, minData);
+    }
+    if (typeof opts.xAxis.max === 'number') {
+      maxData = Math.max(opts.xAxis.max, maxData);
+    }
+  }
+  
+
+  if (minData === maxData) {
+    var rangeSpan = maxData || 10;
+    maxData += rangeSpan;
+  }
+
+  //var dataRange = getDataRange(minData, maxData);
+  var minRange = minData;
+  var maxRange = maxData;
+
+  var range = [];
+  var eachRange = (maxRange - minRange) / opts.xAxis.splitNumber;
+
+  for (var i = 0; i <= opts.xAxis.splitNumber; i++) {
+    range.push(minRange + eachRange * i);
+  }
+  return range;
+}
+
+function calXAxisData(series, opts, config){
+    var result = {
+        angle: 0,
+        xAxisHeight: config.xAxisHeight
+    };
+
+    result.ranges = getXAxisTextList(series, opts, config);
+    result.rangesFormat = result.ranges.map(function(item){
+        item = opts.xAxis.format? opts.xAxis.format(item):util.toFixed(item, 2);
+        return item;
+    });
+		
+    var xAxisScaleValues = result.ranges.map(function (item) {
+        // 如果刻度值是浮点数,则保留两位小数
+        item = util.toFixed(item, 2);
+        // 若有自定义格式则调用自定义的格式化函数
+        item = opts.xAxis.format ? opts.xAxis.format(Number(item)) : item;
+        return item;
+    });
+
+    result = Object.assign(result,getXAxisPoints(xAxisScaleValues, opts, config));
+    // 计算X轴刻度的属性譬如每个刻度的间隔,刻度的起始点\结束点以及总长
+    var eachSpacing = result.eachSpacing;
+
+    var textLength = xAxisScaleValues.map(function (item) {
+        return measureText(item);
+    });
+    
+    // get max length of categories text
+    var maxTextLength = Math.max.apply(this, textLength);
+
+    // 如果刻度值文本内容过长,则将其逆时针旋转45°
+    if (maxTextLength + 2 * config.xAxisTextPadding > eachSpacing) {
+        result.angle = 45 * Math.PI / 180;
+        result.xAxisHeight = 2 * config.xAxisTextPadding + maxTextLength * Math.sin(result.angle);
+    }
+
+    if (opts.xAxis.disabled === true) {
+        result.xAxisHeight = 0;
+    }
+
+    return result;
+}
+
+function getRadarDataPoints(angleList, center, radius, series, opts) {
+  var process = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 1;
+
+  var radarOption = opts.extra.radar || {};
+  radarOption.max = radarOption.max || 0;
+  var maxData = Math.max(radarOption.max, Math.max.apply(null, dataCombine(series)));
+
+  var data = [];
+  for (let i = 0; i < series.length; i++) {
+    let each = series[i];
+    let listItem = {};
+    listItem.color = each.color;
+		listItem.legendShape = each.legendShape;
+		listItem.pointShape = each.pointShape;
+    listItem.data = [];
+    each.data.forEach(function(item, index) {
+      let tmp = {};
+      tmp.angle = angleList[index];
+
+      tmp.proportion = item / maxData;
+      tmp.position = convertCoordinateOrigin(radius * tmp.proportion * process * Math.cos(tmp.angle), radius * tmp.proportion *
+        process * Math.sin(tmp.angle), center);
+      listItem.data.push(tmp);
+    });
+
+    data.push(listItem);
+  }
+
+  return data;
+}
+
+function getPieDataPoints(series, radius) {
+  var process = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
+
+  var count = 0;
+  var _start_ = 0;
+  for (let i = 0; i < series.length; i++) {
+    let item = series[i];
+    item.data = item.data === null ? 0 : item.data;
+    count += item.data;
+  }
+  for (let i = 0; i < series.length; i++) {
+    let item = series[i];
+    item.data = item.data === null ? 0 : item.data;
+    if (count === 0) {
+      item._proportion_ = 1 / series.length * process;
+    } else {
+      item._proportion_ = item.data / count * process;
+    }
+    item._radius_ = radius;
+  }
+  for (let i = 0; i < series.length; i++) {
+    let item = series[i];
+    item._start_ = _start_;
+    _start_ += 2 * item._proportion_ * Math.PI;
+  }
+
+  return series;
+}
+
+function getFunnelDataPoints(series, radius) {
+  var process = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
+  series = series.sort(function(a,b){return parseInt(b.data)-parseInt(a.data);});
+  for (let i = 0; i < series.length; i++) {
+    series[i].radius = series[i].data/series[0].data*radius*process;
+    series[i]._proportion_ = series[i].data/series[0].data;
+  }
+  return series.reverse();
+}
+
+function getRoseDataPoints(series, type, minRadius, radius) {
+  var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
+  var count = 0;
+  var _start_ = 0;
+
+  var dataArr = [];
+  for (let i = 0; i < series.length; i++) {
+    let item = series[i];
+    item.data = item.data === null ? 0 : item.data;
+    count += item.data;
+    dataArr.push(item.data);
+  }
+  
+  var minData = Math.min.apply(null, dataArr);
+  var maxData = Math.max.apply(null, dataArr);
+  var radiusLength = radius - minRadius;
+  
+  for (let i = 0; i < series.length; i++) {
+    let item = series[i];
+    item.data = item.data === null ? 0 : item.data;
+    if (count === 0 || type == 'area') {
+      item._proportion_ = item.data / count * process;
+      item._rose_proportion_ = 1 / series.length * process;
+    } else {
+      item._proportion_ = item.data / count * process;
+      item._rose_proportion_ = item.data / count * process;
+    }
+    item._radius_ = minRadius + radiusLength * ((item.data - minData) / (maxData - minData));
+  }
+  for (let i = 0; i < series.length; i++) {
+    let item = series[i];
+    item._start_ = _start_;
+    _start_ += 2 * item._rose_proportion_ * Math.PI;
+  }
+
+  return series;
+}
+
+function getArcbarDataPoints(series, arcbarOption) {
+  var process = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1;
+  if (process == 1) {
+    process = 0.999999;
+  }
+  for (let i = 0; i < series.length; i++) {
+    let item = series[i];
+    item.data = item.data === null ? 0 : item.data;
+    let totalAngle;
+    if (arcbarOption.type == 'circle') {
+      totalAngle = 2;
+    } else {
+			if (arcbarOption.endAngle < arcbarOption.startAngle) {
+			  totalAngle = 2 + arcbarOption.endAngle - arcbarOption.startAngle;
+			} else{
+			  totalAngle = arcbarOption.startAngle - arcbarOption.endAngle;
+			}
+    }
+    item._proportion_ = totalAngle * item.data * process + arcbarOption.startAngle;
+    if (item._proportion_ >= 2) {
+      item._proportion_ = item._proportion_ % 2;
+    }
+  }
+  return series;
+}
+
+function getGaugeAxisPoints(categories, startAngle, endAngle) {
+  let totalAngle = startAngle - endAngle + 1;
+  let tempStartAngle = startAngle;
+  for (let i = 0; i < categories.length; i++) {
+    categories[i].value = categories[i].value === null ? 0 : categories[i].value;
+    categories[i]._startAngle_ = tempStartAngle;
+    categories[i]._endAngle_ = totalAngle * categories[i].value + startAngle;
+    if (categories[i]._endAngle_ >= 2) {
+      categories[i]._endAngle_ = categories[i]._endAngle_ % 2;
+    }
+    tempStartAngle = categories[i]._endAngle_;
+  }
+  return categories;
+}
+
+function getGaugeDataPoints(series, categories, gaugeOption) {
+  let process = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 1;
+  for (let i = 0; i < series.length; i++) {
+    let item = series[i];
+    item.data = item.data === null ? 0 : item.data;
+    if (gaugeOption.pointer.color == 'auto') {
+      for (let i = 0; i < categories.length; i++) {
+        if (item.data <= categories[i].value) {
+          item.color = categories[i].color;
+          break;
+        }
+      }
+    } else {
+      item.color = gaugeOption.pointer.color;
+    }
+    let totalAngle = gaugeOption.startAngle - gaugeOption.endAngle + 1;
+    item._endAngle_ = totalAngle * item.data + gaugeOption.startAngle;
+    item._oldAngle_ = gaugeOption.oldAngle;
+    if (gaugeOption.oldAngle < gaugeOption.endAngle) {
+      item._oldAngle_ += 2;
+    }
+    if (item.data >= gaugeOption.oldData) {
+      item._proportion_ = (item._endAngle_ - item._oldAngle_) * process + gaugeOption.oldAngle;
+    } else {
+      item._proportion_ = item._oldAngle_ - (item._oldAngle_ - item._endAngle_) * process;
+    }
+    if (item._proportion_ >= 2) {
+      item._proportion_ = item._proportion_ % 2;
+    }
+  }
+  return series;
+}
+
+function getPieTextMaxLength(series) {
+  series = getPieDataPoints(series);
+  let maxLength = 0;
+  for (let i = 0; i < series.length; i++) {
+    let item = series[i];
+    let text = item.format ? item.format(+item._proportion_.toFixed(2)) : util.toFixed(item._proportion_ * 100) + '%';
+    maxLength = Math.max(maxLength, measureText(text));
+  }
+
+  return maxLength;
+}
+
+function fixColumeData(points, eachSpacing, columnLen, index, config, opts) {
+  return points.map(function(item) {
+    if (item === null) {
+      return null;
+    }
+    item.width = Math.ceil((eachSpacing - 2 * config.columePadding) / columnLen);
+
+    if (opts.extra.column && opts.extra.column.width && +opts.extra.column.width > 0) {
+      item.width = Math.min(item.width, +opts.extra.column.width);
+    }
+    if (item.width <= 0) {
+      item.width = 1;
+    }
+    item.x += (index + 0.5 - columnLen / 2) * item.width;
+    return item;
+  });
+}
+
+function fixColumeMeterData(points, eachSpacing, columnLen, index, config, opts, border) {
+  return points.map(function(item) {
+    if (item === null) {
+      return null;
+    }
+    item.width = Math.ceil((eachSpacing - 2 * config.columePadding) / 2);
+
+    if (opts.extra.column && opts.extra.column.width && +opts.extra.column.width > 0) {
+      item.width = Math.min(item.width, +opts.extra.column.width);
+    }
+
+    if (index > 0) {
+      item.width -= 2 * border;
+    }
+    return item;
+  });
+}
+
+function fixColumeStackData(points, eachSpacing, columnLen, index, config, opts, series) {
+
+  return points.map(function(item, indexn) {
+
+    if (item === null) {
+      return null;
+    }
+    item.width = Math.ceil((eachSpacing - 2 * config.columePadding) / 2);
+
+    if (opts.extra.column && opts.extra.column.width && +opts.extra.column.width > 0) {
+      item.width = Math.min(item.width, +opts.extra.column.width);
+    }
+    return item;
+  });
+}
+
+function getXAxisPoints(categories, opts, config) {
+  var spacingValid = opts.width - opts.area[1] - opts.area[3];
+  var dataCount = opts.enableScroll ? Math.min(opts.xAxis.itemCount, categories.length) : categories.length;
+  if((opts.type=='line' || opts.type=='area') && dataCount>1 && opts.xAxis.boundaryGap=='justify'){
+    dataCount -=1;
+  }
+  var eachSpacing = spacingValid / dataCount;
+
+  var xAxisPoints = [];
+  var startX = opts.area[3];
+  var endX = opts.width - opts.area[1];
+  categories.forEach(function(item, index) {
+    xAxisPoints.push(startX + index * eachSpacing);
+  });
+  if(opts.xAxis.boundaryGap !=='justify'){
+    if (opts.enableScroll === true) {
+      xAxisPoints.push(startX + categories.length * eachSpacing);
+    } else {
+      xAxisPoints.push(endX);
+    }
+  }
+  return {
+    xAxisPoints: xAxisPoints,
+    startX: startX,
+    endX: endX,
+    eachSpacing: eachSpacing
+  };
+}
+
+function getCandleDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config) {
+  var process = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 1;
+  var points = [];
+  var validHeight = opts.height - opts.area[0] - opts.area[2];
+  data.forEach(function(item, index) {
+    if (item === null) {
+      points.push(null);
+    } else {
+      var cPoints = [];
+      item.forEach(function(items, indexs) {
+        var point = {};
+        point.x = xAxisPoints[index] + Math.round(eachSpacing / 2);
+        var value = items.value || items;
+        var height = validHeight * (value - minRange) / (maxRange - minRange);
+        height *= process;
+        point.y = opts.height - Math.round(height) - opts.area[2];
+        cPoints.push(point);
+      });
+      points.push(cPoints);
+    }
+  });
+
+  return points;
+}
+
+function getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config) {
+  var process = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 1;
+  var boundaryGap='center';
+  if (opts.type == 'line'||opts.type == 'area'){
+    boundaryGap=opts.xAxis.boundaryGap;
+  }
+  var points = [];
+  var validHeight = opts.height - opts.area[0] - opts.area[2];
+	var validWidth = opts.width - opts.area[1] - opts.area[3];
+  data.forEach(function(item, index) {
+    if (item === null) {
+      points.push(null);
+    } else {
+      var point = {};
+      point.color = item.color;
+      point.x = xAxisPoints[index];
+      var value = item;
+      if (typeof item === 'object' && item !== null) {
+				if (item.constructor.toString().indexOf('Array')>-1) {
+					let xranges,xminRange,xmaxRange;
+					xranges = [].concat(opts.chartData.xAxisData.ranges);
+					xminRange = xranges.shift();
+					xmaxRange = xranges.pop();
+				  value = item[1];
+					point.x = opts.area[3]+ validWidth * (item[0] - xminRange) / (xmaxRange - xminRange);
+				} else {
+				  value = item.value;
+				}
+      }
+			if(boundaryGap=='center'){
+			  point.x += Math.round(eachSpacing / 2);
+			}
+      var height = validHeight * (value - minRange) / (maxRange - minRange);
+      height *= process;
+      point.y = opts.height - Math.round(height) - opts.area[2];
+      points.push(point);
+    }
+  });
+
+  return points;
+}
+
+function getStackDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, seriesIndex, stackSeries) {
+  var process = arguments.length > 9 && arguments[9] !== undefined ? arguments[9] : 1;
+  var points = [];
+  var validHeight = opts.height - opts.area[0] - opts.area[2];
+
+  data.forEach(function(item, index) {
+    if (item === null) {
+      points.push(null);
+    } else {
+      var point = {};
+      point.color = item.color;
+      point.x = xAxisPoints[index] + Math.round(eachSpacing / 2);
+
+      if (seriesIndex > 0) {
+        var value = 0;
+        for (let i = 0; i <= seriesIndex; i++) {
+          value += stackSeries[i].data[index];
+        }
+        var value0 = value - item;
+        var height = validHeight * (value - minRange) / (maxRange - minRange);
+        var height0 = validHeight * (value0 - minRange) / (maxRange - minRange);
+      } else {
+        var value = item;
+        var height = validHeight * (value - minRange) / (maxRange - minRange);
+        var height0 = 0;
+      }
+      var heightc = height0;
+      height *= process;
+      heightc *= process;
+      point.y = opts.height - Math.round(height) - opts.area[2];
+      point.y0 = opts.height - Math.round(heightc) - opts.area[2];
+      points.push(point);
+    }
+  });
+
+  return points;
+}
+
+function getYAxisTextList(series, opts, config, stack) {
+  var index = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : -1;
+  var data;
+  if (stack == 'stack') {
+    data = dataCombineStack(series, opts.categories.length);
+  } else {
+    data = dataCombine(series);
+  }
+  var sorted = [];
+  // remove null from data
+  data = data.filter(function(item) {
+    //return item !== null;
+    if (typeof item === 'object' && item !== null) {
+      if (item.constructor.toString().indexOf('Array')>-1) {
+        return item !== null;
+      } else {
+        return item.value !== null;
+      }
+    } else {
+      return item !== null;
+    }
+  });
+  data.map(function(item) {
+    if (typeof item === 'object') {
+      if (item.constructor.toString().indexOf('Array')>-1) {
+				if(opts.type=='candle'){
+					item.map(function(subitem) {
+					  sorted.push(subitem);
+					})
+				}else{
+					sorted.push(item[1]);
+				}
+      } else {
+        sorted.push(item.value);
+      }
+    } else {
+      sorted.push(item);
+    }
+  })
+	
+  var minData = 0;
+  var maxData = 0;
+  if (sorted.length > 0) {
+    minData = Math.min.apply(this, sorted);
+    maxData = Math.max.apply(this, sorted);
+  }
+  //为了兼容v1.9.0之前的项目
+  if(index>-1){
+    if (typeof opts.yAxis.data[index].min === 'number') {
+      minData = Math.min(opts.yAxis.data[index].min, minData);
+    }
+    if (typeof opts.yAxis.data[index].max === 'number') {
+      maxData = Math.max(opts.yAxis.data[index].max, maxData);
+    }
+  }else{
+    if (typeof opts.yAxis.min === 'number') {
+      minData = Math.min(opts.yAxis.min, minData);
+    }
+    if (typeof opts.yAxis.max === 'number') {
+      maxData = Math.max(opts.yAxis.max, maxData);
+    }
+  }
+  
+
+  if (minData === maxData) {
+    var rangeSpan = maxData || 10;
+    maxData += rangeSpan;
+  }
+
+  var dataRange = getDataRange(minData, maxData);
+  var minRange = dataRange.minRange;
+  var maxRange = dataRange.maxRange;
+
+  var range = [];
+  var eachRange = (maxRange - minRange) / opts.yAxis.splitNumber;
+
+  for (var i = 0; i <= opts.yAxis.splitNumber; i++) {
+    range.push(minRange + eachRange * i);
+  }
+  return range.reverse();
+}
+
+function calYAxisData(series, opts, config) {
+  //堆叠图重算Y轴
+  var columnstyle = assign({}, {
+    type: ""
+  }, opts.extra.column);
+  //如果是多Y轴,重新计算
+  var YLength = opts.yAxis.data.length;
+  var newSeries=new Array(YLength);
+  if(YLength>0){
+    for(let i=0;i<YLength;i++){
+      newSeries[i]=[];
+      for(let j=0;j<series.length;j++){
+        if(series[j].index == i){
+          newSeries[i].push(series[j]);
+        }
+      }
+    }
+    var rangesArr =new Array(YLength);
+    var rangesFormatArr = new Array(YLength);
+    var yAxisWidthArr =new Array(YLength);
+		
+    for(let i=0;i<YLength;i++){
+      let yData = opts.yAxis.data[i];
+			//如果总开关不显示,强制每个Y轴为不显示
+			if(opts.yAxis.disabled == true){
+				yData.disabled = true;
+			}
+			rangesArr[i]=getYAxisTextList(newSeries[i], opts, config, columnstyle.type,i);
+			let yAxisFontSizes = yData.fontSize || config.fontSize;
+			yAxisWidthArr[i] = {position:yData.position?yData.position:'left',width:0};
+			rangesFormatArr[i]= rangesArr[i].map(function(items) {
+				items = util.toFixed(items, 6);
+				items = yData.format ? yData.format(Number(items)) : items;
+				yAxisWidthArr[i].width = Math.max(yAxisWidthArr[i].width, measureText(items, yAxisFontSizes) + 5);
+				return items;
+			});
+			let calibration= yData.calibration? 4*opts.pixelRatio : 0 ;
+			yAxisWidthArr[i].width += calibration +3*opts.pixelRatio;
+      if (yData.disabled === true) {
+        yAxisWidthArr[i].width=0;
+      }
+    }
+    
+  }else{
+    var rangesArr =new Array(1);
+    var rangesFormatArr = new Array(1);
+    var yAxisWidthArr =new Array(1);
+		rangesArr[0] = getYAxisTextList(series, opts, config, columnstyle.type);
+		yAxisWidthArr[0] = {position:'left',width:0};
+		var yAxisFontSize = opts.yAxis.fontSize || config.fontSize;
+		rangesFormatArr[0] = rangesArr[0].map(function(item) {
+			item = util.toFixed(item, 6);
+			item = opts.yAxis.format ? opts.yAxis.format(Number(item)) : item;
+			yAxisWidthArr[0].width = Math.max(yAxisWidthArr[0].width, measureText(item, yAxisFontSize) + 5);
+			return item;
+		});
+		yAxisWidthArr[0].width += 3*opts.pixelRatio;
+		if (opts.yAxis.disabled === true) {
+		  yAxisWidthArr[0] = {position:'left',width:0};
+		  opts.yAxis.data[0]={disabled:true};
+		}else{
+			opts.yAxis.data[0]={disabled:false,position:'left',max:opts.yAxis.max,min:opts.yAxis.min,format:opts.yAxis.format};
+		}
+    
+  }
+
+  return {
+    rangesFormat: rangesFormatArr,
+    ranges: rangesArr,
+    yAxisWidth: yAxisWidthArr
+  };
+  
+}
+
+function calTooltipYAxisData(point, series, opts, config, eachSpacing) {
+  let ranges = [].concat(opts.chartData.yAxisData.ranges);
+  let spacingValid = opts.height - opts.area[0] - opts.area[2];
+  let minAxis = opts.area[0];
+  let items=[];
+  for(let i=0;i<ranges.length;i++){
+    let maxVal = ranges[i].shift();
+    let minVal = ranges[i].pop();
+    let item = maxVal - (maxVal - minVal) * (point - minAxis) / spacingValid;
+    item = opts.yAxis.data[i].format ? opts.yAxis.data[i].format(Number(item)) : item.toFixed(0);
+    items.push(String(item))
+  }
+  return items;
+}
+
+function calMarkLineData(points, opts) {
+  let minRange, maxRange;
+  let spacingValid = opts.height - opts.area[0] - opts.area[2];
+  for (let i = 0; i < points.length; i++) {
+    points[i].yAxisIndex = points[i].yAxisIndex ? points[i].yAxisIndex:0;
+    let range = [].concat(opts.chartData.yAxisData.ranges[points[i].yAxisIndex]);
+    minRange = range.pop();
+    maxRange = range.shift();
+    let height = spacingValid * (points[i].value - minRange) / (maxRange - minRange);
+    points[i].y = opts.height - Math.round(height) - opts.area[2];
+  }
+  return points;
+}
+
+function contextRotate(context, opts) {
+  if (opts.rotateLock !== true) {
+    context.translate(opts.height, 0);
+    context.rotate(90 * Math.PI / 180);
+  } else if (opts._rotate_ !== true) {
+    context.translate(opts.height, 0);
+    context.rotate(90 * Math.PI / 180);
+    opts._rotate_ = true;
+  }
+}
+
+function drawPointShape(points, color, shape, context, opts) {
+  context.beginPath();
+	if(opts.dataPointShapeType == 'hollow'){
+		context.setStrokeStyle(color);
+		context.setFillStyle(opts.background);
+		context.setLineWidth(2 * opts.pixelRatio);
+	}else{
+		context.setStrokeStyle("#ffffff");
+		context.setFillStyle(color);
+		context.setLineWidth(1 * opts.pixelRatio);
+	}
+  if (shape === 'diamond') {
+    points.forEach(function(item, index) {
+      if (item !== null) {
+        context.moveTo(item.x, item.y - 4.5);
+        context.lineTo(item.x - 4.5, item.y);
+        context.lineTo(item.x, item.y + 4.5);
+        context.lineTo(item.x + 4.5, item.y);
+        context.lineTo(item.x, item.y - 4.5);
+      }
+    });
+  } else if (shape === 'circle') {
+    points.forEach(function(item, index) {
+      if (item !== null) {
+        context.moveTo(item.x + 2.5 * opts.pixelRatio, item.y);
+        context.arc(item.x, item.y, 3 * opts.pixelRatio, 0, 2 * Math.PI, false);
+      }
+    });
+  } else if (shape === 'rect') {
+    points.forEach(function(item, index) {
+      if (item !== null) {
+        context.moveTo(item.x - 3.5, item.y - 3.5);
+        context.rect(item.x - 3.5, item.y - 3.5, 7, 7);
+      }
+    });
+  } else if (shape === 'triangle') {
+    points.forEach(function(item, index) {
+      if (item !== null) {
+        context.moveTo(item.x, item.y - 4.5);
+        context.lineTo(item.x - 4.5, item.y + 4.5);
+        context.lineTo(item.x + 4.5, item.y + 4.5);
+        context.lineTo(item.x, item.y - 4.5);
+      }
+    });
+  }
+  context.closePath();
+  context.fill();
+  context.stroke();
+}
+
+function drawRingTitle(opts, config, context, center) {
+  var titlefontSize = opts.title.fontSize || config.titleFontSize;
+  var subtitlefontSize = opts.subtitle.fontSize || config.subtitleFontSize;
+  var title = opts.title.name || '';
+  var subtitle = opts.subtitle.name || '';
+  var titleFontColor = opts.title.color || config.titleColor;
+  var subtitleFontColor = opts.subtitle.color || config.subtitleColor;
+  var titleHeight = title ? titlefontSize : 0;
+  var subtitleHeight = subtitle ? subtitlefontSize : 0;
+  var margin = 5;
+
+  if (subtitle) {
+    var textWidth = measureText(subtitle, subtitlefontSize);
+    var startX = center.x - textWidth / 2 + (opts.subtitle.offsetX || 0);
+    var startY = center.y + subtitlefontSize / 2 + (opts.subtitle.offsetY || 0);
+    if (title) {
+      startY += (titleHeight + margin) / 2;
+    }
+    context.beginPath();
+    context.setFontSize(subtitlefontSize);
+    context.setFillStyle(subtitleFontColor);
+    context.fillText(subtitle, startX, startY);
+    context.closePath();
+    context.stroke();
+  }
+  if (title) {
+    var _textWidth = measureText(title, titlefontSize);
+    var _startX = center.x - _textWidth / 2 + (opts.title.offsetX || 0);
+    var _startY = center.y + titlefontSize / 2 + (opts.title.offsetY || 0);
+    if (subtitle) {
+      _startY -= (subtitleHeight + margin) / 2;
+    }
+    context.beginPath();
+    context.setFontSize(titlefontSize);
+    context.setFillStyle(titleFontColor);
+    context.fillText(title, _startX, _startY);
+    context.closePath();
+    context.stroke();
+  }
+}
+
+function drawPointText(points, series, config, context) {
+  // 绘制数据文案
+  var data = series.data;
+  points.forEach(function(item, index) {
+    if (item !== null) {
+      //var formatVal = series.format ? series.format(data[index]) : data[index];
+      context.beginPath();
+      context.setFontSize(series.textSize || config.fontSize);
+      context.setFillStyle(series.textColor || '#666666');
+      var value = data[index]
+      if (typeof data[index] === 'object' && data[index] !== null) {
+				if (data[index].constructor == Array) {
+					value = data[index][1];
+				}else{
+					value = data[index].value
+				}
+      }
+      var formatVal = series.format ? series.format(value) : value;
+      context.fillText(String(formatVal), item.x - measureText(formatVal, series.textSize || config.fontSize) / 2, item.y -4);
+      context.closePath();
+      context.stroke();
+    }
+  });
+
+}
+
+function drawGaugeLabel(gaugeOption, radius, centerPosition, opts, config, context) {
+  radius -= gaugeOption.width / 2 + config.gaugeLabelTextMargin;
+
+  let totalAngle = gaugeOption.startAngle - gaugeOption.endAngle + 1;
+  let splitAngle = totalAngle / gaugeOption.splitLine.splitNumber;
+  let totalNumber = gaugeOption.endNumber - gaugeOption.startNumber;
+  let splitNumber = totalNumber / gaugeOption.splitLine.splitNumber;
+  let nowAngle = gaugeOption.startAngle;
+  let nowNumber = gaugeOption.startNumber;
+  for (let i = 0; i < gaugeOption.splitLine.splitNumber + 1; i++) {
+    var pos = {
+      x: radius * Math.cos(nowAngle * Math.PI),
+      y: radius * Math.sin(nowAngle * Math.PI)
+    };
+    var labelText = gaugeOption.labelFormat ? gaugeOption.labelFormat(nowNumber) : nowNumber;
+    pos.x += centerPosition.x - measureText(labelText) / 2;
+    pos.y += centerPosition.y;
+    var startX = pos.x;
+    var startY = pos.y;
+    context.beginPath();
+    context.setFontSize(config.fontSize);
+    context.setFillStyle(gaugeOption.labelColor || '#666666');
+    context.fillText(labelText, startX, startY + config.fontSize / 2);
+    context.closePath();
+    context.stroke();
+
+    nowAngle += splitAngle;
+    if (nowAngle >= 2) {
+      nowAngle = nowAngle % 2;
+    }
+    nowNumber += splitNumber;
+  }
+
+}
+
+function drawRadarLabel(angleList, radius, centerPosition, opts, config, context) {
+  var radarOption = opts.extra.radar || {};
+  radius += config.radarLabelTextMargin;
+
+  angleList.forEach(function(angle, index) {
+    var pos = {
+      x: radius * Math.cos(angle),
+      y: radius * Math.sin(angle)
+    };
+    var posRelativeCanvas = convertCoordinateOrigin(pos.x, pos.y, centerPosition);
+    var startX = posRelativeCanvas.x;
+    var startY = posRelativeCanvas.y;
+    if (util.approximatelyEqual(pos.x, 0)) {
+      startX -= measureText(opts.categories[index] || '') / 2;
+    } else if (pos.x < 0) {
+      startX -= measureText(opts.categories[index] || '');
+    }
+    context.beginPath();
+    context.setFontSize(config.fontSize);
+    context.setFillStyle(radarOption.labelColor || '#666666');
+    context.fillText(opts.categories[index] || '', startX, startY + config.fontSize / 2);
+    context.closePath();
+    context.stroke();
+  });
+
+}
+
+function drawPieText(series, opts, config, context, radius, center) {
+  var lineRadius = config.pieChartLinePadding;
+  var textObjectCollection = [];
+  var lastTextObject = null;
+
+  var seriesConvert = series.map(function(item) {
+    var text = item.format ? item.format(+item._proportion_.toFixed(2)) : util.toFixed(item._proportion_.toFixed(4) * 100) +'%';
+    if(item._rose_proportion_) item._proportion_=item._rose_proportion_;
+    var arc = 2 * Math.PI - (item._start_ + 2 * Math.PI * item._proportion_ / 2);
+    var color = item.color;
+    var radius = item._radius_;
+    return {
+      arc: arc,
+      text: text,
+      color: color,
+      radius: radius,
+      textColor: item.textColor,
+      textSize: item.textSize,
+    };
+  });
+  for (let i = 0; i < seriesConvert.length; i++) {
+    let item = seriesConvert[i];
+    // line end
+    let orginX1 = Math.cos(item.arc) * (item.radius + lineRadius);
+    let orginY1 = Math.sin(item.arc) * (item.radius + lineRadius);
+
+    // line start
+    let orginX2 = Math.cos(item.arc) * item.radius;
+    let orginY2 = Math.sin(item.arc) * item.radius;
+
+    // text start
+    let orginX3 = orginX1 >= 0 ? orginX1 + config.pieChartTextPadding : orginX1 - config.pieChartTextPadding;
+    let orginY3 = orginY1;
+    let textWidth = measureText(item.text,item.textSize||config.fontSize);
+    let startY = orginY3;
+
+    if (lastTextObject && util.isSameXCoordinateArea(lastTextObject.start, {
+        x: orginX3
+      })) {
+      if (orginX3 > 0) {
+        startY = Math.min(orginY3, lastTextObject.start.y);
+      } else if (orginX1 < 0) {
+        startY = Math.max(orginY3, lastTextObject.start.y);
+      } else {
+        if (orginY3 > 0) {
+          startY = Math.max(orginY3, lastTextObject.start.y);
+        } else {
+          startY = Math.min(orginY3, lastTextObject.start.y);
+        }
+      }
+    }
+    if (orginX3 < 0) {
+      orginX3 -= textWidth;
+    }
+
+    let textObject = {
+      lineStart: {
+        x: orginX2,
+        y: orginY2
+      },
+      lineEnd: {
+        x: orginX1,
+        y: orginY1
+      },
+      start: {
+        x: orginX3,
+        y: startY
+      },
+      width: textWidth,
+      height: config.fontSize,
+      text: item.text,
+      color: item.color,
+      textColor: item.textColor,
+      textSize: item.textSize
+    };
+    lastTextObject = avoidCollision(textObject, lastTextObject);
+    textObjectCollection.push(lastTextObject);
+  }
+
+  for (let i = 0; i < textObjectCollection.length; i++) {
+    let item = textObjectCollection[i];
+    let lineStartPoistion = convertCoordinateOrigin(item.lineStart.x, item.lineStart.y, center);
+    let lineEndPoistion = convertCoordinateOrigin(item.lineEnd.x, item.lineEnd.y, center);
+    let textPosition = convertCoordinateOrigin(item.start.x, item.start.y, center);
+    context.setLineWidth(1 * opts.pixelRatio);
+    context.setFontSize(config.fontSize);
+    context.beginPath();
+    context.setStrokeStyle(item.color);
+    context.setFillStyle(item.color);
+    context.moveTo(lineStartPoistion.x, lineStartPoistion.y);
+    let curveStartX = item.start.x < 0 ? textPosition.x + item.width : textPosition.x;
+    let textStartX = item.start.x < 0 ? textPosition.x - 5 : textPosition.x + 5;
+    context.quadraticCurveTo(lineEndPoistion.x, lineEndPoistion.y, curveStartX, textPosition.y);
+    context.moveTo(lineStartPoistion.x, lineStartPoistion.y);
+    context.stroke();
+    context.closePath();
+    context.beginPath();
+    context.moveTo(textPosition.x + item.width, textPosition.y);
+    context.arc(curveStartX, textPosition.y, 2, 0, 2 * Math.PI);
+    context.closePath();
+    context.fill();
+    context.beginPath();
+    context.setFontSize(item.textSize || config.fontSize);
+    context.setFillStyle(item.textColor || '#666666');
+    context.fillText(item.text, textStartX, textPosition.y + 3);
+    context.closePath();
+    context.stroke();
+    context.closePath();
+  }
+}
+
+function drawToolTipSplitLine(offsetX, opts, config, context) {
+  var toolTipOption = opts.extra.tooltip || {};
+  toolTipOption.gridType = toolTipOption.gridType == undefined ? 'solid' : toolTipOption.gridType;
+  toolTipOption.dashLength = toolTipOption.dashLength == undefined ? 4 : toolTipOption.dashLength;
+  var startY = opts.area[0];
+  var endY = opts.height - opts.area[2];
+
+  if (toolTipOption.gridType == 'dash') {
+    context.setLineDash([toolTipOption.dashLength, toolTipOption.dashLength]);
+  }
+  context.setStrokeStyle(toolTipOption.gridColor || '#cccccc');
+  context.setLineWidth(1 * opts.pixelRatio);
+  context.beginPath();
+  context.moveTo(offsetX, startY);
+  context.lineTo(offsetX, endY);
+  context.stroke();
+  context.setLineDash([]);
+
+  if (toolTipOption.xAxisLabel) {
+    let labelText = opts.categories[opts.tooltip.index];
+    context.setFontSize(config.fontSize);
+    let textWidth = measureText(labelText, config.fontSize);
+
+    let textX = offsetX - 0.5 * textWidth;
+    let textY = endY;
+    context.beginPath();
+    context.setFillStyle(hexToRgb(toolTipOption.labelBgColor || config.toolTipBackground, toolTipOption.labelBgOpacity || config.toolTipOpacity));
+    context.setStrokeStyle(toolTipOption.labelBgColor || config.toolTipBackground);
+    context.setLineWidth(1 * opts.pixelRatio);
+    context.rect(textX - config.toolTipPadding, textY, textWidth + 2 * config.toolTipPadding, config.fontSize + 2 * config.toolTipPadding);
+    context.closePath();
+    context.stroke();
+    context.fill();
+
+    context.beginPath();
+    context.setFontSize(config.fontSize);
+    context.setFillStyle(toolTipOption.labelFontColor || config.fontColor);
+    context.fillText(String(labelText), textX, textY + config.toolTipPadding + config.fontSize);
+    context.closePath();
+    context.stroke();
+  }
+}
+
+function drawMarkLine(opts, config, context) {
+  let markLineOption = assign({}, {
+    type: 'solid',
+    dashLength: 4,
+    data: []
+  }, opts.extra.markLine);
+  let startX = opts.area[3];
+  let endX = opts.width - opts.area[1];
+  let points = calMarkLineData(markLineOption.data, opts);
+
+  for (let i = 0; i < points.length; i++) {
+    let item = assign({}, {
+      lineColor: '#DE4A42',
+      showLabel: false,
+      labelFontColor: '#666666',
+      labelBgColor: '#DFE8FF',
+      labelBgOpacity: 0.8,
+      yAxisIndex: 0
+    }, points[i]);
+
+    if (markLineOption.type == 'dash') {
+      context.setLineDash([markLineOption.dashLength, markLineOption.dashLength]);
+    }
+    context.setStrokeStyle(item.lineColor);
+    context.setLineWidth(1 * opts.pixelRatio);
+    context.beginPath();
+    context.moveTo(startX, item.y);
+    context.lineTo(endX, item.y);
+    context.stroke();
+    context.setLineDash([]);
+    if (item.showLabel) {
+      let labelText = opts.yAxis.format ? opts.yAxis.format(Number(item.value)) : item.value;
+      context.setFontSize(config.fontSize);
+      let textWidth = measureText(labelText, config.fontSize);
+      let bgStartX = opts.padding[3] + config.yAxisTitleWidth - config.toolTipPadding;
+      let bgEndX = Math.max(opts.area[3], textWidth + config.toolTipPadding * 2);
+      let bgWidth = bgEndX - bgStartX;
+
+      let textX = bgStartX + (bgWidth - textWidth) / 2;
+      let textY = item.y;
+      context.setFillStyle(hexToRgb(item.labelBgColor, item.labelBgOpacity));
+      context.setStrokeStyle(item.labelBgColor);
+      context.setLineWidth(1 * opts.pixelRatio);
+      context.beginPath();
+      context.rect(bgStartX, textY - 0.5 * config.fontSize - config.toolTipPadding, bgWidth, config.fontSize + 2 * config.toolTipPadding);
+      context.closePath();
+      context.stroke();
+      context.fill();
+
+      context.beginPath();
+      context.setFontSize(config.fontSize);
+      context.setFillStyle(item.labelFontColor);
+      context.fillText(String(labelText), textX, textY + 0.5 * config.fontSize);
+      context.stroke();
+    }
+  }
+}
+
+function drawToolTipHorizentalLine(opts, config, context, eachSpacing, xAxisPoints) {
+  var toolTipOption = assign({}, {
+    gridType: 'solid',
+    dashLength: 4
+  }, opts.extra.tooltip);
+
+  var startX = opts.area[3];
+  var endX = opts.width - opts.area[1];
+
+  if (toolTipOption.gridType == 'dash') {
+    context.setLineDash([toolTipOption.dashLength, toolTipOption.dashLength]);
+  }
+  context.setStrokeStyle(toolTipOption.gridColor || '#cccccc');
+  context.setLineWidth(1 * opts.pixelRatio);
+  context.beginPath();
+  context.moveTo(startX, opts.tooltip.offset.y);
+  context.lineTo(endX, opts.tooltip.offset.y);
+  context.stroke();
+  context.setLineDash([]);
+
+  if (toolTipOption.yAxisLabel) {
+    let labelText = calTooltipYAxisData(opts.tooltip.offset.y, opts.series, opts, config, eachSpacing);
+    let widthArr = opts.chartData.yAxisData.yAxisWidth;
+    let tStartLeft=opts.area[3];
+    let tStartRight=opts.width-opts.area[1];
+    for(let i=0;i<labelText.length;i++){
+      context.setFontSize(config.fontSize);
+      let textWidth = measureText(labelText[i], config.fontSize);
+      let bgStartX,bgEndX,bgWidth;
+      if(widthArr[i].position == 'left'){
+        bgStartX = tStartLeft - widthArr[i].width;
+        bgEndX = Math.max(bgStartX, bgStartX + textWidth + config.toolTipPadding * 2);
+      }else{
+        bgStartX = tStartRight;
+        bgEndX = Math.max(bgStartX + widthArr[i].width, bgStartX + textWidth + config.toolTipPadding * 2);
+      }
+      bgWidth = bgEndX - bgStartX;
+      
+      let textX = bgStartX + (bgWidth - textWidth) / 2;
+      let textY = opts.tooltip.offset.y;
+      context.beginPath();
+      context.setFillStyle(hexToRgb(toolTipOption.labelBgColor || config.toolTipBackground, toolTipOption.labelBgOpacity || config.toolTipOpacity));
+      context.setStrokeStyle(toolTipOption.labelBgColor || config.toolTipBackground);
+      context.setLineWidth(1 * opts.pixelRatio);
+      context.rect(bgStartX, textY - 0.5 * config.fontSize - config.toolTipPadding, bgWidth, config.fontSize + 2 * config.toolTipPadding);
+      context.closePath();
+      context.stroke();
+      context.fill();
+      
+      context.beginPath();
+      context.setFontSize(config.fontSize);
+      context.setFillStyle(toolTipOption.labelFontColor || config.fontColor);
+      context.fillText(labelText[i], textX, textY + 0.5 * config.fontSize);
+      context.closePath();
+      context.stroke();
+      if(widthArr[i].position == 'left'){
+        tStartLeft -=(widthArr[i].width + opts.yAxis.padding);
+      }else{
+        tStartRight +=widthArr[i].width+ opts.yAxis.padding;
+      }
+    }
+  }
+}
+
+function drawToolTipSplitArea(offsetX, opts, config, context, eachSpacing) {
+  var toolTipOption = assign({}, {
+    activeBgColor: '#000000',
+    activeBgOpacity: 0.08
+  }, opts.extra.tooltip);
+  var startY = opts.area[0];
+  var endY = opts.height - opts.area[2];
+  context.beginPath();
+  context.setFillStyle(hexToRgb(toolTipOption.activeBgColor, toolTipOption.activeBgOpacity));
+  context.rect(offsetX - eachSpacing / 2, startY, eachSpacing, endY - startY);
+  context.closePath();
+  context.fill();
+}
+
+function drawToolTip(textList, offset, opts, config, context, eachSpacing, xAxisPoints) {
+  var toolTipOption = assign({}, {
+		showBox:true,
+    bgColor: '#000000',
+    bgOpacity: 0.7,
+    fontColor: '#FFFFFF'
+  }, opts.extra.tooltip);
+  var legendWidth = 4 * opts.pixelRatio;
+  var legendMarginRight = 5 * opts.pixelRatio;
+  var arrowWidth = 8 * opts.pixelRatio;
+  var isOverRightBorder = false;
+  if (opts.type == 'line' || opts.type == 'area' || opts.type == 'candle' || opts.type == 'mix') {
+    drawToolTipSplitLine(opts.tooltip.offset.x, opts, config, context);
+  }
+
+  offset = assign({
+    x: 0,
+    y: 0
+  }, offset);
+  offset.y -= 8 * opts.pixelRatio;
+  var textWidth = textList.map(function(item) {
+    return measureText(item.text, config.fontSize);
+  });
+  var toolTipWidth = legendWidth + legendMarginRight + 4 * config.toolTipPadding + Math.max.apply(null, textWidth);
+  var toolTipHeight = 2 * config.toolTipPadding + textList.length * config.toolTipLineHeight;
+
+	if(toolTipOption.showBox == false){ return }
+  // if beyond the right border
+  if (offset.x - Math.abs(opts._scrollDistance_) + arrowWidth + toolTipWidth > opts.width) {
+    isOverRightBorder = true;
+  }
+  if (toolTipHeight + offset.y > opts.height) {
+    offset.y = opts.height - toolTipHeight;
+  }
+  // draw background rect
+  context.beginPath();
+  context.setFillStyle(hexToRgb(toolTipOption.bgColor || config.toolTipBackground, toolTipOption.bgOpacity || config.toolTipOpacity));
+  if (isOverRightBorder) {
+    context.moveTo(offset.x, offset.y + 10 * opts.pixelRatio);
+    context.lineTo(offset.x - arrowWidth, offset.y + 10 * opts.pixelRatio - 5 * opts.pixelRatio);
+    context.lineTo(offset.x - arrowWidth, offset.y);
+    context.lineTo(offset.x - arrowWidth - Math.round(toolTipWidth), offset.y);
+    context.lineTo(offset.x - arrowWidth - Math.round(toolTipWidth), offset.y + toolTipHeight);
+    context.lineTo(offset.x - arrowWidth, offset.y + toolTipHeight);
+    context.lineTo(offset.x - arrowWidth, offset.y + 10 * opts.pixelRatio + 5 * opts.pixelRatio);
+    context.lineTo(offset.x, offset.y + 10 * opts.pixelRatio);
+  } else {
+    context.moveTo(offset.x, offset.y + 10 * opts.pixelRatio);
+    context.lineTo(offset.x + arrowWidth, offset.y + 10 * opts.pixelRatio - 5 * opts.pixelRatio);
+    context.lineTo(offset.x + arrowWidth, offset.y);
+    context.lineTo(offset.x + arrowWidth + Math.round(toolTipWidth), offset.y);
+    context.lineTo(offset.x + arrowWidth + Math.round(toolTipWidth), offset.y + toolTipHeight);
+    context.lineTo(offset.x + arrowWidth, offset.y + toolTipHeight);
+    context.lineTo(offset.x + arrowWidth, offset.y + 10 * opts.pixelRatio + 5 * opts.pixelRatio);
+    context.lineTo(offset.x, offset.y + 10 * opts.pixelRatio);
+  }
+
+  context.closePath();
+  context.fill();
+
+  // draw legend
+  textList.forEach(function(item, index) {
+    if (item.color !== null) {
+      context.beginPath();
+      context.setFillStyle(item.color);
+      var startX = offset.x + arrowWidth + 2 * config.toolTipPadding;
+      var startY = offset.y + (config.toolTipLineHeight - config.fontSize) / 2 + config.toolTipLineHeight * index +
+        config.toolTipPadding + 1;
+      if (isOverRightBorder) {
+        startX = offset.x - toolTipWidth - arrowWidth + 2 * config.toolTipPadding;
+      }
+      context.fillRect(startX, startY, legendWidth, config.fontSize);
+      context.closePath();
+    }
+  });
+
+  // draw text list
+
+  textList.forEach(function(item, index) {
+    var startX = offset.x + arrowWidth + 2 * config.toolTipPadding + legendWidth + legendMarginRight;
+    if (isOverRightBorder) {
+      startX = offset.x - toolTipWidth - arrowWidth + 2 * config.toolTipPadding + +legendWidth + legendMarginRight;
+    }
+    var startY = offset.y + (config.toolTipLineHeight - config.fontSize) / 2 + config.toolTipLineHeight * index +
+      config.toolTipPadding;
+    context.beginPath();
+    context.setFontSize(config.fontSize);
+    context.setFillStyle(toolTipOption.fontColor);
+    context.fillText(item.text, startX, startY + config.fontSize);
+    context.closePath();
+    context.stroke();
+  });
+}
+
+function drawYAxisTitle(title, opts, config, context) {
+  var startX = config.xAxisHeight + (opts.height - config.xAxisHeight - measureText(title)) / 2;
+  context.save();
+  context.beginPath();
+  context.setFontSize(config.fontSize);
+  context.setFillStyle(opts.yAxis.titleFontColor || '#333333');
+  context.translate(0, opts.height);
+  context.rotate(-90 * Math.PI / 180);
+  context.fillText(title, startX, opts.padding[3] + 0.5 * config.fontSize);
+  context.closePath();
+  context.stroke();
+  context.restore();
+}
+
+function drawColumnDataPoints(series, opts, config, context) {
+  let process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
+  let xAxisData = opts.chartData.xAxisData,
+    xAxisPoints = xAxisData.xAxisPoints,
+    eachSpacing = xAxisData.eachSpacing;
+  let columnOption = assign({}, {
+    type: 'group',
+    width: eachSpacing / 2,
+    meter: {
+      border: 4,
+      fillColor: '#FFFFFF'
+    }
+  }, opts.extra.column);
+  
+  let calPoints = [];
+  context.save();
+	
+	let leftNum=-2;
+	let rightNum=xAxisPoints.length+2;
+	
+  if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
+    context.translate(opts._scrollDistance_, 0);
+		leftNum=Math.floor(-opts._scrollDistance_/eachSpacing)-2;
+		rightNum=leftNum+opts.xAxis.itemCount+4;
+  }
+  if (opts.tooltip && opts.tooltip.textList && opts.tooltip.textList.length && process === 1) {
+    drawToolTipSplitArea(opts.tooltip.offset.x, opts, config, context, eachSpacing);
+  }
+	
+  series.forEach(function(eachSeries, seriesIndex) {
+    let ranges,minRange,maxRange;
+    ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
+    minRange = ranges.pop();
+    maxRange = ranges.shift();
+    
+    var data = eachSeries.data;
+    switch (columnOption.type) {
+      case 'group':
+        var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
+        var tooltipPoints = getStackDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, seriesIndex, series, process);
+        calPoints.push(tooltipPoints);
+        points = fixColumeData(points, eachSpacing, series.length, seriesIndex, config, opts);
+				for(let i=0;i<points.length;i++){
+					let item=points[i];
+          if (item !== null && i>leftNum && i<rightNum) {
+            context.beginPath();
+            context.setStrokeStyle(item.color || eachSeries.color);
+            context.setLineWidth(1)
+            context.setFillStyle(item.color || eachSeries.color);
+            var startX = item.x - item.width / 2;
+            var height = opts.height - item.y - opts.area[2];
+            context.moveTo(startX, item.y);
+            context.lineTo(startX+item.width-2,item.y);
+            context.lineTo(startX+item.width-2,opts.height - opts.area[2]);
+            context.lineTo(startX,opts.height - opts.area[2]);
+            context.lineTo(startX,item.y);
+            context.closePath();
+            context.stroke();
+            context.fill();
+          }
+        };
+        break;
+      case 'stack':
+        // 绘制堆叠数据图
+        var points = getStackDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, seriesIndex, series, process);
+        calPoints.push(points);
+        points = fixColumeStackData(points, eachSpacing, series.length, seriesIndex, config, opts, series);
+
+        for(let i=0;i<points.length;i++){
+        	let item=points[i];
+          if (item !== null && i>leftNum && i<rightNum) {
+            context.beginPath();
+            context.setFillStyle(item.color || eachSeries.color);
+            var startX = item.x - item.width / 2 + 1;
+            var height = opts.height - item.y - opts.area[2];
+            var height0 = opts.height - item.y0 - opts.area[2];
+            if (seriesIndex > 0) {
+              height -= height0;
+            }
+            context.moveTo(startX, item.y);
+            context.fillRect(startX, item.y, item.width - 2, height);
+            context.closePath();
+            context.fill();
+          }
+        };
+        break;
+      case 'meter':
+        // 绘制温度计数据图
+        var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
+        calPoints.push(points);
+        points = fixColumeMeterData(points, eachSpacing, series.length, seriesIndex, config, opts, columnOption.meter.border);
+        if (seriesIndex == 0) {
+          for(let i=0;i<points.length;i++){
+          	let item=points[i];
+            if (item !== null && i>leftNum && i<rightNum) {
+              //画背景颜色
+              context.beginPath();
+              context.setFillStyle(columnOption.meter.fillColor);
+              var startX = item.x - item.width / 2;
+              var height = opts.height - item.y - opts.area[2];
+              context.moveTo(startX, item.y);
+              context.fillRect(startX, item.y, item.width, height);
+              context.closePath();
+              context.fill();
+              //画边框线
+              if (columnOption.meter.border > 0) {
+                context.beginPath();
+                context.setStrokeStyle(eachSeries.color);
+                context.setLineWidth(columnOption.meter.border * opts.pixelRatio);
+                context.moveTo(startX + columnOption.meter.border * 0.5, item.y + height);
+                context.lineTo(startX + columnOption.meter.border * 0.5, item.y + columnOption.meter.border * 0.5);
+                context.lineTo(startX + item.width - columnOption.meter.border * 0.5, item.y + columnOption.meter.border * 0.5);
+                context.lineTo(startX + item.width - columnOption.meter.border * 0.5, item.y + height);
+                context.stroke();
+              }
+            }
+          };
+        } else {
+          for(let i=0;i<points.length;i++){
+          	let item=points[i];
+            if (item !== null && i>leftNum && i<rightNum) {
+              context.beginPath();
+              context.setFillStyle(item.color || eachSeries.color);
+              var startX = item.x - item.width / 2;
+              var height = opts.height - item.y - opts.area[2];
+              context.moveTo(startX, item.y);
+              context.fillRect(startX, item.y, item.width, height);
+              context.closePath();
+              context.fill();
+            }
+          };
+        }
+        break;
+    }
+  });
+
+  if (opts.dataLabel !== false && process === 1) {
+    series.forEach(function(eachSeries, seriesIndex) {
+      let ranges,minRange,maxRange;
+        ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
+        minRange = ranges.pop();
+        maxRange = ranges.shift();
+      var data = eachSeries.data;
+      switch (columnOption.type) {
+        case 'group':
+          var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
+          points = fixColumeData(points, eachSpacing, series.length, seriesIndex, config, opts);
+          drawPointText(points, eachSeries, config, context);
+          break;
+        case 'stack':
+          var points = getStackDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, seriesIndex, series, process);
+          drawPointText(points, eachSeries, config, context);
+          break;
+        case 'meter':
+          var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
+          drawPointText(points, eachSeries, config, context);
+          break;
+      }
+    });
+  }
+
+  context.restore();
+
+  return {
+    xAxisPoints: xAxisPoints,
+    calPoints: calPoints,
+    eachSpacing: eachSpacing
+  };
+}
+
+function drawCandleDataPoints(series, seriesMA, opts, config, context) {
+  var process = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 1;
+  var candleOption = assign({}, {
+    color: {},
+    average: {}
+  }, opts.extra.candle);
+  candleOption.color = assign({}, {
+    upLine: '#f04864',
+    upFill: '#f04864',
+    downLine: '#2fc25b',
+    downFill: '#2fc25b'
+  }, candleOption.color);
+  candleOption.average = assign({}, {
+    show: false,
+    name: [],
+    day: [],
+    color: config.colors
+  }, candleOption.average);
+  opts.extra.candle = candleOption;
+
+  let xAxisData = opts.chartData.xAxisData,
+    xAxisPoints = xAxisData.xAxisPoints,
+    eachSpacing = xAxisData.eachSpacing;
+
+  let calPoints = [];
+
+  context.save();
+	
+	let leftNum=-2;
+	let rightNum=xAxisPoints.length+2;
+	let leftSpace=0;
+	let rightSpace=opts.width+eachSpacing;
+	
+  if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
+    context.translate(opts._scrollDistance_, 0);
+		leftNum=Math.floor(-opts._scrollDistance_/eachSpacing)-2;
+		rightNum=leftNum+opts.xAxis.itemCount+4;
+		leftSpace=-opts._scrollDistance_-eachSpacing+opts.area[3];
+		rightSpace=leftSpace+(opts.xAxis.itemCount+4)*eachSpacing;
+  }
+
+  //画均线
+  if (candleOption.average.show) {
+    seriesMA.forEach(function(eachSeries, seriesIndex) {
+      let ranges,minRange,maxRange;
+      ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
+      minRange = ranges.pop();
+      maxRange = ranges.shift();
+
+      var data = eachSeries.data;
+      var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
+      var splitPointList = splitPoints(points);
+			
+			for(let i=0;i<splitPointList.length;i++){
+				let points=splitPointList[i];
+				context.beginPath();
+				context.setStrokeStyle(eachSeries.color);
+				context.setLineWidth(1);
+				if (points.length === 1) {
+					context.moveTo(points[0].x, points[0].y);
+					context.arc(points[0].x, points[0].y, 1, 0, 2 * Math.PI);
+				} else {
+					context.moveTo(points[0].x, points[0].y);
+					let startPoint=0;
+					for(let j=0;j<points.length;j++){
+						let item=points[j];
+						if(startPoint==0 && item.x > leftSpace){
+							context.moveTo(item.x, item.y);
+							startPoint=1;
+						}
+						if (j > 0 && item.x > leftSpace && item.x < rightSpace) {
+							var ctrlPoint = createCurveControlPoints(points, j - 1);
+							context.bezierCurveTo(ctrlPoint.ctrA.x, ctrlPoint.ctrA.y, ctrlPoint.ctrB.x, ctrlPoint.ctrB.y,item.x, item.y);
+						}
+					}
+					context.moveTo(points[0].x, points[0].y);
+				}
+				context.closePath();
+				context.stroke();
+      }
+    });
+  }
+  //画K线
+  series.forEach(function(eachSeries, seriesIndex) {
+    let ranges,minRange,maxRange;
+    ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
+    minRange = ranges.pop();
+    maxRange = ranges.shift();
+    var data = eachSeries.data;
+    var points = getCandleDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
+    calPoints.push(points);
+    var splitPointList = splitPoints(points);
+
+		for(let i=0;i<splitPointList[0].length;i++){
+			if(i>leftNum && i<rightNum){
+				let item=splitPointList[0][i];
+				context.beginPath();
+				//如果上涨
+				if (data[i][1] - data[i][0] > 0) {
+					context.setStrokeStyle(candleOption.color.upLine);
+					context.setFillStyle(candleOption.color.upFill);
+					context.setLineWidth(1 * opts.pixelRatio);
+					context.moveTo(item[3].x, item[3].y); //顶点
+					context.lineTo(item[1].x, item[1].y); //收盘中间点
+					context.lineTo(item[1].x - eachSpacing / 4, item[1].y); //收盘左侧点
+					context.lineTo(item[0].x - eachSpacing / 4, item[0].y); //开盘左侧点
+					context.lineTo(item[0].x, item[0].y); //开盘中间点
+					context.lineTo(item[2].x, item[2].y); //底点
+					context.lineTo(item[0].x, item[0].y); //开盘中间点
+					context.lineTo(item[0].x + eachSpacing / 4, item[0].y); //开盘右侧点
+					context.lineTo(item[1].x + eachSpacing / 4, item[1].y); //收盘右侧点
+					context.lineTo(item[1].x, item[1].y); //收盘中间点
+					context.moveTo(item[3].x, item[3].y); //顶点
+				} else {
+					context.setStrokeStyle(candleOption.color.downLine);
+					context.setFillStyle(candleOption.color.downFill);
+					context.setLineWidth(1 * opts.pixelRatio);
+					context.moveTo(item[3].x, item[3].y); //顶点
+					context.lineTo(item[0].x, item[0].y); //开盘中间点
+					context.lineTo(item[0].x - eachSpacing / 4, item[0].y); //开盘左侧点
+					context.lineTo(item[1].x - eachSpacing / 4, item[1].y); //收盘左侧点
+					context.lineTo(item[1].x, item[1].y); //收盘中间点
+					context.lineTo(item[2].x, item[2].y); //底点
+					context.lineTo(item[1].x, item[1].y); //收盘中间点
+					context.lineTo(item[1].x + eachSpacing / 4, item[1].y); //收盘右侧点
+					context.lineTo(item[0].x + eachSpacing / 4, item[0].y); //开盘右侧点
+					context.lineTo(item[0].x, item[0].y); //开盘中间点
+					context.moveTo(item[3].x, item[3].y); //顶点
+				}
+				context.closePath();
+				context.fill();
+				context.stroke();
+			}
+    }
+  });
+
+  context.restore();
+
+  return {
+    xAxisPoints: xAxisPoints,
+    calPoints: calPoints,
+    eachSpacing: eachSpacing
+  };
+}
+
+function drawAreaDataPoints(series, opts, config, context) {
+  var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
+  var areaOption = assign({},{
+    type: 'straight',
+    opacity: 0.2,
+    addLine: false,
+    width: 2,
+		gradient:false
+  },opts.extra.area);
+
+  let xAxisData = opts.chartData.xAxisData,
+    xAxisPoints = xAxisData.xAxisPoints,
+    eachSpacing = xAxisData.eachSpacing;
+
+  let endY = opts.height - opts.area[2];
+  let calPoints = [];
+
+  context.save();
+	let leftSpace=0;
+	let rightSpace=opts.width+eachSpacing;
+  if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
+    context.translate(opts._scrollDistance_, 0);
+		leftSpace=-opts._scrollDistance_-eachSpacing+opts.area[3];
+		rightSpace=leftSpace+(opts.xAxis.itemCount+4)*eachSpacing;
+  }
+
+  series.forEach(function(eachSeries, seriesIndex) {
+    let ranges,minRange,maxRange;
+    ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
+    minRange = ranges.pop();
+    maxRange = ranges.shift();
+    let data = eachSeries.data;
+    let points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
+    calPoints.push(points);
+
+    let splitPointList = splitPoints(points);
+    for (let i = 0; i < splitPointList.length; i++) {
+      let points = splitPointList[i];
+      // 绘制区域数
+      context.beginPath();
+      context.setStrokeStyle(hexToRgb(eachSeries.color, areaOption.opacity));
+			if(areaOption.gradient){
+				let gradient = context.createLinearGradient(0, opts.area[0], 0, opts.height-opts.area[2]);
+				gradient.addColorStop('0', hexToRgb(eachSeries.color, areaOption.opacity));
+				gradient.addColorStop('1.0',hexToRgb("#FFFFFF", 0.1));
+				context.setFillStyle(gradient);
+			}else{
+				context.setFillStyle(hexToRgb(eachSeries.color, areaOption.opacity));
+			}
+      context.setLineWidth(areaOption.width * opts.pixelRatio);
+      if (points.length > 1) {
+        let firstPoint = points[0];
+        let lastPoint = points[points.length - 1];
+        context.moveTo(firstPoint.x, firstPoint.y);
+				let startPoint=0;
+        if (areaOption.type === 'curve') {
+					for(let j=0;j<points.length;j++){
+						let item=points[j];
+						if(startPoint==0 && item.x > leftSpace){
+							context.moveTo(item.x, item.y);
+							startPoint=1;
+						}
+            if (j > 0 && item.x > leftSpace && item.x < rightSpace) {
+              let ctrlPoint = createCurveControlPoints(points, j - 1);
+              context.bezierCurveTo(ctrlPoint.ctrA.x, ctrlPoint.ctrA.y, ctrlPoint.ctrB.x, ctrlPoint.ctrB.y,item.x, item.y);
+            }
+          };
+        } else {
+					for(let j=0;j<points.length;j++){
+						let item=points[j];
+						if(startPoint==0 && item.x > leftSpace){
+							context.moveTo(item.x, item.y);
+							startPoint=1;
+						}
+					  if (j > 0 && item.x > leftSpace && item.x < rightSpace) {
+              context.lineTo(item.x, item.y);
+            }
+          };
+        }
+
+        context.lineTo(lastPoint.x, endY);
+        context.lineTo(firstPoint.x, endY);
+        context.lineTo(firstPoint.x, firstPoint.y);
+      } else {
+        let item = points[0];
+        context.moveTo(item.x - eachSpacing / 2, item.y);
+        context.lineTo(item.x + eachSpacing / 2, item.y);
+        context.lineTo(item.x + eachSpacing / 2, endY);
+        context.lineTo(item.x - eachSpacing / 2, endY);
+        context.moveTo(item.x - eachSpacing / 2, item.y);
+      }
+      context.closePath();
+      context.fill();
+
+      //画连线
+      if (areaOption.addLine) {
+				if (eachSeries.lineType == 'dash') {
+					let dashLength = eachSeries.dashLength?eachSeries.dashLength:8;
+					dashLength *= opts.pixelRatio;
+				  context.setLineDash([dashLength, dashLength]);
+				}
+        context.beginPath();
+        context.setStrokeStyle(eachSeries.color);
+        context.setLineWidth(areaOption.width * opts.pixelRatio);
+        if (points.length === 1) {
+          context.moveTo(points[0].x, points[0].y);
+          context.arc(points[0].x, points[0].y, 1, 0, 2 * Math.PI);
+        } else {
+          context.moveTo(points[0].x, points[0].y);
+					let startPoint=0;
+          if (areaOption.type === 'curve') {
+            for(let j=0;j<points.length;j++){
+            	let item=points[j];
+            	if(startPoint==0 && item.x > leftSpace){
+            		context.moveTo(item.x, item.y);
+            		startPoint=1;
+            	}
+              if (j > 0 && item.x > leftSpace && item.x < rightSpace) {
+                let ctrlPoint = createCurveControlPoints(points, j - 1);
+                context.bezierCurveTo(ctrlPoint.ctrA.x, ctrlPoint.ctrA.y, ctrlPoint.ctrB.x, ctrlPoint.ctrB.y,item.x,item.y);
+              }
+            };
+          } else {
+            for(let j=0;j<points.length;j++){
+            	let item=points[j];
+            	if(startPoint==0 && item.x > leftSpace){
+            		context.moveTo(item.x, item.y);
+            		startPoint=1;
+            	}
+              if (j > 0 && item.x > leftSpace && item.x < rightSpace) {
+                context.lineTo(item.x, item.y);
+              }
+            };
+          }
+          context.moveTo(points[0].x, points[0].y);
+        }
+        context.stroke();
+				context.setLineDash([]);
+      }
+    }
+
+    //画点
+    if (opts.dataPointShape !== false) {
+      drawPointShape(points, eachSeries.color, eachSeries.pointShape, context, opts);
+    }
+
+  });
+
+  if (opts.dataLabel !== false && process === 1) {
+    series.forEach(function(eachSeries, seriesIndex) {
+      let ranges,minRange,maxRange;
+      ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
+      minRange = ranges.pop();
+      maxRange = ranges.shift();
+      var data = eachSeries.data;
+      var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
+      drawPointText(points, eachSeries, config, context);
+    });
+  }
+
+  context.restore();
+
+  return {
+    xAxisPoints: xAxisPoints,
+    calPoints: calPoints,
+    eachSpacing: eachSpacing
+  };
+}
+
+function drawLineDataPoints(series, opts, config, context) {
+  var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
+  var lineOption = assign({},{
+		type: 'straight',
+		width: 2
+	},opts.extra.line);
+	lineOption.width *=opts.pixelRatio;
+	
+  let xAxisData = opts.chartData.xAxisData,
+    xAxisPoints = xAxisData.xAxisPoints,
+    eachSpacing = xAxisData.eachSpacing;
+  var calPoints = [];
+
+  context.save();
+	let leftSpace=0;
+	let rightSpace=opts.width+eachSpacing;
+  if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
+    context.translate(opts._scrollDistance_, 0);
+		leftSpace=-opts._scrollDistance_-eachSpacing+opts.area[3];
+		rightSpace=leftSpace+(opts.xAxis.itemCount+4)*eachSpacing;
+  }
+
+  series.forEach(function(eachSeries, seriesIndex) {
+    let ranges,minRange,maxRange;
+    ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
+    minRange = ranges.pop();
+    maxRange = ranges.shift();
+    var data = eachSeries.data;
+    var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
+    calPoints.push(points);
+    var splitPointList = splitPoints(points);
+		
+		if (eachSeries.lineType == 'dash') {
+			let dashLength = eachSeries.dashLength?eachSeries.dashLength:8;
+			dashLength *= opts.pixelRatio;
+		  context.setLineDash([dashLength, dashLength]);
+		}
+		context.beginPath();
+		context.setStrokeStyle(eachSeries.color);
+		context.setLineWidth(lineOption.width);
+		
+    splitPointList.forEach(function(points, index) {
+			
+      if (points.length === 1) {
+        context.moveTo(points[0].x, points[0].y);
+        context.arc(points[0].x, points[0].y, 1, 0, 2 * Math.PI);
+      } else {
+        context.moveTo(points[0].x, points[0].y);
+				let startPoint=0;
+        if (lineOption.type === 'curve') {
+          for(let j=0;j<points.length;j++){
+          	let item=points[j];
+          	if(startPoint==0 && item.x > leftSpace){
+          		context.moveTo(item.x, item.y);
+          		startPoint=1;
+          	}
+            if (j > 0 && item.x > leftSpace && item.x < rightSpace) {
+              var ctrlPoint = createCurveControlPoints(points, j - 1);
+              context.bezierCurveTo(ctrlPoint.ctrA.x, ctrlPoint.ctrA.y, ctrlPoint.ctrB.x, ctrlPoint.ctrB.y,item.x, item.y);
+            }
+          };
+        } else {
+          for(let j=0;j<points.length;j++){
+          	let item=points[j];
+          	if(startPoint==0 && item.x > leftSpace){
+          		context.moveTo(item.x, item.y);
+          		startPoint=1;
+          	}
+            if (j > 0 && item.x > leftSpace && item.x < rightSpace) {
+              context.lineTo(item.x, item.y);
+            }
+          };
+        }
+        context.moveTo(points[0].x, points[0].y);
+      }
+      
+    });
+		
+		context.stroke();
+		context.setLineDash([]);
+		
+    if (opts.dataPointShape !== false) {
+      drawPointShape(points, eachSeries.color, eachSeries.pointShape, context, opts);
+    }
+  });
+
+  if (opts.dataLabel !== false && process === 1) {
+    series.forEach(function(eachSeries, seriesIndex) {
+      let ranges,minRange,maxRange;
+      ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
+      minRange = ranges.pop();
+      maxRange = ranges.shift();
+      var data = eachSeries.data;
+      var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
+      drawPointText(points, eachSeries, config, context);
+    });
+  }
+
+  context.restore();
+
+  return {
+    xAxisPoints: xAxisPoints,
+    calPoints: calPoints,
+    eachSpacing: eachSpacing
+  };
+}
+
+function drawMixDataPoints(series, opts, config, context) {
+  let process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
+  
+  let xAxisData = opts.chartData.xAxisData,
+    xAxisPoints = xAxisData.xAxisPoints,
+    eachSpacing = xAxisData.eachSpacing;
+
+  let endY = opts.height - opts.area[2];
+  let calPoints = [];
+
+  var columnIndex = 0;
+  var columnLength = 0;
+  series.forEach(function(eachSeries, seriesIndex) {
+    if (eachSeries.type == 'column') {
+      columnLength += 1;
+    }
+  });
+  context.save();
+	let leftNum=-2;
+	let rightNum=xAxisPoints.length+2;
+	let leftSpace=0;
+	let rightSpace=opts.width+eachSpacing;
+  if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
+    context.translate(opts._scrollDistance_, 0);
+		leftNum=Math.floor(-opts._scrollDistance_/eachSpacing)-2;
+		rightNum=leftNum+opts.xAxis.itemCount+4;
+		leftSpace=-opts._scrollDistance_-eachSpacing+opts.area[3];
+		rightSpace=leftSpace+(opts.xAxis.itemCount+4)*eachSpacing;
+  }
+
+  series.forEach(function(eachSeries, seriesIndex) {
+    let ranges,minRange,maxRange;
+    
+		ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
+		minRange = ranges.pop();
+		maxRange = ranges.shift();
+
+    var data = eachSeries.data;
+    var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
+    calPoints.push(points);
+
+    // 绘制柱状数据图
+    if (eachSeries.type == 'column') {
+      points = fixColumeData(points, eachSpacing, columnLength, columnIndex, config, opts);
+      for(let i=0;i<points.length;i++){
+      	let item=points[i];
+        if (item !== null && i>leftNum && i<rightNum) {
+          context.beginPath();
+          context.setStrokeStyle(item.color || eachSeries.color);
+          context.setLineWidth(1)
+          context.setFillStyle(item.color || eachSeries.color);
+          var startX = item.x - item.width / 2;
+          var height = opts.height - item.y - opts.area[2];
+          context.moveTo(startX, item.y);
+          context.moveTo(startX, item.y);
+          context.lineTo(startX+item.width-2,item.y);
+          context.lineTo(startX+item.width-2,opts.height - opts.area[2]);
+          context.lineTo(startX,opts.height - opts.area[2]);
+          context.lineTo(startX,item.y);
+          context.closePath();
+          context.stroke();
+          context.fill();
+          context.closePath();
+          context.fill();
+        }
+      }
+      columnIndex += 1;
+    }
+
+    //绘制区域图数据
+
+    if (eachSeries.type == 'area') {
+      let splitPointList = splitPoints(points);
+      for (let i = 0; i < splitPointList.length; i++) {
+        let points = splitPointList[i];
+        // 绘制区域数据
+        context.beginPath();
+        context.setStrokeStyle(eachSeries.color);
+        context.setFillStyle(hexToRgb(eachSeries.color, 0.2));
+        context.setLineWidth(2 * opts.pixelRatio);
+        if (points.length > 1) {
+          var firstPoint = points[0];
+          let lastPoint = points[points.length - 1];
+          context.moveTo(firstPoint.x, firstPoint.y);
+					let startPoint=0;
+          if (eachSeries.style === 'curve') {
+            for(let j=0;j<points.length;j++){
+            	let item=points[j];
+            	if(startPoint==0 && item.x > leftSpace){
+            		context.moveTo(item.x, item.y);
+            		startPoint=1;
+            	}
+              if (j > 0 && item.x > leftSpace && item.x < rightSpace) {
+                var ctrlPoint = createCurveControlPoints(points, j - 1);
+                context.bezierCurveTo(ctrlPoint.ctrA.x, ctrlPoint.ctrA.y, ctrlPoint.ctrB.x, ctrlPoint.ctrB.y, item.x, item.y);
+              }
+            };
+          } else {
+            for(let j=0;j<points.length;j++){
+            	let item=points[j];
+            	if(startPoint==0 && item.x > leftSpace){
+            		context.moveTo(item.x, item.y);
+            		startPoint=1;
+            	}
+              if (j > 0 && item.x > leftSpace && item.x < rightSpace) {
+                context.lineTo(item.x, item.y);
+              }
+            };
+          }
+          context.lineTo(lastPoint.x, endY);
+          context.lineTo(firstPoint.x, endY);
+          context.lineTo(firstPoint.x, firstPoint.y);
+        } else {
+          let item = points[0];
+          context.moveTo(item.x - eachSpacing / 2, item.y);
+          context.lineTo(item.x + eachSpacing / 2, item.y);
+          context.lineTo(item.x + eachSpacing / 2, endY);
+          context.lineTo(item.x - eachSpacing / 2, endY);
+          context.moveTo(item.x - eachSpacing / 2, item.y);
+        }
+        context.closePath();
+        context.fill();
+      }
+    }
+
+    // 绘制折线数据图
+    if (eachSeries.type == 'line') {
+      var splitPointList = splitPoints(points);
+      splitPointList.forEach(function(points, index) {
+				if (eachSeries.lineType == 'dash') {
+					let dashLength = eachSeries.dashLength?eachSeries.dashLength:8;
+					dashLength *= opts.pixelRatio;
+				  context.setLineDash([dashLength, dashLength]);
+				}
+        context.beginPath();
+        context.setStrokeStyle(eachSeries.color);
+        context.setLineWidth(2 * opts.pixelRatio);
+        if (points.length === 1) {
+          context.moveTo(points[0].x, points[0].y);
+          context.arc(points[0].x, points[0].y, 1, 0, 2 * Math.PI);
+        } else {
+          context.moveTo(points[0].x, points[0].y);
+					let startPoint=0;
+          if (eachSeries.style == 'curve') {
+            for(let j=0;j<points.length;j++){
+            	let item=points[j];
+            	if(startPoint==0 && item.x > leftSpace){
+            		context.moveTo(item.x, item.y);
+            		startPoint=1;
+            	}
+              if (j > 0 && item.x > leftSpace && item.x < rightSpace) {
+                var ctrlPoint = createCurveControlPoints(points, j - 1);
+                context.bezierCurveTo(ctrlPoint.ctrA.x, ctrlPoint.ctrA.y, ctrlPoint.ctrB.x, ctrlPoint.ctrB.y,item.x,item.y);
+              }
+            }
+          } else {
+            for(let j=0;j<points.length;j++){
+            	let item=points[j];
+            	if(startPoint==0 && item.x > leftSpace){
+            		context.moveTo(item.x, item.y);
+            		startPoint=1;
+            	}
+              if (j > 0 && item.x > leftSpace && item.x < rightSpace) {
+                context.lineTo(item.x, item.y);
+              }
+            }
+          }
+          context.moveTo(points[0].x, points[0].y);
+        }
+        context.stroke();
+				context.setLineDash([]);
+      });
+    }
+
+    // 绘制点数据图
+    if (eachSeries.type == 'point') {
+			eachSeries.addPoint = true;
+    }
+
+    if (eachSeries.addPoint == true && eachSeries.type !== 'column' ) {
+      drawPointShape(points, eachSeries.color, eachSeries.pointShape, context, opts);
+    }
+  });
+  if (opts.dataLabel !== false && process === 1) {
+    var columnIndex = 0;
+    series.forEach(function(eachSeries, seriesIndex) {
+      let ranges,minRange,maxRange;
+      
+			ranges = [].concat(opts.chartData.yAxisData.ranges[eachSeries.index]);
+			minRange = ranges.pop();
+			maxRange = ranges.shift();
+				
+      var data = eachSeries.data;
+      var points = getDataPoints(data, minRange, maxRange, xAxisPoints, eachSpacing, opts, config, process);
+      if (eachSeries.type !== 'column') {
+        drawPointText(points, eachSeries, config, context);
+      } else {
+        points = fixColumeData(points, eachSpacing, columnLength, columnIndex, config, opts);
+        drawPointText(points, eachSeries, config, context);
+        columnIndex += 1;
+      }
+
+    });
+  }
+
+  context.restore();
+
+  return {
+    xAxisPoints: xAxisPoints,
+    calPoints: calPoints,
+    eachSpacing: eachSpacing,
+  }
+}
+
+function drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints) {
+  var toolTipOption = opts.extra.tooltip || {};
+  if (toolTipOption.horizentalLine && opts.tooltip && process === 1 && (opts.type == 'line' || opts.type == 'area' || opts.type == 'column' || opts.type == 'candle' || opts.type == 'mix')) {
+    drawToolTipHorizentalLine(opts, config, context, eachSpacing, xAxisPoints)
+  }
+  context.save();
+  if (opts._scrollDistance_ && opts._scrollDistance_ !== 0 && opts.enableScroll === true) {
+    context.translate(opts._scrollDistance_, 0);
+  }
+  if (opts.tooltip && opts.tooltip.textList && opts.tooltip.textList.length && process === 1) {
+    drawToolTip(opts.tooltip.textList, opts.tooltip.offset, opts, config, context, eachSpacing, xAxisPoints);
+  }
+  context.restore();
+
+}
+
+function drawXAxis(categories, opts, config, context) {
+
+  let xAxisData = opts.chartData.xAxisData,
+    xAxisPoints = xAxisData.xAxisPoints,
+    startX = xAxisData.startX,
+    endX = xAxisData.endX,
+    eachSpacing = xAxisData.eachSpacing;
+  var boundaryGap='center';
+  if (opts.type == 'line'||opts.type == 'area'){
+    boundaryGap=opts.xAxis.boundaryGap;
+  }
+  var startY = opts.height - opts.area[2];
+  var endY = opts.area[0];
+
+  //绘制滚动条
+  if (opts.enableScroll && opts.xAxis.scrollShow) {
+    var scrollY = opts.height - opts.area[2] + config.xAxisHeight;
+    var scrollScreenWidth = endX - startX;
+    var scrollTotalWidth = eachSpacing * (xAxisPoints.length - 1);
+    var scrollWidth = scrollScreenWidth * scrollScreenWidth / scrollTotalWidth;
+    var scrollLeft = 0;
+    if (opts._scrollDistance_) {
+      scrollLeft = -opts._scrollDistance_ * (scrollScreenWidth) / scrollTotalWidth;
+    }
+    context.beginPath();
+    context.setLineCap('round');
+    context.setLineWidth(6 * opts.pixelRatio);
+    context.setStrokeStyle(opts.xAxis.scrollBackgroundColor || "#EFEBEF");
+    context.moveTo(startX, scrollY);
+    context.lineTo(endX, scrollY);
+    context.stroke();
+    context.closePath();
+    context.beginPath();
+    context.setLineCap('round');
+    context.setLineWidth(6 * opts.pixelRatio);
+    context.setStrokeStyle(opts.xAxis.scrollColor || "#A6A6A6");
+    context.moveTo(startX + scrollLeft, scrollY);
+    context.lineTo(startX + scrollLeft + scrollWidth, scrollY);
+    context.stroke();
+    context.closePath();
+    context.setLineCap('butt');
+  }
+
+  context.save();
+
+  if (opts._scrollDistance_ && opts._scrollDistance_ !== 0) {
+    context.translate(opts._scrollDistance_, 0);
+  }
+	
+	//绘制X轴刻度线
+	if (opts.xAxis.calibration === true) {
+		context.setStrokeStyle(opts.xAxis.gridColor || "#cccccc");
+		context.setLineCap('butt');
+		context.setLineWidth(1 * opts.pixelRatio);
+	  xAxisPoints.forEach(function(item, index) {
+	    if (index > 0) {
+	      context.beginPath();
+	      context.moveTo(item - eachSpacing / 2, startY);
+	      context.lineTo(item - eachSpacing / 2, startY + 3 * opts.pixelRatio);
+	      context.closePath();
+	      context.stroke();
+	    }
+	  });
+	}
+	//绘制X轴网格
+  if (opts.xAxis.disableGrid !== true) {
+    context.setStrokeStyle(opts.xAxis.gridColor || "#cccccc");
+    context.setLineCap('butt');
+    context.setLineWidth(1 * opts.pixelRatio);
+    if (opts.xAxis.gridType == 'dash') {
+      context.setLineDash([opts.xAxis.dashLength, opts.xAxis.dashLength]);
+    }
+		opts.xAxis.gridEval = opts.xAxis.gridEval || 1;
+		xAxisPoints.forEach(function(item, index) {
+			if (index % opts.xAxis.gridEval == 0) {
+				context.beginPath();
+				context.moveTo(item, startY);
+				context.lineTo(item, endY);
+				context.stroke();
+			}
+		});
+    context.setLineDash([]);
+  }
+  
+
+  //绘制X轴文案
+  if (opts.xAxis.disabled !== true) {
+    // 对X轴列表做抽稀处理
+    //默认全部显示X轴标签
+    let maxXAxisListLength = categories.length;
+    //如果设置了X轴单屏数量
+    if (opts.xAxis.labelCount) {
+      //如果设置X轴密度
+      if (opts.xAxis.itemCount) {
+        maxXAxisListLength = Math.ceil(categories.length / opts.xAxis.itemCount * opts.xAxis.labelCount);
+      } else {
+        maxXAxisListLength = opts.xAxis.labelCount;
+      }
+      maxXAxisListLength -= 1;
+    }
+
+    let ratio = Math.ceil(categories.length / maxXAxisListLength);
+
+    let newCategories = [];
+    let cgLength = categories.length;
+    for (let i = 0; i < cgLength; i++) {
+      if (i % ratio !== 0) {
+        newCategories.push("");
+      } else {
+        newCategories.push(categories[i]);
+      }
+    }
+    newCategories[cgLength - 1] = categories[cgLength - 1];
+
+    var xAxisFontSize = opts.xAxis.fontSize || config.fontSize;
+    if (config._xAxisTextAngle_ === 0) {
+      newCategories.forEach(function(item, index) {
+        var offset = - measureText(String(item), xAxisFontSize) / 2;
+        if(boundaryGap == 'center'){
+          offset+=eachSpacing / 2;
+        }
+        var scrollHeight=0;
+        if(opts.xAxis.scrollShow){
+          scrollHeight=6*opts.pixelRatio;
+        }
+        context.beginPath();
+        context.setFontSize(xAxisFontSize);
+        context.setFillStyle(opts.xAxis.fontColor || '#666666');
+        context.fillText(String(item), xAxisPoints[index] + offset, startY + xAxisFontSize + (config.xAxisHeight - scrollHeight - xAxisFontSize) / 2);
+        context.closePath();
+        context.stroke();
+      });
+
+    } else {
+      newCategories.forEach(function(item, index) {
+        context.save();
+        context.beginPath();
+        context.setFontSize(xAxisFontSize);
+        context.setFillStyle(opts.xAxis.fontColor || '#666666');
+        var textWidth = measureText(String(item),xAxisFontSize);
+        var offset = - textWidth;
+        if(boundaryGap == 'center'){
+          offset+=eachSpacing / 2;
+        }
+        var _calRotateTranslate = calRotateTranslate(xAxisPoints[index] + eachSpacing / 2, startY + xAxisFontSize / 2 + 5, opts.height),
+          transX = _calRotateTranslate.transX,
+          transY = _calRotateTranslate.transY;
+
+        context.rotate(-1 * config._xAxisTextAngle_);
+        context.translate(transX, transY);
+        context.fillText(String(item), xAxisPoints[index] + offset, startY + xAxisFontSize + 5);
+        context.closePath();
+        context.stroke();
+        context.restore();
+      });
+    }
+  }
+  context.restore();
+	
+	//绘制X轴轴线
+  if(opts.xAxis.axisLine){
+    context.beginPath();
+    context.setStrokeStyle(opts.xAxis.axisLineColor);
+    context.setLineWidth(1 * opts.pixelRatio);
+    context.moveTo(startX,opts.height-opts.area[2]);
+    context.lineTo(endX,opts.height-opts.area[2]);
+    context.stroke();
+  }
+}
+
+function drawYAxisGrid(categories, opts, config, context) {
+  if (opts.yAxis.disableGrid === true) {
+    return;
+  }
+  let spacingValid = opts.height - opts.area[0] - opts.area[2];
+  let eachSpacing = spacingValid / opts.yAxis.splitNumber;
+  let startX = opts.area[3];
+  let xAxisPoints = opts.chartData.xAxisData.xAxisPoints,
+    xAxiseachSpacing = opts.chartData.xAxisData.eachSpacing;
+  let TotalWidth = xAxiseachSpacing * (xAxisPoints.length - 1);
+  let endX = startX + TotalWidth;
+
+  let points = [];
+  for (let i = 0; i < opts.yAxis.splitNumber + 1; i++) {
+    points.push(opts.height - opts.area[2] - eachSpacing * i);
+  }
+
+  context.save();
+  if (opts._scrollDistance_ && opts._scrollDistance_ !== 0) {
+    context.translate(opts._scrollDistance_, 0);
+  }
+
+  if (opts.yAxis.gridType == 'dash') {
+    context.setLineDash([opts.yAxis.dashLength, opts.yAxis.dashLength]);
+  }
+  context.setStrokeStyle(opts.yAxis.gridColor);
+  context.setLineWidth(1 * opts.pixelRatio);
+  points.forEach(function(item, index) {
+    context.beginPath();
+    context.moveTo(startX, item);
+    context.lineTo(endX, item);
+    context.stroke();
+  });
+  context.setLineDash([]);
+
+  context.restore();
+}
+
+function drawYAxis(series, opts, config, context) {
+  if (opts.yAxis.disabled === true) {
+    return;
+  }
+  var spacingValid = opts.height - opts.area[0] - opts.area[2];
+  var eachSpacing = spacingValid / opts.yAxis.splitNumber;
+  var startX = opts.area[3];
+  var endX = opts.width - opts.area[1];
+  var endY = opts.height - opts.area[2];
+  var fillEndY = endY + config.xAxisHeight;
+  if (opts.xAxis.scrollShow) {
+    fillEndY -= 3 * opts.pixelRatio;
+  }
+	if (opts.xAxis.rotateLabel){
+		fillEndY = opts.height - opts.area[2]+3;
+	}
+  // set YAxis background
+  context.beginPath();
+  context.setFillStyle(opts.background || '#ffffff');
+  if (opts._scrollDistance_ < 0) {
+    context.fillRect(0, 0, startX, fillEndY);
+  }
+  if(opts.enableScroll == true){
+    context.fillRect(endX, 0, opts.width, fillEndY);
+  }
+  context.closePath();
+  context.stroke();
+
+  var points = [];
+  for (let i = 0; i <= opts.yAxis.splitNumber; i++) {
+    points.push(opts.area[0] + eachSpacing * i);
+  }
+
+  let tStartLeft=opts.area[3];
+  let tStartRight=opts.width-opts.area[1];
+
+  for (let i = 0; i < opts.yAxis.data.length; i++) {
+    let yData = opts.yAxis.data[i];
+    if(yData.disabled !== true){
+      let rangesFormat = opts.chartData.yAxisData.rangesFormat[i];
+      let yAxisFontSize = yData.fontSize || config.fontSize;
+      let yAxisWidth = opts.chartData.yAxisData.yAxisWidth[i];
+      //画Y轴刻度及文案
+      rangesFormat.forEach(function(item, index) {
+        var pos = points[index] ? points[index] : endY;
+        context.beginPath();
+        context.setFontSize(yAxisFontSize);
+        context.setLineWidth(1*opts.pixelRatio);
+        context.setStrokeStyle(yData.axisLineColor||'#cccccc');
+        context.setFillStyle(yData.fontColor|| '#666666');
+        if(yAxisWidth.position=='left'){
+          context.fillText(String(item), tStartLeft - yAxisWidth.width , pos + yAxisFontSize / 2);
+          //画刻度线
+          if(yData.calibration==true){
+            context.moveTo(tStartLeft,pos);
+            context.lineTo(tStartLeft - 3*opts.pixelRatio,pos);
+          }
+        }else{
+          context.fillText(String(item), tStartRight + 4*opts.pixelRatio, pos + yAxisFontSize / 2);
+          //画刻度线
+          if(yData.calibration==true){
+            context.moveTo(tStartRight,pos);
+            context.lineTo(tStartRight + 3*opts.pixelRatio,pos);
+          }
+        }
+        context.closePath();
+        context.stroke();
+      });
+      //画Y轴轴线
+      if (yData.axisLine!==false) {
+        context.beginPath();
+        context.setStrokeStyle(yData.axisLineColor||'#cccccc');
+        context.setLineWidth(1 * opts.pixelRatio);
+        if(yAxisWidth.position=='left'){
+          context.moveTo(tStartLeft,opts.height-opts.area[2]);
+          context.lineTo(tStartLeft,opts.area[0]);
+        }else{
+          context.moveTo(tStartRight,opts.height-opts.area[2]);
+          context.lineTo(tStartRight,opts.area[0]);
+        }
+        context.stroke();
+      }
+			
+      //画Y轴标题
+      if (opts.yAxis.showTitle) {
+				
+        let titleFontSize = yData.titleFontSize || config.fontSize;
+        let title = yData.title;
+        context.beginPath();
+        context.setFontSize(titleFontSize);
+        context.setFillStyle(yData.titleFontColor || '#666666');
+        if(yAxisWidth.position=='left'){
+          context.fillText(title, tStartLeft - measureText(title,titleFontSize)/2, opts.area[0]-10*opts.pixelRatio);
+        }else{
+          context.fillText(title,tStartRight - measureText(title,titleFontSize)/2, opts.area[0]-10*opts.pixelRatio);
+        }
+        context.closePath();
+        context.stroke();
+      }
+      if(yAxisWidth.position=='left'){
+        tStartLeft -=(yAxisWidth.width + opts.yAxis.padding);
+      }else{
+        tStartRight +=yAxisWidth.width+ opts.yAxis.padding;
+      }
+    }
+  }
+}
+
+function drawLegend(series, opts, config, context, chartData) {
+  if (opts.legend.show === false) {
+    return;
+  }
+  let legendData = chartData.legendData;
+  let legendList = legendData.points;
+  let legendArea = legendData.area;
+  let padding = opts.legend.padding;
+  let fontSize = opts.legend.fontSize;
+  let shapeWidth = 15 * opts.pixelRatio;
+  let shapeRight = 5 * opts.pixelRatio;
+  let itemGap = opts.legend.itemGap;
+  let lineHeight = Math.max(opts.legend.lineHeight * opts.pixelRatio, fontSize);
+
+  //画背景及边框
+  context.beginPath();
+  context.setLineWidth(opts.legend.borderWidth);
+  context.setStrokeStyle(opts.legend.borderColor);
+  context.setFillStyle(opts.legend.backgroundColor);
+  context.moveTo(legendArea.start.x, legendArea.start.y);
+  context.rect(legendArea.start.x, legendArea.start.y, legendArea.width, legendArea.height);
+  context.closePath();
+  context.fill();
+  context.stroke();
+
+  legendList.forEach(function(itemList, listIndex) {
+    let width = 0;
+    let height = 0;
+    width = legendData.widthArr[listIndex];
+    height = legendData.heightArr[listIndex];
+    let startX = 0;
+    let startY = 0;
+    if (opts.legend.position == 'top' || opts.legend.position == 'bottom') {
+      startX = legendArea.start.x + (legendArea.width - width) / 2;
+      startY = legendArea.start.y + padding + listIndex * lineHeight;
+    } else {
+      if (listIndex == 0) {
+        width = 0;
+      } else {
+        width = legendData.widthArr[listIndex - 1];
+      }
+      startX = legendArea.start.x + padding + width;
+      startY = legendArea.start.y + padding + (legendArea.height - height) / 2;
+    }
+
+    context.setFontSize(config.fontSize);
+    for (let i = 0; i < itemList.length; i++) {
+      let item = itemList[i];
+      item.area = [0, 0, 0, 0];
+      item.area[0] = startX;
+      item.area[1] = startY;
+      item.area[3] = startY + lineHeight;
+      context.beginPath();
+      context.setLineWidth(1 * opts.pixelRatio);
+      context.setStrokeStyle(item.show ? item.color : opts.legend.hiddenColor);
+      context.setFillStyle(item.show ? item.color : opts.legend.hiddenColor);
+      switch (item.legendShape) {
+        case 'line':
+          context.moveTo(startX, startY + 0.5 * lineHeight - 2 * opts.pixelRatio);
+          context.fillRect(startX, startY + 0.5 * lineHeight - 2 * opts.pixelRatio, 15 * opts.pixelRatio, 4 * opts.pixelRatio);
+          break;
+        case 'triangle':
+          context.moveTo(startX + 7.5 * opts.pixelRatio, startY + 0.5 * lineHeight - 5 * opts.pixelRatio);
+          context.lineTo(startX + 2.5 * opts.pixelRatio, startY + 0.5 * lineHeight + 5 * opts.pixelRatio);
+          context.lineTo(startX + 12.5 * opts.pixelRatio, startY + 0.5 * lineHeight + 5 * opts.pixelRatio);
+          context.lineTo(startX + 7.5 * opts.pixelRatio, startY + 0.5 * lineHeight - 5 * opts.pixelRatio);
+          break;
+        case 'diamond':
+          context.moveTo(startX + 7.5 * opts.pixelRatio, startY + 0.5 * lineHeight - 5 * opts.pixelRatio);
+          context.lineTo(startX + 2.5 * opts.pixelRatio, startY + 0.5 * lineHeight);
+          context.lineTo(startX + 7.5 * opts.pixelRatio, startY + 0.5 * lineHeight + 5 * opts.pixelRatio);
+          context.lineTo(startX + 12.5 * opts.pixelRatio, startY + 0.5 * lineHeight);
+          context.lineTo(startX + 7.5 * opts.pixelRatio, startY + 0.5 * lineHeight - 5 * opts.pixelRatio);
+          break;
+        case 'circle':
+          context.moveTo(startX + 7.5 * opts.pixelRatio, startY + 0.5 * lineHeight);
+          context.arc(startX + 7.5 * opts.pixelRatio, startY + 0.5 * lineHeight, 5 * opts.pixelRatio, 0, 2 * Math.PI);
+          break;
+        case 'rect':
+          context.moveTo(startX, startY + 0.5 * lineHeight - 5 * opts.pixelRatio);
+          context.fillRect(startX, startY + 0.5 * lineHeight - 5 * opts.pixelRatio, 15 * opts.pixelRatio, 10 * opts.pixelRatio);
+          break;
+        default:
+          context.moveTo(startX, startY + 0.5 * lineHeight - 5 * opts.pixelRatio);
+          context.fillRect(startX, startY + 0.5 * lineHeight - 5 * opts.pixelRatio, 15 * opts.pixelRatio, 10 * opts.pixelRatio);
+      }
+      context.closePath();
+      context.fill();
+      context.stroke();
+
+      startX += shapeWidth + shapeRight;
+      let fontTrans = 0.5 * lineHeight + 0.5 * fontSize - 2;
+      context.beginPath();
+      context.setFontSize(fontSize);
+      context.setFillStyle(item.show ? opts.legend.fontColor : opts.legend.hiddenColor);
+      context.fillText(item.name, startX, startY + fontTrans);
+      context.closePath();
+      context.stroke();
+      if (opts.legend.position == 'top' || opts.legend.position == 'bottom') {
+        startX += measureText(item.name, fontSize) + itemGap;
+        item.area[2] = startX;
+      } else {
+        item.area[2] = startX + measureText(item.name, fontSize) + itemGap;;
+        startX -= shapeWidth + shapeRight;
+        startY += lineHeight;
+      }
+    }
+  });
+}
+
+function drawPieDataPoints(series, opts, config, context) {
+  var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
+  var pieOption = assign({}, {
+    activeOpacity: 0.5,
+    activeRadius: 10 * opts.pixelRatio,
+    offsetAngle: 0,
+    labelWidth: 15 * opts.pixelRatio,
+    ringWidth: 0,
+    border:false,
+    borderWidth:2,
+    borderColor:'#FFFFFF'
+  }, opts.extra.pie);
+  var centerPosition = {
+    x: opts.area[3] + (opts.width - opts.area[1] - opts.area[3]) / 2,
+    y: opts.area[0] + (opts.height - opts.area[0] - opts.area[2]) / 2
+  };
+  if (config.pieChartLinePadding == 0) {
+    config.pieChartLinePadding = pieOption.activeRadius;
+  }
+
+  var radius = Math.min((opts.width - opts.area[1] - opts.area[3]) / 2 - config.pieChartLinePadding - config.pieChartTextPadding - config._pieTextMaxLength_, (opts.height - opts.area[0] - opts.area[2]) / 2 - config.pieChartLinePadding - config.pieChartTextPadding);
+
+  series = getPieDataPoints(series, radius, process);
+
+  var activeRadius = pieOption.activeRadius;
+
+  series = series.map(function(eachSeries) {
+    eachSeries._start_ += (pieOption.offsetAngle) * Math.PI / 180;
+    return eachSeries;
+  });
+  series.forEach(function(eachSeries, seriesIndex) {
+    if (opts.tooltip) {
+      if (opts.tooltip.index == seriesIndex) {
+        context.beginPath();
+        context.setFillStyle(hexToRgb(eachSeries.color, opts.extra.pie.activeOpacity || 0.5));
+        context.moveTo(centerPosition.x, centerPosition.y);
+        context.arc(centerPosition.x, centerPosition.y, eachSeries._radius_ + activeRadius, eachSeries._start_,
+          eachSeries._start_ + 2 *
+          eachSeries._proportion_ * Math.PI);
+        context.closePath();
+        context.fill();
+      }
+    }
+    context.beginPath();
+    context.setLineWidth(pieOption.borderWidth * opts.pixelRatio);
+    context.lineJoin = "round";
+    context.setStrokeStyle(pieOption.borderColor);
+    context.setFillStyle(eachSeries.color);
+    context.moveTo(centerPosition.x, centerPosition.y);
+    context.arc(centerPosition.x, centerPosition.y, eachSeries._radius_, eachSeries._start_, eachSeries._start_ + 2 * eachSeries._proportion_ * Math.PI);
+    context.closePath();
+    context.fill();
+    if (pieOption.border == true) {
+      context.stroke();
+    }
+  });
+
+  if (opts.type === 'ring') {
+    var innerPieWidth = radius * 0.6;
+    if (typeof opts.extra.pie.ringWidth === 'number' && opts.extra.pie.ringWidth > 0) {
+      innerPieWidth = Math.max(0, radius - opts.extra.pie.ringWidth);
+    }
+    context.beginPath();
+    context.setFillStyle(opts.background || '#ffffff');
+    context.moveTo(centerPosition.x, centerPosition.y);
+    context.arc(centerPosition.x, centerPosition.y, innerPieWidth, 0, 2 * Math.PI);
+    context.closePath();
+    context.fill();
+  }
+
+  if (opts.dataLabel !== false && process === 1) {
+    var valid = false;
+    for (var i = 0, len = series.length; i < len; i++) {
+      if (series[i].data > 0) {
+        valid = true;
+        break;
+      }
+    }
+
+    if (valid) {
+      drawPieText(series, opts, config, context, radius, centerPosition);
+    }
+  }
+
+  if (process === 1 && opts.type === 'ring') {
+    drawRingTitle(opts, config, context, centerPosition);
+  }
+
+  return {
+    center: centerPosition,
+    radius: radius,
+    series: series
+  };
+}
+
+function drawRoseDataPoints(series, opts, config, context) {
+  var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
+  var roseOption = assign({}, {
+    type: 'area',
+    activeOpacity: 0.5,
+    activeRadius: 10 * opts.pixelRatio,
+    offsetAngle: 0,
+    labelWidth: 15 * opts.pixelRatio,
+    border:false,
+    borderWidth:2,
+    borderColor:'#FFFFFF'
+  }, opts.extra.rose);
+  if (config.pieChartLinePadding == 0) {
+    config.pieChartLinePadding = roseOption.activeRadius;
+  }
+  var centerPosition = {
+    x: opts.area[3] + (opts.width - opts.area[1] - opts.area[3]) / 2,
+    y: opts.area[0] + (opts.height - opts.area[0] - opts.area[2]) / 2
+  };
+   var radius = Math.min((opts.width - opts.area[1] - opts.area[3]) / 2 - config.pieChartLinePadding - config.pieChartTextPadding - config._pieTextMaxLength_, (opts.height - opts.area[0] - opts.area[2]) / 2 - config.pieChartLinePadding - config.pieChartTextPadding);
+  var minRadius = roseOption.minRadius || radius * 0.5;
+
+  series = getRoseDataPoints(series, roseOption.type, minRadius, radius, process);
+
+  var activeRadius = roseOption.activeRadius;
+
+  series = series.map(function(eachSeries) {
+    eachSeries._start_ += (roseOption.offsetAngle || 0) * Math.PI / 180;
+    return eachSeries;
+  });
+
+  series.forEach(function(eachSeries, seriesIndex) {
+    if (opts.tooltip) {
+      if (opts.tooltip.index == seriesIndex) {
+        context.beginPath();
+        context.setFillStyle(hexToRgb(eachSeries.color, roseOption.activeOpacity || 0.5));
+        context.moveTo(centerPosition.x, centerPosition.y);
+        context.arc(centerPosition.x, centerPosition.y, activeRadius + eachSeries._radius_, eachSeries._start_,
+          eachSeries._start_ + 2 * eachSeries._rose_proportion_ * Math.PI);
+        context.closePath();
+        context.fill();
+      }
+    }
+    context.beginPath();
+    context.setLineWidth(roseOption.borderWidth * opts.pixelRatio);
+    context.lineJoin = "round";
+    context.setStrokeStyle(roseOption.borderColor);
+    context.setFillStyle(eachSeries.color);
+    context.moveTo(centerPosition.x, centerPosition.y);
+    context.arc(centerPosition.x, centerPosition.y, eachSeries._radius_, eachSeries._start_, eachSeries._start_ + 2 *
+      eachSeries._rose_proportion_ * Math.PI);
+    context.closePath();
+    context.fill();
+    if (roseOption.border == true) {
+      context.stroke();
+    }
+  });
+
+  if (opts.dataLabel !== false && process === 1) {
+    var valid = false;
+    for (var i = 0, len = series.length; i < len; i++) {
+      if (series[i].data > 0) {
+        valid = true;
+        break;
+      }
+    }
+
+    if (valid) {
+      drawPieText(series, opts, config, context, radius, centerPosition);
+    }
+  }
+
+  return {
+    center: centerPosition,
+    radius: radius,
+    series: series
+  };
+}
+
+function drawArcbarDataPoints(series, opts, config, context) {
+  var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
+  var arcbarOption = assign({}, {
+    startAngle: 0.75,
+    endAngle: 0.25,
+    type: 'default',
+    width: 12 * opts.pixelRatio,
+		gap:2 * opts.pixelRatio
+  }, opts.extra.arcbar);
+
+  series = getArcbarDataPoints(series, arcbarOption, process);
+	
+  var centerPosition;
+	if(arcbarOption.center){
+		centerPosition=arcbarOption.center;
+	}else{
+		centerPosition= {
+		  x: opts.width / 2,
+		  y: opts.height / 2
+		};
+	}
+	
+  var radius;
+	if(arcbarOption.radius){
+		radius=arcbarOption.radius;
+	}else{
+		radius = Math.min(centerPosition.x, centerPosition.y);
+		radius -= 5 * opts.pixelRatio;
+		radius -= arcbarOption.width / 2;
+	}
+	
+  for (let i = 0; i < series.length; i++) {
+    let eachSeries = series[i];
+		//背景颜色
+		context.setLineWidth(arcbarOption.width);
+		context.setStrokeStyle(arcbarOption.backgroundColor || '#E9E9E9');
+		context.setLineCap('round');
+		context.beginPath();
+		if (arcbarOption.type == 'default') {
+		  context.arc(centerPosition.x, centerPosition.y, radius-(arcbarOption.width+arcbarOption.gap)*i, arcbarOption.startAngle * Math.PI, arcbarOption.endAngle * Math.PI, false);
+		} else {
+		  context.arc(centerPosition.x, centerPosition.y, radius-(arcbarOption.width+arcbarOption.gap)*i, 0, 2 * Math.PI, false);
+		}
+		context.stroke();
+		//进度条
+    context.setLineWidth(arcbarOption.width);
+    context.setStrokeStyle(eachSeries.color);
+    context.setLineCap('round');
+    context.beginPath();
+    context.arc(centerPosition.x, centerPosition.y, radius-(arcbarOption.width+arcbarOption.gap)*i, arcbarOption.startAngle * Math.PI, eachSeries._proportion_ * Math.PI, false);
+    context.stroke();
+  }
+
+  drawRingTitle(opts, config, context, centerPosition);
+
+  return {
+    center: centerPosition,
+    radius: radius,
+    series: series
+  };
+}
+
+function drawGaugeDataPoints(categories, series, opts, config, context) {
+  var process = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : 1;
+  var gaugeOption = assign({}, {
+		type:'default',
+    startAngle: 0.75,
+    endAngle: 0.25,
+    width: 15,
+    splitLine: {
+      fixRadius: 0,
+      splitNumber: 10,
+      width: 15,
+      color: '#FFFFFF',
+      childNumber: 5,
+      childWidth: 5
+    },
+    pointer: {
+      width: 15,
+      color: 'auto'
+    }
+  }, opts.extra.gauge);
+
+  if (gaugeOption.oldAngle == undefined) {
+    gaugeOption.oldAngle = gaugeOption.startAngle;
+  }
+  if (gaugeOption.oldData == undefined) {
+    gaugeOption.oldData = 0;
+  }
+  categories = getGaugeAxisPoints(categories, gaugeOption.startAngle, gaugeOption.endAngle);
+
+  var centerPosition = {
+    x: opts.width / 2,
+    y: opts.height / 2
+  };
+  var radius = Math.min(centerPosition.x, centerPosition.y);
+  radius -= 5 * opts.pixelRatio;
+  radius -= gaugeOption.width / 2;
+  var innerRadius = radius - gaugeOption.width;
+	var totalAngle=0;
+	
+	//判断仪表盘的样式:default百度样式,progress新样式
+	if(gaugeOption.type == 'progress'){
+		
+		//## 第一步画中心圆形背景和进度条背景
+		//中心圆形背景
+		var pieRadius = radius - gaugeOption.width*3;
+		context.beginPath();
+		let gradient = context.createLinearGradient(centerPosition.x, centerPosition.y-pieRadius, centerPosition.x , centerPosition.y+pieRadius);
+		//配置渐变填充(起点:中心点向上减半径;结束点中心点向下加半径)
+		gradient.addColorStop('0', hexToRgb(series[0].color, 0.3));
+		gradient.addColorStop('1.0',hexToRgb("#FFFFFF", 0.1));
+		context.setFillStyle(gradient);
+		context.arc(centerPosition.x, centerPosition.y, pieRadius, 0, 2*Math.PI, false);
+		context.fill();
+		//画进度条背景
+		context.setLineWidth(gaugeOption.width);
+		context.setStrokeStyle(hexToRgb(series[0].color, 0.3));
+		context.setLineCap('round');
+		context.beginPath();
+		context.arc(centerPosition.x, centerPosition.y, innerRadius , gaugeOption.startAngle * Math.PI, gaugeOption.endAngle *Math.PI, false);
+		context.stroke();
+		
+		//## 第二步画刻度线
+		totalAngle = gaugeOption.startAngle - gaugeOption.endAngle + 1;
+		let splitAngle = totalAngle / gaugeOption.splitLine.splitNumber;
+		let childAngle = totalAngle / gaugeOption.splitLine.splitNumber / gaugeOption.splitLine.childNumber;
+		let startX = -radius - gaugeOption.width * 0.5 - gaugeOption.splitLine.fixRadius;
+		let endX = -radius - gaugeOption.width - gaugeOption.splitLine.fixRadius + gaugeOption.splitLine.width;
+		context.save();
+		context.translate(centerPosition.x, centerPosition.y);
+		context.rotate((gaugeOption.startAngle - 1) * Math.PI);
+		let len = gaugeOption.splitLine.splitNumber * gaugeOption.splitLine.childNumber + 1;
+		let proc = series[0].data * process;
+		for (let i = 0; i < len; i++) {
+		  context.beginPath();
+			//刻度线随进度变色
+			if(proc>(i/len)){
+				context.setStrokeStyle(hexToRgb(series[0].color, 1));
+			}else{
+				context.setStrokeStyle(hexToRgb(series[0].color, 0.3));
+			}
+		  context.setLineWidth(3 * opts.pixelRatio);
+		  context.moveTo(startX, 0);
+		  context.lineTo(endX, 0);
+		  context.stroke();
+		  context.rotate(childAngle * Math.PI);
+		}
+		context.restore();
+		
+		//## 第三步画进度条
+		series = getArcbarDataPoints(series, gaugeOption, process);
+		context.setLineWidth(gaugeOption.width);
+		context.setStrokeStyle(series[0].color);
+		context.setLineCap('round');
+		context.beginPath();
+		context.arc(centerPosition.x, centerPosition.y, innerRadius , gaugeOption.startAngle * Math.PI, series[0]._proportion_ *Math.PI, false);
+		context.stroke();
+		
+		//## 第四步画指针
+		let pointerRadius = radius - gaugeOption.width*2.5;
+		context.save();
+		context.translate(centerPosition.x, centerPosition.y);
+		context.rotate((series[0]._proportion_ - 1) * Math.PI);
+		context.beginPath();
+		context.setLineWidth(gaugeOption.width/3);
+		let gradient3 = context.createLinearGradient(0, -pointerRadius*0.6, 0 , pointerRadius*0.6);
+		gradient3.addColorStop('0', hexToRgb('#FFFFFF', 0));
+		gradient3.addColorStop('0.5', hexToRgb(series[0].color, 1));
+		gradient3.addColorStop('1.0', hexToRgb('#FFFFFF', 0));
+		context.setStrokeStyle(gradient3);
+		context.arc(0, 0, pointerRadius , 0.85* Math.PI, 1.15 * Math.PI, false);
+		context.stroke();
+		context.beginPath();
+		context.setLineWidth(1);
+		context.setStrokeStyle(series[0].color);
+		context.setFillStyle(series[0].color);
+		context.moveTo(-pointerRadius-gaugeOption.width/3/2,-4);
+		context.lineTo(-pointerRadius-gaugeOption.width/3/2-4,0);
+		context.lineTo(-pointerRadius-gaugeOption.width/3/2,4);
+		context.lineTo(-pointerRadius-gaugeOption.width/3/2,-4);
+		context.stroke();
+		context.fill();
+		context.restore();
+		
+	//default百度样式
+	}else{
+		//画背景
+		context.setLineWidth(gaugeOption.width);
+		context.setLineCap('butt');
+		for (let i = 0; i < categories.length; i++) {
+		  let eachCategories = categories[i];
+		  context.beginPath();
+		  context.setStrokeStyle(eachCategories.color);
+		  context.arc(centerPosition.x, centerPosition.y, radius, eachCategories._startAngle_ * Math.PI, eachCategories._endAngle_ *Math.PI, false);
+		  context.stroke();
+		}
+		context.save();
+		
+		//画刻度线
+		totalAngle = gaugeOption.startAngle - gaugeOption.endAngle + 1;
+		let splitAngle = totalAngle / gaugeOption.splitLine.splitNumber;
+		let childAngle = totalAngle / gaugeOption.splitLine.splitNumber / gaugeOption.splitLine.childNumber;
+		let startX = -radius - gaugeOption.width * 0.5 - gaugeOption.splitLine.fixRadius;
+		let endX = -radius - gaugeOption.width * 0.5 - gaugeOption.splitLine.fixRadius + gaugeOption.splitLine.width;
+		let childendX = -radius - gaugeOption.width * 0.5 - gaugeOption.splitLine.fixRadius + gaugeOption.splitLine.childWidth;
+		
+		context.translate(centerPosition.x, centerPosition.y);
+		context.rotate((gaugeOption.startAngle - 1) * Math.PI);
+		
+		for (let i = 0; i < gaugeOption.splitLine.splitNumber + 1; i++) {
+		  context.beginPath();
+		  context.setStrokeStyle(gaugeOption.splitLine.color);
+		  context.setLineWidth(2 * opts.pixelRatio);
+		  context.moveTo(startX, 0);
+		  context.lineTo(endX, 0);
+		  context.stroke();
+		  context.rotate(splitAngle * Math.PI);
+		}
+		context.restore();
+		
+		context.save();
+		context.translate(centerPosition.x, centerPosition.y);
+		context.rotate((gaugeOption.startAngle - 1) * Math.PI);
+		
+		for (let i = 0; i < gaugeOption.splitLine.splitNumber * gaugeOption.splitLine.childNumber + 1; i++) {
+		  context.beginPath();
+		  context.setStrokeStyle(gaugeOption.splitLine.color);
+		  context.setLineWidth(1 * opts.pixelRatio);
+		  context.moveTo(startX, 0);
+		  context.lineTo(childendX, 0);
+		  context.stroke();
+		  context.rotate(childAngle * Math.PI);
+		}
+		context.restore();
+		
+		//画指针
+		series = getGaugeDataPoints(series, categories, gaugeOption, process);
+		
+		for (let i = 0; i < series.length; i++) {
+		  let eachSeries = series[i];
+		  context.save();
+		  context.translate(centerPosition.x, centerPosition.y);
+		  context.rotate((eachSeries._proportion_ - 1) * Math.PI);
+		  context.beginPath();
+		  context.setFillStyle(eachSeries.color);
+		  context.moveTo(gaugeOption.pointer.width, 0);
+		  context.lineTo(0, -gaugeOption.pointer.width / 2);
+		  context.lineTo(-innerRadius, 0);
+		  context.lineTo(0, gaugeOption.pointer.width / 2);
+		  context.lineTo(gaugeOption.pointer.width, 0);
+		  context.closePath();
+		  context.fill();
+		  context.beginPath();
+		  context.setFillStyle('#FFFFFF');
+		  context.arc(0, 0, gaugeOption.pointer.width / 6, 0, 2 * Math.PI, false);
+		  context.fill();
+		  context.restore();
+		}
+		
+		if (opts.dataLabel !== false) {
+		  drawGaugeLabel(gaugeOption, radius, centerPosition, opts, config, context);
+		}
+	}
+	
+	//画仪表盘标题,副标题
+  drawRingTitle(opts, config, context, centerPosition);
+
+  if (process === 1 && opts.type === 'gauge') {
+    opts.extra.gauge.oldAngle = series[0]._proportion_;
+    opts.extra.gauge.oldData = series[0].data;
+  }
+  return {
+    center: centerPosition,
+    radius: radius,
+    innerRadius: innerRadius,
+    categories: categories,
+    totalAngle: totalAngle
+  };
+}
+
+function drawRadarDataPoints(series, opts, config, context) {
+  var process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
+  var radarOption = assign({},{
+    gridColor: '#cccccc',
+    labelColor: '#666666',
+    opacity: 0.2,
+		gridCount:3
+  },opts.extra.radar);
+  
+  var coordinateAngle = getRadarCoordinateSeries(opts.categories.length);
+  
+  var centerPosition = {
+    x: opts.area[3] + (opts.width - opts.area[1] - opts.area[3]) / 2,
+    y: opts.area[0] + (opts.height - opts.area[0] - opts.area[2]) / 2
+  };
+
+  var radius = Math.min(centerPosition.x - (getMaxTextListLength(opts.categories) + config.radarLabelTextMargin),
+    centerPosition.y - config.radarLabelTextMargin);
+  //TODO逻辑不对
+  radius -= opts.padding[1];
+
+  // draw grid
+  context.beginPath();
+  context.setLineWidth(1 * opts.pixelRatio);
+  context.setStrokeStyle(radarOption.gridColor);
+  coordinateAngle.forEach(function(angle) {
+    var pos = convertCoordinateOrigin(radius * Math.cos(angle), radius * Math.sin(angle), centerPosition);
+    context.moveTo(centerPosition.x, centerPosition.y);
+    context.lineTo(pos.x, pos.y);
+  });
+  context.stroke();
+  context.closePath();
+  // draw split line grid
+
+  var _loop = function _loop(i) {
+    var startPos = {};
+    context.beginPath();
+    context.setLineWidth(1 * opts.pixelRatio);
+    context.setStrokeStyle(radarOption.gridColor);
+    coordinateAngle.forEach(function(angle, index) {
+      var pos = convertCoordinateOrigin(radius / radarOption.gridCount * i * Math.cos(angle), radius / radarOption.gridCount * i * Math.sin(angle), centerPosition);
+      if (index === 0) {
+        startPos = pos;
+        context.moveTo(pos.x, pos.y);
+      } else {
+        context.lineTo(pos.x, pos.y);
+      }
+    });
+    context.lineTo(startPos.x, startPos.y);
+    context.stroke();
+    context.closePath();
+  };
+
+  for (var i = 1; i <= radarOption.gridCount; i++) {
+    _loop(i);
+  }
+
+  var radarDataPoints = getRadarDataPoints(coordinateAngle, centerPosition, radius, series, opts, process);
+
+  radarDataPoints.forEach(function(eachSeries, seriesIndex) {
+    // 绘制区域数据
+    context.beginPath();
+    context.setFillStyle(hexToRgb(eachSeries.color, radarOption.opacity));
+    eachSeries.data.forEach(function(item, index) {
+      if (index === 0) {
+        context.moveTo(item.position.x, item.position.y);
+      } else {
+        context.lineTo(item.position.x, item.position.y);
+      }
+    });
+    context.closePath();
+    context.fill();
+
+    if (opts.dataPointShape !== false) {
+      var points = eachSeries.data.map(function(item) {
+        return item.position;
+      });
+      drawPointShape(points, eachSeries.color, eachSeries.pointShape, context, opts);
+    }
+  });
+  // draw label text
+  drawRadarLabel(coordinateAngle, radius, centerPosition, opts, config, context);
+
+  return {
+    center: centerPosition,
+    radius: radius,
+    angleList: coordinateAngle
+  };
+}
+
+function normalInt(min, max, iter) {
+    iter = iter==0?1:iter;
+    var arr = [];
+    for (var i = 0; i < iter; i++) {
+        arr[i] = Math.random();
+    };
+    return  Math.floor(arr.reduce(function(i,j){return i+j})/iter*(max-min))+min;  
+};
+
+function collisionNew(area,points,width,height){
+    var isIn=false;
+    for(let i=0;i<points.length;i++){
+      if(points[i].area){
+        if(area[3]<points[i].area[1]||area[0]>points[i].area[2]||area[1]>points[i].area[3]||area[2]<points[i].area[0]){
+          if(area[0]<0 || area[1]<0 || area[2]>width || area[3]>height){
+            isIn=true;
+            break;
+          }else{
+            isIn=false;
+          }
+        }else{
+          isIn=true;
+          break;
+        }
+      }
+    }
+    return isIn;
+};
+
+function getBoundingBox(data) {
+  var bounds = {}, coords;
+  bounds.xMin = 180;
+  bounds.xMax = 0;
+  bounds.yMin = 90;
+  bounds.yMax = 0
+  for (var i = 0; i < data.length; i++) {
+      var coorda = data[i].geometry.coordinates
+      for (var k = 0; k < coorda.length; k++) {
+          coords = coorda[k];
+          if (coords.length == 1) {
+              coords = coords[0]
+          }
+          for (var j = 0; j < coords.length; j++) {
+              var longitude = coords[j][0];
+              var latitude = coords[j][1];
+              var point = {
+                  x: longitude, 
+                  y: latitude 
+              }
+              bounds.xMin = bounds.xMin < point.x ? bounds.xMin : point.x;
+              bounds.xMax = bounds.xMax > point.x ? bounds.xMax : point.x;
+              bounds.yMin = bounds.yMin < point.y ? bounds.yMin : point.y;
+              bounds.yMax = bounds.yMax > point.y ? bounds.yMax : point.y;
+          }
+      }
+  }
+  return bounds;
+}
+
+function coordinateToPoint(latitude, longitude,bounds,scale,xoffset,yoffset) {
+  return {
+      x: (longitude - bounds.xMin) * scale+xoffset,
+      y: (bounds.yMax - latitude) * scale+yoffset
+  };
+}
+
+function pointToCoordinate(pointY, pointX,bounds,scale,xoffset,yoffset) {
+  return {
+      x: (pointX-xoffset)/scale+bounds.xMin,
+      y: bounds.yMax - (pointY-yoffset)/scale
+  };
+}
+
+function isRayIntersectsSegment(poi,s_poi,e_poi){
+      if (s_poi[1]==e_poi[1]){return false;} 
+      if (s_poi[1]>poi[1] && e_poi[1]>poi[1]){return false;}
+      if (s_poi[1]<poi[1] && e_poi[1]<poi[1]){return false;}
+      if (s_poi[1]==poi[1] && e_poi[1]>poi[1]){return false;}
+      if (e_poi[1]==poi[1] && s_poi[1]>poi[1]){return false;}
+      if (s_poi[0]<poi[0] && e_poi[1]<poi[1]){return false;}
+      let xseg=e_poi[0]-(e_poi[0]-s_poi[0])*(e_poi[1]-poi[1])/(e_poi[1]-s_poi[1]); 
+      if (xseg<poi[0]){
+        return false;
+      }else{
+        return true;
+      }
+} 
+
+function isPoiWithinPoly(poi,poly){
+  let sinsc=0;
+  for (let i=0;i<poly.length;i++){
+    let epoly=poly[i][0];
+    if (poly.length == 1) {
+      epoly = poly[i][0]
+    }
+    for(let j=0;j<epoly.length-1;j++){
+      let s_poi=epoly[j];
+      let e_poi=epoly[j+1];
+      if (isRayIntersectsSegment(poi,s_poi,e_poi)){
+        sinsc+=1;
+      }
+    }
+  }
+  
+  if(sinsc%2==1){
+    return true;
+  }else{
+    return false;
+  }
+}
+
+
+function drawMapDataPoints(series, opts, config, context) {
+  var mapOption=assign({},{
+    border:true,
+    borderWidth:1,
+    borderColor:'#666666',
+    fillOpacity:0.6,
+    activeBorderColor:'#f04864',
+    activeFillColor:'#facc14',
+    activeFillOpacity:1
+  },opts.extra.map);
+  var coords, point;
+  var data = series;
+  var bounds= getBoundingBox(data);
+  var xScale = opts.width / Math.abs(bounds.xMax - bounds.xMin);
+  var yScale = opts.height / Math.abs(bounds.yMax - bounds.yMin);
+  var scale = xScale < yScale ? xScale : yScale;
+  var xoffset=opts.width/2-Math.abs(bounds.xMax - bounds.xMin)/2*scale;
+  var yoffset=opts.height/2-Math.abs(bounds.yMax - bounds.yMin)/2*scale;
+  context.beginPath();
+  context.clearRect(0, 0, opts.width, opts.height);
+  context.setFillStyle(opts.background||'#FFFFFF');
+  context.rect(0,0,opts.width,opts.height);
+  context.fill();
+  for (var i = 0; i < data.length; i++) {
+    context.beginPath();
+    context.setLineWidth(mapOption.borderWidth * opts.pixelRatio);
+    context.setStrokeStyle(mapOption.borderColor);
+    context.setFillStyle(hexToRgb(series[i].color, mapOption.fillOpacity));
+    if (opts.tooltip) {
+      if (opts.tooltip.index == i ) {
+        context.setStrokeStyle(mapOption.activeBorderColor);
+        context.setFillStyle(hexToRgb(mapOption.activeFillColor, mapOption.activeFillOpacity));
+      }
+    }
+    var coorda = data[i].geometry.coordinates
+    for (var k = 0; k < coorda.length; k++) {
+      coords = coorda[k];
+      if (coords.length == 1) {
+        coords = coords[0]
+      }
+      for (var j = 0; j < coords.length; j++) {
+        point = coordinateToPoint(coords[j][1], coords[j][0],bounds,scale,xoffset,yoffset)
+        if (j === 0) {
+          context.beginPath();
+          context.moveTo(point.x, point.y);
+        } else {
+          context.lineTo(point.x, point.y);
+        }
+      }
+      context.fill();
+      if(mapOption.border == true){
+        context.stroke();
+      }
+    }
+    if(opts.dataLabel == true){
+      var centerPoint = data[i].properties.centroid;
+      if(centerPoint){
+        point = coordinateToPoint(centerPoint[1], centerPoint[0],bounds,scale,xoffset,yoffset);
+        let fontSize=data[i].textSize||config.fontSize;
+        let text=data[i].properties.name;
+        context.beginPath();
+        context.setFontSize(fontSize)
+        context.setFillStyle(data[i].textColor||'#666666')
+        context.fillText(text, point.x-measureText(text,fontSize)/2, point.y+fontSize/2);
+        context.closePath();
+        context.stroke();
+      }
+    }
+  }
+  opts.chartData.mapData={
+    bounds:bounds,
+    scale:scale,
+    xoffset:xoffset,
+    yoffset:yoffset
+  }
+  drawToolTipBridge(opts, config, context,1);
+  context.draw();
+}
+
+function getWordCloudPoint(opts,type){
+  let points = opts.series.sort(function(a,b){return parseInt(b.textSize)-parseInt(a.textSize);});
+  switch (type) {
+    case 'normal':
+      for (let i = 0; i < points.length; i++) {
+        let text = points[i].name;
+        let tHeight = points[i].textSize;
+        let tWidth = measureText(text,tHeight);
+        let x,y;
+        let area;
+        let breaknum=0;
+        while(true) {
+            breaknum++;
+            x = normalInt(-opts.width/2, opts.width/2,5) - tWidth/2;
+            y = normalInt(-opts.height/2, opts.height/2,5) + tHeight/2;
+            area=[x-5+opts.width/2,y-5-tHeight+opts.height/2,x+tWidth+5+opts.width/2,y+5+opts.height/2];
+            let isCollision = collisionNew(area,points,opts.width,opts.height);
+            if (!isCollision) break;
+            if (breaknum==1000){
+              area=[-100,-100,-100,-100];
+              break;
+            }
+        };
+        points[i].area=area;
+      }
+    break;
+    case 'vertical':
+      function Spin(){
+        //获取均匀随机值,是否旋转,旋转的概率为(1-0.5)
+        if (Math.random()>0.7) {
+            return true;
+        }else {return false};
+      };
+      for (let i = 0; i < points.length; i++) { 
+        let text = points[i].name;
+        let tHeight = points[i].textSize;
+        let tWidth = measureText(text,tHeight);
+        let isSpin = Spin(); 
+        let x,y,area,areav;
+        let breaknum=0;
+        while(true) {
+          breaknum++;
+          let isCollision;
+          if (isSpin) {
+              x = normalInt(-opts.width/2, opts.width/2,5) - tWidth/2;
+              y = normalInt(-opts.height/2, opts.height/2,5)+tHeight/2;
+              area=[y-5-tWidth+opts.width/2,(-x-5+opts.height/2),y+5+opts.width/2,(-x+tHeight+5+opts.height/2)];
+              areav=[opts.width-(opts.width/2-opts.height/2)-(-x+tHeight+5+opts.height/2)-5,(opts.height/2-opts.width/2)+(y-5-tWidth+opts.width/2)-5,opts.width-(opts.width/2-opts.height/2)-(-x+tHeight+5+opts.height/2)+tHeight,(opts.height/2-opts.width/2)+(y-5-tWidth+opts.width/2)+tWidth+5];
+              isCollision = collisionNew(areav,points,opts.height,opts.width);
+          }else{
+            x = normalInt(-opts.width/2, opts.width/2,5) - tWidth/2;
+            y = normalInt(-opts.height/2, opts.height/2,5)+tHeight/2;
+            area=[x-5+opts.width/2,y-5-tHeight+opts.height/2,x+tWidth+5+opts.width/2,y+5+opts.height/2];
+            isCollision = collisionNew(area,points,opts.width,opts.height);
+          } 
+          if (!isCollision) break;
+          if (breaknum==1000){
+            area=[-1000,-1000,-1000,-1000];
+            break;
+          }
+        };
+        if (isSpin) {
+          points[i].area=areav;
+          points[i].areav=area;
+        }else{
+          points[i].area=area;
+        }
+        points[i].rotate=isSpin;
+      };
+    break;
+  }
+  return points;
+}
+
+
+function drawWordCloudDataPoints(series, opts, config, context) {
+  let process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
+  let wordOption = assign({},{
+    type: 'normal',
+    autoColors: true
+  },opts.extra.word);
+  
+  context.beginPath();
+  context.setFillStyle(opts.background||'#FFFFFF');
+  context.rect(0,0,opts.width,opts.height);
+  context.fill();
+  context.save();
+  let points = opts.chartData.wordCloudData;
+  context.translate(opts.width/2,opts.height/2);
+  
+  for(let i=0;i<points.length;i++){
+      context.save();
+      if(points[i].rotate){
+        context.rotate(90 * Math.PI / 180);
+      }
+      let text = points[i].name;
+      let tHeight = points[i].textSize;
+      let tWidth = measureText(text,tHeight);
+      context.beginPath();
+      context.setStrokeStyle(points[i].color);
+      context.setFillStyle(points[i].color);
+      context.setFontSize(tHeight);
+      if(points[i].rotate){
+        if(points[i].areav[0]>0){
+          if (opts.tooltip) {
+            if (opts.tooltip.index == i) {
+              context.strokeText(text,(points[i].areav[0]+5-opts.width/2)*process-tWidth*(1-process)/2,(points[i].areav[1]+5+tHeight-opts.height/2)*process);
+              }else{
+                context.fillText(text,(points[i].areav[0]+5-opts.width/2)*process-tWidth*(1-process)/2,(points[i].areav[1]+5+tHeight-opts.height/2)*process);
+              }
+          }else{
+            context.fillText(text,(points[i].areav[0]+5-opts.width/2)*process-tWidth*(1-process)/2,(points[i].areav[1]+5+tHeight-opts.height/2)*process);
+          } 
+        }
+      }else{
+        if(points[i].area[0]>0){
+          if (opts.tooltip) {
+            if (opts.tooltip.index == i) {
+              context.strokeText(text,(points[i].area[0]+5-opts.width/2)*process-tWidth*(1-process)/2,(points[i].area[1]+5+tHeight-opts.height/2)*process);
+            }else{
+              context.fillText(text,(points[i].area[0]+5-opts.width/2)*process-tWidth*(1-process)/2,(points[i].area[1]+5+tHeight-opts.height/2)*process);
+            }
+          }else{
+            context.fillText(text,(points[i].area[0]+5-opts.width/2)*process-tWidth*(1-process)/2,(points[i].area[1]+5+tHeight-opts.height/2)*process);
+          }
+            
+        }
+      }
+      
+      context.stroke();
+      context.restore();
+  }
+  context.restore();
+}
+
+function drawFunnelDataPoints(series, opts, config, context) {
+  let process = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;
+  let funnelOption = assign({},{
+    activeWidth:10,
+    activeOpacity:0.3,
+    border:false,
+    borderWidth:2,
+    borderColor:'#FFFFFF',
+    fillOpacity:1,
+    labelAlign:'right'
+  },opts.extra.funnel);
+  let eachSpacing = (opts.height - opts.area[0] - opts.area[2])/series.length;
+  let centerPosition = {
+    x: opts.area[3] + (opts.width - opts.area[1] - opts.area[3]) / 2,
+    y: opts.height-opts.area[2]
+  };
+  let activeWidth = funnelOption.activeWidth;
+  let radius = Math.min((opts.width - opts.area[1] - opts.area[3]) / 2 - activeWidth, (opts.height - opts.area[0] - opts.area[2]) / 2 - activeWidth);
+  series = getFunnelDataPoints(series, radius, process);
+  context.save();
+  context.translate(centerPosition.x,centerPosition.y);
+  for(let i=0;i<series.length;i++){
+    if(i==0){
+      if (opts.tooltip) {
+        if (opts.tooltip.index == i) {
+          context.beginPath();
+          context.setFillStyle(hexToRgb(series[i].color, funnelOption.activeOpacity));
+          context.moveTo(-activeWidth, 0);
+          context.lineTo(-series[i].radius-activeWidth, -eachSpacing);
+          context.lineTo(series[i].radius+activeWidth, -eachSpacing);
+          context.lineTo(activeWidth, 0);
+          context.lineTo(-activeWidth, 0);
+          context.closePath();
+          context.fill();
+        }
+      }
+      series[i].funnelArea=[centerPosition.x-series[i].radius,centerPosition.y-eachSpacing,centerPosition.x+series[i].radius,centerPosition.y];
+      context.beginPath();
+      context.setLineWidth(funnelOption.borderWidth * opts.pixelRatio);
+      context.setStrokeStyle(funnelOption.borderColor);
+      context.setFillStyle(hexToRgb(series[i].color, funnelOption.fillOpacity));
+      context.moveTo(0, 0);
+      context.lineTo(-series[i].radius, -eachSpacing);
+      context.lineTo(series[i].radius, -eachSpacing);
+      context.lineTo(0, 0);
+      context.closePath();
+      context.fill();
+      if(funnelOption.border == true){
+        context.stroke();
+      }
+    }else{
+      if (opts.tooltip) {
+        if (opts.tooltip.index == i) {
+          context.beginPath();
+          context.setFillStyle(hexToRgb(series[i].color, funnelOption.activeOpacity));
+          context.moveTo(0, 0);
+          context.lineTo(-series[i-1].radius-activeWidth, 0);
+          context.lineTo(-series[i].radius-activeWidth, -eachSpacing);
+          context.lineTo(series[i].radius+activeWidth, -eachSpacing);
+          context.lineTo(series[i-1].radius+activeWidth, 0);
+          context.lineTo(0, 0);
+          context.closePath();
+          context.fill();
+        }
+      }
+      series[i].funnelArea=[centerPosition.x-series[i].radius,centerPosition.y-eachSpacing*(i+1),centerPosition.x+series[i].radius,centerPosition.y-eachSpacing*i];
+      context.beginPath();
+      context.setLineWidth(funnelOption.borderWidth * opts.pixelRatio);
+      context.setStrokeStyle(funnelOption.borderColor);
+      context.setFillStyle(hexToRgb(series[i].color, funnelOption.fillOpacity));
+      context.moveTo(0, 0);
+      context.lineTo(-series[i-1].radius, 0);
+      context.lineTo(-series[i].radius, -eachSpacing);
+      context.lineTo(series[i].radius, -eachSpacing);
+      context.lineTo(series[i-1].radius, 0);
+      context.lineTo(0, 0);
+      context.closePath();
+      context.fill();
+      if(funnelOption.border == true){
+        context.stroke();
+      }
+    }
+    context.translate(0,-eachSpacing)
+  }
+  context.restore();
+  
+  if (opts.dataLabel !== false && process === 1) {
+    drawFunnelText(series, opts, context, eachSpacing, funnelOption.labelAlign, activeWidth, centerPosition);
+  }
+  
+  return {
+    center: centerPosition,
+    radius: radius,
+    series: series
+  };
+}
+
+function drawFunnelText(series, opts, context, eachSpacing, labelAlign,activeWidth, centerPosition){
+  for(let i=0;i<series.length;i++){
+    let item = series[i];
+    let startX,endX,startY,fontSize;
+    let text = item.format ? item.format(+item._proportion_.toFixed(2)) : util.toFixed(item._proportion_ * 100) +'%';
+    if(labelAlign == 'right'){
+      if(i==0){
+        startX=(item.funnelArea[2]+centerPosition.x)/2;
+      }else{
+        startX=(item.funnelArea[2]+series[i-1].funnelArea[2])/2;
+      }
+      endX=startX+activeWidth*2;
+      startY=item.funnelArea[1]+eachSpacing/2;
+      fontSize = item.textSize || opts.fontSize;
+      context.setLineWidth(1 * opts.pixelRatio);
+      context.setStrokeStyle(item.color);
+      context.setFillStyle(item.color);
+      context.beginPath();
+      context.moveTo(startX,startY );
+      context.lineTo(endX,startY);
+      context.stroke();
+      context.closePath();
+      context.beginPath();
+      context.moveTo(endX, startY);
+      context.arc(endX, startY, 2, 0, 2 * Math.PI);
+      context.closePath();
+      context.fill();
+      context.beginPath();
+      context.setFontSize(fontSize);
+      context.setFillStyle(item.textColor || '#666666');
+      context.fillText(text, endX+5, startY + fontSize/2 -2);
+      context.closePath();
+      context.stroke();
+      context.closePath();
+    }else{
+      if(i==0){
+        startX=(item.funnelArea[0]+centerPosition.x)/2;
+      }else{
+        startX=(item.funnelArea[0]+series[i-1].funnelArea[0])/2;
+      }
+      endX=startX-activeWidth*2;
+      startY=item.funnelArea[1]+eachSpacing/2;
+      fontSize = item.textSize || opts.fontSize;
+      context.setLineWidth(1 * opts.pixelRatio);
+      context.setStrokeStyle(item.color);
+      context.setFillStyle(item.color);
+      context.beginPath();
+      context.moveTo(startX,startY );
+      context.lineTo(endX,startY);
+      context.stroke();
+      context.closePath();
+      context.beginPath();
+      context.moveTo(endX, startY);
+      context.arc(endX, startY, 2, 0, 2 * Math.PI);
+      context.closePath();
+      context.fill();
+      context.beginPath();
+      context.setFontSize(fontSize);
+      context.setFillStyle(item.textColor || '#666666');
+      context.fillText(text, endX-5-measureText(text), startY + fontSize/2 -2);
+      context.closePath();
+      context.stroke();
+      context.closePath();
+    }
+    
+  }
+}
+
+
+function drawCanvas(opts, context) {
+  context.draw();
+}
+
+var Timing = {
+  easeIn: function easeIn(pos) {
+    return Math.pow(pos, 3);
+  },
+  easeOut: function easeOut(pos) {
+    return Math.pow(pos - 1, 3) + 1;
+  },
+  easeInOut: function easeInOut(pos) {
+    if ((pos /= 0.5) < 1) {
+      return 0.5 * Math.pow(pos, 3);
+    } else {
+      return 0.5 * (Math.pow(pos - 2, 3) + 2);
+    }
+  },
+  linear: function linear(pos) {
+    return pos;
+  }
+};
+
+function Animation(opts) {
+  this.isStop = false;
+  opts.duration = typeof opts.duration === 'undefined' ? 1000 : opts.duration;
+  opts.timing = opts.timing || 'linear';
+  var delay = 17;
+
+  function createAnimationFrame() {
+    if (typeof setTimeout !== 'undefined') {
+      return function(step, delay) {
+        setTimeout(function() {
+          var timeStamp = +new Date();
+          step(timeStamp);
+        }, delay);
+      };
+    } else if (typeof requestAnimationFrame !== 'undefined') {
+      return requestAnimationFrame;
+    } else {
+      return function(step) {
+        step(null);
+      };
+    }
+  };
+  var animationFrame = createAnimationFrame();
+  var startTimeStamp = null;
+  var _step = function step(timestamp) {
+    if (timestamp === null || this.isStop === true) {
+      opts.onProcess && opts.onProcess(1);
+      opts.onAnimationFinish && opts.onAnimationFinish();
+      return;
+    }
+    if (startTimeStamp === null) {
+      startTimeStamp = timestamp;
+    }
+    if (timestamp - startTimeStamp < opts.duration) {
+      var process = (timestamp - startTimeStamp) / opts.duration;
+      var timingFunction = Timing[opts.timing];
+      process = timingFunction(process);
+
+      opts.onProcess && opts.onProcess(process);
+      animationFrame(_step, delay);
+    } else {
+      opts.onProcess && opts.onProcess(1);
+      opts.onAnimationFinish && opts.onAnimationFinish();
+    }
+  };
+  _step = _step.bind(this);
+  animationFrame(_step, delay);
+}
+
+// stop animation immediately
+// and tigger onAnimationFinish
+Animation.prototype.stop = function() {
+  this.isStop = true;
+};
+
+function drawCharts(type, opts, config, context) {
+  var _this = this;
+  var series = opts.series;
+  var categories = opts.categories;
+  series = fillSeries(series, opts, config);
+  var duration = opts.animation ? opts.duration : 0;
+  _this.animationInstance && _this.animationInstance.stop();
+  var seriesMA = null;
+  if (type == 'candle') {
+    let average = assign({}, opts.extra.candle.average);
+    if (average.show) {
+      seriesMA = calCandleMA(average.day, average.name, average.color, series[0].data);
+      seriesMA = fillSeries(seriesMA, opts, config);
+      opts.seriesMA = seriesMA;
+    } else if (opts.seriesMA) {
+      seriesMA = opts.seriesMA = fillSeries(opts.seriesMA, opts, config);
+    } else {
+      seriesMA = series;
+    }
+  } else {
+    seriesMA = series;
+  }
+
+  /* 过滤掉show=false的series */
+  opts._series_ = series = filterSeries(series);
+
+  //重新计算图表区域
+
+  opts.area = new Array(4);
+  //复位绘图区域
+  for (let j = 0; j < 4; j++) {
+    opts.area[j] = opts.padding[j];
+  }
+
+  //通过计算三大区域:图例、X轴、Y轴的大小,确定绘图区域
+  var _calLegendData = calLegendData(seriesMA, opts, config, opts.chartData),
+    legendHeight = _calLegendData.area.wholeHeight,
+    legendWidth = _calLegendData.area.wholeWidth;
+    
+  switch (opts.legend.position) {
+    case 'top':
+      opts.area[0] += legendHeight;
+      break;
+    case 'bottom':
+      opts.area[2] += legendHeight;
+      break;
+    case 'left':
+      opts.area[3] += legendWidth;
+      break;
+    case 'right':
+      opts.area[1] += legendWidth;
+      break;
+  }
+
+  let _calYAxisData = {},yAxisWidth = 0;
+  if (opts.type === 'line' || opts.type === 'column' || opts.type === 'area' || opts.type === 'mix' || opts.type === 'candle') {
+    _calYAxisData = calYAxisData(series, opts, config);
+    yAxisWidth = _calYAxisData.yAxisWidth;
+    //如果显示Y轴标题
+    if(opts.yAxis.showTitle){
+      let maxTitleHeight=0;
+      for(let i=0;i<opts.yAxis.data.length;i++){
+        maxTitleHeight = Math.max(maxTitleHeight,opts.yAxis.data[i].titleFontSize?opts.yAxis.data[i].titleFontSize:config.fontSize)
+      }
+      opts.area[0] += (maxTitleHeight+6)*opts.pixelRatio;
+    }
+    let rightIndex=0,leftIndex=0;
+    //计算主绘图区域左右位置
+    for(let i=0;i<yAxisWidth.length;i++){
+      if(yAxisWidth[i].position=='left'){
+        if(leftIndex>0){
+          opts.area[3] += yAxisWidth[i].width + opts.yAxis.padding;
+        }else{
+          opts.area[3] += yAxisWidth[i].width;
+        }
+        leftIndex +=1;
+      }else{
+        if(rightIndex>0){
+          opts.area[1] += yAxisWidth[i].width + opts.yAxis.padding;
+        }else{
+          opts.area[1] += yAxisWidth[i].width;
+        }
+        rightIndex +=1;
+      }
+    }
+  }else{
+    config.yAxisWidth = yAxisWidth;
+  }
+  opts.chartData.yAxisData = _calYAxisData;
+
+  if (opts.categories && opts.categories.length) {
+    opts.chartData.xAxisData = getXAxisPoints(opts.categories, opts, config);
+    let _calCategoriesData = calCategoriesData(opts.categories, opts, config, opts.chartData.xAxisData.eachSpacing),
+      xAxisHeight = _calCategoriesData.xAxisHeight,
+      angle = _calCategoriesData.angle;
+    config.xAxisHeight = xAxisHeight;
+    config._xAxisTextAngle_ = angle;
+    opts.area[2] += xAxisHeight;
+    opts.chartData.categoriesData = _calCategoriesData;
+  }else{
+		if (opts.type === 'line' || opts.type === 'area' || opts.type === 'points') {
+			opts.chartData.xAxisData = calXAxisData(series, opts, config);
+			categories=opts.chartData.xAxisData.rangesFormat;
+			let _calCategoriesData = calCategoriesData(categories, opts, config, opts.chartData.xAxisData.eachSpacing),
+			  xAxisHeight = _calCategoriesData.xAxisHeight,
+			  angle = _calCategoriesData.angle;
+			config.xAxisHeight = xAxisHeight;
+			config._xAxisTextAngle_ = angle;
+			opts.area[2] += xAxisHeight;
+			opts.chartData.categoriesData = _calCategoriesData;
+		}else{
+			opts.chartData.xAxisData={
+				xAxisPoints: []
+			};
+		}
+	}
+  //计算右对齐偏移距离
+  if (opts.enableScroll && opts.xAxis.scrollAlign == 'right' && opts._scrollDistance_ === undefined) {
+    let offsetLeft = 0,
+      xAxisPoints = opts.chartData.xAxisData.xAxisPoints,
+      startX = opts.chartData.xAxisData.startX,
+      endX = opts.chartData.xAxisData.endX,
+      eachSpacing = opts.chartData.xAxisData.eachSpacing;
+    let totalWidth = eachSpacing * (xAxisPoints.length - 1);
+    let screenWidth = endX - startX;
+    offsetLeft = screenWidth - totalWidth;
+    _this.scrollOption = {
+      currentOffset: offsetLeft,
+      startTouchX: offsetLeft,
+      distance: 0,
+      lastMoveTime: 0
+    };
+    opts._scrollDistance_ = offsetLeft;
+  }
+
+  if (type === 'pie' || type === 'ring' || type === 'rose') {
+    config._pieTextMaxLength_ = opts.dataLabel === false ? 0 : getPieTextMaxLength(seriesMA);
+  }
+
+  switch (type) {
+    case 'word':
+      let wordOption = assign({},{
+        type: 'normal',
+        autoColors: true
+      },opts.extra.word);
+      if(opts.updateData==true || opts.updateData==undefined){
+        opts.chartData.wordCloudData=getWordCloudPoint(opts,wordOption.type);
+      }
+      this.animationInstance = new Animation({
+        timing: 'easeInOut',
+        duration: duration,
+        onProcess: function(process) {
+          context.clearRect(0, 0, opts.width, opts.height);
+          if (opts.rotate) {
+            contextRotate(context, opts);
+          }
+          drawWordCloudDataPoints(series, opts, config, context,process);
+          drawCanvas(opts, context);
+        },
+        onAnimationFinish: function onAnimationFinish() {
+          _this.event.trigger('renderComplete');
+        }
+      });
+    break;
+    case 'map':
+      context.clearRect(0, 0, opts.width, opts.height);
+      drawMapDataPoints(series, opts, config, context);
+    break;
+    case 'funnel':
+      this.animationInstance = new Animation({
+        timing: 'easeInOut',
+        duration: duration,
+        onProcess: function(process) {
+          context.clearRect(0, 0, opts.width, opts.height);
+          if (opts.rotate) {
+            contextRotate(context, opts);
+          }
+          opts.chartData.funnelData = drawFunnelDataPoints(series, opts, config, context, process);
+          drawLegend(opts.series, opts, config, context, opts.chartData);
+          drawToolTipBridge(opts, config, context, process);
+          drawCanvas(opts, context);
+        },
+        onAnimationFinish: function onAnimationFinish() {
+          _this.event.trigger('renderComplete');
+        }
+      });
+    break;
+    case 'line':
+      this.animationInstance = new Animation({
+        timing: 'easeIn',
+        duration: duration,
+        onProcess: function onProcess(process) {
+          context.clearRect(0, 0, opts.width, opts.height);
+          if (opts.rotate) {
+            contextRotate(context, opts);
+          }
+          drawYAxisGrid(categories, opts, config, context);
+          drawXAxis(categories, opts, config, context);
+          var _drawLineDataPoints = drawLineDataPoints(series, opts, config, context, process),
+            xAxisPoints = _drawLineDataPoints.xAxisPoints,
+            calPoints = _drawLineDataPoints.calPoints,
+            eachSpacing = _drawLineDataPoints.eachSpacing;
+          opts.chartData.xAxisPoints = xAxisPoints;
+          opts.chartData.calPoints = calPoints;
+          opts.chartData.eachSpacing = eachSpacing;
+          drawYAxis(series, opts, config, context);
+          if (opts.enableMarkLine !== false && process === 1) {
+            drawMarkLine(opts, config, context);
+          }
+          drawLegend(opts.series, opts, config, context, opts.chartData);
+          drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints);
+          drawCanvas(opts, context);
+
+        },
+        onAnimationFinish: function onAnimationFinish() {
+          _this.event.trigger('renderComplete');
+        }
+      });
+      break;
+    case 'mix':
+      this.animationInstance = new Animation({
+        timing: 'easeIn',
+        duration: duration,
+        onProcess: function onProcess(process) {
+          context.clearRect(0, 0, opts.width, opts.height);
+          if (opts.rotate) {
+            contextRotate(context, opts);
+          }
+          drawYAxisGrid(categories, opts, config, context);
+          drawXAxis(categories, opts, config, context);
+          var _drawMixDataPoints = drawMixDataPoints(series, opts, config, context, process),
+            xAxisPoints = _drawMixDataPoints.xAxisPoints,
+            calPoints = _drawMixDataPoints.calPoints,
+            eachSpacing = _drawMixDataPoints.eachSpacing;
+          opts.chartData.xAxisPoints = xAxisPoints;
+          opts.chartData.calPoints = calPoints;
+          opts.chartData.eachSpacing = eachSpacing;
+          drawYAxis(series, opts, config, context);
+          if (opts.enableMarkLine !== false && process === 1) {
+            drawMarkLine(opts, config, context);
+          }
+          drawLegend(opts.series, opts, config, context, opts.chartData);
+          drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints);
+          drawCanvas(opts, context);
+        },
+        onAnimationFinish: function onAnimationFinish() {
+          _this.event.trigger('renderComplete');
+        }
+      });
+      break;
+    case 'column':
+      this.animationInstance = new Animation({
+        timing: 'easeIn',
+        duration: duration,
+        onProcess: function onProcess(process) {
+          context.clearRect(0, 0, opts.width, opts.height);
+          if (opts.rotate) {
+            contextRotate(context, opts);
+          }
+          drawYAxisGrid(categories, opts, config, context);
+          drawXAxis(categories, opts, config, context);
+          var _drawColumnDataPoints = drawColumnDataPoints(series, opts, config, context, process),
+            xAxisPoints = _drawColumnDataPoints.xAxisPoints,
+            calPoints = _drawColumnDataPoints.calPoints,
+            eachSpacing = _drawColumnDataPoints.eachSpacing;
+          opts.chartData.xAxisPoints = xAxisPoints;
+          opts.chartData.calPoints = calPoints;
+          opts.chartData.eachSpacing = eachSpacing;
+          drawYAxis(series, opts, config, context);
+          if (opts.enableMarkLine !== false && process === 1) {
+            drawMarkLine(opts, config, context);
+          }
+          drawLegend(opts.series, opts, config, context, opts.chartData);
+          drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints);
+          drawCanvas(opts, context);
+        },
+        onAnimationFinish: function onAnimationFinish() {
+          _this.event.trigger('renderComplete');
+        }
+      });
+      break;
+    case 'area':
+      this.animationInstance = new Animation({
+        timing: 'easeIn',
+        duration: duration,
+        onProcess: function onProcess(process) {
+          context.clearRect(0, 0, opts.width, opts.height);
+          if (opts.rotate) {
+            contextRotate(context, opts);
+          }
+          drawYAxisGrid(categories, opts, config, context);
+          drawXAxis(categories, opts, config, context);
+          var _drawAreaDataPoints = drawAreaDataPoints(series, opts, config, context, process),
+            xAxisPoints = _drawAreaDataPoints.xAxisPoints,
+            calPoints = _drawAreaDataPoints.calPoints,
+            eachSpacing = _drawAreaDataPoints.eachSpacing;
+          opts.chartData.xAxisPoints = xAxisPoints;
+          opts.chartData.calPoints = calPoints;
+          opts.chartData.eachSpacing = eachSpacing;
+          drawYAxis(series, opts, config, context);
+          if (opts.enableMarkLine !== false && process === 1) {
+            drawMarkLine(opts, config, context);
+          }
+          drawLegend(opts.series, opts, config, context, opts.chartData);
+          drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints);
+          drawCanvas(opts, context);
+        },
+        onAnimationFinish: function onAnimationFinish() {
+          _this.event.trigger('renderComplete');
+        }
+      });
+      break;
+    case 'ring':
+    case 'pie':
+      this.animationInstance = new Animation({
+        timing: 'easeInOut',
+        duration: duration,
+        onProcess: function onProcess(process) {
+          context.clearRect(0, 0, opts.width, opts.height);
+          if (opts.rotate) {
+            contextRotate(context, opts);
+          }
+          opts.chartData.pieData = drawPieDataPoints(series, opts, config, context, process);
+          drawLegend(opts.series, opts, config, context, opts.chartData);
+          drawToolTipBridge(opts, config, context, process);
+          drawCanvas(opts, context);
+        },
+        onAnimationFinish: function onAnimationFinish() {
+          _this.event.trigger('renderComplete');
+        }
+      });
+      break;
+    case 'rose':
+      this.animationInstance = new Animation({
+        timing: 'easeInOut',
+        duration: duration,
+        onProcess: function onProcess(process) {
+          context.clearRect(0, 0, opts.width, opts.height);
+          if (opts.rotate) {
+            contextRotate(context, opts);
+          }
+          opts.chartData.pieData = drawRoseDataPoints(series, opts, config, context, process);
+          drawLegend(opts.series, opts, config, context, opts.chartData);
+          drawToolTipBridge(opts, config, context, process);
+          drawCanvas(opts, context);
+        },
+        onAnimationFinish: function onAnimationFinish() {
+          _this.event.trigger('renderComplete');
+        }
+      });
+      break;
+    case 'radar':
+      this.animationInstance = new Animation({
+        timing: 'easeInOut',
+        duration: duration,
+        onProcess: function onProcess(process) {
+          context.clearRect(0, 0, opts.width, opts.height);
+          if (opts.rotate) {
+            contextRotate(context, opts);
+          }
+          opts.chartData.radarData = drawRadarDataPoints(series, opts, config, context, process);
+          drawLegend(opts.series, opts, config, context, opts.chartData);
+          drawToolTipBridge(opts, config, context, process);
+          drawCanvas(opts, context);
+        },
+        onAnimationFinish: function onAnimationFinish() {
+          _this.event.trigger('renderComplete');
+        }
+      });
+      break;
+    case 'arcbar':
+      this.animationInstance = new Animation({
+        timing: 'easeInOut',
+        duration: duration,
+        onProcess: function onProcess(process) {
+          context.clearRect(0, 0, opts.width, opts.height);
+          if (opts.rotate) {
+            contextRotate(context, opts);
+          }
+          opts.chartData.arcbarData = drawArcbarDataPoints(series, opts, config, context, process);
+          drawCanvas(opts, context);
+        },
+        onAnimationFinish: function onAnimationFinish() {
+          _this.event.trigger('renderComplete');
+        }
+      });
+      break;
+    case 'gauge':
+      this.animationInstance = new Animation({
+        timing: 'easeInOut',
+        duration: duration,
+        onProcess: function onProcess(process) {
+          context.clearRect(0, 0, opts.width, opts.height);
+          if (opts.rotate) {
+            contextRotate(context, opts);
+          }
+          opts.chartData.gaugeData = drawGaugeDataPoints(categories, series, opts, config, context, process);
+          drawCanvas(opts, context);
+        },
+        onAnimationFinish: function onAnimationFinish() {
+          _this.event.trigger('renderComplete');
+        }
+      });
+      break;
+    case 'candle':
+      this.animationInstance = new Animation({
+        timing: 'easeIn',
+        duration: duration,
+        onProcess: function onProcess(process) {
+          context.clearRect(0, 0, opts.width, opts.height);
+          if (opts.rotate) {
+            contextRotate(context, opts);
+          }
+          drawYAxisGrid(categories, opts, config, context);
+          drawXAxis(categories, opts, config, context);
+          var _drawCandleDataPoints = drawCandleDataPoints(series, seriesMA, opts, config, context, process),
+            xAxisPoints = _drawCandleDataPoints.xAxisPoints,
+            calPoints = _drawCandleDataPoints.calPoints,
+            eachSpacing = _drawCandleDataPoints.eachSpacing;
+          opts.chartData.xAxisPoints = xAxisPoints;
+          opts.chartData.calPoints = calPoints;
+          opts.chartData.eachSpacing = eachSpacing;
+          drawYAxis(series, opts, config, context);
+          if (opts.enableMarkLine !== false && process === 1) {
+            drawMarkLine(opts, config, context);
+          }
+          if (seriesMA) {
+            drawLegend(seriesMA, opts, config, context, opts.chartData);
+          } else {
+            drawLegend(opts.series, opts, config, context, opts.chartData);
+          }
+          drawToolTipBridge(opts, config, context, process, eachSpacing, xAxisPoints);
+          drawCanvas(opts, context);
+        },
+        onAnimationFinish: function onAnimationFinish() {
+          _this.event.trigger('renderComplete');
+        }
+      });
+      break;
+  }
+}
+
+// simple event implement
+
+function Event() {
+  this.events = {};
+}
+
+Event.prototype.addEventListener = function(type, listener) {
+  this.events[type] = this.events[type] || [];
+  this.events[type].push(listener);
+};
+
+Event.prototype.trigger = function() {
+  for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
+    args[_key] = arguments[_key];
+  }
+
+  var type = args[0];
+  var params = args.slice(1);
+  if (!!this.events[type]) {
+    this.events[type].forEach(function(listener) {
+      try {
+        listener.apply(null, params);
+      } catch (e) {
+        console.error(e);
+      }
+    });
+  }
+};
+
+var Charts = function Charts(opts) {
+  opts.pixelRatio = opts.pixelRatio ? opts.pixelRatio : 1;
+  opts.fontSize = opts.fontSize ? opts.fontSize * opts.pixelRatio : 13 * opts.pixelRatio;
+  opts.title = assign({}, opts.title);
+  opts.subtitle = assign({}, opts.subtitle);
+  opts.duration = opts.duration ? opts.duration : 1000;
+  opts.yAxis = assign({}, {
+    data:[],
+    showTitle:false,
+    disabled:false,
+    disableGrid:false,
+    splitNumber:5,
+    gridType: 'solid',
+    dashLength: 4 * opts.pixelRatio,
+    gridColor:'#cccccc',
+    padding:10,
+    fontColor:'#666666'
+  }, opts.yAxis);
+  opts.yAxis.dashLength *= opts.pixelRatio;
+  opts.yAxis.padding *= opts.pixelRatio;
+  opts.xAxis = assign({}, {
+    rotateLabel: false,
+    type: 'calibration',
+    gridType: 'solid',
+    dashLength: 4,
+    scrollAlign: 'left',
+    boundaryGap:'center',
+    axisLine:true,
+    axisLineColor:'#cccccc'
+  }, opts.xAxis);
+  opts.xAxis.dashLength *= opts.pixelRatio;
+  opts.legend = assign({}, {
+    show: true,
+    position: 'bottom',
+    float: 'center',
+    backgroundColor: 'rgba(0,0,0,0)',
+    borderColor: 'rgba(0,0,0,0)',
+    borderWidth: 0,
+    padding: 5,
+    margin: 5,
+    itemGap: 10,
+    fontSize: opts.fontSize,
+    lineHeight: opts.fontSize,
+    fontColor: '#333333',
+    format: {},
+    hiddenColor: '#CECECE'
+  }, opts.legend);
+  opts.legend.borderWidth = opts.legend.borderWidth * opts.pixelRatio;
+  opts.legend.itemGap = opts.legend.itemGap * opts.pixelRatio;
+  opts.legend.padding = opts.legend.padding * opts.pixelRatio;
+  opts.legend.margin = opts.legend.margin * opts.pixelRatio;
+  opts.extra = assign({}, opts.extra);
+  opts.rotate = opts.rotate ? true : false;
+  opts.animation = opts.animation ? true : false;
+	opts.rotate = opts.rotate ? true : false;
+
+  let config$$1 = JSON.parse(JSON.stringify(config));
+  config$$1.colors = opts.colors ? opts.colors : config$$1.colors;
+  config$$1.yAxisTitleWidth = opts.yAxis.disabled !== true && opts.yAxis.title ? config$$1.yAxisTitleWidth : 0;
+  if (opts.type == 'pie' || opts.type == 'ring') {
+    config$$1.pieChartLinePadding = opts.dataLabel === false ? 0 : opts.extra.pie.labelWidth * opts.pixelRatio || config$$1.pieChartLinePadding * opts.pixelRatio;
+  }
+  if (opts.type == 'rose') {
+    config$$1.pieChartLinePadding = opts.dataLabel === false ? 0 : opts.extra.rose.labelWidth * opts.pixelRatio || config$$1.pieChartLinePadding * opts.pixelRatio;
+  }
+  config$$1.pieChartTextPadding = opts.dataLabel === false ? 0 : config$$1.pieChartTextPadding * opts.pixelRatio;
+  config$$1.yAxisSplit = opts.yAxis.splitNumber ? opts.yAxis.splitNumber : config.yAxisSplit;
+
+  //屏幕旋转
+  config$$1.rotate = opts.rotate;
+  if (opts.rotate) {
+    let tempWidth = opts.width;
+    let tempHeight = opts.height;
+    opts.width = tempHeight;
+    opts.height = tempWidth;
+  }
+
+  //适配高分屏
+  opts.padding = opts.padding ? opts.padding : config$$1.padding;
+  for (let i = 0; i < 4; i++) {
+    opts.padding[i] *= opts.pixelRatio;
+  }
+  config$$1.yAxisWidth = config.yAxisWidth * opts.pixelRatio;
+  config$$1.xAxisHeight = config.xAxisHeight * opts.pixelRatio;
+  if (opts.enableScroll && opts.xAxis.scrollShow) {
+    config$$1.xAxisHeight += 6 * opts.pixelRatio;
+  }
+  config$$1.xAxisLineHeight = config.xAxisLineHeight * opts.pixelRatio;
+  config$$1.fontSize = opts.fontSize;
+  config$$1.titleFontSize = config.titleFontSize * opts.pixelRatio;
+  config$$1.subtitleFontSize = config.subtitleFontSize * opts.pixelRatio;
+  config$$1.toolTipPadding = config.toolTipPadding * opts.pixelRatio;
+  config$$1.toolTipLineHeight = config.toolTipLineHeight * opts.pixelRatio;
+  config$$1.columePadding = config.columePadding * opts.pixelRatio;
+  opts.$this = opts.$this ? opts.$this : this;
+  
+  this.context = uni.createCanvasContext(opts.canvasId, opts.$this);
+  /* 兼容原生H5
+  this.context = document.getElementById(opts.canvasId).getContext("2d");
+  this.context.setStrokeStyle = function(e){ return this.strokeStyle=e; }
+  this.context.setLineWidth = function(e){ return this.lineWidth=e; }
+  this.context.setLineCap = function(e){ return this.lineCap=e; }
+  this.context.setFontSize = function(e){ return this.font=e+"px sans-serif"; }
+  this.context.setFillStyle = function(e){ return this.fillStyle=e; }
+  this.context.draw = function(){ }
+  */
+
+  opts.chartData = {};
+  this.event = new Event();
+  this.scrollOption = {
+    currentOffset: 0,
+    startTouchX: 0,
+    distance: 0,
+    lastMoveTime: 0
+  };
+
+  this.opts = opts;
+  this.config = config$$1;
+
+  drawCharts.call(this, opts.type, opts, config$$1, this.context);
+};
+
+Charts.prototype.updateData = function() {
+  let data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
+  this.opts = assign({}, this.opts, data);
+  this.opts.updateData = true;
+  let scrollPosition = data.scrollPosition || 'current';
+  switch (scrollPosition) {
+    case 'current':
+      this.opts._scrollDistance_ = this.scrollOption.currentOffset;
+      break;
+    case 'left':
+      this.opts._scrollDistance_ = 0;
+      this.scrollOption = {
+        currentOffset: 0,
+        startTouchX: 0,
+        distance: 0,
+        lastMoveTime: 0
+      };
+      break;
+    case 'right':
+      let _calYAxisData = calYAxisData(this.opts.series, this.opts, this.config),
+        yAxisWidth = _calYAxisData.yAxisWidth;
+      this.config.yAxisWidth = yAxisWidth;
+      let offsetLeft = 0;
+      let _getXAxisPoints0 = getXAxisPoints(this.opts.categories, this.opts, this.config),
+        xAxisPoints = _getXAxisPoints0.xAxisPoints,
+        startX = _getXAxisPoints0.startX,
+        endX = _getXAxisPoints0.endX,
+        eachSpacing = _getXAxisPoints0.eachSpacing;
+      let totalWidth = eachSpacing * (xAxisPoints.length - 1);
+      let screenWidth = endX - startX;
+      offsetLeft = screenWidth - totalWidth;
+      this.scrollOption = {
+        currentOffset: offsetLeft,
+        startTouchX: offsetLeft,
+        distance: 0,
+        lastMoveTime: 0
+      };
+      this.opts._scrollDistance_ = offsetLeft;
+      break;
+  }
+  drawCharts.call(this, this.opts.type, this.opts, this.config, this.context);
+};
+
+Charts.prototype.zoom = function() {
+  var val = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.opts.xAxis.itemCount;
+  if (this.opts.enableScroll !== true) {
+    console.log('请启用滚动条后使用!')
+    return;
+  }
+  //当前屏幕中间点
+  let centerPoint = Math.round(Math.abs(this.scrollOption.currentOffset) / this.opts.chartData.eachSpacing) + Math.round(
+    this.opts.xAxis.itemCount / 2);
+  this.opts.animation = false;
+  this.opts.xAxis.itemCount = val.itemCount;
+  //重新计算x轴偏移距离
+  let _calYAxisData = calYAxisData(this.opts.series, this.opts, this.config),
+    yAxisWidth = _calYAxisData.yAxisWidth;
+  this.config.yAxisWidth = yAxisWidth;
+  let offsetLeft = 0;
+  let _getXAxisPoints0 = getXAxisPoints(this.opts.categories, this.opts, this.config),
+    xAxisPoints = _getXAxisPoints0.xAxisPoints,
+    startX = _getXAxisPoints0.startX,
+    endX = _getXAxisPoints0.endX,
+    eachSpacing = _getXAxisPoints0.eachSpacing;
+  let centerLeft = eachSpacing * centerPoint;
+  let screenWidth = endX - startX;
+  let MaxLeft = screenWidth - eachSpacing * (xAxisPoints.length - 1);
+  offsetLeft = screenWidth / 2 - centerLeft;
+  if (offsetLeft > 0) {
+    offsetLeft = 0;
+  }
+  if (offsetLeft < MaxLeft) {
+    offsetLeft = MaxLeft;
+  }
+  this.scrollOption = {
+    currentOffset: offsetLeft,
+    startTouchX: offsetLeft,
+    distance: 0,
+    lastMoveTime: 0
+  };
+  this.opts._scrollDistance_ = offsetLeft;
+  drawCharts.call(this, this.opts.type, this.opts, this.config, this.context);
+};
+
+Charts.prototype.stopAnimation = function() {
+  this.animationInstance && this.animationInstance.stop();
+};
+
+Charts.prototype.addEventListener = function(type, listener) {
+  this.event.addEventListener(type, listener);
+};
+
+Charts.prototype.getCurrentDataIndex = function(e) {
+  var touches = null;
+  if (e.changedTouches) {
+    touches = e.changedTouches[0];
+  } else {
+    touches = e.mp.changedTouches[0];
+  }
+  if (touches) {
+    let _touches$ = getTouches(touches, this.opts, e);
+    if (this.opts.type === 'pie' || this.opts.type === 'ring' || this.opts.type === 'rose') {
+      return findPieChartCurrentIndex({
+        x: _touches$.x,
+        y: _touches$.y
+      }, this.opts.chartData.pieData);
+    } else if (this.opts.type === 'radar') {
+      return findRadarChartCurrentIndex({
+        x: _touches$.x,
+        y: _touches$.y
+      }, this.opts.chartData.radarData, this.opts.categories.length);
+    } else if (this.opts.type === 'funnel') {
+      return findFunnelChartCurrentIndex({
+        x: _touches$.x,
+        y: _touches$.y
+      }, this.opts.chartData.funnelData);
+    } else if (this.opts.type === 'map') {
+      return findMapChartCurrentIndex({
+        x: _touches$.x,
+        y: _touches$.y
+      }, this.opts);
+    }else if (this.opts.type === 'word') {
+      return findWordChartCurrentIndex({
+        x: _touches$.x,
+        y: _touches$.y
+      }, this.opts.chartData.wordCloudData);
+    } else {
+      return findCurrentIndex({
+        x: _touches$.x,
+        y: _touches$.y
+      }, this.opts.chartData.calPoints, this.opts, this.config, Math.abs(this.scrollOption.currentOffset));
+    }
+  }
+  return -1;
+};
+
+Charts.prototype.getLegendDataIndex = function(e) {
+  var touches = null;
+  if (e.changedTouches) {
+    touches = e.changedTouches[0];
+  } else {
+    touches = e.mp.changedTouches[0];
+  }
+  if (touches) {
+    let _touches$ = getTouches(touches, this.opts, e);
+    return findLegendIndex({
+      x: _touches$.x,
+      y: _touches$.y
+    }, this.opts.chartData.legendData);
+  }
+  return -1;
+};
+
+Charts.prototype.touchLegend = function(e) {
+  var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
+  var touches = null;
+  if (e.changedTouches) {
+    touches = e.changedTouches[0];
+  } else {
+    touches = e.mp.changedTouches[0];
+  }
+  if (touches) {
+    var _touches$ = getTouches(touches, this.opts, e);
+    var index = this.getLegendDataIndex(e);
+    if (index >= 0) {
+      this.opts.series[index].show = !this.opts.series[index].show;
+      this.opts.animation = option.animation ? true : false;
+			this.opts._scrollDistance_= this.scrollOption.currentOffset;
+      drawCharts.call(this, this.opts.type, this.opts, this.config, this.context);
+    }
+  }
+
+};
+
+Charts.prototype.showToolTip = function(e) {
+  var option = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
+  var touches = null;
+  if (e.changedTouches) {
+    touches = e.changedTouches[0];
+  } else {
+    touches = e.mp.changedTouches[0];
+  }
+  if (!touches) {
+    console.log("touchError");
+  }
+  var _touches$ = getTouches(touches, this.opts, e);
+  var currentOffset = this.scrollOption.currentOffset;
+  var opts = assign({}, this.opts, {
+    _scrollDistance_: currentOffset,
+    animation: false
+  });
+  if (this.opts.type === 'line' || this.opts.type === 'area' || this.opts.type === 'column') {
+    var index = option.index==undefined? this.getCurrentDataIndex(e):option.index ;
+    if (index > -1) {
+      var seriesData = getSeriesDataItem(this.opts.series, index);
+      if (seriesData.length !== 0) {
+        var _getToolTipData = getToolTipData(seriesData, this.opts.chartData.calPoints, index, this.opts.categories,option),
+          textList = _getToolTipData.textList,
+          offset = _getToolTipData.offset;
+        offset.y = _touches$.y;
+        opts.tooltip = {
+          textList: option.textList?option.textList:textList,
+          offset: offset,
+          option: option,
+          index: index
+        };
+      }
+    }
+    drawCharts.call(this, opts.type, opts, this.config, this.context);
+  }
+  if (this.opts.type === 'mix') {
+    var index = option.index==undefined? this.getCurrentDataIndex(e):option.index ;
+    if (index > -1) {
+      var currentOffset = this.scrollOption.currentOffset;
+      var opts = assign({}, this.opts, {
+        _scrollDistance_: currentOffset,
+        animation: false
+      });
+      var seriesData = getSeriesDataItem(this.opts.series, index);
+      if (seriesData.length !== 0) {
+        var _getMixToolTipData = getMixToolTipData(seriesData, this.opts.chartData.calPoints, index, this.opts.categories,option),
+          textList = _getMixToolTipData.textList,
+          offset = _getMixToolTipData.offset;
+        offset.y = _touches$.y;
+        opts.tooltip = {
+          textList: option.textList?option.textList:textList,
+          offset: offset,
+          option: option,
+          index: index
+        };
+      }
+    }
+    drawCharts.call(this, opts.type, opts, this.config, this.context);
+  }
+  if (this.opts.type === 'candle') {
+    var index = option.index==undefined? this.getCurrentDataIndex(e):option.index ;
+    if (index > -1) {
+      var currentOffset = this.scrollOption.currentOffset;
+      var opts = assign({}, this.opts, {
+        _scrollDistance_: currentOffset,
+        animation: false
+      });
+      var seriesData = getSeriesDataItem(this.opts.series, index);
+      if (seriesData.length !== 0) {
+        var _getToolTipData = getCandleToolTipData(this.opts.series[0].data, seriesData, this.opts.chartData.calPoints,
+            index, this.opts.categories, this.opts.extra.candle, option),
+          textList = _getToolTipData.textList,
+          offset = _getToolTipData.offset;
+        offset.y = _touches$.y;
+        opts.tooltip = {
+          textList: option.textList?option.textList:textList,
+          offset: offset,
+          option: option,
+          index: index
+        };
+      }
+    }
+    drawCharts.call(this, opts.type, opts, this.config, this.context);
+  }
+  if (this.opts.type === 'pie' || this.opts.type === 'ring' || this.opts.type === 'rose'||this.opts.type === 'funnel' ) {
+    var index = option.index==undefined? this.getCurrentDataIndex(e):option.index ;
+    if (index > -1) {
+      var currentOffset = this.scrollOption.currentOffset;
+      var opts = assign({}, this.opts, {
+        _scrollDistance_: currentOffset,
+        animation: false
+      });
+      var seriesData = this.opts._series_[index];
+      var textList = [{
+        text: option.format ? option.format(seriesData) : seriesData.name + ': ' + seriesData.data,
+        color: seriesData.color
+      }];
+      var offset = {
+        x: _touches$.x,
+        y: _touches$.y
+      };
+      opts.tooltip = {
+        textList: option.textList?option.textList:textList,
+        offset: offset,
+        option: option,
+        index: index
+      };
+    }
+    drawCharts.call(this, opts.type, opts, this.config, this.context);
+  }
+  if (this.opts.type === 'map'||this.opts.type === 'word') {
+    var index = option.index==undefined? this.getCurrentDataIndex(e):option.index ;
+    if (index > -1) {
+      var currentOffset = this.scrollOption.currentOffset;
+      var opts = assign({}, this.opts, {
+        _scrollDistance_: currentOffset,
+        animation: false
+      });
+      var seriesData = this.opts._series_[index];
+      var textList = [{
+        text: option.format ? option.format(seriesData) : seriesData.properties.name ,
+        color: seriesData.color
+      }];
+      var offset = {
+        x: _touches$.x,
+        y: _touches$.y
+      };
+      opts.tooltip = {
+        textList: option.textList?option.textList:textList,
+        offset: offset,
+        option: option,
+        index: index
+      };
+    }
+    opts.updateData = false;
+    drawCharts.call(this, opts.type, opts, this.config, this.context);
+  }
+  if (this.opts.type === 'radar') {
+    var index = option.index==undefined? this.getCurrentDataIndex(e):option.index ;
+    if (index > -1) {
+      var currentOffset = this.scrollOption.currentOffset;
+      var opts = assign({}, this.opts, {
+        _scrollDistance_: currentOffset,
+        animation: false
+      });
+      var seriesData = getSeriesDataItem(this.opts.series, index);
+      if (seriesData.length !== 0) {
+        var textList = seriesData.map(function(item) {
+          return {
+            text: option.format ? option.format(item) : item.name + ': ' + item.data,
+            color: item.color
+          };
+        });
+        var offset = {
+          x: _touches$.x,
+          y: _touches$.y
+        };
+        opts.tooltip = {
+          textList: option.textList?option.textList:textList,
+          offset: offset,
+          option: option,
+          index: index
+        };
+      }
+    }
+    drawCharts.call(this, opts.type, opts, this.config, this.context);
+  }
+};
+
+Charts.prototype.translate = function(distance) {
+  this.scrollOption = {
+    currentOffset: distance,
+    startTouchX: distance,
+    distance: 0,
+    lastMoveTime: 0
+  };
+  let opts = assign({}, this.opts, {
+    _scrollDistance_: distance,
+    animation: false
+  });
+  drawCharts.call(this, this.opts.type, opts, this.config, this.context);
+};
+
+Charts.prototype.scrollStart = function(e) {
+  var touches = null;
+  if (e.changedTouches) {
+    touches = e.changedTouches[0];
+  } else {
+    touches = e.mp.changedTouches[0];
+  }
+  var _touches$ = getTouches(touches, this.opts, e);
+  if (touches && this.opts.enableScroll === true) {
+    this.scrollOption.startTouchX = _touches$.x;
+  }
+};
+
+Charts.prototype.scroll = function(e) {
+  if (this.scrollOption.lastMoveTime === 0) {
+    this.scrollOption.lastMoveTime = Date.now();
+  }
+  let Limit = this.opts.extra.touchMoveLimit || 20;
+  let currMoveTime = Date.now();
+  let duration = currMoveTime - this.scrollOption.lastMoveTime;
+  if (duration < Math.floor(1000 / Limit)) return;
+  this.scrollOption.lastMoveTime = currMoveTime;
+  var touches = null;
+  if (e.changedTouches) {
+    touches = e.changedTouches[0];
+  } else {
+    touches = e.mp.changedTouches[0];
+  }
+  if (touches && this.opts.enableScroll === true) {
+    var _touches$ = getTouches(touches, this.opts, e);
+    var _distance;
+    _distance = _touches$.x - this.scrollOption.startTouchX;
+    var currentOffset = this.scrollOption.currentOffset;
+    var validDistance = calValidDistance(this,currentOffset + _distance, this.opts.chartData, this.config, this.opts);
+    this.scrollOption.distance = _distance = validDistance - currentOffset;
+    var opts = assign({}, this.opts, {
+      _scrollDistance_: currentOffset + _distance,
+      animation: false
+    });
+    drawCharts.call(this, opts.type, opts, this.config, this.context);
+    return currentOffset + _distance;
+  }
+};
+
+Charts.prototype.scrollEnd = function(e) {
+  if (this.opts.enableScroll === true) {
+    var _scrollOption = this.scrollOption,
+      currentOffset = _scrollOption.currentOffset,
+      distance = _scrollOption.distance;
+    this.scrollOption.currentOffset = currentOffset + distance;
+    this.scrollOption.distance = 0;
+  }
+};
+if (typeof module === "object" && typeof module.exports === "object") {
+  module.exports = Charts;
+  //export default Charts;//建议使用nodejs的module导出方式,如报错请使用export方式导出
+}

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 0 - 0
src/js_sdk/u-charts/u-charts/u-charts.min.js


+ 1 - 1
src/manifest.json

@@ -126,7 +126,7 @@
     "mp-weixin" : {
         /* 小程序特有相关 */
         "usingComponents" : true,
-        "appid" : "", // 新梨享
+        "appid" : "wx131e197faee2c8c3", // 新梨享
 
         // 这里添加微信小程序appid
         "setting" : {

+ 38 - 570
src/pages.json

@@ -1,57 +1,27 @@
 {
   "pages": [
-    // 主页
     {
-      "path": "pages/index/index",
-      "style": {
-        "enablePullDownRefresh": true,
-        "navigationBarTitleText": "店铺首页",
-        "onReachBottomDistance": 50,
-        "app-plus": {
-          "bounce": "none",
-          "titleNView": false,
-          "pullToRefresh": {
-            "support": true,
-            "color": "#fa436a",
-            "style": "default"
-          }
-        }
-      }
+      "path": "pages/public/login",
+      "navigationBarTitleText": "登陆"
     },
-    // 公告
     {
-      "path": "pages/index/notice/notice",
-      "style": {
-        "enablePullDownRefresh": true,
-        "navigationBarTitleText": "公告",
-        "app-plus": {
-          "pullToRefresh": {
-            "support": true,
-            "color": "#fa436a",
-            "style": "default"
-          }
+      "path": "pages/public/resetpassword",
+      "navigationBarTitleText": "找回密码",
+      "app-plus": {
+        "bounce": "none",
+        "titleNView": false,
+        "pullToRefresh": {
+          "support": true,
+          "color": "#fa436a",
+          "style": "default"
         }
       }
     },
-    // 公告详情
     {
-      "path": "pages/index/notice/detail",
-      "style": {
-        "navigationBarTitleText": "公告详情"
-      }
-    },
-    // 商品搜索
-    {
-      "path": "pages/index/search/search",
-      "style": {
-        "navigationBarTitleText": "搜索"
-      }
-    },
-    // 分类
-    {
-      "path": "pages/category/category",
+      "path": "pages/index/index",
       "style": {
-        "navigationBarTitleText": "分类",
+        "enablePullDownRefresh": true,
+        "navigationBarTitleText": "店铺首页",
         "onReachBottomDistance": 50,
         "app-plus": {
           "bounce": "none",
@@ -64,543 +34,41 @@
         }
       }
     },
-    // 购物车
-    {
-      "path": "pages/cart/cart",
-      "style": {
-        "enablePullDownRefresh": true,
-        "navigationBarTextStyle": "black",
-        "app-plus": {
-          "titleNView": false,
-          "softinputNavBar": "none",
-          // 禁用原生导航栏
-          "pullToRefresh": {
-            "support": true,
-            "color": "#fa436a",
-            "style": "default"
-          }
-        }
-      }
-    },
-    // 我的
-    {
-      "path": "pages/user/user",
-      "style": {
-        "navigationBarTitleText": "我的",
-        // #ifdef MP
-        "navigationStyle": "custom",
-        // #endif
-        "app-plus": {
-          "bounce": "none",
-          "titleNView": {
-            "type": "transparent",
-            "buttons": [
-              {
-                "fontSrc": "/static/yticon.ttf",
-                "text": "\ue60f",
-                "fontSize": "24",
-                "color": "#303133",
-                "width": "46px",
-                "background": "rgba(0,0,0,0)"
-              },
-              {
-                "fontSrc": "/static/yticon.ttf",
-                "text": "\ue744",
-                "fontSize": "28",
-                "color": "#303133",
-                "background": "rgba(0,0,0,0)",
-                "redDot": false
-              }
-            ]
-          }
-        }
-      }
-    },
-    // 用户资料
-    {
-      "path": "pages/user/userinfo/userinfo",
-      "style": {
-        "navigationBarTitleText": "修改资料"
-      }
-    },
-    // 我的收藏
-    {
-      "path": "pages/user/collection/collection",
-      "style": {
-        "enablePullDownRefresh": true,
-        "navigationBarTitleText": "我的收藏",
-        "app-plus": {
-          "pullToRefresh": {
-            "support": true,
-            "color": "#fa436a",
-            "style": "default"
-          }
-        }
-      }
-    },
-    // 我的足迹
-    {
-      "path": "pages/user/footprint/footprint",
-      "style": {
-        "navigationBarTitleText": "我的足迹"
-      }
-    },
-    // 我的优惠券
-    {
-      "path": "pages/user/coupon/coupon",
-      "style": {
-        "enablePullDownRefresh": true,
-        "navigationBarTitleText": "我的优惠券",
-        "app-plus": {
-          "pullToRefresh": {
-            "support": true,
-            "color": "#fa436a",
-            "style": "default"
-          }
-        }
-      }
-    },
-    // 优惠券详情
-    {
-      "path": "pages/user/coupon/detail",
-      "style": {
-        "navigationBarTitleText": "优惠券详情"
-      }
-    },
-    // 领券中心
-    {
-      "path": "pages/user/coupon/list",
-      "style": {
-        "enablePullDownRefresh": true,
-        "navigationBarTitleText": "领券中心",
-        "app-plus": {
-          "pullToRefresh": {
-            "support": true,
-            "color": "#fa436a",
-            "style": "default"
-          }
-        }
-      }
-    },
-    // 收货地址
-    {
-      "path": "pages/user/address/address",
-      "style": {
-        "enablePullDownRefresh": true,
-        "navigationBarTitleText": "收货地址",
-        "app-plus": {
-          "pullToRefresh": {
-            "support": true,
-            "color": "#fa436a",
-            "style": "default"
-          }
-        }
-      }
-    },
-    // 收货地址管理
     {
-      "path": "pages/user/address/manage",
-      "style": {
-        "navigationBarTitleText": ""
-      }
-    },
-    // 支付
-    {
-      "path": "pages/user/money/pay",
-      "style": {
-        "navigationBarTitleText": "支付"
-      }
-    },
-    // 支付成功
-    {
-      "path": "pages/user/money/success",
-      "style": {
-        "navigationBarTitleText": "支付成功"
-      }
-    },
-    // 充值中心
-    {
-      "path": "pages/user/account/recharge",
-      "style": {
-        "navigationBarTitleText": "充值中心"
-      }
-    },
-    // 我的账户
-    {
-      "path": "pages/user/account/account",
-      "style": {
-        "navigationBarTitleText": "我的账户"
-      }
-    },
-    // 账单明细
-    {
-      "path": "pages/user/account/bill",
-      "style": {
-        "enablePullDownRefresh": true,
-        "navigationBarTitleText": "账单明细",
-        "app-plus": {
-          "pullToRefresh": {
-            "support": true,
-            "color": "#fa436a",
-            "style": "default"
-          }
-        }
+      "path":"pages/order/order",
+      "style":{
+        "navigationBarTitleText": "订单管理"
       }
     },
-    // 积分详情
     {
-      "path": "pages/user/account/integral",
+      "path": "pages/shop/shop",
       "style": {
-        "navigationBarTitleText": "积分详情"
+        "navigationBarTitleText": "商品管理"
       }
     }
   ],
-  "subPackages": [
-    // 设置
-    {
-      "root": "pages/set",
-      "pages": [
-        // 设置
-        {
-          "path": "set",
-          "style": {
-            "navigationBarTitleText": "设置"
-          }
-        },
-        // 授权管理
-        {
-          "path": "authorization/list",
-          "style": {
-            "enablePullDownRefresh": true,
-            "navigationBarTitleText": "授权列表",
-            "app-plus": {
-              "pullToRefresh": {
-                "support": true,
-                "color": "#fa436a",
-                "style": "default"
-              }
-            }
-          }
-        },
-        // 反馈详情
-        {
-          "path": "feedback/detail",
-          "style": {
-            "navigationBarTitleText": "意见反馈详情"
-          }
-        },
-        // 反馈列表
-        {
-          "path": "feedback/list",
-          "style": {
-            "enablePullDownRefresh": true,
-            "navigationBarTitleText": "意见反馈",
-            "app-plus": {
-              "pullToRefresh": {
-                "support": true,
-                "color": "#fa436a",
-                "style": "default"
-              }
-            }
-          }
-        },
-        // 反馈
-        {
-          "path": "feedback/feedback",
-          "style": {
-            "navigationBarTitleText": "意见反馈"
-          }
-        },
-        // 关于
-        {
-          "path": "about/about",
-          "style": {
-            "navigationBarTitleText": "关于RF商城"
-          }
-        },
-        // 关于详情
-        {
-          "path": "about/detail",
-          "style": {
-            "navigationBarTitleText": "关于RF商城"
-          }
-        },
-        // 开票历史列表
-        {
-          "path": "invoice/list",
-          "style": {
-            "enablePullDownRefresh": true,
-            "navigationBarTitleText": "开票历史",
-            "app-plus": {
-              "pullToRefresh": {
-                "support": true,
-                "color": "#fa436a",
-                "style": "default"
-              }
-            }
-          }
-        },
-        // 开票列表
-        {
-          "path": "invoice/invoice",
-          "style": {
-            "enablePullDownRefresh": true,
-            "navigationBarTitleText": "发票管理",
-            "app-plus": {
-              "pullToRefresh": {
-                "support": true,
-                "color": "#fa436a",
-                "style": "default"
-              }
-            }
-          }
-        },
-        // 开票管理
-        {
-          "path": "invoice/manage",
-          "style": {
-            "navigationBarTitleText": ""
-          }
-        }
-      ]
-    },
-    // 商品
-    {
-      "root": "pages/product",
-      "pages": [
-        // 商品列表
-        {
-          "path": "list",
-          "style": {
-            "enablePullDownRefresh": true,
-            "navigationBarTitleText": "商品列表",
-            "onReachBottomDistance": 50,
-            "app-plus": {
-              "bounce": "none",
-              "titleNView": false,
-              "pullToRefresh": {
-                "support": true,
-                "color": "#fa436a",
-                "style": "default"
-              }
-            }
-          }
-        },
-        // 商品详情
-        {
-          "path": "product",
-          "style": {
-            "navigationBarTitleText": "详情展示",
-            "app-plus": {
-              "titleNView": {
-                "type": "transparent"
-              }
-            }
-          }
-        }
-      ]
+  "tabBar": {
+  	"color": "#b7b7b7",
+		"selectedColor": "#7d66f3",
+		"borderStyle": "black",
+    "backgroundColor": "#ffffff",
+    "list": [{
+			"pagePath": "pages/index/index",
+			"text": "店铺首页",
+			"iconPath": "static/images/index.png",
+			"selectedIconPath": "static/images/index_active.png"
     },
-    // 订单
     {
-      "root": "pages/order",
-      "pages": [
-        // 订单列表
-        {
-          "path": "order",
-          "style": {
-            "enablePullDownRefresh": true,
-            "navigationBarTitleText": "我的订单",
-            "app-plus": {
-              "pullToRefresh": {
-                "support": true,
-                "color": "#fa436a",
-                "style": "default"
-              },
-              "bounce": "none"
-            }
-          }
-        },
-        // 售后订单列表
-        {
-          "path": "refund",
-          "style": {
-            "enablePullDownRefresh": true,
-            "navigationBarTitleText": "订单售后",
-            "app-plus": {
-              "pullToRefresh": {
-                "support": true,
-                "color": "#fa436a",
-                "style": "default"
-              },
-              "bounce": "none"
-            }
-          }
-        },
-        // 售后订单列表
-        {
-          "path": "search",
-          "style": {
-            "enablePullDownRefresh": true,
-            "navigationBarTitleText": "订单搜索",
-            "app-plus": {
-              "pullToRefresh": {
-                "support": true,
-                "color": "#fa436a",
-                "style": "default"
-              },
-              "bounce": "none"
-            }
-          }
-        },
-        // 售后订单列表
-        {
-          "path": "refund/refund",
-          "style": {
-            "enablePullDownRefresh": true,
-            "navigationBarTitleText": "订单售后",
-            "app-plus": {
-              "pullToRefresh": {
-                "support": true,
-                "color": "#fa436a",
-                "style": "default"
-              },
-              "bounce": "none"
-            }
-          }
-        },
-        // 发表评价
-        {
-          "path": "evaluation/evaluation",
-          "style": {
-            "navigationBarTitleText": "发表评价"
-          }
-        },
-        // 评价列表
-        {
-          "path": "evaluation/list",
-          "style": {
-            "enablePullDownRefresh": true,
-            "navigationBarTitleText": "评价列表",
-            "app-plus": {
-              "pullToRefresh": {
-                "support": true,
-                "color": "#fa436a",
-                "style": "default"
-              }
-            }
-          }
-        },
-        // 订单详情
-        {
-          "path": "detail",
-          "style": {
-            "navigationBarTitleText": "订单详情"
-          }
-        },
-        // 创建订单
-        {
-          "path": "create/order",
-          "style": {
-            "navigationBarTitleText": "创建订单"
-          }
-        },
-        // 订单物流
-        {
-          "path": "shipping/shipping",
-          "style": {
-            "navigationBarTitleText": "物流详情"
-          }
-        },
-        // 退货物流
-        {
-          "path": "shipping/return",
-          "style": {
-            "navigationBarTitleText": "退货物流"
-          }
-        }
-      ]
+      "pagePath":"pages/order/order",
+      "text": "订单管理",
+      "iconPath":"static/images/order.png",
+      "selectedIconPath": "static/images/order_active.png"
     },
-    // 公共
     {
-      "root": "pages/public",
-      "pages": [
-        // 注册
-        {
-          "path": "register",
-          "style": {
-            "navigationBarTitleText": "注册",
-            "navigationStyle": "custom",
-            "app-plus": {
-              "titleNView": false,
-              "animationType": "slide-in-bottom"
-            }
-          }
-        },
-        // 登录
-        {
-          "path": "login",
-          "style": {
-            "navigationBarTitleText": "登录",
-            "navigationStyle": "custom",
-            "app-plus": {
-              "titleNView": false,
-              "animationType": "slide-in-bottom"
-            }
-          }
-        },
-        // 登录类型
-        {
-          "path": "logintype",
-          "style": {
-            "navigationBarTitleText": "登录"
-          }
-        },
-        // 修改密码
-        {
-          "path": "password",
-          "style": {
-            "navigationBarTitleText": "忘记密码",
-            "navigationStyle": "custom",
-            "app-plus": {
-              "titleNView": false,
-              "animationType": "slide-in-bottom"
-            }
-          }
-        }
-      ]
-    }
-    // 商户
-  ],
-  "globalStyle": {
-    "navigationBarTextStyle": "black",
-    "navigationBarTitleText": "RF微商城",
-    "navigationBarBackgroundColor": "#FFFFFF",
-    "backgroundColor": "#f8f8f8"
-  },
-  "tabBar": {
-    "color": "#7a7c7c",
-    "selectedColor": "#8064f7",
-    "borderStyle": "black",
-    "backgroundColor": "#ffffff",
-    "list": [
-      {
-        "pagePath": "pages/index/index",
-        "iconPath": "static/tab-home.png",
-        "selectedIconPath": "static/tab-home-current.png",
-        "text": "店铺首页"
-      },
-      {
-        "pagePath": "pages/category/category",
-        "iconPath": "static/tab-cate.png",
-        "selectedIconPath": "static/tab-cate-current.png",
-        "text": "订单管理"
-      },
-      {
-        "pagePath": "pages/cart/cart",
-        "iconPath": "static/tab-cart.png",
-        "selectedIconPath": "static/tab-cart-current.png",
-        "text": "商品管理"
-      }
-    ]
+			"pagePath": "pages/shop/shop",
+			"text": "商品管理",
+			"iconPath": "static/images/shop.png",
+			"selectedIconPath": "static/images/shop_active.png"
+		}]
   }
 }

+ 720 - 534
src/pages/index/index.vue

@@ -1,548 +1,734 @@
 <template>
 	<view class="rf-index">
-		index page
+		<view class="index">
+			<view class="header">
+				<view class="header-warp">
+					<view class="header-left">
+						<view class="uni-list">
+							<view class="uni-list-cell">
+								<view class="uni-list-cell-db">
+									<picker @change="bindPickerChange" :value="index" :range="array">
+										<view class="uni-input">{{array[index]}}</view>
+									</picker>
+									<image src="../../static/images/downicon.png" mode="" class="icon"></image>
+								</view>
+							</view>
+						</view>
+					</view>
+					<view class="header-bar header-center">首页</view>
+					<view class="header-right">
+						<image src="../../static/images/seticon.png" mode="" class="icon"></image>
+					</view>
+				</view>
+				<view class="user">
+					<view class="user-left">
+						<image src="" mode="" class="usericon"></image>
+						<view class="message">
+							<view class="name">猪猪虾</view>
+							<view class="tele">151123165441</view>
+						</view>
+					</view>
+					<view class="user-right">
+						<image src="../../static/images/scan.png" mode="" class="sacnicon"></image>
+						<view class="txt">
+							验证码核销
+						</view>
+					</view>
+				</view>
+			</view>
+			<view class="" style="height: 100px;"></view>
+			<view class="index-content">
+				<!-- 关键指数 -->
+				<view class="exponent">
+					<view class="title-warp">
+						<view class="name">
+							关键指数
+						</view>
+						<view class="time">
+							数据截至:2020.07.03 <text class="hour">10:10</text>
+						</view>
+					</view>
+					<view class="exponent-list">
+						<view class="item seale">
+							<view class="left">
+								<view class="title">
+									销售总额
+								</view>
+								<view class="num">
+									1848,123
+								</view>
+								<view class="ratio">
+									<view class="detail">
+										<image src="../../static/images/down.png" class="icon"> 10% <text class="compare">同比上月</text>
+									</view>
+								</view>
+							</view>
+							<view class="right">
+								<image src="../../static/images/sealenum.png" mode="" class="logoicon"></image>
+							</view>
+						</view>
+						<view class="item order">
+							<view class="left">
+								<view class="title">
+									销售总额
+								</view>
+								<view class="num">
+									1848,123
+								</view>
+								<view class="ratio">
+									<view class="detail">
+										<image src="../../static/images/down.png" class="icon"> 10% <text class="compare">同比上月</text>
+									</view>
+								</view>
+							</view>
+							<view class="right">
+								<image src="../../static/images/sealenum.png" mode="" class="logoicon"></image>
+							</view>
+						</view>
+						<view class="item todayseale">
+							<view class="left">
+								<view class="title">
+									销售总额
+								</view>
+								<view class="num">
+									1848,123
+								</view>
+								<view class="ratio">
+									<view class="detail">
+										<image src="../../static/images/down.png" class="icon"> 10% <text class="compare">同比上月</text>
+									</view>
+								</view>
+							</view>
+							<view class="right">
+								<image src="../../static/images/sealenum.png" mode="" class="logoicon"></image>
+							</view>
+						</view>
+						<view class="item todayorder">
+							<view class="left">
+								<view class="title">
+									销售总额
+								</view>
+								<view class="num">
+									1848,123
+								</view>
+								<view class="ratio">
+									<view class="detail">
+										<image src="../../static/images/down.png" class="icon"> 10% <text class="compare">同比上月</text>
+									</view>
+								</view>
+							</view>
+							<view class="right">
+								<image src="../../static/images/sealenum.png" mode="" class="logoicon"></image>
+							</view>
+						</view>
+					</view>
+				</view>
+
+				<!-- 待处理事物 -->
+				<view class="something">
+					<view class="title">
+						待处理事物
+					</view>
+					<view class="todo-list">
+						<view class="item">
+							<view class="title">
+								带发货订单
+							</view>
+							<view class="num">
+								1802
+							</view>
+						</view>
+						<view class="item">
+							<view class="title">
+								带发货订单
+							</view>
+							<view class="num">
+								1802
+							</view>
+						</view>
+						<view class="item">
+							<view class="title">
+								带发货订单
+							</view>
+							<view class="num">
+								1802
+							</view>
+						</view>
+					</view>
+				</view>
+
+				<!-- 数据概况 -->
+				<view class="data">
+					<view class="qiun-bg-white qiun-title-bar qiun-common-mt">
+						<view class="qiun-title-dot-light">数据概况</view>
+					</view>
+					<view class="echarts">
+						<view class="title">
+							<view class="left">
+								<text class="future">未来七天预定:<text class="num">0</text>
+									<text class="yesterday">昨日全天:<text class="daynum">0</text></text>
+								</text>
+							</view>
+							<view class="right">
+								<view class="today-icon"></view><text class="title">今日</text>
+								<view class="yesterday-icon"></view><text class="title">昨日</text>
+							</view>
+						</view>
+						<view class="qiun-charts">
+							<canvas canvas-id="canvasLineA" id="canvasLineA" class="charts" @touchstart="touchLineA"></canvas>
+						</view>
+					</view>
+				</view>
+
+				<!-- 商品销售占比 -->
+				<view class="shop-echarts-warp">
+					<view class="title">
+						商品销售占比
+					</view>
+					<view class="shop-echarts">
+						<canvas canvas-id="shopecharts" id="shopecharts" class="shopecharts" @touchstart="touchPie"></canvas>
+					</view>
+				</view>
+
+        <view id="testecharts"></view>
+
+				<view class="" style="height: 40rpx;"></view>
+			</view>
+		</view>
 		<!--页面加载动画-->
-		<rf-loading v-if="loading"></rf-loading>
+		<!-- <rf-loading v-if="loading"></rf-loading> -->
 	</view>
 </template>
 <script>
-    /**
-     * @des 微商城首页
-     *
-     * @author stav stavyan@qq.com
-     * @date 2020-01-08 14:14
-     * @copyright 2019
-     */
-    import {indexList} from '@/api/product';
-    import rfSwipeDot from '@/components/rf-swipe-dot';
-    import rfFloorIndex from '@/components/rf-floor-index';
-    import rfSearchBar from '@/components/rf-search-bar';
-    import rfSwiperSlide from '@/components/rf-swiper-slide';
-    import {notifyAnnounceIndex} from '@/api/basic';
-    import rfCountDown from '@/components/rf-count-down';
-
-    export default {
-        components: {rfFloorIndex, rfSwipeDot, rfSearchBar, rfSwiperSlide, rfCountDown},
-        data() {
-            return {
-                current: 0, // 轮播图index
-                carouselList: {}, // 广告图
-                hotProductList: [], // 热门商品列表
-                recommendProductList: [], // 推荐商品列表
-                guessYouLikeProductList: [], // 猜你喜欢商品列表
-                newProductList: [], // 新品上市商品列表
-                productCateList: [],  // 商品栏目
-                config: {}, // 商户配置
-                announceList: [], // 公告列表
-                loading: true,
-                hotSearchDefault: '请输入关键字',
-                newsBg: this.$mAssetsPath.newsBg,
-                errorImage: this.$mAssetsPath.errorImage
-            };
-        },
-        onShow() {
-            this.initData();
-        },
-        computed: {
-            // 计算倒计时时间
-            second() {
-                return function (val) {
-                    return Math.floor(15 * 60 - (new Date() / 1000 - val))
-                }
-            }
-        },
-        onShareAppMessage() {
-            return {
-                title: '欢迎来到RageFrame商城',
-                path: '/pages/index/index'
+  import uCharts from '../../js_sdk/u-charts/u-charts/u-charts';
+	let _self;
+	let canvaLineA = null;
+	let canvaPie = null;
+	export default {
+		name: 'Header',
+		data() {
+			return {
+				array: ['中国', '美国', '巴西', '日本'],
+				index: 0,
+				cWidth: '',
+				cHeight: '',
+				pixelRatio: 1, // 像素比
+
+				// 饼图数据
+				bWidth: '',
+        bHeight: ''
+			};
+		},
+		// 此处定义传入的数据
+		props: {
+			shoplist: {
+				type: Object,
+				value: null,
+			},
+		},
+		// 页面生命周期 监听页面加载
+		onLoad() {
+			_self = this;
+			this.cWidth = uni.upx2px(690); // upx2px 转换为px
+			this.cHeight = uni.upx2px(300);
+			this.bWidth = uni.upx2px(690);
+			this.bHeight = uni.upx2px(300);
+			this.getServerData();
+		},
+		methods: {
+			bindPickerChange: function(e) {
+				console.log('picker发送选择改变,携带值为', e.target.value);
+				this.index = e.target.value;
+			},
+			getList() {
+				console.log(1);
+			},
+
+			seting() {
+				console.log('设置');
+			},
+			// 数据处理
+			getServerData() {
+				uni.request({
+					url: 'https://www.ucharts.cn/data.json',
+					data: {},
+					success: function(res) {
+						console.log(res);
+						let LineA = {
+							categories: [],
+							series: [],
+						};
+						//这里我后台返回的是数组,所以用等于,如果您后台返回的是单条数据,需要push进去
+						LineA.categories = res.data.data.LineA.categories;
+						LineA.series = res.data.data.LineA.series;
+						_self.showLineA('canvasLineA', LineA);
+
+						let pie = {
+							series: [],
+						};
+						pie.series = res.data.data.Pie.series;
+						_self.showPie('shopecharts', pie);
+					},
+					fail: () => {
+						_self.tips = '网络错误,小程序端请检查合法域名';
+					},
+				});
+			},
+			// 图表
+			showLineA(canvasId, chartData) {
+				canvaLineA = new uCharts({
+					$this: _self,
+					canvasId: canvasId,
+					type: 'line',
+					fontSize: 12,
+					legend: {
+						show: false,
+					},
+					dataLabel: false, // 图表中是否显示数据
+					duration: 500,
+					dataPointShape: false, // 折点
+					background: '#FFFFFF',
+					pixelRatio: _self.pixelRatio,
+					categories: chartData.categories, // x轴数据
+					series: chartData.series, // 值
+					animation: true,
+					xAxis: {
+						type: 'grid',
+						disableGrid: true,
+					},
+					yAxis: {
+						gridType: 'solid',
+						gridColor: '#CCCCCC',
+						min: 0,
+						max: 180,
+						format: (val) => {
+							return val.toFixed(0) + '元';
+						},
+					},
+					width: _self.cWidth * _self.pixelRatio,
+					height: _self.cHeight * _self.pixelRatio,
+					extra: {
+						line: {
+							type: 'curve', // 平滑曲线; straight直线
+						},
+					},
+				});
+			},
+			touchLineA(e) {
+				canvaLineA.showToolTip(e, {
+					format: function(item, category) {
+						return category + ' ' + item.name + ':' + item.data;
+					},
+				});
+			},
+
+			// 饼图
+			showPie(canvasId, chartData) {
+				canvaPie = new uCharts({
+					$this: _self,
+					canvasId: canvasId,
+					type: 'pie',
+					fontSize: 11,
+					legend: {
+						show: true,
+						position: 'left',
+						margin: 10,
+						itemGap: 20,
+					},
+					background: '#FFFFFF',
+					pixelRatio: _self.pixelRatio,
+					series: chartData.series,
+					animation: true,
+					width: _self.cWidth * _self.pixelRatio,
+					height: _self.cHeight * _self.pixelRatio,
+					dataLabel: true,
+					extra: {
+						pie: {
+							lableWidth: 15,
+						},
+					},
+				});
+			},
+			touchPie(e) {
+				canvaPie.showToolTip(e, {
+					format: function(item) {
+						return item.name + ':' + item.data;
+					},
+				});
+			},
+		},
+	};
+</script>
+<style lang="scss" scoped>
+.header {
+  width: 100%;
+  padding: 0 30rpx;
+  background-color: $barColor;
+  position: fixed;
+  top: 0;
+  box-sizing: border-box;
+  z-index: 99;
+
+  .header-warp {
+    display: flex;
+    height: 80rpx;
+    color: #231726;
+    background-color: #ffcc01;
+
+    .header-left {
+      font-size: 28rpx;
+
+      .uni-list-cell-db {
+        height: 80rpx;
+        font-size: 28rpx;
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        background-color: $barColor;
+				border-bottom: transparent;
+
+        .icon {
+          width: 17rpx;
+          height: 12rpx;
+          margin-left: 10rpx;
+        }
+      }
+    }
+
+    .header-center {
+      flex: 1;
+      font-size: 36rpx;
+      font-weight: 700;
+      text-align: center;
+      line-height: 80rpx;
+    }
+
+    .header-right {
+      display: flex;
+      justify-content: center;
+      align-items: center;
+
+      .icon {
+        width: 40rpx;
+        height: 40rpx;
+      }
+    }
+  }
+
+  .user {
+    padding: 30rpx;
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+
+    .user-left {
+      display: flex;
+      justify-content: center;
+      align-items: center;
+
+      .usericon {
+        width: 100rpx;
+        height: 100rpx;
+        border-radius: 50%;
+        background-color: #ffffff;
+      }
+
+      .message {
+        margin-left: 32rpx;
+        color: #2c1b0a;
+
+        .name {
+          font-size: 30rpx;
+          font-weight: 700;
+        }
+
+        .tele {
+          font-size: 24rpx;
+        }
+      }
+    }
+
+    .user-right {
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      flex-direction: column;
+
+      .sacnicon {
+        width: 40rpx;
+        height: 40rpx;
+      }
+
+      .txt {
+        font-size: 24rpx;
+        margin-top: 20rpx;
+      }
+    }
+  }
+}
+
+.index {
+  background-color: #fafafa;
+
+  .index-content {
+    padding: 0 30rpx;
+
+    .exponent {
+      margin-top: 20rpx;
+
+      .title-warp {
+        display: flex;
+        justify-content: space-between;
+        align-items: center;
+        padding: 30rpx 0;
+
+        .name {
+          font-size: 32rpx;
+          font-weight: 700;
+        }
+
+        .time {
+          font-size: 24rpx;
+          color: #191919;
+
+          .hour {
+            margin-left: 15rpx;
+          }
+        }
+      }
+
+      .exponent-list {
+        display: flex;
+        flex-wrap: wrap;
+
+        .item {
+          width: 320rpx;
+          border-radius: 10rpx;
+          color: #ffffff;
+          display: flex;
+          justify-content: space-between;
+          align-items: center;
+          padding: 25rpx;
+          box-sizing: border-box;
+          margin-bottom: 32rpx;
+
+          &:nth-child(odd) {
+            margin-right: 44rpx;
+          }
+
+          &:nth-child(3),
+          &:nth-child(4) {
+            margin-bottom: 0;
+          }
+
+          .left {
+            .title {
+              font-size: 24rpx;
             }
-        },
-        filters: {
-            filterDiscountPrice(val) {
-                const price = val.product && val.product.price * val.discount / 100;
-                switch (val.decimal_reservation_number) {
-                    case 0:
-                        return (Math.floor(price * 100) / 100).toFixed(2);
-                    case 1:
-                        return (Math.floor(price * 100) / 100).toFixed(0);
-                    case 2:
-                        return (Math.floor(price * 100) / 100).toFixed(1);
-                    default:
-                        return (Math.floor(price * 100) / 100).toFixed(2);
-                }
+
+            .num {
+              font-size: 36rpx;
+              font-weight: 700;
+              margin-top: 5rpx;
             }
-        },
-        //下拉刷新
-        onPullDownRefresh() {
-            this.getIndexList('refresh');
-        },
-        methods: {
-            // 监听轮播图切换
-            handleDotChange(e) {
-                this.current = e.detail.current
-            },
-            // 数据初始化
-            initData() {
-              this.getUserInfo();
-              this.findMenuTreeByToken();
-			},
-			
-			 async getUserInfo() {
-                await this.$http.get('/getUserInfo').then(r => {
-					this.userinfo = r.data
-					debugger
-                })
-            },
-			 async findMenuTreeByToken() {
-                await this.$http.get('/findMenuTreeByToken').then(r => {
-					this.findMenuTreeByToken = r.data
-					debugger
-                })
-            },
-            // 设置购物车数量角标
-            async initCartItemCount() {
-							if (this.$mStore.getters.hasLogin && parseInt(uni.getStorageSync('cartNum'), 10) > 0) {
-                await uni.setTabBarBadge({
-                  index: this.$mConstDataConfig.cartIndex,
-                  text: uni.getStorageSync('cartNum').toString()
-                });
-							} else {
-                uni.removeStorageSync('cartNum');
-                uni.removeTabBarBadge({index: this.$mConstDataConfig.cartIndex});
-							}
-            },
-            // 通用跳转
-            navTo(route) {
-                this.$mRouter.push({route});
-            },
-            // 通用跳转
-            navToSearch() {
-                this.$mRouter.push({route: `/pages/index/search/search?data=${JSON.stringify(this.search)}`});
-            },
-            // 跳至广告图指定页面
-            indexTopToDetailPage(data, link) {
-                if (isNaN(parseInt(data.id, 10))) {
-                    // #ifdef  APP-PLUS
-		                window.location.href = data.id;
-										// #endif
-                }
-                let url;
-                let type;
-                let id;
-                if (!link) {
-                    type = data.type;
-                    id = data.id;
-                } else {
-                    id = link;
-                    type = data;
-                }
-                switch (type) {
-                    case 'product_view':  // 产品详情
-                        url = `/pages/product/product?id=${id}`;
-                        break;
-                    case 'article_view':  // 文章详情
-                        this.$mHelper.toast('article_view');
-                        break;
-                    case 'coupon_view': // 优惠券详情
-                        url = `/pages/user/coupon/detail?id=${id}`;
-                        break;
-                    case 'helper_view': //   站点帮助详情
-                        this.$mHelper.toast('helper_view');
-                        break;
-                    case 'product_list_for_cate': // 某分类下产品列表
-                        url = `/pages/product/list?cate_id=${id}`;
-                        break;
-                    default:
-                        break;
+
+            .ratio {
+              margin-top: 10rpx;
+              font-size: 20rpx;
+
+              .detail {
+                display: flex;
+                justify-content: center;
+                align-items: center;
+
+                .icon {
+                  width: 12rpx;
+                  height: 16rpx;
+                  margin-right: 5rpx;
                 }
-                if (url) {
-			              this.$mRouter.push({route: url});
+
+                .compare {
+                  margin-left: 10rpx;
+                  font-size: 20rpx;
                 }
-            },
-            // 获取主页数据
-            async getIndexList(type) {
-                await this.$http.get(`${indexList}`, {}).then(async r => {
-                    this.loading = false;
-                    if (type === 'refresh') {
-                        uni.stopPullDownRefresh();
-                    }
-                    // 获取公告列表
-                    await this.getNotifyAnnounceIndex();
-                    // 首页参数赋值
-                    this.initIndexData(r.data);
-                }).catch(() => {
-                    this.loading = false;
-                    if (type === 'refresh') {
-                        uni.stopPullDownRefresh();
-                    }
-                })
-            },
-            // 首页参数赋值
-            initIndexData(data) {
-                this.productCateList = data.cate;
-                this.carouselList = data.adv;
-                this.search = data.search;
-                uni.setStorageSync('search', this.search);
-                this.hotSearchDefault = '请输入关键字' + (data.search.hot_search_default ? `如: ${data.search.hot_search_default}` : '');
-                uni.setStorage({
-                    key: 'hotSearchDefault',
-                    data: data.search.hot_search_default
-                });
-                this.hotProductList = data.product_hot;
-                this.recommendProductList = data.product_recommend;
-                this.guessYouLikeProductList = data.guess_you_like;
-                this.newProductList = data.product_new;
-                this.config = data.config;
-            },
-            // 获取通知列表
-            async getNotifyAnnounceIndex() {
-                await this.$http.get(`${notifyAnnounceIndex}`).then(r => {
-                    this.announceList = r.data
-                })
-            },
-            // 跳转至商品详情页
-            navToDetailPage(data) {
-                const {id} = data;
-                if (!id) return;
-                this.$mRouter.push({route: `/pages/product/product?id=${id}`});
-            },
-            // 跳转至分类页
-            toCategory() {
-                this.$mRouter.switchTab({route: '/pages/category/category'});
+              }
+            }
+          }
+
+          .right {
+            width: 90rpx;
+            height: 90rpx;
+            border-radius: 50%;
+            background-color: rgba($color: #ffffff, $alpha: 0.2);
+            display: flex;
+            justify-content: center;
+            align-items: center;
+
+            .logoicon {
+              width: 44rpx;
+              height: 53rpx;
             }
+          }
+        }
+
+        .seale {
+          background-image: linear-gradient(to top right, #e379d0, #f767b1);
+        }
+
+        .order {
+          background-image: linear-gradient(to top right, #f38867, #fca43d);
+        }
+
+        .todayseale {
+          background-image: linear-gradient(to top right, #9859fd, #d98afa);
         }
+
+        .todayorder {
+          background-image: linear-gradient(to top right, #17c1b1, #40e98f);
+        }
+      }
     }
-</script>
-<style lang="scss" scoped>
-	.rf-index {
-		background-color: $color-white;
-		/*爆款拼团*/
-		.wrapper {
-			background: #fff;
-			border-radius: 10upx;
-
-			.sec-header {
-				padding: 10upx 0;
-				display: flex;
-				justify-content: space-between;
-				align-items: center;
-				line-height: 40upx;
-				margin: 0 30upx;
-				font-size: $font-lg;
-				font-weight: 600;
-				border-bottom: 1upx solid rgba(0, 0, 0, 0.05);
-
-				.more {
-					font-size: $font-sm;
-					color: $font-color-light;
-					font-weight: normal;
-				}
-			}
-
-			.h-list {
-				white-space: nowrap;
-				margin: 20upx 0;
-				height: 290upx;
-
-				.h-item {
-					display: inline-block;
-					font-size: $font-sm;
-					width: 220upx;
-					height: 180upx;
-					margin-right: 20upx;
-					border-radius: 10upx;
-
-					.h-item-img {
-						width: 100%;
-						height: 100%;
-						border-top-left-radius: 12upx;
-						border-top-right-radius: 12upx;
-					}
-
-					.h-item-text {
-						margin: 10upx 0 5upx;
-					}
-
-					.last-line {
-						margin-bottom: 5upx;
-						display: flex;
-						justify-content: space-between;
-						align-items: center; /* 垂直居中 */
-						.red {
-							color: $base-color;
-							font-size: $font-sm;
-							margin-right: 4upx;
-						}
-					}
-
-					.price {
-						font-size: $font-base;
-						color: $base-color;
-						line-height: 1;
-
-						&:before {
-							content: '¥';
-							font-size: 26upx;
-						}
-
-						.m-price {
-							margin-left: 8upx;
-							color: $font-color-light;
-							font-size: $font-sm;
-							text-decoration: line-through;
-						}
-					}
-				}
-
-				image {
-				}
-			}
-		}
-
-		.wrapper-pt {
-			padding: 0 30upx;
-
-			.sec-header {
-				margin: 0;
-			}
-		}
-
-		/*轮播图*/
-		.swiper {
-			width: 100%;
-			margin-top: 10upx;
-			display: flex;
-			justify-content: center;
-
-			.swiper-box {
-				width: 92%;
-				height: 40vw;
-				overflow: hidden;
-				border-radius: 15upx;
-				box-shadow: 0upx 8upx 25upx rgba(0, 0, 0, 0.2);
-				//兼容ios,微信小程序
-				position: relative;
-				z-index: 1;
-
-				swiper {
-					width: 100%;
-					height: 40vw;
-
-					swiper-item {
-						image {
-							width: 100%;
-							height: 40vw;
-						}
-					}
-				}
-			}
-		}
-
-		/*轮播图2*/
-		.swiper-item-text {
-			position: absolute;
-			bottom: 16upx;
-			left: 30upx;
-			height: 48upx;
-			line-height: 48upx;
-			background: rgba(0, 0, 0, 0.2);
-			width: 90%;
-			color: $color-white;
-			border-bottom-left-radius: 12upx;
-			padding-left: 20upx;
-		}
-
-		/*新闻通知*/
-		.swiper-slide-header {
-			width: 120upx;
-			height: 80upx;
-			line-height: 88upx;
-
-			.swiper-slide-image {
-				width: 100%;
-				height: 30upx;
-			}
-		}
-
-		/*分类列表*/
-		.category-list {
-			width: 100%;
-			padding: $spacing-base;
-			display: flex;
-			justify-content: space-between;
-			flex-wrap: wrap;
-			min-height: 80upx;
-			.category {
-				width: calc(20% - 20upx);
-				display: flex;
-				flex-wrap: wrap;
-				.img {
-					width: 100%;
-					display: flex;
-					justify-content: center;
-					image {
-						width: 9vw;
-						height: 9vw;
-					}
-				}
-				.text {
-					margin-top: 16upx;
-					width: 100%;
-					display: flex;
-					justify-content: center;
-					font-size: 24upx;
-					color: #3c3c3c;
-				}
-			}
-		}
-
-		/*版权显示*/
-		.copyright {
-			margin: 10upx 0;
-			width: 100%;
-			text-align: center;
-			color: #666;
-
-			a {
-				display: block;
-				color: #666;
-				text-decoration: none;
-			}
-		}
-
-		/*限时抢购*/
-		.order-item {
-			display: flex;
-			flex-direction: column;
-			background: #fff;
-			padding: 0 30upx;
-			margin-bottom: 20upx;
-
-			.goods-box-single {
-				display: flex;
-				padding: 40upx 10upx 10upx;
-				height: 330upx;
-				border-radius: 12upx;
-				margin-top: 20upx;
-				box-shadow: 2px 2px 10px rgba(66, 135, 193, 0.2); // 阴影
-				border-bottom: 1px solid rgba(0, 0, 0, 0.05); // 边框
-				position: relative;
-
-				.goods-img {
-					display: block;
-					border-radius: 12upx;
-					width: 190upx;
-					height: 200upx;
-				}
-
-				.right {
-					flex: 1;
-					display: flex;
-					flex-direction: column;
-					padding: 0 30upx 0 24upx;
-					overflow: hidden;
-
-					.title {
-						font-weight: bold;
-						line-height: 1.2;
-						margin: 10upx 0;
-					}
-
-					.attr-box {
-						line-height: 1.2;
-						margin-bottom: 8upx;
-						margin-left: 10upx;
-					}
-
-					.last-line {
-						margin-top: 3upx;
-						display: flex;
-						justify-content: space-between;
-						align-items: center; /* 垂直居中 */
-						.red {
-							color: $base-color;
-							margin-right: 4upx;
-						}
-					}
-
-					.price {
-						font-size: $font-lg;
-						color: $uni-color-error;
-						line-height: 1;
-
-						&:before {
-							content: '¥';
-							font-size: 26upx;
-						}
-
-						.m-price {
-							margin-left: 8upx;
-							color: $font-color-light;
-							font-size: $font-sm;
-							text-decoration: line-through;
-						}
-					}
-
-					.triangle-wrapper {
-						position: absolute;
-						overflow: hidden;
-						top: 0;
-						right: 0;
-						border-radius: 12upx;
-
-						.triangle {
-							color: #5eba8f;
-							width: 0;
-							height: 0;
-							border-top: 120upx solid $base-color;
-							opacity: 0.8;
-							border-left: 120upx solid transparent;
-						}
-
-						.triangle-content {
-							position: absolute;
-							top: 28upx;
-							right: 0;
-							transform: rotate(45deg);
-							font-size: $font-sm - 2upx;
-							color: #fff;
-						}
-					}
-				}
-			}
-
-			.action-box {
-				display: flex;
-				justify-content: flex-end;
-				align-items: center;
-				height: 90upx;
-				position: relative;
-
-				.discount-time {
-					font-size: $font-sm;
-					color: $uni-color-success;
-					margin-right: 20upx;
-				}
-			}
-
-			.action-btn {
-				height: 50upx;
-				margin-left: 10upx;
-				display: flex;
-				justify-content: center;
-				align-items: center;
-				padding: 10upx 24upx;
-				font-size: $font-sm + 2upx;
-
-				&.recom {
-					background: $base-color;
-					color: #fff;
-
-					&:after {
-						border-color: #f7bcc8;
-					}
-				}
-			}
-		}
-	}
+
+    .something {
+      margin-top: 30rpx;
+
+      .title {
+        font-size: 32rpx;
+        font-weight: 700;
+        color: $titleColor;
+      }
+
+      .todo-list {
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        margin-top: 30rpx;
+        background-color: #ffffff;
+        box-sizing: border-box;
+        padding: 43rpx 30rpx;
+        border-radius: 10rpx;
+
+        .item {
+          width: 33.33%;
+          display: flex;
+          justify-content: center;
+          align-items: center;
+          flex-direction: column;
+
+          .title {
+            color: $subheadColor;
+            font-size: 30rpx;
+          }
+
+          .num {
+            color: $titleColor;
+          }
+        }
+      }
+    }
+
+    .data {
+      margin-top: 40rpx;
+
+      .echarts {
+        background-color: #ffffff;
+        border-radius: 10rpx;
+      }
+
+      .title {
+        display: flex;
+        justify-content: space-between;
+        color: #333333;
+        padding-top: 30rpx;
+        padding-left: 15rpx;
+        padding-bottom: 30rpx;
+        box-sizing: border-box;
+
+        .left {
+          .future {
+            font-size: 26rpx;
+
+            .num {
+              font-size: 30rpx;
+            }
+
+            .yesterday {
+              margin-left: 10rpx;
+            }
+          }
+        }
+
+        .right {
+          display: flex;
+          justify-content: center;
+          align-items: center;
+          box-sizing: border-box;
+
+          .today-icon {
+            width: 20rpx;
+            height: 9rpx;
+            background-color: #ff9c2f;
+            margin-right: 10rpx;
+          }
+
+          .title {
+            font-size: 20rpx;
+            margin-right: 20rpx;
+          }
+
+          .yesterday-icon {
+            width: 20rpx;
+            height: 9rpx;
+            background-color: #b15cfa;
+            margin-left: 10rpx;
+          }
+
+          .title {
+            font-size: 20rpx;
+          }
+        }
+      }
+
+      .qiun-title-dot-light {
+        color: $titleColor;
+        font-size: 32rpx;
+        font-weight: 700;
+        padding-bottom: 25rpx;
+      }
+
+      /* 样式的width和height一定要与定义的cWidth和cHeight相对应 */
+      .qiun-charts {
+        width: 690rpx;
+        height: 300rpx;
+      }
+
+      .charts {
+        width: 690rpx;
+        height: 300rpx;
+      }
+    }
+
+    .shop-echarts-warp {
+      background-color: #ffffff;
+      border-radius: 10rpx;
+      margin-top: 40rpx;
+
+      .title {
+        padding: 40rpx 24rpx 30rpx;
+        font-size: 26rpx;
+        color: $titleColor;
+      }
+
+      .shop-echarts {
+        width: 690rpx;
+        height: 300rpx;
+      }
+
+      .shopecharts {
+        width: 690rpx;
+        height: 300rpx;
+      }
+    }
+  }
+}
 </style>

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 0 - 19
src/pages/order/create/order.vue


Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 0 - 16
src/pages/order/detail.vue


+ 0 - 343
src/pages/order/evaluation/evaluation.vue

@@ -1,343 +0,0 @@
-<template>
-	<view class="evaluation">
-		<view class="evaluation-item" v-for="(item, index) in productList" :key="index">
-			<!--商品信息-->
-			<view class="product-info">
-				<image class="product-image" mode="aspectFill" :src="item.product_picture"></image>
-				<view class="product-content">
-					<text class="product-name in2line">{{ item.product_name }}</text>
-					<text class="product-sku-name">{{ item.sku_name || '基础款' }}</text>
-					<text class="product-price base-color">¥{{ item.product_money }}</text> * {{ item.num }}
-				</view>
-			</view>
-			<!--整体评价-->
-			<view class="product-rate" v-if="evaluationType !== 'add'">
-				整体评价
-				<view class="product-rate-wrapper">
-					<rf-rate
-						size="22"
-						:value="item.scores || 5"
-						:index="index"
-						 @change="handleScoreChange"
-						:margin="8"
-						class="rate"
-						active-color="#fa436a"></rf-rate>
-				</view>
-			</view>
-			<!--详细描述信息-->
-			<view class="product-textarea">
-	       <textarea class="textarea" maxlength="140"
-					 v-model="item.content"
-					 placeholder-style="color:#ccc; font-size: 24upx"
-					 placeholder="宝贝满足你的期待吗?说说你的使用心得,分享给你想买的他们吧"/>
-				<!--<view class="tips">-->
-					<!--{{ item.content }}-->
-					<!--<text v-if="item.content && item.content.length > 0 && item.content.length < 40">-->
-						<!--您已输入<text class="f"> {{ item.content.length }} </text>字-->
-					<!--</text>-->
-					<!--<text v-if="item.content.length >= 40">-->
-							<!--还可输入 <text class="s"> {{ wordLimit(index) }} </text> 字-->
-					<!--</text>-->
-				<!--</view>-->
-				<view class="anonymous" v-if="evaluationType !== 'add'">
-					<switch color="#fa436a" :checked="is_anonymous == 1" @change="handleAnonymousChange" style="transform:scale(0.7)"/>
-					<text class="spec-color">{{ parseInt(is_anonymous, 10) === 1 ? '匿名' : '不匿名' }}</text>
-				</view>
-			</view>
-			<!--上传图片-->
-			<view class="rf-uploader">
-				<view class="uni-uploader">
-					<view class="uni-uploader-body">
-						<view class="uni-uploader__files">
-							<view v-for="(image, i) in imageList[index]" :key="i">
-								<view class="uni-uploader__file" style="position: relative;">
-									<image class="uni-uploader__img" :src="image"></image>
-									<view class="close-view" @tap="close(i, index)">x</view>
-								</view>
-							</view>
-							<view class="uni-uploader__input-box" v-if="imageList[index].length < 8">
-								<view class="uni-uploader__input" @tap="uploadImage(index)"></view>
-							</view>
-						</view>
-					</view>
-				</view>
-			</view>
-			<!--发表评价-->
-			<button class="confirm-btn" @tap="handleEvaluate(item, index)">{{ evaluationType === 'add' ? '我要追评' : '发表评价'}}</button>
-		</view>
-		<rf-empty info="暂无待评价商品" v-if="productList.length === 0"></rf-empty>
-	</view>
-</template>
-
-<script>
-	/**
-	 * @des 发表评价
-	 *
-	 * @author stav stavyan@qq.com
-	 * @date 2019-11-27 14:32
-	 * @copyright 2019
-	 */
-	import rfRate from '@/components/rf-rate/rf-rate';
-	import {evaluateCreate, evaluateAgain, uploadImage} from '@/api/userInfo';
-  import {orderProductIndex} from "../../../api/userInfo";
-	export default{
-		components: { rfRate },
-		data(){
-			return {
-				productList: [],
-				token: null,
-				content: '',
-				evaluationType: null,
-				imageList: [],
-				// 评论表单
-				is_anonymous : '1',
-				orderId: ''
-			}
-		},
-		computed: {
-	    // 限制140字
-			wordLimit () {
-		    return (index) => {
-					return 140 - this.productList[index].content.length;
-		    }
-			}
-		},
-		onLoad(options){
-	    this.initData(options);
-		},
-		methods: {
-	    // 数据初始化
-	    async initData(options) {
-          this.productList.length = 0;
-          this.evaluationType = options.type;
-          if (options.data) {
-              this.productList.push(JSON.parse(options.data));
-              this.productList.forEach(item => {
-	              this.imageList.push([]);
-	              item.content = '';
-	              item.scores = 5;
-              });
-          } else if (options.order_id) {
-              this.orderId = options.order_id;
-              this.getOrderProductList();
-          }
-          let title = '发表评价';
-          if (options.type === 'add') {
-              title = '追加评价'
-          }
-          // 设置标题
-          uni.setNavigationBarTitle({
-              title
-          });
-      },
-			async getOrderProductList() {
-        await this.$http.get(orderProductIndex, {order_id: this.orderId, is_evaluate: 0}).then(async r => {
-					this.productList = r.data;
-					this.productList.forEach(item => {
-              this.imageList.push([]);
-              item.content = '';
-              item.scores = 5;
-          });
-        });
-      },
-			// 评分监听事件
-			handleScoreChange (e) {
-				this.productList[e.index].scores = e.value;
-			},
-			// 监听是否匿名
-			handleAnonymousChange (e) {
-				if (e.detail.value) {
-					this.is_anonymous = 1;
-				} else {
-					this.is_anonymous = 0;
-				}
-			},
-      // 删除已选中图片
-      close(e, index) {
-        this.imageList[index].splice(e, 1);
-      },
-			// 监听图片上传
-			uploadImage (index) {
-				// 从相册选择6张图
-				const _this = this;
-				uni.chooseImage({
-					count: 6,
-					sizeType: ['original', 'compressed'],
-					sourceType: ['album'],
-					success: async function (res) {
-            await _this.handleUploadFile(res.tempFilePaths, index)
-          }
-				});
-			},
-      // 依次上传图片
-      async handleUploadFile(data, index) {
-          data.forEach(item => {
-              this.$http.upload(uploadImage, {filePath: item, name: 'file'}).then(async r => {
-                  this.imageList[index].push(r.data.url);
-              });
-          });
-      },
-			// 提交评价
-			async handleEvaluate(item, index) {
-        const params = {};
-				if (this.evaluationType !== 'add') {
-			    let data = [];
-					data.push({order_product_id: item.id, is_anonymous: this.is_anonymous, covers: this.imageList[index], scores: item.scores, content: item.content})
-					params.evaluate = JSON.stringify(data);
-					this.handleEvaluateCreate(params);
-				} else {
-					params.order_product_id = item.id;
-					params.again_content = item.content;
-					params.again_covers = JSON.stringify(this.imageList[index]);
-					this.handleEvaluateAgain(params);
-				}
-			},
-			// 发表评价
-			async handleEvaluateCreate(params) {
-				await this.$http.post(`${evaluateCreate}`, params).then(() => {
-			    if (this.productList.length === 1) {
-						this.$mRouter.back();
-			    } else {
-		        this.getOrderProductList();
-			    }
-				})
-			},
-			// 追加评价
-			async handleEvaluateAgain(params) {
-				await this.$http.post(`${evaluateAgain}?order_product_id=${params.order_product_id}`, params).then(() => {
-					this.$mRouter.back();
-				})
-			}
-		}
-	}
-</script>
-
-<style lang='scss'>
-	page {
-		background-color: $page-color-base;
-	}
-	.evaluation {
-		margin-bottom: $spacing-lg;
-		.evaluation-item {
-			margin: $spacing-base;
-			padding: $spacing-lg;
-			background-color: $color-white;
-			border-radius: 12upx;
-			box-shadow: 0upx 5upx 25upx rgba(0, 0, 0, 0.05);
-		}
-		.product-info {
-			display: flex;
-			.product-image {
-				width: 200upx;
-				height: 150upx;
-			}
-			.product-content {
-				flex: 1;
-				margin-left: 20upx;
-				.product-name {
-					font-size: $font-base;
-					color: $font-color-dark;
-					line-height: 32upx;
-					min-height: 60upx;
-				}
-				.product-sku-name {
-					display: block;
-					font-size: $font-base;
-					color: $font-color-dark;
-				}
-			}
-		}
-		.product-rate {
-			font-size: $font-lg;
-			color: $font-color-dark;
-			padding: 20upx 0;
-			border-bottom: 1px solid rgba(0, 0, 0, 0.1);
-			.product-rate-wrapper {
-				display: inline-block;
-			}
-		}
-		.product-textarea {
-			margin-top: 20upx;
-			height: 360upx;
-			border-bottom: 1px solid rgba(0, 0, 0, 0.1);
-			position: relative;
-			.textarea {
-				width: 100%;
-			}
-			.tips {
-				position: absolute;
-				bottom: 10upx;
-				right: 0;
-				font-size: $font-sm;
-				color: $font-color-light;
-				.f {
-					color: $uni-color-success;
-				}
-				.s {
-					color: $uni-color-primary;
-				}
-			}
-			.anonymous {
-				color: $font-color-light;
-				font-size: $font-sm;
-				position: absolute;
-				bottom: 0;
-				left: 0;
-			}
-		}
-		.upload-image {
-			overflow: hidden;
-			margin: 40upx 0;
-			.upload-image-wrapper {
-				display: inline-block;
-				position: relative;
-				width: 200upx;
-				height: 200upx;
-				padding: 10upx;
-				margin: 10upx;
-				.image {
-					display: inline-block;
-					width: 180upx;
-					height: 180upx;
-				}
-				.image-close {
-					position: absolute;
-					top: -10upx;
-					right: -10upx;
-				}
-			}
-			.add {
-				display: inline-block;
-				overflow: hidden;
-				width: 180upx;
-				height: 180upx;
-				text-align: center;
-				border: 1px solid rgba(0, 0, 0, 0.05);
-				font-size: 88upx;
-				color: $font-color-base;
-				font-weight: 100;
-			}
-		}
-		.confirm-btn{
-			width: 630upx;
-			height: 76upx;
-			line-height: 76upx;
-			border-radius: 50px;
-			margin-top: 50upx;
-			background: $uni-color-primary;
-			color: #fff;
-			font-size: $font-lg;
-			&:after{
-				border-radius: 100px;
-			}
-		}
-		.uni-uploader__file {
-			width: 190upx;
-			height: 190upx;
-		}
-		.uni-uploader__input-box {
-			width: 188upx;
-			height: 188upx;
-		}
-	}
-</style>

+ 0 - 318
src/pages/order/evaluation/list.vue

@@ -1,318 +0,0 @@
-<template>
-	<view class="content">
-		<!--评价分类选项-->
-		<view class="label">
-			<view v-for="(label,index) in labelList" :class="{'on':index==labelIndex}" @tap="getEvaluationList('', index, label.type)" :key="index">
-				{{label.name}}
-				({{label.number}})
-			</view>
-		</view>
-		<!--评价列表-->
-		<view class="list" v-if="evaluationList.length > 0">
-			<view class="row" v-for="(row, index) in evaluationList" :key="index">
-				<view class="left">
-					<view class="face">
-						<image class="avatar" :src="row.member_head_portrait || headImg" mode="aspectFill"></image>
-					</view>
-				</view>
-				<view class="right">
-					<view class="name-date">
-						<view class="username">
-							{{row.member_nickname || '匿名用户'}}
-						</view>
-						<view class="date">
-							{{ row.created_at | time }}
-						</view>
-					</view>
-					<view class="spec">
-						<text>
-							购买类型: {{ row.sku_name || '基础款' }}
-						</text>
-						<rf-rate
-							size="16"
-						  disabled="true"
-							:value="row.scores"
-							active-color="#fa436a" />
-					</view>
-					<view class="first">
-						<view class="rat in10line">
-							{{row.content}}
-						</view>
-						<view class="img-video">
-							<view class="box" v-for="item in row.covers" :key="item">
-								<rf-image class="image" :src="item"></rf-image>
-							</view>
-						</view>
-					</view>
-					<view class="append" v-if="parseInt(row.has_again, 10) === 1">
-						<view class="date">
-							{{ row | againDay }}
-						</view>
-						<view class="rat">
-							{{row.again_content}}
-						</view>
-						<view class="img-video">
-							<view class="box" v-for="item in row.again_covers" :key="item">
-								<rf-image class="image" :src="item"></rf-image>
-							</view>
-						</view>
-					</view>
-				</view>
-			</view>
-		</view>
-		<view class="no-evaluation" v-else>
-			暂无相关评价
-		</view>
-	</view>
-</template>
-
-<script>
-	import {evaluateList} from "@/api/product";
-	import moment from '@/common/moment';
-
-	import rfRate from "@/components/rf-rate/rf-rate";
-	export default {
-		components: {
-			rfRate
-		},
-		data() {
-			return {
-				evaluateStat: {},
-				labelList:[],
-				labelIndex: 0,
-				evaluationList: [],
-				page: 1,
-				headImg: this.$mAssetsPath.headImg
-			};
-		},
-		filters: {
-	    // 时间格式化
-			time(val) {
-				return moment(val * 1000).format('YYYY-MM-DD HH:mm')
-			},
-	    // 计算评论与追评时间
-			againDay(val) {
-				const day = moment(val.again_addtime * 1000).format('DD') - moment(val.created_at * 1000).format('DD');
-				return day ? `${day}天后追加` : '当天追加'
-			}
-		},
-		onLoad(options) {
-			this.initData(options);
-		},
-		//下拉刷新
-		onPullDownRefresh(){
-			this.evaluationList.length = 0;
-			this.page = 1;
-			this.getEvaluationList('refresh');
-		},
-		//加载更多
-		onReachBottom(){
-			this.page ++;
-			this.getEvaluationList();
-		},
-		methods: {
-			// 初始化数据
-			initData (options) {
-				this.evaluateStat = JSON.parse(options.evaluateStat);
-				if (!this.evaluateStat) return;
-				this.id =  this.evaluateStat.product_id;
-				this.labelList = [
-					{name:'全部',number: options.comment_num,type: {}},
-					{name:'好评',number: this.evaluateStat.good_num || 0, type: { explain_type: 3 }},
-					{name:'中评',number: this.evaluateStat.ordinary_num || 0, type: { explain_type: 2 }},
-					{name:'差评',number: this.evaluateStat.negative_num || 0, type: { explain_type: 1 }},
-					// {name:'文字',number: this.evaluateStat.good_num || 0, type: { has_content: 1 }},
-					{name:'有图',number: this.evaluateStat.cover_num || 0, type: { has_cover: 1 }},
-					// {name:'视频',number: this.evaluateStat.good_num || 0, type: { has_video: 1 }},
-					{name:'追加',number: this.evaluateStat.again_num || 0, type: { has_again: 1 }}
-				]
-				this.getEvaluationList();
-			},
-			// 获取评论列表
-			async getEvaluationList(type, index = 0, params) {
-				if (params) {
-					this.page = 1;
-					this.evaluationList = [];
-				}
-				await this.$http.get(`${evaluateList}`, {
-					product_id: this.id,
-					page: this.page,
-					...params
-				}).then(r => {
-					this.labelIndex = index;
-					this.evaluationList = [...this.evaluationList, ...r.data];
-				}).catch(() => {
-					if (type === 'refresh') {
-						uni.stopPullDownRefresh();
-					}
-				});
-			}
-		}
-	}
-</script>
-
-<style lang="scss">
-page{
-		background-color: #fff;
-	}
-.myVideo{
-	position: fixed;
-	top: 50%;
-	right: 100%;
-}
-.content{
-	view{
-		display: flex;
-	}
-	width: 100%;
-	.label{
-		padding: 0 2%;
-		flex-wrap:wrap;
-		view{
-			padding: 0 20upx;
-			height: 50upx;
-			border-radius: 40upx;
-			border:solid 1upx #ddd;
-			align-items: center;
-			color: #555;
-			font-size: 26upx;
-			background-color: #f9f9f9;
-			margin: 10upx 20upx 10upx 0;
-			&.on{
-				border:solid 1upx #f06c7a;
-				color: #f06c7a;
-			}
-		}
-	}
-	.list{
-		flex-wrap: wrap;
-		padding: 20upx 4%;
-		.row{
-			width: 100%;
-			margin-top: 30upx;
-			.left{
-				width: 10vw;
-				flex-shrink: 0;
-				margin-right: 10upx;
-				.face{
-					width: 100%;
-					image{
-						width: 10vw;
-						height: 10vw;
-						border-radius: 100%;
-					}
-
-				}
-			}
-			.right{
-				width: 100%;
-				flex-wrap: wrap;
-				.name-date{
-					width: 100%;
-					justify-content: space-between;
-					align-items: baseline;
-					.username{
-						font-size: 32upx;
-						color: #555;
-					}
-					.date{
-						font-size:28upx;
-						color: #aaa;
-					}
-				}
-				.spec{
-					width: 100%;
-					color: #aaa;
-					font-size: 26upx;
-					display: flex;
-					justify-content: space-between;
-					align-items: center;
-				}
-				.first{
-					width: 100%;
-					flex-wrap: wrap;
-					.rat{
-						font-size: $font-base;
-						line-height: 1.5;
-					}
-					.img-video{
-						width: 100%;
-						flex-wrap: wrap;
-						.box{
-							width: calc((84.6vw - 50upx)/4);
-							height: calc((84.6vw - 50upx)/4);
-							margin: 5upx 5upx;
-							position: relative;
-							justify-content: center;
-							align-items: center;
-							.image {
-								position: absolute;
-								width: 100%;
-								height: 100%;
-								border-radius: 10upx;
-							}
-							.playbtn{
-								position: absolute;
-								.icon{
-									font-size: 80upx;
-									color: rgba(255,255,255,.9)
-								}
-							}
-						}
-					}
-				}
-
-				.append{
-					width: 100%;
-					flex-wrap: wrap;
-					.date{
-						width: 100%;
-						height: 40upx;
-						border-left: 10upx solid #f06c7a;
-						padding-left: 10upx;
-						align-items: center;
-						font-size: 32upx;
-						margin: 20upx 0;
-					}
-					.rat{
-						font-size: 30upx;
-					}
-					.img-video{
-						width: 100%;
-						flex-wrap: wrap;
-						.box{
-							width: calc((84.6vw - 10upx - (10upx * 4))/4);
-							height: calc((84.6vw - 10upx - (10upx * 4))/4);
-							margin: 5upx 5upx;
-							position: relative;
-							justify-content: center;
-							align-items: center;
-							.image{
-								position: absolute;
-								width: 100%;
-								height: 100%;
-								border-radius: 10upx;
-							}
-							.playbtn{
-								position: absolute;
-								.icon{
-									font-size: 80upx;
-									color: rgba(255,255,255,.9);
-								}
-							}
-						}
-					}
-				}
-			}
-		}
-	}
-	.no-evaluation {
-		overflow: hidden;
-		display: block;
-		width: 100%;
-		text-align: center;
-		margin-top: 60upx;
-		color: #555;
-	}
-}
-</style>

+ 20 - 310
src/pages/order/order.vue

@@ -1,315 +1,25 @@
+<!-- order -->
 <template>
-	<view class="content">
-		<!--导航栏-->
-		<view class="navbar">
-			<view
-				v-for="(item, index) in navList" :key="index"
-				class="nav-item"
-				:class="{current: tabCurrentIndex === index}"
-				@tap="tabClick(index)"
-			>
-				{{item.text}}
-			</view>
-		</view>
-		<!--订单列表-->
-		<swiper :current="tabCurrentIndex" class="swiper-box" duration="300" @change="changeTab">
-			<swiper-item class="tab-content" v-for="(tabItem, tabIndex) in navList" :key="tabIndex">
-				<scroll-view
-					class="list-scroll-content"
-					scroll-y
-					@scrolltolower="getMoreOrderList"
-				>
-					<view
-						v-for="(item,index) in orderList" :key="index"
-						class="rf-order-item"
-					>
-						<view class="i-top b-b">
-							<text class="time in1line">订单号:{{item.order_sn}}</text>
-							<!--<text class="time">{{item.created_at | time}}</text>-->
-							<text class="state" v-if="parseInt(item.order_status, 10) !== 0">{{item.order_status | orderStatusFilter }}</text>
-							<view class="example-body" v-else>
-								<rf-count-down :show-day="false" :second="second(item.created_at)" @timeup="timeUp(item)" color="#FFFFFF" background-color="#fa436a" border-color="#fa436a" />
-							</view>
-						</view>
-
-<!--						<scroll-view  v-if="item && item.product && item.product.length > 1"-->
-<!--												 class="goods-box" scroll-x>-->
-<!--							<view-->
-<!--								v-for="(goodsItem, goodsIndex) in item.product"-->
-<!--								:key="goodsIndex"-->
-<!--								@tap="navTo(`/pages/product/product?id=${goodsItem.product_id}`)"-->
-<!--								class="goods-item"-->
-<!--							>-->
-<!--								<image class="goods-img" :src="goodsItem.product_picture" mode="aspectFill"></image>-->
-<!--								<text class="goods-title in2line">{{goodsItem.product_name}}</text>-->
-<!--							</view>-->
-<!--						</scroll-view>-->
-<!--							v-if="item.product && item.product.length === 1"-->
-						<view
-							class="goods-box-single"
-              @tap.stop="navTo(`/pages/product/product?id=${goodsItem.product_id}`)"
-							v-for="(goodsItem, goodsIndex) in item.product" :key="goodsIndex"
-						>
-							<image class="goods-img" :src="goodsItem.product_picture" mode="aspectFill"></image>
-							<view class="right">
-								<text class="title in2line">{{goodsItem.product_name}}</text>
-								<text class="attr-box">{{goodsItem.sku_name || '基础版'}} * {{goodsItem.num}}</text>
-								<text v-if="goodsItem.point_exchange_type == 2 ||goodsItem.point_exchange_type == 4">
-									<text class="point">{{item.point}}积分 </text>
-								</text>
-								<text class="price" v-else>
-									<text class="red">{{goodsItem.product_money}} <text v-if="goodsItem.gift_flag === 0"> + {{ (item.point + '积分') || '' }}</text></text>
-								</text>
-							</view>
-						</view>
-
-						<view class="price-box">
-							共
-							<text class="num">{{ item.product_count }}</text>
-							件商品 实付款
-							<text class="price">{{ item.pay_money }}</text>
-						</view>
-						<view class="action-box b-t">
-              <button class="action-btn" @tap="handleOrderOperation(item, 'detail')">订单详情</button>
-							<button class="action-btn" v-if="item.order_status == 0" @tap="handleOrderOperation(item, 'close')">取消订单</button>
-							<button class="action-btn recom" v-if="item.order_status == 0" @tap="navTo(`/pages/user/money/pay?id=${item.id}`)">立即支付</button>
-						  <button class="action-btn" v-if="(item.order_status == 4 || item.order_status == 2) && item.product[0].is_virtual != 1" @tap="handleOrderOperation(item, 'shipping')">查看物流</button>
-              <button class="action-btn recom" v-if="item.order_status == 2" @tap="handleOrderOperation(item, 'delivery')">确认收货</button>
-<!--              <button class="action-btn recom" v-if="item.order_status == 2 && item.is_customer == 0" @tap="handleOrderOperation(item, 'delivery')">确认收货</button>-->
-							<button class="action-btn recom" v-if="(item.order_status == 3 || item.order_status == 4) && item.is_evaluate == 0" @tap="handleOrderOperation(item, 'evaluation')">批量评价</button>
-						  <button class="action-btn recom" v-if="item.order_status == -4" @tap="handleOrderOperation(item, 'delete')">删除订单</button>
-            </view>
-					</view>
-					<rf-load-more :status="loadingType" v-if="orderList.length > 0"></rf-load-more>
-          <rf-empty :list="guessYouLikeList" info="暂无订单" v-if="orderList.length === 0 && !loading"></rf-empty>
-				</scroll-view>
-			</swiper-item>
-		</swiper>
-		<rf-loading v-if="loading"></rf-loading>
-	</view>
+  <view class="order">商品管理</view>
 </template>
 
 <script>
-	/**
-	 * @des 订单管理
-	 *
-	 * @author stav stavyan@qq.com
-	 * @date 2020-01-15 11:54
-	 * @copyright 2019
-	 */
-	import rfLoadMore from '@/components/rf-load-more/rf-load-more';
-	import moment from '@/common/moment';
-  import {orderDelete, orderList, orderTakeDelivery} from '@/api/userInfo';
-	import rfCountDown from '@/components/rf-count-down'
-	import {orderClose, guessYouLikeList} from '@/api/product';
-  import mConstData from '@/config/constData.config'
-	export default {
-		components: {
-			rfLoadMore,
-			rfCountDown
-		},
-		data() {
-			return {
-				tabCurrentIndex: 0,
-				loadingType: 'more',
-				navList: this.$mConstDataConfig.orderNavList,
-				orderList: [],
-				page: 1,
-				loading: true,
-				isRefreshing: true,
-				guessYouLikeList: []
-			};
-		},
-		computed: {
-			// 计算倒计时时间
-			second() {
-				return function (val) {
-					return Math.floor(15 * 60 - 10 - (new Date() / 1000 - val))
-				}
-			}
-		},
-		filters: {
-	    // 时间格式化
-			time(val) {
-				return moment(val * 1000).format('YYYY-MM-DD HH:mm:ss')
-			},
-			// 状态显示格式化
-      orderStatusFilter (orderStatus) {
-		    let state;
-				mConstData.orderStatus.forEach(orderItem => {
-					if (orderItem.key == parseInt(orderStatus, 10)) {
-						state = orderItem.value
-					}
-				});
-	      return state;
-      }
-		},
-		onShow(){
-			// #ifdef H5 || APP-PLUS
-			this.page = 1;
-			this.orderList.length = 0;
-			this.initData();
-			// #endif
-		},
-		onLoad(options){
-			/**
-			 * 修复app端点击除全部订单外的按钮进入时不加载数据的问题
-			 * 替换onLoad下代码即可
-			 */
-			this.tabCurrentIndex = +options.state + 1;
-		},
-		//下拉刷新
-		onPullDownRefresh(){
-			this.page = 1;
-			this.orderList.length = 0;
-			this.getOrderList('refresh');
-		},
-		//加载更多
-		onReachBottom(){
-			this.page ++;
-			this.getOrderList();
-		},
-		methods: {
-			// 倒计时关闭订单
-			timeUp(item) {
-		    if (this.isRefreshing) {
-	        this.isRefreshing = false;
-					this.handleOrderClose(item.id);
-		    }
-			},
-			// 订单操作
-      handleOrderOperation (item, type) {
-        switch (type) {
-          case 'detail': // 订单详情
-              this.navTo(`/pages/order/detail?id=${item.id}`);
-            break;
-          case 'evaluation': // 我要评价
-              this.navTo(`/pages/order/evaluation/evaluation?order_id=${item.id}`);
-            break;
-          case 'close': // 取消订单
-              this.handleOrderClose(item.id);
-            break;
-          case 'delete': // 删除订单
-              this.handleOrderDelete(item.id);
-            break;
-          case 'shipping': // 查看物流
-						this.navTo(`/pages/order/shipping/shipping?id=${item.id}`);
-            break;
-          case 'delivery': // 确认收货
-            this.handleOrderTakeDelivery(item.id);
-            break;
-        }
-      },
-			// 跳转页面
-      navTo (route) {
-	      this.$mRouter.push({route});
-      },
-			// 关闭订单
-			async handleOrderClose(id) {
-				await this.$http.get(`${orderClose}`, {
-					id
-				}).then(() => {
-			    this.isRefreshing = true;
-			    this.$mHelper.toast('订单取消成功');
-					setTimeout(() => {
-            this.loading = true;
-						this.page = 1;
-						this.orderList.length = 0;
-						this.getOrderList();
-					}, 500)
-				})
-			},
-      // 删除已关闭订单
-			async handleOrderDelete(id) {
-				await this.$http.delete(`${orderDelete}?id=${id}`, {}).then(() => {
-					this.$mHelper.toast('订单删除成功');
-					setTimeout(() => {
-						this.page = 1;
-						this.orderList.length = 0;
-						this.getOrderList();
-					}, 500)
-				})
-			},
-      // 确认收货
-			async handleOrderTakeDelivery(id) {
-				await this.$http.get(`${orderTakeDelivery}`, {
-					id
-				}).then(() => {
-          this.page = 1;
-          this.orderList.length = 0;
-					this.getOrderList();
-				})
-			},
-			// 数据初始化
-			initData () {
-				this.getOrderList();
-			},
-			// 获取订单列表
-			async getOrderList(type) {
-				let index = this.tabCurrentIndex;
-				let navItem = this.navList[index];
-				const params = {};
-				if (navItem.state || navItem.state === 0) {
-					params.synthesize_status = navItem.state;
-				}
-				params.page = this.page;
-				await this.$http.get(`${orderList}`, params).then(async r => {
-					if (type === 'refresh') {
-						uni.stopPullDownRefresh();
-					}
-					this.loadingType  = r.data.length === 10 ? 'more' : 'nomore';
-					this.orderList = [ ...this.orderList, ...r.data ];
-					if (this.orderList.length === 0) {
-				    await this.getGuessYouLikeList();
-					}
-					this.loading = false;
-				}).catch(() => {
-					this.loading = false;
-					if (type === 'refresh') {
-						uni.stopPullDownRefresh();
-					}
-				});
-			},
-	    async getGuessYouLikeList() {
-	      await this.$http.get(`${guessYouLikeList}`).then(r => {
-	        this.guessYouLikeList = r.data
-	      });
-	    },
-			// 监听swiper切换
-			changeTab(e){
-				this.page = 1;
-				this.orderList.length = 0;
-				this.tabCurrentIndex = e.target.current;
-				this.loading = true;
-				this.getOrderList();
-			},
-			//顶部tab点击
-			tabClick(index){
-				this.page = 1;
-				this.orderList.length = 0;
-				this.tabCurrentIndex = index;
-			},
-			//顶部tab点击
-			getMoreOrderList(){
-        this.page ++;
-        this.getOrderList();
-			}
-		}
-	}
+export default {
+  name: 'order',
+  components: {},
+  data() {
+    //这里存放数据
+    return {};
+  },
+  //监控data中的数据变化
+  watch: {},
+  //方法集合
+  methods: {},
+  //生命周期 - 创建完成(可以访问当前this实例)
+  created() {},
+  //生命周期 - 挂载完成(可以访问DOM元素)
+  mounted() {},
+};
 </script>
-
-<style lang="scss">
-	page, .content{
-		background: $page-color-base;
-		height: 100%;
-	}
-	.swiper-box{
-		height: calc(100% - 40px);
-	}
-	.list-scroll-content{
-		height: 100%;
-	}
-	.uni-swiper-item{
-		height: auto;
-	}
-</style>
+<style lang="scss" scoped>
+</style>

+ 0 - 139
src/pages/order/refund.vue

@@ -1,139 +0,0 @@
-<template>
-	<view class="refund" :style="{backgroundColor: orderList.length === 0 ? '#fff' : '' }">
-		<!--订单列表-->
-		<scroll-view
-			class="list-scroll-content"
-			scroll-y
-		>
-			<!-- 订单列表 -->
-			<view
-				v-for="(item,index) in orderList" :key="index"
-				class="rf-order-item"
-			>
-				<view class="i-top b-b">
-					<text class="time">订单号:{{item.order_sn}}</text>
-					<text class="state">{{item.order_status | orderStatusFilter }}</text>
-				</view>
-				<view
-					class="goods-box-single"
-					@tap="navTo(`/pages/product/product?id=${goodsItem.product_id}`)"
-					v-for="(goodsItem, goodsIndex) in item.product" :key="goodsIndex"
-				>
-					<image class="goods-img" :src="goodsItem.product_picture" mode="aspectFill"></image>
-					<view class="right">
-						<text class="title in2line">{{goodsItem.product_name}}</text>
-						<text class="attr-box">{{goodsItem.sku_name || '基础版'}} * {{goodsItem.num}}</text>
-						<text class="price base-color">¥ {{goodsItem.product_money}}</text>
-					</view>
-				</view>
-
-				<view class="price-box">
-					共
-					<text class="num">{{ item.product_count }}</text>
-					件商品 实付款
-					<text class="price">{{ item.pay_money }}</text>
-				</view>
-				<view class="action-box b-t">
-          <button class="action-btn recom" @tap="navTo(`/pages/order/detail?id=${item.id}`)">订单详情</button>
-				</view>
-			</view>
-			<rf-load-more :status="loadingType" v-if="orderList.length > 0"></rf-load-more>
-		</scroll-view>
-
-		<rf-empty :info="'快去商城逛逛吧'" v-if="orderList.length === 0 && !loading"></rf-empty>
-		<!--加载动画-->
-		<rf-loading v-if="loading"></rf-loading>
-	</view>
-</template>
-
-<script>
-	/**
-	 * @des 售后订单管理
-	 *
-	 * @author stav stavyan@qq.com
-	 * @date 2020-01-15 11:54
-	 * @copyright 2019
-	 */
-	import rfLoadMore from '@/components/rf-load-more/rf-load-more.vue';
-  import { orderList} from '@/api/userInfo';
-  import mConstData from '@/config/constData.config'
-	export default {
-		components: {
-			rfLoadMore
-		},
-		data() {
-			return {
-				loadingType: 'more',
-				orderList: [],
-				page: 1,
-				loading: true
-			};
-		},
-		filters: {
-			// 状态显示格式化
-      orderStatusFilter (orderStatus) {
-		    let state;
-				mConstData.orderStatus.forEach(orderItem => {
-					if (orderItem.key === parseInt(orderStatus, 10)) {
-						state = orderItem.value
-					}
-				})
-	      return state;
-      }
-		},
-		onShow(){
-			this.initData();
-		},
-		//下拉刷新
-		onPullDownRefresh(){
-			this.page = 1;
-			this.orderList.length = 0;
-			this.getOrderList('refresh');
-		},
-		//加载更多
-		onReachBottom(){
-			this.page ++;
-			this.getOrderList();
-		},
-		methods: {
-			// 跳转页面
-      navTo (route) {
-	      this.$mRouter.push({route});
-      },
-			// 数据初始化
-			initData () {
-				this.orderList.length = 0;
-				this.page = 1;
-				this.getOrderList();
-			},
-			// 获取订单列表
-			async getOrderList(type) {
-		    const params = {};
-				params.page = this.page;
-				params.synthesize_status = -1;
-				await this.$http.get(`${orderList}`, params).then(r => {
-			    this.loading = false;
-					if (type === 'refresh') {
-						uni.stopPullDownRefresh();
-					}
-					this.loadingType  = r.data.length === 10 ? 'more' : 'nomore';
-					this.orderList = [ ...this.orderList, ...r.data ]
-				}).catch(() => {
-			    this.loading = false;
-					if (type === 'refresh') {
-						uni.stopPullDownRefresh();
-					}
-				});
-			}
-		}
-	}
-</script>
-
-<style lang="scss">
-	.list-scroll-content{
-		height: 100%;
-	}
-	.uni-swiper-item{
-		height: auto;
-	}
-</style>

+ 0 - 233
src/pages/order/refund/refund.vue

@@ -1,233 +0,0 @@
-<template>
-	<view class="refund">
-		<view class="product-info">
-			<image class="product-image"
-						 mode="aspectFill"
-						 :src="productInfo.product_picture"></image>
-			<view class="product-content">
-				<text class="product-name in2line">{{ productInfo.product_name }}</text>
-				<text class="product-sku-name">{{ productInfo.skuName || '基础款' }}</text>
-				<text class="product-price">{{ productInfo.product_money }} * {{ productInfo.num }}</text>
-			</view>
-		</view>
-		<view class="product-textarea">
-			<form @submit="handleOrderRefundApply">
-				<radio-group v-if="parseInt(refundType, 10) != 1" name="refund_type" class="refund-type" @change="handleRefundTypeChange">
-					<label class="gender-item" v-for="(item, index) in refundTypeArr" :key="index">
-						<radio class="gender-item-radio" :value="item.value" color="#fa436a" :checked="refund_type == item.value" />
-						<text class="gender-item-text">{{ item.name }}</text>
-					</label>
-				</radio-group>
-				 <textarea name="refund_reason" class="textarea" maxlength="140"
-					 @input="handleContentChange"
-					 :value="refund_reason"
-					 placeholder-style="color:#ccc; font-size: 24upx"
-					 placeholder="宝贝不满足你的期待吗?请填写一下你的退货/退款理由吧"/>
-				<view class="tips">
-					<text v-if="refund_reason.length > 0 && refund_reason.length < 40">
-						您已输入<text class="f"> {{ refund_reason.length }} </text>字
-					</text>
-					<text v-if="refund_reason.length >= 40">
-							还可输入 <text class="s"> {{ wordLimit }} </text> 字
-					</text>
-				</view>
-				<button class="confirm-btn" formType="submit">{{ parseInt(refund_type, 10) === 1 ? '仅退款': '退货退款' }}</button>
-			</form>
-		</view>
-	</view>
-</template>
-
-<script>
-	/**
-	 * @des 发表评价
-	 *
-	 * @author stav stavyan@qq.com
-	 * @date 2019-11-27 14:32
-	 * @copyright 2019
-	 */
-	import uniRate from '@/components/rf-rate/rf-rate.vue'
-	import {orderRefundApply} from '@/api/userInfo';
-	import {orderCustomerRefundApply} from '@/api/userInfo';
-	const graceChecker = require('@/common/graceChecker.js');
-	export default{
-		components: { uniRate },
-		data(){
-			return {
-				productInfo: {},
-				refundType: 1,
-				refund_type: 1,
-				refund_reason: '',
-				refundTypeArr: [
-					{
-						value: '1',
-						name: '仅退款'
-					},
-					{
-						value: '2',
-						name: '退货退款'
-					}]
-			}
-		},
-		computed: {
-			wordLimit () {
-				return 140 - this.refund_reason.length;
-			}
-		},
-		onLoad(options){
-			this.initData(options);
-		},
-		methods: {
-			/**
-			 *@des 数据初始化
-			 *@author stav stavyan@qq.com
-			 *@blog https://stavtop.club
-			 *@date 2020/01/03 16:02:40
-			 */
-			initData(options) {
-				this.token = uni.getStorageSync('accessToken') || undefined;
-				this.productInfo = JSON.parse(options.data);
-				this.refundType = options.refundType;
-				let title = '仅退款';
-				if(parseInt(this.refundType, 10) === 1){
-					title = '仅退款'
-				} else {
-					title = '仅退款/退货退款'
-				}
-				uni.setNavigationBarTitle({
-					title
-				});
-			},
-			/**
-			 *@des 评价内容监听事件
-			 *@author stav stavyan@qq.com
-			 *@blog https://stavtop.club
-			 *@date 2019/11/27 15:51:21
-			 *@param arguments
-			 */
-			handleContentChange (e) {
-				this.refund_reason = e.detail.value;
-			},
-			handleRefundTypeChange (e) {
-				this.refund_type = e.detail.value;
-			},
-			/**
-			 *@des 退货/退款
-			 *@author stav stavyan@qq.com
-			 *@blog https://stavtop.club
-			 *@date 2019/12/03 15:43:18
-			 */
-			async handleOrderRefundApply(e) {
-				const formData = e.detail.value;
-				// formData.refund_type = this.refundType;
-				if (parseInt(this.refundType, 10) === 1) {
-					formData.refund_type = this.refundType;
-				}
-				let rule = [
-					{name:'refund_reason', checkType : 'notnull', checkRule:'',  errorMsg:'请输入退款/退货理由'}
-				];
-				const checkRes = graceChecker.check(formData, rule);
-				if(!checkRes){
-					this.$mHelper.toast(graceChecker.error);
-					return;
-				}
-				if (this.refundType == 3) {
-					this.handleOrderCustomerRefundApply(this.productInfo.id, formData);
-				} else {
-					this.handleOrderRefundApplyOperation(this.productInfo.id, formData);
-				}
-			},
-			async handleOrderRefundApplyOperation(id, formData) {
-				await this.$http.post(`${orderRefundApply}`, {
-					id,
-					...formData
-				}).then(() => {
-					this.$mHelper.toast('申请成功');
-					this.$mRouter.back();
-				});
-			},
-			async handleOrderCustomerRefundApply(id, formData) {
-				await this.$http.post(`${orderCustomerRefundApply}`, {
-					id,
-					...formData
-				}).then(() => {
-					this.$mHelper.toast('申请成功');
-					this.$mRouter.back();
-				});
-			}
-		}
-	}
-</script>
-
-<style lang='scss'>
-	.refund {
-		background: #fff;
-		padding: 20upx;
-		.product-info {
-			display: flex;
-			.product-image {
-				width: 200upx;
-				height: 150upx;
-			}
-			.product-content {
-				flex: 1;
-				margin-left: 20upx;
-				.product-name {
-					font-size: $font-lg;
-					color: $font-color-dark;
-					line-height: 32upx;
-					min-height: 60upx;
-				}
-				.product-sku-name {
-					display: block;
-					font-size: $font-base;
-					color: $font-color-dark;
-				}
-			}
-		}
-		.product-textarea {
-			margin-top: 20upx;
-			height: 300upx;
-			border-bottom: 1px solid rgba(0, 0, 0, 0.1);
-			position: relative;
-			.refund-type {
-				margin: 20upx 0;
-			}
-			.textarea {
-				width: 100%;
-			}
-			.tips {
-				position: absolute;
-				bottom: 10upx;
-				right: 0;
-				font-size: $font-sm;
-				color: $font-color-light;
-				.f {
-					color: $uni-color-success;
-				}
-				.s {
-					color: $uni-color-primary;
-				}
-			}
-			.anonymous {
-				color: $font-color-light;
-				font-size: $font-sm;
-				position: absolute;
-				bottom: 0;
-				left: 0;
-			}
-		}
-		.confirm-btn{
-			width: 630upx;
-			height: 76upx;
-			line-height: 76upx;
-			border-radius: 50px;
-			margin-top: 50upx;
-			background: $uni-color-primary;
-			color: #fff;
-			font-size: $font-lg;
-			&:after{
-				border-radius: 100px;
-			}
-		}
-	}
-</style>

+ 0 - 181
src/pages/order/search.vue

@@ -1,181 +0,0 @@
-<template>
-	<view class="refund" :style="{backgroundColor: orderList.length === 0 ? '#fff' : '' }">
-		<!--订单列表-->
-		<scroll-view
-			class="list-scroll-content"
-			scroll-y
-		>
-			<!-- 订单列表 -->
-			<view
-				v-for="(item,index) in orderList" :key="index"
-				class="rf-order-item"
-			>
-				<view class="i-top b-b">
-					<text class="time">订单号:{{item.order_sn}}</text>
-					<!--<text class="time">{{item.created_at | time}}</text>-->
-					<text class="state" v-if="parseInt(item.order_status, 10) !== 0">{{item.order_status | orderStatusFilter }}</text>
-					<view class="example-body" v-else>
-						<rf-count-down :show-day="false" :second="second(item.created_at)" @timeup="timeUp(item)" color="#FFFFFF" background-color="#fa436a" border-color="#fa436a" />
-					</view>
-				</view>
-
-				<view
-					class="goods-box-single"
-					@tap="navTo(`/pages/product/product?id=${goodsItem.product_id}`)"
-					v-for="(goodsItem, goodsIndex) in item.product"
-					:key="goodsIndex"
-				>
-					<image class="goods-img" :src="goodsItem.product_picture" mode="aspectFill"></image>
-					<view class="right">
-						<text class="title in2line">{{goodsItem.product_name}}</text>
-						<text class="attr-box">{{goodsItem.sku_name || '基础版'}} * {{goodsItem.num}}</text>
-						<text class="price base-color">¥ {{goodsItem.price}}</text>
-					</view>
-				</view>
-
-				<view class="price-box">
-					共
-					<text class="num">{{ item.product_count }}</text>
-					件商品 实付款
-					<text class="price">{{ item.pay_money }}</text>
-				</view>
-				<view class="action-box b-t">
-          <button class="action-btn" @tap="navTo(`/pages/order/detail?id=${item.id}`)">订单详情</button>
-        </view>
-			</view>
-			<rf-load-more :status="loadingType" v-if="orderList.length > 0"></rf-load-more>
-		</scroll-view>
-
-		<rf-empty info="暂无相关订单" v-if="orderList.length === 0 && !loading"></rf-empty>
-		<!--加载动画-->
-		<rf-loading v-if="loading"></rf-loading>
-	</view>
-</template>
-
-<script>
-	/**
-	 * @des 售后订单管理
-	 *
-	 * @author stav stavyan@qq.com
-	 * @date 2020-01-15 11:54
-	 * @copyright 2019
-	 */
-	import rfLoadMore from '@/components/rf-load-more/rf-load-more.vue';
-	import moment from '@/common/moment';
-  import {orderDelete, orderList, orderTakeDelivery} from '@/api/userInfo';
-	import rfCountDown from '@/components/rf-count-down'
-	import {orderClose} from '@/api/product';
-  import mConstData from '@/config/constData.config'
-	export default {
-		components: {
-			rfLoadMore,
-			rfCountDown
-		},
-		data() {
-			return {
-				loadingType: 'more',
-				orderList: [],
-				page: 1,
-				loading: true,
-				keyword: null
-			};
-		},
-		computed: {
-			// 计算倒计时时间
-			second() {
-				return function (val) {
-					return Math.floor(15 * 60 - (new Date() / 1000 - val))
-				}
-			}
-		},
-		filters: {
-	    // 时间格式化
-			time(val) {
-				return moment(val * 1000).format('YYYY-MM-DD HH:mm:ss')
-			},
-			// 状态显示格式化
-      orderStatusFilter (orderStatus) {
-		    let state;
-				mConstData.orderStatus.forEach(orderItem => {
-					if (orderItem.key === parseInt(orderStatus, 10)) {
-						state = orderItem.value
-					}
-				})
-	      return state;
-      }
-		},
-		onLoad(options){
-			this.initData(options);
-		},
-		//下拉刷新
-		onPullDownRefresh(){
-			this.page = 1;
-			this.orderList.length = 0;
-			this.getOrderList('refresh');
-		},
-		//加载更多
-		onReachBottom(){
-			this.page ++;
-			this.getOrderList();
-		},
-		methods: {
-			// 跳转页面
-      navTo (route) {
-	      this.$mRouter.push({route});
-      },
-			// 倒计时关闭订单
-			timeUp(item) {
-				this.handleOrderClose(item.id);
-			},
-			// 关闭订单
-			async handleOrderClose(id) {
-				await this.$http.get(`${orderClose}`, {
-					id
-				}).then(() => {
-			    this.$mHelper.toast('订单取消成功');
-					setTimeout(() => {
-						this.page = 1;
-						this.orderList.length = 0;
-						this.getOrderList();
-					}, 500)
-				})
-			},
-			// 数据初始化
-			initData (options) {
-				this.keyword = options.keyword;
-				this.orderList.length = 0;
-				this.page = 1;
-				this.getOrderList();
-			},
-			// 获取订单列表
-			async getOrderList(type) {
-		    const params = {};
-				params.order_sn = this.keyword;
-				await this.$http.get(`${orderList}`, {
-					...params
-				}).then(r => {
-			    this.loading = false;
-					if (type === 'refresh') {
-						uni.stopPullDownRefresh();
-					}
-					this.loadingType  = r.data.length === 10 ? 'more' : 'nomore';
-					this.orderList = [ ...this.orderList, ...r.data ]
-				}).catch(() => {
-			    this.loading = false;
-					if (type === 'refresh') {
-						uni.stopPullDownRefresh();
-					}
-				});
-			}
-		}
-	}
-</script>
-
-<style lang="scss">
-	.list-scroll-content{
-		height: 100%;
-	}
-	.uni-swiper-item{
-		height: auto;
-	}
-</style>

+ 0 - 191
src/pages/order/shipping/return.vue

@@ -1,191 +0,0 @@
-<template>
-	<view class="evaluation">
-		<!--商品信息-->
-		<view class="product-info">
-			<image class="product-image"
-						 mode="aspectFill"
-						 :src="productInfo.product_picture"></image>
-			<view class="product-content">
-				<text class="product-name in2line">{{ productInfo.product_name }}</text>
-				<text class="product-sku-name">{{ productInfo.sku_name || '基础款' }}</text>
-				<text class="product-price">{{ productInfo.product_money }} * {{ productInfo.num }}</text>
-			</view>
-		</view>
-		<!--详细描述信息-->
-
-		<view class="input-content">
-			<view class="input-item">
-						<text class="tit">快递公司</text>
-						<input
-							type="text"
-							@input="handleRefundShippingCompanyChange"
-							:value="salesReturn.refund_shipping_company"
-							placeholder="请输入快递公司"
-						/>
-					</view>
-			<view class="input-item">
-				<text class="tit">快递单号</text>
-				<input
-					type="text"
-					@input="handleRefundShippingCodeChange"
-					:value="salesReturn.refund_shipping_code"
-					placeholder="请输入快递单号"
-				/>
-			</view>
-		</view>
-		<!--提交退货物流-->
-		<button class="confirm-btn" @tap="handleSalesReturn">提交退货物流</button>
-	</view>
-</template>
-
-<script>
-	/**
-	 * @des 提交退货物流
-	 *
-	 * @author stav stavyan@qq.com
-	 * @date 2020-03-16 11:15
-	 * @copyright 2019
-	 */
-	import {orderProductSalesReturn, orderCustomerSalesReturn} from '@/api/userInfo';
-	export default{
-		data(){
-			return {
-				productInfo: {},
-				token: null,
-				// 评论表单
-				salesReturn: {
-					'id': undefined,
-					'refund_shipping_code' : undefined,
-					'refund_shipping_company' : undefined
-				}
-			}
-		},
-		onLoad(options){
-		    this.initData(options);
-		},
-		methods: {
-	    // 数据初始化
-	    initData(options) {
-				this.productInfo = JSON.parse(options.data);
-				console.log(this.productInfo)
-	    },
-			handleRefundShippingCompanyChange (e) {
-	    	this.salesReturn.refund_shipping_company = e.detail.value;
-			},
-			handleRefundShippingCodeChange (e) {
-	    	this.salesReturn.refund_shipping_code = e.detail.value;
-			},
-			// 提交评价
-			async handleSalesReturn() {
-				this.salesReturn.id = this.productInfo.id;
-				if (!this.salesReturn.refund_shipping_company) {
-					this.$mHelper.toast('请输入物流公司');
-					return;
-				}
-				if (!this.salesReturn.refund_shipping_code === undefined) {
-					this.$mHelper.toast('请输入物流单号');
-					return;
-				}
-
-				let salesReturnApi = orderProductSalesReturn;
-				if (this.productInfo.order_status == 4) {
-					salesReturnApi = orderCustomerSalesReturn;
-				}
-				await this.$http.post(`${salesReturnApi}`, {
-					...this.salesReturn
-				}).then(() => {
-					this.$mRouter.back();
-				})
-			}
-		}
-	}
-</script>
-
-<style lang='scss'>
-	.evaluation {
-		background: #fff;
-		padding: 20upx;
-		.product-info {
-			display: flex;
-			.product-image {
-				width: 200upx;
-				height: 150upx;
-			}
-			.product-content {
-				flex: 1;
-				margin-left: 20upx;
-				.product-name {
-					font-size: $font-base;
-					color: $font-color-dark;
-					line-height: 32upx;
-					min-height: 60upx;
-				}
-				.product-sku-name {
-					display: block;
-					font-size: $font-base;
-					color: $font-color-dark;
-				}
-			}
-		}
-		.input-content{
-			padding: 80upx 0 40upx;
-			.input-item{
-				display:flex;
-				padding: 0 30upx;
-				background: $page-color-light;
-				height: 80upx;
-				line-height: 80upx;
-				border-radius: 4px;
-				margin-bottom: 40upx;
-				&:last-child{
-					margin-bottom: 0;
-				}
-				.tit{
-					width: 120upx;
-					font-size: $font-sm+2upx;
-					color: $font-color-base;
-				}
-				input {
-					height: 80upx;
-					line-height: 80upx;
-					font-size: $font-base + 2upx;
-					color: $font-color-dark;
-				}
-				.date {
-					height: 80upx;
-					line-height: 80upx;
-					font-size: $font-base + 2upx;
-					color: $font-color-dark;
-				}
-				.gender {
-					margin: 10upx 0;
-					color: $font-color-dark;
-					font-size: $font-base;
-					.gender-item {
-						margin-right: 10upx;
-						.gender-item-text {
-							padding: 0 5upx;
-						}
-						radio .wx-radio-input.wx-radio-input-checked {
-							background: $uni-color-primary;
-							border-color: $uni-color-primary;
-						}
-					}
-				}
-			}
-		}
-		.confirm-btn{
-			width: 630upx;
-			height: 76upx;
-			line-height: 76upx;
-			border-radius: 50px;
-			margin-top: 50upx;
-			background: $uni-color-primary;
-			color: #fff;
-			font-size: $font-lg;
-			&:after{
-				border-radius: 100px;
-			}
-		}
-	}
-</style>

+ 0 - 635
src/pages/order/shipping/shipping.vue

@@ -1,635 +0,0 @@
-<template>
-	<view>
-		<!-- 优惠明细 -->
-		<view v-for="(item, index) in shippingDetail.data" :key="index">
-			<!-- 商品信息 -->
-			<view class="goods-section">
-				<view class="g-header b-b">
-					<text class="name">商品信息</text>
-				</view>
-				<!-- 商品信息 @tap="navTo(`/pages/product/product?id=${item.order_product.id}`)" -->
-				<view class="g-item">
-					<image :src="item.order_product.product_picture" mode="aspectFill"></image>
-					<view class="right">
-						<text class="title clamp">{{ item.order_product.product_name }}</text>
-					</view>
-				</view>
-			</view>
-			<view class="yt-list">
-				<view class="yt-list-cell b-b" v-if="item.member_username">
-					<view class="cell-icon">
-						名
-					</view>
-					<text class="cell-tit clamp">收件人</text>
-					<text class="cell-tip active">
-						{{ item.member_username }}
-					</text>
-					<text class="cell-more wanjia wanjia-gengduo-d"></text>
-				</view>
-				<view class="yt-list-cell b-b" v-if="item.express_no">
-					<view class="cell-icon">
-						单
-					</view>
-					<text class="cell-tit clamp">快递单号</text>
-					<text class="cell-tip active">
-						{{ item.express_no }}
-					</text>
-					<text class="cell-more wanjia wanjia-gengduo-d"></text>
-				</view>
-				<view class="yt-list-cell b-b" v-if="item.express_company">
-					<view class="cell-icon">
-						司
-					</view>
-					<text class="cell-tit clamp">快递公司</text>
-					<text class="cell-tip active">
-						{{ item.express_company }}
-					</text>
-					<text class="cell-more wanjia wanjia-gengduo-d"></text>
-				</view>
-			</view>
-			<view class="uni-timeline" style="padding: 30upx 40upx; background-color: #fff;">
-				 <!--uni-timeline-first-item-->
-				<view
-						class="uni-timeline-item"
-						:class="{'uni-timeline-first-item': index === 0, 'uni-timeline-last-item': index === item.trace.length - 1, }"
-						v-for="(row, index) in item.trace"
-						:key="index">
-					<view class="uni-timeline-item-divider"></view>
-					<view class="uni-timeline-item-content">
-						<view>
-							{{ row.value }}
-						</view>
-						<view v-if="row.trace.length === 0" class="datetime">
-							{{ row.time }}
-						</view>
-					</view>
-				</view>
-				<view>暂无物流信息</view>
-			</view>
-		</view>
-
-		<rf-empty :info="'暂无物流信息'" v-if="shippingDetail.count === 0"></rf-empty>
-	</view>
-</template>
-
-<script>
-	import rfPicker from '@/components/rf-picker';
-	import moment from '@/common/moment';
-	import {orderProductExpressDetails} from "@/api/product";
-	export default {
-		components: {
-			rfPicker
-		},
-		data() {
-			return {
-				shippingDetail: {},
-				shippingTimeLine: []
-			}
-		},
-		filters: {
-			time(val) {
-				return val == 0 ? '暂未操作' : moment(val * 1000).format('YYYY-MM-DD HH:mm:ss')
-			},
-      orderStatusFilter (orderStatus) {
-			  let status = null;
-				const orderStatusList = [
-					{key: 0, value: '待付款'},
-					{key: 1, value: '待发货'},
-					{key: 2, value: '已发货'},
-					{key: 3, value: '已收货'},
-					{key: 4, value: '已完成'},
-					{key: -1, value: '退货申请'},
-					{key: -2, value: '退款中'},
-					{key: -3, value: '退款完成'},
-					{key: -4, value: '已关闭'},
-					{key: -5, value: '撤销申请'},
-				];
-				orderStatusList.forEach(orderItem => {
-					if (orderItem.key == orderStatus) {
-						 status = orderItem.value
-					}
-				});
-        return status;
-      },
-			filterProductStatus(item) {
-				let status = null;
-				if (parseInt(item.refund_status, 10) !== 0) {
-					const refundStatusList = [
-						{key: 1, value: '退款申请'},
-						{key: 2, value: '等待退货'},
-						{key: 3, value: '等待确认收货'},
-						{key: 4, value: '等待确认退款'},
-						{key: 5, value: '同意退款'},
-						{key: -1, value: '退款已拒绝'},
-						{key: -2, value: '退款已关闭'},
-						{key: -3, value: '退款不通过'},
-					];
-					refundStatusList.forEach(refundItem => {
-						if (refundItem.key == item.refund_status) {
-							 status = refundItem.value
-						}
-					})
-				} else if (parseInt(item.order_status, 10) === 4) {
-					const evaluateStatusList = [
-						{key: 0, value: '未评价'},
-						{key: 1, value: '已评价'},
-						{key: 2, value: '已追评'},
-					];
-					evaluateStatusList.forEach(evaluateItem => {
-						if (evaluateItem.key == item.is_evaluate) {
-							 status = evaluateItem.value
-						}
-					})
-				} else {
-					const orderStatusList = [
-						{key: 0, value: '待付款'},
-						{key: 1, value: '待发货'},
-						{key: 2, value: '已发货'},
-						{key: 3, value: '已收货'},
-						{key: 4, value: '已完成'},
-						{key: -1, value: '退货申请'},
-						{key: -2, value: '退款中'},
-						{key: -3, value: '退款完成'},
-						{key: -4, value: '已关闭'},
-						{key: -5, value: '撤销申请'},
-					];
-					orderStatusList.forEach(orderItem => {
-						if (orderItem.key == item.order_status) {
-							 status = orderItem.value
-						}
-					})
-				}
-				return status;
-			},
-			filterShippingType (value) {
-				const data = ['', '物流配送', '买家自提', '本地配送'];
-				return data[parseInt(value, 10)]
-			},
-		},
-		onLoad(options){
-			this.initData(options);
-		},
-		methods: {
-	    navTo(url) {
-        uni.navigateTo({ url });
-	    },
-			/**
-			 *@des 初始化数据
-			 *@author stav stavyan@qq.com
-			 *@blog https://stavtop.club
-			 *@date 2019/11/19 13:44:25
-			 */
-			initData(options) {
-				this.getOrderDetail(options.id)
-			},
-			// 获取物流信息
-			async getOrderDetail(order_id) {
-
-				await this.$http.get(`${orderProductExpressDetails}`, {
-					order_id
-				}).then(r => {
-					r.data.data.forEach(row => {
-				    const traceArr = [];
-						row.trace.forEach(item => {
-						    traceArr.push({ time: item.datetime, value: item.remark })
-						});
-						row.trace = traceArr;
-					});
-					this.shippingDetail = r.data;
-				}).catch(err => {
-					console.log(err)
-				})
-			},
-		}
-	}
-</script>
-
-<style lang="scss">
-	page {
-		background: $page-color-base;
-	}
-
-	.address-section {
-		padding: 30upx 0;
-		background: #fff;
-		position: relative;
-
-		.order-content {
-			display: flex;
-			align-items: center;
-		}
-
-		.no-default-address {
-			color: #333;
-			font-size: 32upx;
-		}
-
-		.icon-shouhuodizhi {
-			flex-shrink: 0;
-			display: flex;
-			align-items: center;
-			justify-content: center;
-			width: 90upx;
-			color: #888;
-			font-size: 44upx;
-		}
-
-		.cen {
-			display: flex;
-			flex-direction: column;
-			flex: 1;
-			font-size: 28upx;
-			color: $font-color-dark;
-		}
-
-		.name {
-			font-size: 34upx;
-			margin-right: 24upx;
-		}
-
-		.address {
-			margin-top: 16upx;
-			margin-right: 20upx;
-			color: $font-color-light;
-		}
-
-		.icon-you {
-			font-size: 32upx;
-			color: $font-color-light;
-			margin-right: 30upx;
-		}
-
-		.a-bg {
-			position: absolute;
-			left: 0;
-			bottom: 0;
-			display: block;
-			width: 100%;
-			height: 5upx;
-		}
-	}
-
-	.goods-section {
-		margin-top: 16upx;
-		background: #fff;
-		padding-bottom: 1px;
-
-		.g-header {
-			display: flex;
-			align-items: center;
-			justify-content:space-between;
-			height: 84upx;
-			padding: 0 30upx;
-			position: relative;
-			.red {
-				color: $base-color;
-			}
-		}
-
-		.logo {
-			display: block;
-			width: 50upx;
-			height: 50upx;
-			border-radius: 100px;
-		}
-
-		.name {
-			font-size: 30upx;
-			color: $font-color-base;
-			margin-left: 24upx;
-		}
-
-		.g-item {
-			display: flex;
-			margin: 20upx 30upx;
-			image {
-				flex-shrink: 0;
-				display: block;
-				width: 220upx;
-				height: 170upx;
-				border-radius: 4upx;
-			}
-
-			.right {
-				flex: 1;
-				padding-left: 16upx;
-				overflow: hidden;
-			}
-
-			.title {
-				font-size: $font-base;
-				color: $font-color-dark;
-				line-height: 40upx;
-			}
-
-			.spec {
-				font-size: 22upx;
-				color: $font-color-light;
-			}
-
-			.price-box {
-				display: flex;
-				align-items: center;
-				justify-content:space-between;
-				font-size: 28upx;
-				color: $font-color-dark;
-				.price {
-					margin-bottom: 4upx;
-				}
-				.number{
-					font-size: 26upx;
-					color: $font-color-base;
-					margin-left: 20upx;
-				}
-				.status {
-					font-size: 24upx;
-					color: $font-color-spec;
-				}
-			}
-
-			.step-box {
-				position: relative;
-			}
-		}
-	}
-	.yt-list {
-		margin-top: 16upx;
-		background: #fff;
-	}
-
-	.yt-list-cell {
-		display: flex;
-		align-items: center;
-		padding: 10upx 30upx 10upx 40upx;
-		line-height: 70upx;
-		position: relative;
-
-		&.cell-hover {
-			background: #fafafa;
-		}
-
-		&.b-b:after {
-			left: 30upx;
-		}
-
-		.cell-icon {
-			height: 32upx;
-			width: 32upx;
-			font-size: 22upx;
-			color: #fff;
-			text-align: center;
-			line-height: 32upx;
-			background: #f85e52;
-			border-radius: 4upx;
-			margin-right: 12upx;
-
-			&.hb {
-				background: #ffaa0e;
-			}
-
-			&.lpk {
-				background: #3ab54a;
-			}
-
-		}
-
-		.cell-more {
-			align-self: center;
-			font-size: 24upx;
-			color: $font-color-light;
-			margin-left: 8upx;
-			margin-right: -10upx;
-		}
-
-		.cell-tit {
-			flex: 1;
-			font-size: 26upx;
-			color: $font-color-light;
-			margin-right: 10upx;
-		}
-
-		.cell-tip {
-			font-size: 26upx;
-			color: $font-color-dark;
-
-			&.disabled {
-				color: $font-color-light;
-			}
-
-			&.active {
-				color: $base-color;
-			}
-			&.red{
-				color: $base-color;
-			}
-		}
-
-		&.desc-cell {
-			.cell-tit {
-				max-width: 90upx;
-			}
-		}
-
-		.desc {
-			flex: 1;
-			font-size: $font-base;
-			color: $font-color-dark;
-		}
-	}
-
-	/* 支付列表 */
-	.pay-list{
-		padding-left: 40upx;
-		margin-top: 16upx;
-		background: #fff;
-		.pay-item{
-			display: flex;
-			align-items: center;
-			padding-right: 20upx;
-			line-height: 1;
-			height: 110upx;
-			position: relative;
-		}
-		.icon-weixinzhifu{
-			width: 80upx;
-			font-size: 40upx;
-			color: #6BCC03;
-		}
-		.icon-alipay{
-			width: 80upx;
-			font-size: 40upx;
-			color: #06B4FD;
-		}
-		.icon-xuanzhong2{
-			display: flex;
-			align-items: center;
-			justify-content: center;
-			width: 60upx;
-			height: 60upx;
-			font-size: 40upx;
-			color: $base-color;
-		}
-		.tit{
-			font-size: 32upx;
-			color: $font-color-dark;
-			flex: 1;
-		}
-	}
-
-	.footer{
-		position: fixed;
-		left: 0;
-		bottom: 0;
-		z-index: 995;
-		display: flex;
-		align-items: center;
-		width: 100%;
-		height: 90upx;
-		justify-content: space-between;
-		font-size: 30upx;
-		background-color: #fff;
-		z-index: 998;
-		color: $font-color-base;
-		box-shadow: 0 -1px 5px rgba(0,0,0,.1);
-		.price-content{
-			padding-left: 30upx;
-		}
-		.price-tip{
-			color: $base-color;
-			margin-left: 8upx;
-		}
-		.price{
-			font-size: 36upx;
-			color: $base-color;
-		}
-		.submit{
-			display:flex;
-			align-items:center;
-			justify-content: center;
-			width: 280upx;
-			height: 100%;
-			color: #fff;
-			font-size: 32upx;
-			background-color: $base-color;
-		}
-	}
-
-	/* 优惠券面板 */
-	.mask{
-		display: flex;
-		align-items: flex-end;
-		position: fixed;
-		left: 0;
-		top: var(--window-top);
-		bottom: 0;
-		width: 100%;
-		background: rgba(0,0,0,0);
-		z-index: 9995;
-		transition: .3s;
-
-		.mask-content{
-			width: 100%;
-			max-height: 70vh;
-			min-height: 16vh;
-			background: #f3f3f3;
-			transform: translateY(100%);
-			transition: .3s;
-			overflow-y:scroll;
-      .no-coupon {
-        display: flex;
- 	      justify-content: center;	/* 水平居中 */
-        line-height: 16vh;
-      }
-		}
-		&.none{
-			display: none;
-		}
-		&.show{
-			background: rgba(0,0,0,.4);
-
-			.mask-content{
-				transform: translateY(0);
-			}
-		}
-	}
-
-	/* 优惠券列表 */
-	.coupon-item{
-		display: flex;
-		flex-direction: column;
-		margin: 20upx 24upx;
-		background: #fff;
-		.con{
-			display: flex;
-			align-items: center;
-			position: relative;
-			height: 120upx;
-			padding: 0 30upx;
-			&:after{
-				position: absolute;
-				left: 0;
-				bottom: 0;
-				content: '';
-				width: 100%;
-				height: 0;
-				border-bottom: 1px dashed #f3f3f3;
-				transform: scaleY(50%);
-			}
-		}
-		.left{
-			display: flex;
-			flex-direction: column;
-			justify-content: center;
-			flex: 1;
-			overflow: hidden;
-			height: 100upx;
-		}
-		.title{
-			font-size: 32upx;
-			color: $font-color-dark;
-			margin-bottom: 10upx;
-		}
-		.time{
-			font-size: 24upx;
-			color: $font-color-light;
-		}
-		.right{
-			display: flex;
-			flex-direction: column;
-			justify-content: center;
-			align-items: center;
-			font-size: 26upx;
-			color: $font-color-base;
-			height: 100upx;
-		}
-		.price{
-			font-size: 44upx;
-			color: $base-color;
-			&:before{
-				content: '¥';
-				font-size: 34upx;
-			}
-		}
-		.tips{
-			font-size: 24upx;
-			color: $font-color-light;
-			line-height: 60upx;
-			padding-left: 30upx;
-		}
-		.circle{
-			position: absolute;
-			left: -6upx;
-			bottom: -10upx;
-			z-index: 10;
-			width: 20upx;
-			height: 20upx;
-			background: #f3f3f3;
-			border-radius: 100px;
-			&.r{
-				left: auto;
-				right: -6upx;
-			}
-		}
-	}
-
-</style>

+ 375 - 381
src/pages/public/login.vue

@@ -1,451 +1,445 @@
 <template>
-	<view class="container">
-		<!--顶部返回按钮-->
-		<text class="back-btn iconfont iconzuojiantou-up" @tap="navBack"></text>
-		<view class="login-title">
-			<image class="logo" mode="widthFix" src="@/static/img/logo-xd.png"></image>
-			<view class="title">商家端管理后台登录</view>
-		</view>
-		<!-- 设置白色背景防止软键盘把下部绝对定位元素顶上来盖住输入框等 -->
-		<view class="wrapper">
-			
-			<view class="input-content">
-        <!--<view class="btn-group">-->
-          <!--<button type="primary" @tap="loginTest('15083980039', '123456')">小明-父</button>-->
-        <!--</view>-->
-				<view class="input-item">
-					<input
-						type="text"
-						name="username"
-						v-model="loginParams.username"
-						placeholder="请输入账户名"
-					/>
-				</view>
-				<view class="input-item" v-if="loginByPass">
-					<input
-						name="password"
-						type="password"
-						v-model="loginParams.password"
-						placeholder="请输入密码"	
-					/>
-				</view>
-				<view class="input-item relative" v-if="loginByPass">
-					<input
-						name="code"
-						type="text"
-						v-model="loginParams.code"
-						placeholder="请输入验证码"
-					/>
-					<image @tap="getCaptchaImage" class="codeImage" mode="widthFix" :src="codeImage"></image>
-				</view>
-
-				
-				<button
-					class="confirm-btn"
-					:disabled="btnLoading"
-					:loading="btnLoading"
-					@tap="toLogin"
-				>
-					登录
-				</button>
-			</view>
-			<!-- <view @tap="showLoginBySmsCode" class="forget-section">
-				{{ loginByPass ? '验证码登录' : '密码登录' }}
-			</view> -->
-			<view class="forget-section" @tap="navTo('/pages/public/password')">
-				忘记密码?
-			</view>
-		</view>
-	
-	</view>
+  <view class="container">
+    <!--顶部返回按钮-->
+    <text class="back-btn iconfont iconzuojiantou-up" @tap="navBack"></text>
+    <view class="login-title">
+      <image
+        class="logo"
+        mode="widthFix"
+        src="@/static/img/logo-xd.png"
+      ></image>
+      <view class="title">商家端管理后台登录</view>
+    </view>
+    <!-- 设置白色背景防止软键盘把下部绝对定位元素顶上来盖住输入框等 -->
+    <view class="wrapper">
+      <view class="input-content">
+        <view class="input-item">
+          <input
+            type="text"
+            name="username"
+            v-model="loginParams.username"
+            placeholder="请输入账户名"
+          />
+        </view>
+        <view class="input-item" v-if="loginByPass">
+          <input
+            name="password"
+            type="password"
+            v-model="loginParams.password"
+            placeholder="请输入密码"
+          />
+        </view>
+        <view class="input-item relative" v-if="loginByPass">
+          <input class="codenum"
+            name="code"
+            type="text"
+            v-model="loginParams.code"
+            placeholder="请输入验证码"
+          />
+          <image
+            @tap="getCaptchaImage"
+            class="codeImage"
+            mode="widthFix"
+            :src="codeImage"
+          ></image>
+        </view>
+
+        <button
+          class="confirm-btn"
+          :disabled="btnLoading"
+          :loading="btnLoading"
+          @tap="toLogin"
+        >
+          登录
+        </button>
+      </view>
+
+      <view class="forget-section" @tap="navTo()">
+        忘记密码?
+      </view>
+    </view>
+  </view>
 </template>
 <script>
 import { authLogin, loginByPass, loginBySmsCode, smsCode } from '@/api/login';
 import moment from '@/common/moment';
 export default {
-	data() {
-		return {
-			// loginParams: {
-			// 	username: '',
-			// 	code: '',
-			// 	password: ''
-			// },
-			loginParams: {
-				username: 'wljq',
-				code: '',
-				password: 'Ectrip2020',
-				uuid: null
-			},
-			codeImage: null,
-			btnLoading: false,
-			reqBody: {},
-			codeSeconds: 0, // 验证码发送时间间隔
-			loginByPass: true,
-			smsCodeBtnDisabled: true,
-			userInfo: null
-		};
-	},
-	onShow() {
-		if (this.$mStore.getters.hasLogin) {
-			this.$mRouter.reLaunch({ route: '/pages/index/index' });
-		}
-	},
-	onLoad() {
-		const time =
-			moment().valueOf() / 1000 - uni.getStorageSync('loginSmsCodeTime');
-		if (time < 60) {
-			this.codeSeconds =
-				this.$mConstDataConfig.sendCodeTime - parseInt(time, 10);
-			this.handleSmsCodeTime(this.codeSeconds);
-		} else {
-			this.codeSeconds = this.$mConstDataConfig.sendCodeTime;
-			this.smsCodeBtnDisabled = false;
-			uni.removeStorageSync('loginSmsCodeTime');
-		}
-		this.loginParams.mobile = uni.getStorageSync('loginMobile') || '';
-		this.loginParams.password = uni.getStorageSync('loginPassword') || '';
-		this.userInfo = uni.getStorageSync('wechatUserInfo');
-
-		this.getCaptchaImage()
-	},
-	methods: {
-		loginTest(mobile, password) {
-			this.loginParams.mobile = mobile;
-			this.loginParams.password = password;
-		},
-		// 发送验证码并进入倒计时
-		async getSmsCode() {
-			this.reqBody['mobile'] = this.loginParams['mobile'];
-			let checkSendCode = this.$mGraceChecker.check(
-				this.reqBody,
-				this.$mFormRule.sendCodeRule
-			);
-			if (!checkSendCode) {
-				this.$mHelper.toast(this.$mGraceChecker.error);
-				return;
-			}
-			await this.$http
-				.post(smsCode, {
-					mobile: this.loginParams.mobile,
-					usage: 'login'
-				})
-				.then(r => {
-					if (r.data) {
-						this.$mHelper.toast(`验证码发送成功, 验证码是${r.data}`);
-					} else {
-						this.$mHelper.toast('验证码已发送.');
-					}
-					this.smsCodeBtnDisabled = true;
-					uni.setStorageSync('loginSmsCodeTime', moment().valueOf() / 1000);
-					this.handleSmsCodeTime(59);
-				});
-		},
-		handleSmsCodeTime(time) {
-			let timer = setInterval(() => {
-				if (time === 0) {
-					clearInterval(timer);
-					this.smsCodeBtnDisabled = false;
-				} else {
-					this.codeSeconds = time;
-					this.smsCodeBtnDisabled = true;
-					time--;
-				}
-			}, 1000);
-		},
-		// 失去焦点的手机号
-		blurMobileChange(e) {
-			this.mobile = e.detail.value;
-		},
-		// 切换登录方式
-		showLoginBySmsCode() {
-			this.loginByPass = !this.loginByPass;
-		},
-		// 返回上一页
-		navBack() {
-			this.$mRouter.back();
-		},
-		// 统一跳转路由
-		navTo(route) {
-			this.$mRouter.push({ route });
-		},
-		// 返回主页
-		toHome() {
-			this.$mRouter.reLaunch({ route: '/pages/index/index' });
-		},
-		
-		async getCaptchaImage() {
-			await this.$http.get('captchaImage', {}).then(async r => {
-				console.log(r.data)
-				this.codeImage = 'data:image/gif;base64,'+r.data.img
-				this.loginParams.uuid = r.data.uuid
-			}).catch(() => {
-				this.loading = false;
-				
-			})
-		},
-		// 提交表单
-		async toLogin() {
-		
-			let cheRes, loginApi;
-			if (this.loginByPass) {
-				loginApi = loginByPass;
-				cheRes = this.$mGraceChecker.check(
-					this.loginParams,
-					this.$mFormRule.loginByPassRule
-				);
-			} 
-			if (!cheRes) {
-				this.$mHelper.toast(this.$mGraceChecker.error);
-				return;
-			}
-			/*  #ifdef  APP-PLUS  */
-			this.reqBody.group = 'tinyShopApp';
-			/*  #endif  */
-			/*  #ifdef H5  */
-			this.reqBody.group = 'tinyShopH5';
-			/*  #endif  */
-			/*  #ifdef  MP-WEIXIN  */
-			this.reqBody.group = 'tinyShopWechatMq';
-			/*  #endif  */
-			/*  #ifdef  MP-QQ  */
-			this.reqBody.group = 'tinyShopQqMq';
-			/*  #endif  */
-			this.handleLogin(this.loginParams, loginApi);
-		},
-		// 登录
-		async handleLogin(params, loginApi) {
-			this.btnLoading = true;
-			await this.$http
-				.post(loginApi, params)
-				.then(r => {
-					this.$mHelper.toast('恭喜您,登录成功!');
-					this.$mStore.commit('login', r.data);
-			
-					
-					// // #ifdef H5
-					// this.$mPayment.wxConfigH5();
-					// // #endif
-					const backToPage = uni.getStorageSync('backToPage');
-					if (backToPage) {
-						if (
-							backToPage.indexOf('/pages/user/user') !== -1 ||
-							backToPage.indexOf('/pages/cart/cart') !== -1 ||
-							backToPage.indexOf('/pages/index/index') !== -1 ||
-							backToPage.indexOf('/pages/notify/notify') !== -1 ||
-							backToPage.indexOf('/pages/category/category') !== -1
-						) {
-							this.$mRouter.reLaunch(JSON.parse(backToPage));
-						} else {
-							this.$mRouter.redirectTo(JSON.parse(backToPage));
-						}
-						uni.removeStorageSync('backToPage');
-						uni.removeStorageSync('wechatUserInfo');
-					} else {
-						this.$mRouter.reLaunch({ route: '/pages/index/index' });
-					}
-				})
-				.catch(() => {
-					this.btnLoading = false;
-				});
-		}
-	}
+  data() {
+    return {
+      loginParams: {
+        username: 'wljq',
+        code: '',
+        password: 'Ectrip2020',
+        uuid: null,
+      },
+      codeImage: null,
+      btnLoading: false,
+      reqBody: {},
+      codeSeconds: 0, // 验证码发送时间间隔
+      loginByPass: true,
+      smsCodeBtnDisabled: true,
+      userInfo: null,
+    };
+  },
+
+  onShow() {
+    if (this.$mStore.getters.hasLogin) {
+      this.$mRouter.reLaunch({ route: '/pages/index/index' });
+    }
+  },
+  // 页面生命周期 监听页面加载是否加载完成
+  onLoad() {
+    const time = moment().valueOf() / 1000 - uni.getStorageSync('loginSmsCodeTime');   // 从本地缓存中异步获取指定 key 对应的内容。
+    if (time < 60) {
+      this.codeSeconds = this.$mConstDataConfig.sendCodeTime - parseInt(time, 10);
+      this.handleSmsCodeTime(this.codeSeconds);
+    } else {
+      this.codeSeconds = this.$mConstDataConfig.sendCodeTime;
+      this.smsCodeBtnDisabled = false;
+      uni.removeStorageSync('loginSmsCodeTime');
+    }
+    this.loginParams.mobile = uni.getStorageSync('loginMobile') || '';
+    this.loginParams.password = uni.getStorageSync('loginPassword') || '';
+    this.userInfo = uni.getStorageSync('wechatUserInfo');
+
+    this.getCaptchaImage();
+  },
+  methods: {
+    loginTest(mobile, password) {
+      this.loginParams.mobile = mobile;
+      this.loginParams.password = password;
+    },
+
+    // 发送验证码并进入倒计时
+    async getSmsCode() {
+      this.reqBody['mobile'] = this.loginParams['mobile'];
+      let checkSendCode = this.$mGraceChecker.check(
+        this.reqBody,
+        this.$mFormRule.sendCodeRule
+      );
+      if (!checkSendCode) {
+        this.$mHelper.toast(this.$mGraceChecker.error);
+        return;
+      }
+      await this.$http
+        .post(smsCode, {
+          mobile: this.loginParams.mobile,
+          usage: 'login',
+        })
+        .then((r) => {
+          if (r.data) {
+            this.$mHelper.toast(`验证码发送成功, 验证码是${r.data}`);
+          } else {
+            this.$mHelper.toast('验证码已发送.');
+          }
+          this.smsCodeBtnDisabled = true;
+          uni.setStorageSync('loginSmsCodeTime', moment().valueOf() / 1000);
+          this.handleSmsCodeTime(59);
+        });
+    },
+
+    handleSmsCodeTime(time) {
+      let timer = setInterval(() => {
+        if (time === 0) {
+          clearInterval(timer);
+          this.smsCodeBtnDisabled = false;
+        } else {
+          this.codeSeconds = time;
+          this.smsCodeBtnDisabled = true;
+          time--;
+        }
+      }, 1000);
+    },
+    // 失去焦点的手机号
+    blurMobileChange(e) {
+      this.mobile = e.detail.value;
+    },
+    // 切换登录方式
+    showLoginBySmsCode() {
+      this.loginByPass = !this.loginByPass;
+    },
+    // 返回上一页
+    navBack() {
+      this.$mRouter.back();
+    },
+    // 统一跳转路由
+    navTo() {
+      this.$mRouter.push({ route: '/pages/public/resetpassword' });
+    },
+    // 返回主页
+    toHome() {
+      this.$mRouter.reLaunch({ route: '/pages/index/index' });
+    },
+
+		// 获取验证码
+    async getCaptchaImage() {
+      await this.$http
+        .get('captchaImage', {})
+        .then(async (r) => {
+          this.codeImage = 'data:image/gif;base64,' + r.data.img;
+          this.loginParams.uuid = r.data.uuid;
+        })
+        .catch(() => {
+          this.loading = false;
+        });
+    },
+    // 提交表单
+    async toLogin() {
+      let cheRes, loginApi;
+      if (this.loginByPass) {
+        loginApi = loginByPass;
+        cheRes = this.$mGraceChecker.check(
+          this.loginParams,
+          this.$mFormRule.loginByPassRule
+        );
+      }
+      //表单验证规则是否通过,否,终止登陆提示错误信息
+      if (!cheRes) {
+        this.$mHelper.toast(this.$mGraceChecker.error);
+        return;
+      }
+      /*  #ifdef  APP-PLUS  */
+      this.reqBody.group = 'tinyShopApp';
+      /*  #endif  */
+      /*  #ifdef H5  */
+      this.reqBody.group = 'tinyShopH5';
+      /*  #endif  */
+      /*  #ifdef  MP-WEIXIN  */
+      this.reqBody.group = 'tinyShopWechatMq';
+      /*  #endif  */
+      /*  #ifdef  MP-QQ  */
+      this.reqBody.group = 'tinyShopQqMq';
+      /*  #endif  */
+      this.handleLogin(this.loginParams, loginApi);
+    },
+    // 登录
+    async handleLogin(params, loginApi) {
+      this.btnLoading = true;
+      await this.$http
+        .post(loginApi, params)
+        .then((r) => {
+          this.$mHelper.toast('恭喜您,登录成功!');
+          this.$mStore.commit('login', r.data);
+          const backToPage = uni.getStorageSync('backToPage');
+          if (backToPage) {
+            if (
+              backToPage.indexOf('/pages/user/user') !== -1 ||
+              backToPage.indexOf('/pages/cart/cart') !== -1 ||
+              backToPage.indexOf('/pages/index/index') !== -1 ||
+              backToPage.indexOf('/pages/notify/notify') !== -1 ||
+              backToPage.indexOf('/pages/category/category') !== -1
+            ) {
+              this.$mRouter.reLaunch(JSON.parse(backToPage));
+            } else {
+              this.$mRouter.redirectTo(JSON.parse(backToPage));
+            }
+            uni.removeStorageSync('backToPage');
+            uni.removeStorageSync('wechatUserInfo');
+          } else {
+            this.$mRouter.reLaunch({ route: '/pages/index/index' });
+          }
+        })
+        .catch(() => {
+          this.btnLoading = false;
+        });
+    },
+  },
 };
 </script>
-<style lang="scss">
+<style lang="scss" scoped>
 page {
-	background: #fff;
+  background: #fff;
 }
 
 .container {
-	padding-top: 115px;
-	position: relative;
-	width: 100vw;
-	overflow: hidden;
-	background: #fff;
+  padding-top: 115px;
+  position: relative;
+  width: 100vw;
+  overflow: hidden;
+  background: #fff;
 }
 
 .wrapper {
-	position: relative;
-	z-index: 90;
-	background: #fff;
-	padding-bottom: 40upx;
+  position: relative;
+  z-index: 90;
+  background: #fff;
+  padding-bottom: 40upx;
 }
 
 .back-btn {
-	position: absolute;
-	left: 40upx;
-	z-index: 9999;
-	padding-top: var(--status-bar-height);
-	top: 40upx;
-	font-size: 40upx;
-	color: $font-color-dark;
+  position: absolute;
+  left: 40upx;
+  z-index: 9999;
+  padding-top: var(--status-bar-height);
+  top: 40upx;
+  font-size: 40upx;
+  color: $font-color-dark;
 }
 
 .login-title {
-	padding-left: 32upx;
-	margin-bottom: 40upx;
+  padding-left: 32upx;
+  margin-bottom: 40upx;
 
-	.logo {
-		width: 156upx;
-	}
-	.title {
-		font-size: 48upx;
-		color:#2f2f2f;
-	}
+  .logo {
+    width: 156upx;
+  }
+  .title {
+    font-size: 48upx;
+    color: #2f2f2f;
+  }
 }
 
-
 .left-top-sign {
-	font-size: 120upx;
-	color: $page-color-base;
-	position: relative;
-	left: -16upx;
+  font-size: 120upx;
+  color: $page-color-base;
+  position: relative;
+  left: -16upx;
 }
 
 .right-top-sign {
-	position: absolute;
-	top: 80upx;
-	right: -30upx;
-	z-index: 95;
-
-	&:before,
-	&:after {
-		display: block;
-		content: '';
-		width: 400upx;
-		height: 80upx;
-		background: #b4f3e2;
-	}
+  position: absolute;
+  top: 80upx;
+  right: -30upx;
+  z-index: 95;
 
-	&:before {
-		transform: rotate(50deg);
-		border-radius: 0 50px 0 0;
-	}
+  &:before,
+  &:after {
+    display: block;
+    content: '';
+    width: 400upx;
+    height: 80upx;
+    background: #b4f3e2;
+  }
 
-	&:after {
-		position: absolute;
-		right: -198upx;
-		top: 0;
-		transform: rotate(-50deg);
-		border-radius: 50px 0 0 0;
-		/* background: pink; */
-	}
+  &:before {
+    transform: rotate(50deg);
+    border-radius: 0 50px 0 0;
+  }
+
+  &:after {
+    position: absolute;
+    right: -198upx;
+    top: 0;
+    transform: rotate(-50deg);
+    border-radius: 50px 0 0 0;
+  }
 }
 
 .left-bottom-sign {
-	position: absolute;
-	left: -270upx;
-	bottom: -320upx;
-	border: 100upx solid #d0d1fd;
-	border-radius: 50%;
-	padding: 180upx;
+  position: absolute;
+  left: -270upx;
+  bottom: -320upx;
+  border: 100upx solid #d0d1fd;
+  border-radius: 50%;
+  padding: 180upx;
 }
 
 .welcome {
-	position: relative;
-	left: 50upx;
-	top: -90upx;
-	font-size: 46upx;
-	color: #555;
-	text-shadow: 1px 0px 1px rgba(0, 0, 0, 0.3);
+  position: relative;
+  left: 50upx;
+  top: -90upx;
+  font-size: 46upx;
+  color: #555;
+  text-shadow: 1px 0px 1px rgba(0, 0, 0, 0.3);
 }
 
 .input-content {
-	padding: 0 32upx;
+  padding: 0 32upx;
 }
 
 .input-item {
-	display: flex;
-	flex-direction: column;
-	align-items: flex-start;
-	justify-content: center;
-	padding: 0 30upx;
-	background: $page-color-light;
-	height: 80upx;
-	border-radius: 4px;
+  display: flex;
+  flex-direction: column;
+  align-items: flex-start;
+  justify-content: center;
+  padding: 0 30upx;
+  background: $page-color-light;
+  height: 80upx;
+  border-radius: 4px;
 	margin-bottom: 30upx;
+	background-color: #fff;
+	border-bottom: 1px solid #e7e7e7;
+	
 
-	&:last-child {
-		margin-bottom: 0;
-	}
+  .tit {
+    height: 50upx;
+    line-height: 56upx;
+    font-size: $font-sm + 2upx;
+    color: $font-color-base;
+  }
 
-	.tit {
-		height: 50upx;
-		line-height: 56upx;
-		font-size: $font-sm + 2upx;
-		color: $font-color-base;
-	}
-
-	input {
-		height: 60upx;
-		font-size: $font-base + 2upx;
+  input {
+    height: 60upx;
+    font-size: $font-base + 2upx;
 		color: $font-color-dark;
+		background-color: #fff;
 		width: 100%;
 	}
+	.codenum {
+		width: 65%;
+	}
 }
 
 .input-item-sms-code {
-	position: relative;
-	width: 100%;
-	.sms-code-btn {
-		position: absolute;
-		color: #111;
-		right: 20upx;
-		bottom: 20upx;
-		font-size: 28upx;
-	}
+  position: relative;
+  width: 100%;
+  .sms-code-btn {
+    position: absolute;
+    color: #111;
+    right: 20upx;
+    bottom: 20upx;
+    font-size: 28upx;
+  }
 
-	.sms-code-resend {
-		color: #999;
-	}
+  .sms-code-resend {
+    color: #999;
+  }
 
-	.sms-code-btn:after {
-		border: none;
-		background-color: transparent;
-	}
+  .sms-code-btn:after {
+    border: none;
+    background-color: transparent;
+  }
 }
 
 .forget-section {
-	font-size: $font-sm + 2upx;
-	color: $font-color-spec;
-	text-align: center;
-	margin-top: 40upx;
+  font-size: $font-sm + 2upx;
+  color: $font-color-spec;
+  text-align: center;
+  margin-top: 40upx;
 }
 
 .register-section {
-	margin: 30upx 0 50upx 0;
-	width: 100%;
-	font-size: $font-sm + 2upx;
-	color: $font-color-base;
-	text-align: center;
-
-	text {
-		color: $font-color-spec;
-		margin-left: 10upx;
-	}
+  margin: 30upx 0 50upx 0;
+  width: 100%;
+  font-size: $font-sm + 2upx;
+  color: $font-color-base;
+  text-align: center;
 
-	text:first-child {
-		margin-right: 10upx;
-	}
+  text {
+    color: $font-color-spec;
+    margin-left: 10upx;
+  }
+
+  text:first-child {
+    margin-right: 10upx;
+  }
 }
 
 .btn-group {
-	display: flex;
-	margin-bottom: 20upx;
+  display: flex;
+  margin-bottom: 20upx;
 }
 
 .codeImage {
-	width: 220upx;
-	position: absolute;
-	top:0;
-	right:0;
-
+  width: 220upx;
+  position: absolute;
+  top: 0;
+  right: 0;
 }
 .confirm-btn {
-	background-color: rgb(255, 205, 0);
-	color: rgb(35, 40, 40);
-	font-weight: bold;
-	border-radius: 40upx;
-
+  background-color: rgb(255, 205, 0);
+  color: rgb(35, 40, 40);
+  font-weight: bold;
+  border-radius: 40upx;
 }
 </style>

+ 51 - 0
src/pages/public/resetpassword.vue

@@ -0,0 +1,51 @@
+<!-- 找回密码 -->
+<template>
+  <view class="resetpassword">
+    <view class="goback" @tap="navBack"><image src="../../static/images/backicon.png" class="backicon"></image></view>
+    <view class="title">找回密码</view>
+    <view class=""></view>
+  </view>
+</template>
+
+<script>
+export default {
+  name: 'resetpassword',
+  components: {},
+  data() {
+    //这里存放数据
+    return {};
+  },
+  //监控data中的数据变化
+  watch: {},
+  onLoad () {
+    console.log(1);
+  },
+  //方法集合
+  methods: {
+     // 返回上一页
+    navBack() {
+      this.$mRouter.back();
+    }
+  }
+  
+};
+</script>
+<style lang='scss' scoped>
+  .resetpassword {
+    padding-left: 50upx;
+    .goback{
+      padding-top: 100upx;
+      .backicon{
+        width: 24upx;
+        height: 43upx;
+      }
+    }
+    .title {
+      font-size: 48upx;
+      color: $titleColor;
+      background: url('../../static/images/passworddown.png') no-repeat left 82%;
+      background-size: 192upx 14upx;
+      margin-top: 65upx;
+    }
+  }
+</style>

+ 25 - 0
src/pages/shop/shop.vue

@@ -0,0 +1,25 @@
+<!-- shop -->
+<template>
+  <view class="shop">商品管理</view>
+</template>
+
+<script>
+export default {
+  name: 'shop',
+  components: {},
+  data() {
+    //这里存放数据
+    return {};
+  },
+  //监控data中的数据变化
+  watch: {},
+  //方法集合
+  methods: {},
+  //生命周期 - 创建完成(可以访问当前this实例)
+  created() {},
+  //生命周期 - 挂载完成(可以访问DOM元素)
+  mounted() {},
+};
+</script>
+<style lang="scss" scoped>
+</style>

binární
src/static/images/backicon.png


binární
src/static/images/down.png


binární
src/static/images/downicon.png


binární
src/static/images/index.png


binární
src/static/images/index_active.png


binární
src/static/images/order.png


binární
src/static/images/order_active.png


binární
src/static/images/ordernum.png


binární
src/static/images/passworddown.png


binární
src/static/images/purse.png


binární
src/static/images/scan.png


binární
src/static/images/sealenum.png


binární
src/static/images/seticon.png


binární
src/static/images/shop.png


binární
src/static/images/shop_active.png


binární
src/static/images/todayordernum.png


binární
src/static/images/up.png


+ 7 - 0
src/uni.scss

@@ -1,3 +1,10 @@
+$titleColor: #2f2f2f;
+$subheadColor: #909090;
+$mainBgcColor: #fafafa;
+$barColor: #ffcc01;
+
+
+
 /* 页面左右间距 */
 $spacing-lg: 30upx;
 $spacing-base: 20upx;

Některé soubory nejsou zobrazeny, neboť je v těchto rozdílových datech změněno mnoho souborů