From bde3dd4569fb341c1b2f1f84dccf8e59114de8f3 Mon Sep 17 00:00:00 2001 From: sjf1256754123 <33301030+sjf1256754123@users.noreply.github.com> Date: Sun, 16 Feb 2020 11:34:05 +0800 Subject: [PATCH] demo --- pages/index/index.vue | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/pages/index/index.vue b/pages/index/index.vue index 82267d1..b229d50 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) -- 2.22.0