|
@ -50,7 +50,9 @@ Blame |
|
|
<view class="steps"> |
|
|
<view class="steps"> |
|
|
<view class="content"> |
|
|
<view class="content"> |
|
|
<view class="title">{{ i18n.TodaySteps }}</view> |
|
|
<view class="title">{{ i18n.TodaySteps }}</view> |
|
|
<view id="chart" style="width: 280rpx;height:280rpx; font-size: 40rpx;"></view> |
|
|
<view id="chart" :stepsNum="stepsNum" :stepTarget="stepTarget" |
|
|
|
|
|
:change:stepTarget="echarts.receive" :change:stepsNum="echarts.receive" |
|
|
|
|
|
style="width: 280rpx;height:280rpx; font-size: 40rpx;"></view> |
|
|
<!-- <canvas id="chart" ref="chart" style="width: 280rpx;height:280rpx; font-size: 40rpx;"></canvas> --> |
|
|
<!-- <canvas id="chart" ref="chart" style="width: 280rpx;height:280rpx; font-size: 40rpx;"></canvas> --> |
|
|
<u-button class="button" color="#00E8A2">{{ i18n.ReceiveEarnings }}</u-button> |
|
|
<u-button class="button" color="#00E8A2">{{ i18n.ReceiveEarnings }}</u-button> |
|
|
</view> |
|
|
</view> |
|
@ -348,7 +350,7 @@ export default { |
|
|
const script = document.createElement('script'); |
|
|
const script = document.createElement('script'); |
|
|
console.log(2); |
|
|
console.log(2); |
|
|
// view 层的页面运行在 www 根目录,其相对路径相对于 www 计算 |
|
|
// view 层的页面运行在 www 根目录,其相对路径相对于 www 计算 |
|
|
script.src = '/static/echarts.js'; |
|
|
script.src = './static/echarts.js'; |
|
|
console.log(3); |
|
|
console.log(3); |
|
|
script.onload = this.initEcharts.bind(this); |
|
|
script.onload = this.initEcharts.bind(this); |
|
|
console.log(4); |
|
|
console.log(4); |
|
@ -358,6 +360,10 @@ export default { |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
receive(newValue, oldValue, ownerVm, vm) { |
|
|
|
|
|
console.log('newValue', newValue) |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
initEcharts() { |
|
|
initEcharts() { |
|
|
console.log(31); |
|
|
console.log(31); |
|
|
// let t1=null; |
|
|
// let t1=null; |
|
|