Commit bde3dd45 authored by sjf1256754123's avatar sjf1256754123

demo

parent 305dcf02
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
<view class="btnList"> <view class="btnList">
<button class="btnStaff" type="primary" @click="staff">员工填报</button> <button class="btnStaff" type="primary" @click="staff">员工填报</button>
<button class="btnSecurity" type="primary" @click="security">安保测温</button> <button class="btnSecurity" type="primary" @click="security">安保测温</button>
<button class="btnSecurity" type="primary" @click="fillInDay">每日填报</button> <!-- <button class="btnSecurity" type="primary" @click="fillInDay">每日填报</button> -->
<image class="img" src="../../static/22.jpg" mode="" ></image> <!-- <image class="img" src="../../static/22.jpg" mode="" @click="fillInDay"></image> -->
{{option.userId?option.userId:''}} <image class="img" :src="imgSrc" mode="widthFix">
<view class="tips"> <view class="tips">
入园请向门卫出示健康码 入园请向门卫出示健康码
</view> </view>
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
name: "home", name: "home",
data() { data() {
return { return {
imgSrc:'',
option:{ option:{
userId:'' userId:''
} }
...@@ -46,6 +47,16 @@ ...@@ -46,6 +47,16 @@
}, },
onShow() {}, onShow() {},
methods: { 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() { staff() {
uni.navigateTo({ uni.navigateTo({
...@@ -77,6 +88,7 @@ ...@@ -77,6 +88,7 @@
} }
this.$store.dispatch('user/setInfo', Object.assign(obj, userInfo)) this.$store.dispatch('user/setInfo', Object.assign(obj, userInfo))
this.$store.dispatch('user/setToken', d.result) this.$store.dispatch('user/setToken', d.result)
this.getImg()
} }
}).catch(err => { }).catch(err => {
console.log(err) console.log(err)
......
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