二维码校验
This commit is contained in:
@@ -2,8 +2,8 @@
|
||||
"name" : "海亮铜箔",
|
||||
"appid" : "__UNI__3A002CD",
|
||||
"description" : "海亮铜箔二期手持系统",
|
||||
"versionName" : "1.4.6",
|
||||
"versionCode" : 146,
|
||||
"versionName" : "1.4.7",
|
||||
"versionCode" : 147,
|
||||
"transformPx" : false,
|
||||
/* 5+App特有相关 */
|
||||
"app-plus" : {
|
||||
|
||||
@@ -777,6 +777,13 @@
|
||||
{
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path" : "pages/SecondPhase/QrcodeVerify",
|
||||
"style" :
|
||||
{
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}
|
||||
],
|
||||
"globalStyle": {
|
||||
|
||||
84
pages/SecondPhase/QrcodeVerify.vue
Normal file
84
pages/SecondPhase/QrcodeVerify.vue
Normal file
@@ -0,0 +1,84 @@
|
||||
<template>
|
||||
<view class="zd_container">
|
||||
<!-- <nav-bar title="二维码校验"></nav-bar> -->
|
||||
<nav-bar :title="title"></nav-bar>
|
||||
<view class="zd_content">
|
||||
<view class="zd_wrapper">
|
||||
<view class="filter_item">
|
||||
<view class="filter_label_wraper">
|
||||
<span class="filter_label">二维码1</span>
|
||||
</view>
|
||||
<view class="filter_input_wraper">
|
||||
<search-box v-model="code1" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="filter_item">
|
||||
<view class="filter_label_wraper">
|
||||
<span class="filter_label">二维码2</span>
|
||||
</view>
|
||||
<view class="filter_input_wraper">
|
||||
<search-box v-model="code2" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="zd-row submitbar">
|
||||
<button class="zd-col-6 btn-submit btn-default" @tap="clearUp">清空</button>
|
||||
<button class="zd-col-15 btn-submit btn-success" :class="{'btn-info': !code1 || !code2}" @tap="_verify">校验</button>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import NavBar from '@/components/NavBar.vue'
|
||||
import SearchBox from '@/components/SearchBox.vue'
|
||||
export default {
|
||||
components: {
|
||||
NavBar,
|
||||
SearchBox
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
title: '',
|
||||
code1: '',
|
||||
code2: ''
|
||||
};
|
||||
},
|
||||
onLoad (options) {
|
||||
this.title = options.title
|
||||
},
|
||||
methods: {
|
||||
clearUp () {
|
||||
this.code1 = ''
|
||||
this.code2 = ''
|
||||
},
|
||||
_verify() {
|
||||
// 非空校验
|
||||
if (!this.code1 || !this.code2) {
|
||||
uni.showToast({
|
||||
title: '请输入两个二维码内容',
|
||||
icon: 'none'
|
||||
})
|
||||
return
|
||||
}
|
||||
// 去除首尾空格,避免空格导致校验失败
|
||||
const c1 = this.code1.trim()
|
||||
const c2 = this.code2.trim()
|
||||
|
||||
if (c1 === c2) {
|
||||
uni.showModal({
|
||||
title: '校验结果',
|
||||
content: '两个二维码内容一致',
|
||||
showCancel: false
|
||||
})
|
||||
} else {
|
||||
uni.showModal({
|
||||
title: '校验结果',
|
||||
content: `两个二维码内容不一致\n二维码1:${c1}\n二维码2:${c2}`,
|
||||
showCancel: false
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -122,7 +122,8 @@ export const allAuthority = () => {
|
||||
{menu_id: '1', title: '装箱口木箱回库', path: '/pages/SecondPhase/BoxReturn'},
|
||||
{menu_id: '1', title: '人工点维护', path: '/pages/SecondPhase/ManMaintain'},
|
||||
{menu_id: '1', title: '载具解绑', path: '/pages/SecondPhase/VehicleUnbind'},
|
||||
{menu_id: '1', title: '三码合一', path: '/pages/SecondPhase/ThreeCodeToOne'}
|
||||
{menu_id: '1', title: '三码合一', path: '/pages/SecondPhase/ThreeCodeToOne'},
|
||||
{menu_id: '1', title: '二维码校验', path: '/pages/SecondPhase/QrcodeVerify'}
|
||||
]},
|
||||
{menu_id: '6', path: 'RF04', title: '点位管理', sonTree: [
|
||||
{menu_id: '1', title: '点位管理', path: '/pages/SecondPhase/point/PointManage'},
|
||||
|
||||
Reference in New Issue
Block a user