uniapp项目多处报警告Error parsing JavaScript ex
839 浏览2023年02月16日作者:User7194269186670116897

用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>
最后一次编辑于 2023 年 02 月 16 日
2 条评论

相关文章

专题推荐

热门文章

热门问答