diff --git a/pages/index/index.vue b/pages/index/index.vue index 82267d1746bd489891ad9d466532fd3d605882c6..b229d5045297c8571040d5285460c53b64b3bc08 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -4,9 +4,9 @@ - - - {{option.userId?option.userId:'无'}} + + + 入园请向门卫出示健康码 @@ -21,6 +21,7 @@ name: "home", data() { return { + imgSrc:'', option:{ userId:'' } @@ -46,6 +47,16 @@ }, onShow() {}, methods: { + getImg(){ + this.$http.get(`/sict-ncov/user/qrcode`).then(res => { + const d = res.data + if (d.code == 1) { + this.imgSrc = d.object + } + }).catch(err => { + console.log(err) + }) + }, // 员工跳转 staff() { uni.navigateTo({ @@ -77,6 +88,7 @@ } this.$store.dispatch('user/setInfo', Object.assign(obj, userInfo)) this.$store.dispatch('user/setToken', d.result) + this.getImg() } }).catch(err => { console.log(err)