用uniapp开发的项目,编译后大量报Error parsing JavaScript expression
<template>
<view class="address">
<u-empty class="empty" v-if="this.reportList == 0" text="暂无数据" mode="address"></u-empty>
<view class="list" v-else>
<view class="item c-content" v-for="(item, index) in reportList " :key="index">
<view class="basic">
<view>
<div class="region">
<span>温度 : {{ item.temperature }}</span>
</div>
<div class="region">
<span>身体状况 : {{ bodyStateList[item.bodyState - 1] }}</span>
</div>
<div class="region">
<span>检测结果 : {{ detectionStateList[item.detectionState - 1] }}</span>
</div>
<div class="region">
<span>在职状态 : {{ jobStatusList[item.jobStatus - 1] }}</span>
</div>
<div class="region">
<span>上报时间 : {{ item.reportTime }}</span>
</div>
</view>
</view>
</view>
</view>
<view v-show="todayReportStatus">
<button type="default" class="btn" @click="addReport">
<u-icon name="plus-circle"></u-icon>
今日健康上报
</button>
</view>
</view>
</template>
<script>
import {checkTodayReport, reportList, getBind} from "@/api/health.js";
export default {
data() {
return {
todayReportStatus: false,
reportList: [], //列表
bodyStateList: [
"良好", "有发烧、咳嗽等轻微症状", "发烧、咳嗽等症状较长或较重", "其他症状",
],
detectionStateList: [
"核酸阳性", "核酸阴性", "抗原阳性", "抗原阴性", "未检测"
//检测结果 1、核酸阳性 2、核酸阴性 3、抗原阳性 4、抗原阴性5、未检测
],
jobStatusList: [
"到岗", "居家隔离", "休假", "集中隔离"
//在职状态1、到岗2、居家隔离3、休假4、集中隔离
],
}
},
onLoad(option) {
getBind().then((res) => {
if (!res.data.result) {
uni.navigateTo({
url: "/pages/health/userBind/userBind"
});
}
});
this.checkTodayReport();
this.getReportList();
},
methods: {
//检查今日是否上报
checkTodayReport() {
checkTodayReport().then((res) => {
if (res.data.result === false) {
this.todayReportStatus = true
this.$nextTick(() => {
})
}
})
},
getReportList() {
reportList().then((res) => {
console.log(res.data.result)
this.reportList = res.data.result
});
},
addReport() {
uni.navigateTo({
url: "/pages/health/reportAdd"
});
}
}
};
</script>
<style lang="scss" scoped>
@import "./report.scss";
</style>