Commit eb12e48a by wangyalan-git

扫描员工验证员工不存在,列表刷新

parent 69ab632a
...@@ -6,7 +6,7 @@ import { Toast } from 'vant' ...@@ -6,7 +6,7 @@ import { Toast } from 'vant'
// 创建axios实例 // 创建axios实例
const service = axios.create({ const service = axios.create({
// baseURL: 'http://192.168.31.138:8201/mall-portal', // baseURL: 'http://192.168.31.138:8201/mall-portal',
baseURL: 'http://192.168.31.127:8201/mall-portal/', baseURL: 'http://vankemanage.jsonpro.cn/mall-portal',
// baseURL: 'http://hhg.api.jsonpro.cn:8201/mall-portal', // baseURL: 'http://hhg.api.jsonpro.cn:8201/mall-portal',
timeout: 60000 // 请求超时时间 timeout: 60000 // 请求超时时间
}) })
...@@ -36,11 +36,11 @@ service.interceptors.response.use( ...@@ -36,11 +36,11 @@ service.interceptors.response.use(
// 401:未登录; // 401:未登录;
if (res.code === 401) { if (res.code === 401) {
store.dispatch('LogOut').then(() => { store.dispatch('LogOut').then(() => {
})
router.replace({ router.replace({
name: 'login', name: 'login',
query: { redirect: router.currentRoute.fullPath } // 登录后再跳回此页面时要做的配置 query: { redirect: router.currentRoute.fullPath } // 登录后再跳回此页面时要做的配置
}) })
})
} else { } else {
Toast(res.message) Toast(res.message)
} }
......
...@@ -91,7 +91,6 @@ export default { ...@@ -91,7 +91,6 @@ export default {
}, },
mounted () { mounted () {
this.getHomeData() this.getHomeData()
this.getList()
this.getCategoryList() this.getCategoryList()
this.getSetting() this.getSetting()
}, },
......
...@@ -84,7 +84,6 @@ export default { ...@@ -84,7 +84,6 @@ export default {
} }
}, },
mounted () { mounted () {
this.getList()
this.getDepartList() this.getDepartList()
}, },
methods: { methods: {
......
...@@ -71,6 +71,10 @@ export default { ...@@ -71,6 +71,10 @@ export default {
needResult: 1, needResult: 1,
success: function (result) { success: function (result) {
const data = JSON.parse(result.data.qrcode_str) const data = JSON.parse(result.data.qrcode_str)
if (!data.onlyId) {
this.$toast.fail('该员工不存在')
return
}
checkQcode(data).then(res => { checkQcode(data).then(res => {
console.log('校验结果', res) console.log('校验结果', res)
getMemberInfo({ memberId: data.memberId }).then(res => { getMemberInfo({ memberId: data.memberId }).then(res => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment