Commit c01a0f77 authored by sjf1256754123's avatar sjf1256754123

demo

parent 5dfe87fe
...@@ -2,13 +2,26 @@ ...@@ -2,13 +2,26 @@
<view class="index"> <view class="index">
<view class="temp"> <view class="temp">
<view class="btnList"> <view class="btnList">
<button class="btnStaff" type="primary" @click="staff">员工填报</button> <button class="btnStaff" type="primary" @click="staff" v-show="flag">员工填报</button>
<button class="btnSecurity" type="primary" @click="fillInDay" v-show="!flag">每日填报</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> -->
<!-- <image class="img" src="../../static/22.jpg" mode="" @click="fillInDay"></image> --> <!-- <image class="img" src="../../static/22.jpg" mode="" @click="fillInDay"></image> -->
<image class="img" :src="imgSrc" mode="widthFix"> <image class="img" :src="imgSrc" mode="widthFix" @click="modalName = 'Image'">
<view class="tips"> <view class="tips">入园请向门卫出示健康码</view>
入园请向门卫出示健康码 </view>
</view>
<view class="cu-modal" :class="modalName=='Image'?'show':''" @tap="modalName=''">
<view class="cu-dialog">
<view class="bg-img">
<view class="cu-bar justify-end text-black">
<view class="action" @tap="modalName = ''">
<text class="cuIcon-close"></text>
</view>
</view>
</view>
<image :src="imgSrc" mode="widthFix"></image>
<view class="cu-bar bg-white">
<view class="action margin-0 flex-sub solid-left text-right" @tap="modalName = ''"></view>
</view> </view>
</view> </view>
</view> </view>
...@@ -22,6 +35,8 @@ ...@@ -22,6 +35,8 @@
data() { data() {
return { return {
imgSrc:'', imgSrc:'',
modalName:'',
flag:true,
option:{ option:{
userId:'' userId:''
} }
...@@ -45,7 +60,11 @@ ...@@ -45,7 +60,11 @@
}) })
// #endif // #endif
}, },
onShow() {}, onShow() {
if(this.$store.state.user.userInfo.idCard){
this.getUserInfo(code)
}
},
methods: { methods: {
getImg(){ getImg(){
this.$http.get(`/sict-ncov/user/qrcode`).then(res => { this.$http.get(`/sict-ncov/user/qrcode`).then(res => {
...@@ -82,6 +101,9 @@ ...@@ -82,6 +101,9 @@
const d = res.data const d = res.data
if (d.code == 1) { if (d.code == 1) {
let userInfo = d.object let userInfo = d.object
if(userInfo.idCard){
this.flag=false
}
let obj = Object.assign({}, this.$store.getters.userInfo) let obj = Object.assign({}, this.$store.getters.userInfo)
if (obj.avatarUrl) { if (obj.avatarUrl) {
userInfo.avatarUrl = obj.avatarUrl userInfo.avatarUrl = obj.avatarUrl
...@@ -108,7 +130,7 @@ ...@@ -108,7 +130,7 @@
background-size: cover; background-size: cover;
background-image: url('http://139.9.163.126/gastric/static/background.jpg'); background-image: url('http://139.9.163.126/gastric/static/background.jpg');
.btnList{ .btnList{
padding-top: 355upx; padding-top: 395upx;
.btnStaff,.btnSecurity{ .btnStaff,.btnSecurity{
background-color: #92d0f1; background-color: #92d0f1;
color: #FFFFFF; color: #FFFFFF;
......
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