缓存线详情
This commit is contained in:
@@ -21,7 +21,7 @@
|
|||||||
<view class="submit">
|
<view class="submit">
|
||||||
<button class="primary-button" :disabled="disabled" @click="toLogin">登 录</button>
|
<button class="primary-button" :disabled="disabled" @click="toLogin">登 录</button>
|
||||||
</view>
|
</view>
|
||||||
<view class="scanBox">
|
<view class="scanBox" @tap="toScan">
|
||||||
<view class="iconfont scan_icon"></view>
|
<view class="iconfont scan_icon"></view>
|
||||||
<text class="san_text">扫码登录</text>
|
<text class="san_text">扫码登录</text>
|
||||||
</view>
|
</view>
|
||||||
@@ -49,6 +49,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import { RSAencrypt } from '@/utils/jsencrypt.js'
|
import { RSAencrypt } from '@/utils/jsencrypt.js'
|
||||||
import {handLogin} from '@/utils/getData2.js'
|
import {handLogin} from '@/utils/getData2.js'
|
||||||
|
import permision from "@/utils/permission.js"
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -138,7 +139,48 @@
|
|||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.disabled = false
|
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>
|
</script>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="content">
|
<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-confirm-wrap">
|
||||||
<view class="search-wrap">
|
<view class="search-wrap">
|
||||||
<view class="search-item">
|
<view class="search-item">
|
||||||
@@ -110,6 +110,11 @@
|
|||||||
selectChange3(e) {
|
selectChange3(e) {
|
||||||
this.index3 = e
|
this.index3 = e
|
||||||
},
|
},
|
||||||
|
goIn () {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pages/management/hcxcheck`
|
||||||
|
})
|
||||||
|
},
|
||||||
toSearch () {
|
toSearch () {
|
||||||
this.dataList = []
|
this.dataList = []
|
||||||
this._queryInstraction()
|
this._queryInstraction()
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="material-wrap">
|
<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-title">{{e.vehicle_code}}</view>
|
||||||
<view class="material-spec">{{e.material_spec}}</view>
|
<view class="material-spec">{{e.material_spec}}</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -64,6 +64,11 @@
|
|||||||
selectChange1(e) {
|
selectChange1(e) {
|
||||||
this.index1 = e
|
this.index1 = e
|
||||||
},
|
},
|
||||||
|
toInfo(e) {
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pages/management/hcxInfo`
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user