master
lion 3 years ago
parent 781ab03990
commit 1a756d3240

@ -30,7 +30,6 @@
"view-design": "^4.7.0",
"vue": "2.6.10",
"vue-count-to": "^1.0.13",
"vue-jsonp": "^2.0.0",
"vue-router": "3.0.6",
"vuex": "3.1.0"
},

@ -24,14 +24,6 @@ export function cancelCode(params){
})
}
export function getIdcard(baseURL,params){
return request({
idcards:baseURL,
url:'/ZKIDROnline/ScanReadIdCardInfo?OP-DEV=1&CMD-URL=4&REPEAT=1&READTYPE=1',
method:'get',
params
})
}
// http://127.0.0.1:24010/ZKIDROnline/ScanReadIdCardInfo?OP-DEV=1&CMD-URL=4&REPEAT=1&READTYPE=1

@ -21,9 +21,6 @@ const service = axios.create({
// request interceptor
service.interceptors.request.use(
config => {
if(config.idcards){
config.baseURL = config.idcards
}
if(config.isLoading){
loading = Loading.service({
lock:true,

@ -19,7 +19,7 @@
<div>
核验销码
<el-input clearable ref='codeInput' size="mini" placeholder="请输入核销码或扫码" v-model="select.code"
style="width: 160px;margin-right: 10px;"></el-input>
style="width: 160px;margin-right: 10px;" @change='getList'></el-input>
</div>
<div>
身份证件
@ -48,12 +48,12 @@
</div>
</template>
<script>
import Cookies from 'js-cookie'
import Cookies from 'js-cookie'
import axios from 'axios'
import showVisit from '@/views/visit/component/showVisit'
import {
getList,
getUserList,
getIdcard
getUserList
} from '@/api/gate'
export default {
components: {
@ -136,14 +136,17 @@
this.$refs['showVisit'].form = this.data[0]
this.$refs['showVisit'].formDataType = 'coderecord'
this.$refs['showVisit'].gateAdminId = this.gateAdminId
this.$refs['showVisit'].isShow = true
this.$refs['showVisit'].isShow = true
return
} else {
this.$successMessage(k.audit_status_text, '', 'success')
}
}
} else {
this.$successMessage("未查询到记录", '', 'warning')
}
}
this.select.code = ''
this.select.idcard = ''
},
async getUserList() {
this.gateUser = Cookies.get("gateUser") ? JSON.parse(Cookies.get("gateUser")) : ''
@ -182,19 +185,28 @@
this.gateShow = false
},
getIdcard() {
let that = this
this.$jsonp(
'http://127.0.0.1:24010/ZKIDROnline/ScanReadIdCardInfo?OP-DEV=1&CMD-URL=4&REPEAT=1&READTYPE=1'
)
.then((res) => {
let that = this
axios.get('https://127.0.0.1:24011/ZKIDROnline/ScanReadIdCardInfo?OP-DEV=1&CMD-URL=4&REPEAT=1&READTYPE=1',{
'headers':{
"Content-Type":'application/json'
}
})
.then(res=>{
console.log(res)
that.select.idcard = res.Certificate.IDNumber
that.getList()
})
.catch((err) => {
console.log(err)
this.$successMessage(err.statusText, '', 'warning')
})
console.log(res.data)
if(!res.data){
return
}
let data1 = res.data?res.data.split('"IDNumber"'):''
let data2= data1[1].split(",")
let data3 =data2[0].replace(/[^\d]/g, "")
that.select.idcard = data3
that.getList()
}).catch(err=>{
console.log(err)
this.$successMessage(err.statusText, '', 'warning')
})
},
screen() {
let element = document.documentElement;

@ -45,14 +45,6 @@ module.exports = {
},
//before: require('./mock/mock-server.js'),
proxy: {
'^/idcard': {
target: 'http://127.0.0.1:24010',
changeOrigin: true, //配置跨域
"secure": true, // 接受运行在https上默认不接受
pathRewrite: {
['^/idcard']:'http://127.0.0.1:24010'
}
},
[process.env.VUE_APP_BASE_API]: {
target: process.env.VUE_APP_BASE_API,
changeOrigin: true, //配置跨域

Loading…
Cancel
Save