Commit 3c05ae04 by 李伟康

commit 话术质检

1 parent 549def61
...@@ -12,13 +12,19 @@ Page({ ...@@ -12,13 +12,19 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
wx.$router.getData(({params}) =>{ wx.$router.getData(({
params
}) => {
this.loadData(params)
})
if (options.badgeId) this.loadData(options)
},
loadData(params) {
this.setData({ this.setData({
badgeId: params.badgeId badgeId: params.badgeId
}) })
this.searchDate = new Date().format('yyyy-MM-dd') this.searchDate = new Date().format('yyyy-MM-dd')
this.onLoadData() this.onLoadData()
})
}, },
onLoadData() { onLoadData() {
wx.$util.showLoading() wx.$util.showLoading()
...@@ -83,7 +89,7 @@ Page({ ...@@ -83,7 +89,7 @@ Page({
if (!e.estimatedResult) { if (!e.estimatedResult) {
e.estimatedResult = '未知' e.estimatedResult = '未知'
e.estimatedStatus = -1 e.estimatedStatus = -1
}else e.estimatedStatus == '战败' ? 0 : 1 } else e.estimatedStatus == '战败' ? 0 : 1
}) })
this.setData({ this.setData({
list: data.list || [], list: data.list || [],
...@@ -101,6 +107,7 @@ Page({ ...@@ -101,6 +107,7 @@ Page({
}, },
formatTime(seconds) { formatTime(seconds) {
seconds = seconds / 1000
let formattedTime = '' let formattedTime = ''
if (seconds < 60) return seconds + 's' if (seconds < 60) return seconds + 's'
else { else {
......
...@@ -40,6 +40,7 @@ Page({ ...@@ -40,6 +40,7 @@ Page({
}) })
this.getInspectionDetail(res.id) this.getInspectionDetail(res.id)
}) })
this.getInspectionDetail(19)
}, },
async getInspectionDetail(batchId) { async getInspectionDetail(batchId) {
...@@ -89,6 +90,7 @@ Page({ ...@@ -89,6 +90,7 @@ Page({
} }
}, },
formatTime(seconds) { formatTime(seconds) {
seconds = seconds / 1000
let formattedTime = '' let formattedTime = ''
if (seconds < 60) return seconds + '秒' if (seconds < 60) return seconds + '秒'
else { else {
......
...@@ -101,6 +101,7 @@ page { ...@@ -101,6 +101,7 @@ page {
color: #347BFF; color: #347BFF;
line-height: var(--fontSize44); line-height: var(--fontSize44);
} }
} }
} }
} }
...@@ -127,3 +128,7 @@ page { ...@@ -127,3 +128,7 @@ page {
} }
} }
} }
.red{
color: #F24724 !important;
}
\ No newline at end of file \ No newline at end of file
...@@ -17,7 +17,9 @@ ...@@ -17,7 +17,9 @@
{{item.title}} {{item.title}}
<view class="score flex"> <view class="score flex">
得分: 得分:
<view class="num flex"><view class="highlight">{{item.score}}</view>/{{item.rawScore}}</view> <view class="num flex">
<view class="highlight {{item.score == 0 ?'red':''}}">{{item.score}}</view>/{{item.rawScore}}
</view>
</view> </view>
</view> </view>
<view class="content"> <view class="content">
......
...@@ -95,3 +95,7 @@ page { ...@@ -95,3 +95,7 @@ page {
} }
} }
} }
.red{
color: #F24724 !important;
}
\ No newline at end of file \ No newline at end of file
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<view class="score flex"> <view class="score flex">
得分: 得分:
<view class="num flex"> <view class="num flex">
<view class="highlight">{{detailInfo.score}}</view>/{{detailInfo.rawScore}} <view class="highlight {{detailInfo.score == 0 ?'red':''}}">{{detailInfo.score}}</view>/{{detailInfo.rawScore}}
</view> </view>
</view> </view>
</view> </view>
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
<view class="score flex"> <view class="score flex">
得分: 得分:
<view class="num flex"> <view class="num flex">
<view class="highlight">{{item.score}}</view>/{{item.rawScore}} <view class="highlight {{item.score == 0 ?'red':''}}">{{item.score}}</view>/{{item.rawScore}}
</view> </view>
</view> </view>
</view> </view>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!