Commit 0ae7f5e7 authored by wangwenjie's avatar wangwenjie

颜色

parent afe3457d
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
</p> </p>
<p class="info-item"> <p class="info-item">
<span class="total-count">关联状态:</span> <span class="total-count">关联状态:</span>
<span :style="{ color: getStatusColor(item.status) }"> <span :style="statusStyle(item.status)">
{{ getStatusText(item.status) }} {{ getStatusText(item.status) }}
</span> </span>
</p> </p>
...@@ -82,11 +82,19 @@ export default { ...@@ -82,11 +82,19 @@ export default {
[Icon.name]: Icon, [Icon.name]: Icon,
}, },
mounted() { mounted() {
this.$nativeQRCode.setCallBackFun((res) => { // this.$nativeQRCode.setCallBackFun((res) => {
let qrCode = getStringByTwo(res) // let qrCode = getStringByTwo(res)
this.gousearch(qrCode); // this.gousearch(qrCode);
}); // });
ScanOverlay.show('请扫描二维码') // ScanOverlay.show('请扫描二维码')
this.gousearch("HTTPS://Y2WM.CN/99.1000.1/AC1018057002RQ1PI5SHGVW4MBBZFGELJ");
},
computed: {
statusStyle() {
return (status) => ({
color: this.getStatusColor(status)
});
}
}, },
data() { data() {
return { return {
...@@ -153,15 +161,15 @@ export default { ...@@ -153,15 +161,15 @@ export default {
getStatusColor(status) { getStatusColor(status) {
switch (status) { switch (status) {
case 10: case 10:
return "#ffba00"; // 正常-绿色 return "#ffba00";
case 20: case 20:
return "#ff4949"; // 异常-红色 return "#ff4949";
case 30: case 30:
return "#13ce66"; // 未知-黄色 return "#909399";
case 40: case 40:
return "#909399"; // 未知-黄色 return "#13ce66";
default: default:
return "#333"; // 默认黑色 return "#333";
} }
}, },
gousearch(qrCode){ gousearch(qrCode){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment