缓存线详情

This commit is contained in:
2023-03-25 10:30:26 +08:00
parent 5b6b94fcc4
commit e7ab90e5cb
3 changed files with 55 additions and 3 deletions

View File

@@ -21,7 +21,7 @@
<view class="submit">
<button class="primary-button" :disabled="disabled" @click="toLogin">&nbsp;&nbsp;</button>
</view>
<view class="scanBox">
<view class="scanBox" @tap="toScan">
<view class="iconfont scan_icon"></view>
<text class="san_text">扫码登录</text>
</view>
@@ -49,6 +49,7 @@
<script>
import { RSAencrypt } from '@/utils/jsencrypt.js'
import {handLogin} from '@/utils/getData2.js'
import permision from "@/utils/permission.js"
export default {
data() {
return {
@@ -138,7 +139,48 @@
} catch (e) {
this.disabled = false
}
},
async toScan() {
// #ifdef APP-PLUS
let status = await this.checkPermission();
if (status !== 1) {
return;
}
// #endif
uni.scanCode({
success: (res) => {
console.log(res.result)
},
fail: (err) => {
// uni.showToast({
// title: '出错',
// icon: 'none'
// })
}
});
}
// #ifdef APP-PLUS
,
async checkPermission(code) {
let status = permision.isIOS ? await permision.requestIOS('camera') :
await permision.requestAndroid('android.permission.CAMERA');
if (status === null || status === 1) {
status = 1;
} else {
uni.showModal({
content: "需要相机权限",
confirmText: "设置",
success: function(res) {
if (res.confirm) {
permision.gotoAppSetting();
}
}
})
}
return status;
}
// #endif
}
}
</script>

View File

@@ -1,6 +1,6 @@
<template>
<view class="content">
<nav-bar title="缓存线-详情"></nav-bar>
<nav-bar :inner2="true" @goIn="goIn" title="缓存线-详情"></nav-bar>
<view class="search-confirm-wrap">
<view class="search-wrap">
<view class="search-item">
@@ -110,6 +110,11 @@
selectChange3(e) {
this.index3 = e
},
goIn () {
uni.navigateTo({
url: `/pages/management/hcxcheck`
})
},
toSearch () {
this.dataList = []
this._queryInstraction()

View File

@@ -33,7 +33,7 @@
</view>
</view>
<view class="material-wrap">
<view class="material-item" v-for="(e, i) in dataList" :key="i" :class="['bg-gray', 'bg-green', 'bg-yellow','bg-red'][Number(e.status) - 1]">
<view class="material-item" v-for="(e, i) in dataList" :key="i" :class="['bg-gray', 'bg-green', 'bg-yellow','bg-red'][Number(e.status) - 1]" @tap="toInfo(e)">
<view class="material-title">{{e.vehicle_code}}</view>
<view class="material-spec">{{e.material_spec}}</view>
</view>
@@ -64,6 +64,11 @@
selectChange1(e) {
this.index1 = e
},
toInfo(e) {
uni.navigateTo({
url: `/pages/management/hcxInfo`
})
}
}
}
</script>