diff --git a/package-lock.json b/package-lock.json index 298c152..a4a5313 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,6 +10,7 @@ "license": "ISC", "dependencies": { "fast-xml-parser": "^4.0.12", + "uqrcodejs": "^4.0.7", "uview-ui": "^1.8.8" }, "devDependencies": { @@ -274,6 +275,11 @@ "browserslist": ">= 4.21.0" } }, + "node_modules/uqrcodejs": { + "version": "4.0.7", + "resolved": "https://registry.npmmirror.com/uqrcodejs/-/uqrcodejs-4.0.7.tgz", + "integrity": "sha512-84+aZmD2godCVI+93lxE3YUAPNY8zAJvNA7xRS7R7U+q57KzMDepBSfNCwoRUhWOfR6eHFoAOcHRPwsP6ka1cA==" + }, "node_modules/uview-ui": { "version": "1.8.8", "resolved": "https://registry.npmmirror.com/uview-ui/-/uview-ui-1.8.8.tgz", @@ -404,6 +410,11 @@ "picocolors": "^1.0.1" } }, + "uqrcodejs": { + "version": "4.0.7", + "resolved": "https://registry.npmmirror.com/uqrcodejs/-/uqrcodejs-4.0.7.tgz", + "integrity": "sha512-84+aZmD2godCVI+93lxE3YUAPNY8zAJvNA7xRS7R7U+q57KzMDepBSfNCwoRUhWOfR6eHFoAOcHRPwsP6ka1cA==" + }, "uview-ui": { "version": "1.8.8", "resolved": "https://registry.npmmirror.com/uview-ui/-/uview-ui-1.8.8.tgz", diff --git a/package.json b/package.json index 1e55a81..c54577e 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "homepage": "https://github.com/lchighpass/lchighpass-speaking#readme", "dependencies": { "fast-xml-parser": "^4.0.12", + "uqrcodejs": "^4.0.7", "uview-ui": "^1.8.8" }, "devDependencies": { diff --git a/pages/index/index.vue b/pages/index/index.vue index b2a4022..b4a10dc 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -946,6 +946,7 @@ 导航去这里 + @@ -970,6 +971,7 @@ + @@ -1588,53 +1590,117 @@ // }); // } else if (this.deviceInfos.status == 0) { - uni.showToast({ + // uni.showToast({ + // title: '车辆未上架,请使用其他车辆', + // icon: 'none', + // duration: 4000 + // }); + this.$refs.uToast.show({ title: '车辆未上架,请使用其他车辆', - icon: 'none', - duration: 4000 - }); + // 如果不传此type参数,默认为default,也可以手动写上 type: 'default' + // type: 'warning', + // 如果不需要图标,请设置为false + duration: 1000*2 + // icon: false + }) } else if (this.deviceInfos.status == 2) { - uni.showToast({ + // uni.showToast({ + // title: '车辆预约中,请使用其他车辆', + // icon: 'none', + // duration: 4000 + // }); + this.$refs.uToast.show({ title: '车辆预约中,请使用其他车辆', - icon: 'none', - duration: 4000 - }); + // 如果不传此type参数,默认为default,也可以手动写上 type: 'default' + // type: 'warning', + // 如果不需要图标,请设置为false + duration: 1000*2 + // icon: false + }) } else if (this.deviceInfos.status == 3) { - uni.showToast({ + // uni.showToast({ + // title: '车辆骑行中,请使用其他车辆', + // icon: 'none', + // // duration: 4000 + // }); + this.$refs.uToast.show({ title: '车辆骑行中,请使用其他车辆', - icon: 'none', - duration: 4000 - }); + // 如果不传此type参数,默认为default,也可以手动写上 type: 'default' + // type: 'warning', + // 如果不需要图标,请设置为false + duration: 1000*2 + // icon: false + }) } else if (this.deviceInfos.status == 4) { - uni.showToast({ + // uni.showToast({ + // title: '车辆临时锁车中,请使用其他车辆', + // icon: 'none', + // // duration: 4000 + // }); + this.$refs.uToast.show({ title: '车辆临时锁车中,请使用其他车辆', - icon: 'none', - duration: 4000 - }); + // 如果不传此type参数,默认为default,也可以手动写上 type: 'default' + // type: 'warning', + // 如果不需要图标,请设置为false + duration: 1000*2 + // icon: false + }) } else if (this.deviceInfos.status == 6) { - uni.showToast({ + // uni.showToast({ + // title: '车辆调度中,请使用其他车辆', + // icon: 'none', + // // duration: 4000 + // }); + this.$refs.uToast.show({ title: '车辆调度中,请使用其他车辆', - icon: 'none', - duration: 4000 - }); + // 如果不传此type参数,默认为default,也可以手动写上 type: 'default' + // type: 'warning', + // 如果不需要图标,请设置为false + duration: 1000*2 + // icon: false + }) } else if (this.deviceInfos.status == 8) { - uni.showToast({ + // uni.showToast({ + // title: '车辆下线中,请使用其他车辆', + // icon: 'none', + // duration: 4000 + // }); + this.$refs.uToast.show({ title: '车辆下线中,请使用其他车辆', - icon: 'none', - duration: 4000 - }); + // 如果不传此type参数,默认为default,也可以手动写上 type: 'default' + // type: 'warning', + // 如果不需要图标,请设置为false + duration: 1000*2 + // icon: false + }) } else if (this.deviceInfos.status == 9) { - uni.showToast({ + // uni.showToast({ + // title: '车辆已废弃,请使用其他车辆', + // icon: 'none', + // duration: 4000 + // }); + this.$refs.uToast.show({ title: '车辆已废弃,请使用其他车辆', - icon: 'none', - duration: 4000 - }); + // 如果不传此type参数,默认为default,也可以手动写上 type: 'default' + // type: 'warning', + // 如果不需要图标,请设置为false + duration: 1000*2 + // icon: false + }) } else if (this.deviceInfos.status == 7) { - uni.showToast({ + // uni.showToast({ + // title: '车辆未上线,请使用其他车辆', + // icon: 'none', + // duration: 4000 + // }); + this.$refs.uToast.show({ title: '车辆未上线,请使用其他车辆', - icon: 'none', - duration: 4000 - }); + // 如果不传此type参数,默认为default,也可以手动写上 type: 'default' + // type: 'warning', + // 如果不需要图标,请设置为false + duration: 1000*2 + // icon: false + }) } else if (this.deviceInfos.status == 1) { if (this.areaInfo.areaId != res.data.areaId) { diff --git a/pages_admin/order/device_detail.vue b/pages_admin/order/device_detail.vue index 95a773f..c2b8e36 100644 --- a/pages_admin/order/device_detail.vue +++ b/pages_admin/order/device_detail.vue @@ -199,6 +199,9 @@ 换电处理 --> + + 设备二维码 + @@ -284,6 +287,15 @@ + + + + + + + 保存二维码 + + @@ -312,6 +324,7 @@