Commit b4133d59 by 李伟康

commit 分数为0时也显示

1 parent 4511624d
......@@ -18,7 +18,7 @@ export const appId = 'wx570d9331f9ace0bd'
* 4预发布
* 5cdptest
*/
let index = 1
let index = 2
const accountInfo = wx.getAccountInfoSync()
const systemInfo = wx.getSystemInfoSync()
......
......@@ -62,7 +62,7 @@ Page({
})
const arcComponent = this.selectComponent('#arc')
arcComponent.init()
if (inspectionInfo.score) arcComponent.drawData()
if (inspectionInfo.score != null) arcComponent.drawData()
} else throw message
} catch (error) {
wx.hideLoading()
......
......@@ -96,7 +96,7 @@ Component({
num
} = this.data
this.part = Math.ceil(num / 20)
if (num) this.fillArc(Start_Angle, 0, Start_Angle + Angle)
if (num != null) this.fillArc(Start_Angle, 0, num == 0 ? Start_Angle : Start_Angle + Angle)
},
drawTips(data) {
let {
......@@ -107,7 +107,7 @@ Component({
this.ctx.clearRect(x + 10, y / 2 + 20, this.toRpx(52), this.toRpx(30))
this.ctx.clearRect(x + 10, y / 2 + 60, this.toRpx(50), this.toRpx(30))
this.drawText({
text: data || '···',
text: data != null ? data : '···',
x,
y: y / 2,
fontSize: 30,
......@@ -117,7 +117,7 @@ Component({
textBaseline: 'middle'
})
this.drawText({
text: data ? '分数' : '计算中…',
text: data != null ? '分数' : '计算中…',
x,
y: (y + 44) / 2,
fontSize: 10,
......@@ -143,6 +143,7 @@ Component({
}
} = this,
a = startAngle
if(num == 0) return this.drawTips(num)
let b = startAngle + Math.PI / 70
ctx.beginPath()
ctx.strokeStyle = Arc_Data_Background[index]
......
......@@ -6,7 +6,7 @@
{
"name": "质检",
"pathName": "packageEquity/pages/aiInspection/aiInspection",
"query": "badgeId=3030F935D78C",
"query": "badgeId=4827E2F0CD24",
"launchMode": "default",
"scene": null
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!