2 lines
749 B
JavaScript
2 lines
749 B
JavaScript
"use strict";const e=require("../../common/vendor.js"),a=require("../../request/api.js");Math||t();const t=()=>"../../components/hazardDetail/HazardDetailPanel.js",o={__name:"view",setup(t){const o=e.ref({}),n=e.ref(!1);return e.onLoad((t=>{t.hazardId?(async t=>{n.value=!0;try{const i=await a.getHazardDetail(t);0===i.code&&i.data?o.value=i.data:e.index.showToast({title:i.msg||"获取详情失败",icon:"none"})}catch(i){console.error("获取隐患详情失败:",i)}finally{n.value=!1}})(t.hazardId):(e.index.showToast({title:"缺少隐患ID",icon:"none"}),setTimeout((()=>{e.index.navigateBack()}),1500))})),(a,t)=>({a:e.p({detail:o.value,loading:n.value}),b:e.gei(a,"")})}},n=e._export_sfc(o,[["__scopeId","data-v-c54bf299"]]);wx.createPage(n);
|