8 changed files with 490 additions and 467 deletions
@ -1,293 +1,310 @@ |
|||||
<template> |
<template> |
||||
<view> |
<view> |
||||
<form class="padding-lr cu-form-group flex-direction"> |
<form class="padding-lr cu-form-group flex-direction"> |
||||
<view class="cu-form-group flex flex-direction padding-tb"> |
<view class="cu-form-group flex flex-direction padding-tb"> |
||||
<view class="title padding-bottom-sm"><span class="text-red padding-right-xs">*</span>当前所在地区</view> |
<view class="title padding-bottom-sm"> |
||||
<view class="flex align-center"> |
<span class="text-red padding-right-xs">*</span>当前所在地区 |
||||
<input class="flex-sub padding-left-xs" @tap="handleSelectLocation" placeholder="请选择当前所在地区" name="input" type="btn" |
</view> |
||||
v-model="district" /> |
<view class="flex align-center"> |
||||
<text class="cuIcon-location timer"></text> |
<input |
||||
</view> |
@tap="handleSelectLocation" |
||||
</view> |
class="flex-sub padding-left-xs" |
||||
<view class="cu-form-group flex flex-direction padding-tb"> |
name="input" |
||||
<view class="title padding-bottom-sm"><span class="text-red padding-right-xs">*</span>当前所在详细地址</view> |
placeholder="请选择当前所在地区" |
||||
<input placeholder="请输入详细地址(含门牌号)" name="input" type="text" v-model="address" /> |
type="btn" |
||||
</view> |
v-model="district" |
||||
<view class="cu-form-group flex flex-direction padding-top"> |
/> |
||||
<view class="title padding-bottom-sm"><span class="text-red padding-right-xs">*</span>当前状态</view> |
<text class="cuIcon-location timer"></text> |
||||
<radio-group class="block" @change="StateChange"> |
</view> |
||||
<view class="cu-list menu text-left"> |
</view> |
||||
<view class="cu-item" v-for="(state,index) in status" :key="index"> |
<view class="cu-form-group flex flex-direction padding-tb"> |
||||
<label class="flex justify-between align-center"> |
<view class="title padding-bottom-sm"> |
||||
<radio class="round margin-right-xs" :checked="index === healthTypeId" :value="state.id"></radio> |
<span class="text-red padding-right-xs">*</span>当前所在详细地址 |
||||
<view class="flex-sub" style="font-size: 34rpx;">{{ state.name }}</view> |
</view> |
||||
</label> |
<input name="input" placeholder="请输入详细地址(含门牌号)" type="text" v-model="address" /> |
||||
</view> |
</view> |
||||
</view> |
<view class="cu-form-group flex flex-direction padding-top"> |
||||
</radio-group> |
<view class="title padding-bottom-sm"> |
||||
</view> |
<span class="text-red padding-right-xs">*</span>当前状态 |
||||
<view class="cu-form-group flex flex-direction padding-tb"> |
</view> |
||||
<view class="title padding-bottom-sm">就诊医院(若无填无)</view> |
<radio-group @change="StateChange" class="block"> |
||||
<input placeholder="请输入就诊医院" name="input" type="text" v-model="hospital" /> |
<view class="cu-list menu text-left"> |
||||
</view> |
<view :key="index" class="cu-item" v-for="(state,index) in status"> |
||||
<view class="cu-form-group flex flex-direction padding-top"> |
<label class="flex justify-between align-center"> |
||||
<view class="title padding-bottom-sm">最近14天是否有武汉居住史、旅游史或武汉亲戚来访</view> |
<radio |
||||
<radio-group class="block" @change="TourChange"> |
:checked="index === healthTypeId" |
||||
<view class="flex"> |
:value="state.id" |
||||
<view class="flex-sub margin-tb-sm" v-for="(tour,index) in tours" :key="index"> |
class="round margin-right-xs" |
||||
<label class="flex justify-between align-center"> |
></radio> |
||||
<radio class="round margin-right-xs" :checked="index === touchHubei" :value="tour.value"></radio> |
<view class="flex-sub" style="font-size: 34rpx;">{{ state.name }}</view> |
||||
<text class="flex-sub" style="font-size: 34rpx;">{{ tour.name }}</text> |
</label> |
||||
</label> |
</view> |
||||
</view> |
</view> |
||||
</view> |
</radio-group> |
||||
</radio-group> |
</view> |
||||
</view> |
<view class="cu-form-group flex flex-direction padding-tb"> |
||||
|
<view class="title padding-bottom-sm">就诊医院(若无填无)</view> |
||||
|
<input name="input" placeholder="请输入就诊医院" type="text" v-model="hospital" /> |
||||
|
</view> |
||||
|
<view class="cu-form-group flex flex-direction padding-top"> |
||||
|
<view class="title padding-bottom-sm">最近14天是否有武汉居住史、旅游史或武汉亲戚来访</view> |
||||
|
<radio-group @change="TourChange" class="block"> |
||||
|
<view class="flex"> |
||||
|
<view :key="index" class="flex-sub margin-tb-sm" v-for="(tour,index) in tours"> |
||||
|
<label class="flex justify-between align-center"> |
||||
|
<radio |
||||
|
:checked="index === touchHubei" |
||||
|
:value="tour.value" |
||||
|
class="round margin-right-xs" |
||||
|
></radio> |
||||
|
<text class="flex-sub" style="font-size: 34rpx;">{{ tour.name }}</text> |
||||
|
</label> |
||||
|
</view> |
||||
|
</view> |
||||
|
</radio-group> |
||||
|
</view> |
||||
|
|
||||
<view class="cu-form-group flex flex-direction padding-top"> |
<view class="cu-form-group flex flex-direction padding-top"> |
||||
<view class="title padding-bottom-sm">最近14天是否有新冠肺炎患者或疑似患者接触史</view> |
<view class="title padding-bottom-sm">最近14天是否有新冠肺炎患者或疑似患者接触史</view> |
||||
<radio-group class="block" @change="TouchChange"> |
<radio-group @change="TouchChange" class="block"> |
||||
<view class="flex"> |
<view class="flex"> |
||||
<view class="flex-sub margin-tb-sm" v-for="(touch,index) in touches" :key="index"> |
<view :key="index" class="flex-sub margin-tb-sm" v-for="(touch,index) in touches"> |
||||
<label class="flex justify-between align-center"> |
<label class="flex justify-between align-center"> |
||||
<radio class="round margin-right-xs" :checked="index === touchSick" :value="touch.value"></radio> |
<radio |
||||
<text class="flex-sub" style="font-size: 34rpx;">{{ touch.name }}</text> |
:checked="index === touchSick" |
||||
</label> |
:value="touch.value" |
||||
</view> |
class="round margin-right-xs" |
||||
</view> |
></radio> |
||||
</radio-group> |
<text class="flex-sub" style="font-size: 34rpx;">{{ touch.name }}</text> |
||||
</view> |
</label> |
||||
<view class="cu-form-group flex flex-direction padding-tb"> |
</view> |
||||
<view class="title padding-bottom-sm"><span class="text-red padding-right-xs">*</span>当前体温(℃)</view> |
</view> |
||||
<input placeholder="请输入当前真实体温" name="input" type="number" v-model="animalHeat" /> |
</radio-group> |
||||
</view> |
</view> |
||||
</form> |
<view class="cu-form-group flex flex-direction padding-tb"> |
||||
<user-agreement @changeIntentions="changeIntentions"></user-agreement> |
<view class="title padding-bottom-sm"> |
||||
<button class="bg-cyan margin primary-btn" hover-class="cc-active" @tap="handleHealthSign">确认提交</button> |
<span class="text-red padding-right-xs">*</span>当前体温(℃) |
||||
<!-- 历史 --> |
</view> |
||||
<button class="shadow round bg-cyan history-btn iconfont icon-history" hover-class="cc-active" @tap="openPage('/pages/my-code/my-code')"></button> |
<input name="input" placeholder="请输入当前真实体温" type="number" v-model="animalHeat" /> |
||||
</view> |
</view> |
||||
|
</form> |
||||
|
<user-agreement @changeIntentions="changeIntentions"></user-agreement> |
||||
|
<button @tap="handleHealthSign" class="bg-cyan margin primary-btn" hover-class="cc-active">确认提交</button> |
||||
|
<!-- 历史 --> |
||||
|
<button |
||||
|
@tap="openPage('/pages/my-code/my-code')" |
||||
|
class="shadow round bg-cyan history-btn iconfont icon-history" |
||||
|
hover-class="cc-active" |
||||
|
></button> |
||||
|
</view> |
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script> |
||||
import { |
import { showToast } from 'common/script/util'; |
||||
showToast |
import { HEALTH_SIGN } from 'api/api'; |
||||
} from 'common/script/util'; |
import { mapState, mapMutations } from 'vuex'; |
||||
import { |
|
||||
HEALTH_SIGN |
|
||||
} from 'api/api'; |
|
||||
import { |
|
||||
mapState, |
|
||||
mapMutations |
|
||||
} from 'vuex'; |
|
||||
|
|
||||
export default { |
export default { |
||||
data() { |
data() { |
||||
return { |
return { |
||||
district: '请选择当前所在地区', |
district: '请选择当前所在地区', |
||||
address: '', |
address: '', |
||||
// status: [], |
// status: [], |
||||
hospital: '', |
hospital: '', |
||||
tours: [{ |
tours: [ |
||||
value: '0', |
{ |
||||
name: '否' |
value: '0', |
||||
}, { |
name: '否', |
||||
value: '1', |
}, |
||||
name: '是' |
{ |
||||
}], |
value: '1', |
||||
touches: [{ |
name: '是', |
||||
value: '0', |
}, |
||||
name: '否' |
], |
||||
}, { |
touches: [ |
||||
value: '1', |
{ |
||||
name: '是' |
value: '0', |
||||
}], |
name: '否', |
||||
animalHeat: 0, |
}, |
||||
healthTypeId: 0, |
{ |
||||
touchHubei: 0, |
value: '1', |
||||
touchSick: 0, |
name: '是', |
||||
agree: false, |
}, |
||||
}; |
], |
||||
}, |
animalHeat: 0, |
||||
computed: mapState('user', ['token', 'status']), |
healthTypeId: 0, |
||||
|
touchHubei: 0, |
||||
methods: { |
touchSick: 0, |
||||
...mapMutations('user', ['setHealthCode']), |
agree: false, |
||||
handleSelectLocation() { |
}; |
||||
const that = this; |
}, |
||||
uni.chooseLocation({ |
computed: mapState('user', ['token', 'status']), |
||||
success: function(res) { |
|
||||
console.log('位置名称:' + res.name); |
|
||||
console.log('详细地址:' + res.address); |
|
||||
that.district = res.address; |
|
||||
}, |
|
||||
}); |
|
||||
}, |
|
||||
|
|
||||
changeIntentions(data) { |
|
||||
this.agree = data; |
|
||||
}, |
|
||||
|
|
||||
// 状态 |
methods: { |
||||
StateChange: function(evt) { |
...mapMutations('user', ['setHealthCode']), |
||||
for (let i = 0; i < this.status.length; i++) { |
handleSelectLocation() { |
||||
if (this.status[i].id === evt.target.value) { |
const that = this; |
||||
this.healthTypeId = i; |
uni.chooseLocation({ |
||||
break; |
success: function(res) { |
||||
} |
console.log('位置名称:' + res.name); |
||||
} |
console.log('详细地址:' + res.address); |
||||
}, |
that.district = res.address; |
||||
|
}, |
||||
|
}); |
||||
|
}, |
||||
|
|
||||
// 旅游 |
changeIntentions(data) { |
||||
TourChange: function(evt) { |
this.agree = data; |
||||
for (let i = 0; i < this.tours.length; i++) { |
}, |
||||
if (this.tours[i].value === evt.target.value) { |
|
||||
this.touchHubei = i; |
|
||||
break; |
|
||||
} |
|
||||
} |
|
||||
}, |
|
||||
|
|
||||
// 接触 |
// 状态 |
||||
TouchChange(evt) { |
StateChange: function(evt) { |
||||
console.log(this.touches,'aa') |
for (let i = 0; i < this.status.length; i++) { |
||||
for (let b = 0; b < this.touches.length; b++) { |
if (this.status[i].id === evt.target.value) { |
||||
if (this.touches[b].value === evt.target.value) { |
this.healthTypeId = i; |
||||
this.touchSick = b; |
break; |
||||
break; |
} |
||||
} |
} |
||||
} |
}, |
||||
}, |
|
||||
|
|
||||
/** |
// 旅游 |
||||
* 申请健康码 |
TourChange: function(evt) { |
||||
*/ |
for (let i = 0; i < this.tours.length; i++) { |
||||
async handleHealthSign() { |
if (this.tours[i].value === evt.target.value) { |
||||
try { |
this.touchHubei = i; |
||||
if (!this.checkRules()) return; |
break; |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
|
||||
const { |
// 接触 |
||||
address, |
TouchChange(evt) { |
||||
animalHeat, |
console.log(this.touches, 'aa'); |
||||
district, |
for (let b = 0; b < this.touches.length; b++) { |
||||
healthTypeId, |
if (this.touches[b].value === evt.target.value) { |
||||
hospital, |
this.touchSick = b; |
||||
token, |
break; |
||||
touchHubei, |
} |
||||
touchSick |
} |
||||
} = this; |
}, |
||||
const params = { |
|
||||
param: { |
|
||||
address, |
|
||||
animalHeat, |
|
||||
district, |
|
||||
healthTypeId: healthTypeId + 1, |
|
||||
hospital, |
|
||||
token, |
|
||||
touchHubei, |
|
||||
touchSick |
|
||||
} |
|
||||
}; |
|
||||
|
|
||||
const res = await this.$http.post(HEALTH_SIGN, params); |
|
||||
const { |
|
||||
success, |
|
||||
code, |
|
||||
msg, |
|
||||
data |
|
||||
} = res.data; |
|
||||
if (success && code === 200) { |
|
||||
uni.showToast({ |
|
||||
title: '申请健康码成功', |
|
||||
duration: 2000 |
|
||||
}); |
|
||||
this.success = true; |
|
||||
this.setHealthCode(data.healthCode) |
|
||||
uni.reLaunch({ |
|
||||
url: `/pages/index/index`, |
|
||||
}); |
|
||||
} else { |
|
||||
uni.showToast({ |
|
||||
title: msg || '申请健康码失败', |
|
||||
icon: 'none' |
|
||||
}); |
|
||||
} |
|
||||
} catch (error) { |
|
||||
console.log('error: ', error); |
|
||||
if (error.msg) { |
|
||||
uni.showToast({ |
|
||||
title: error.msg || '申请健康码失败', |
|
||||
icon: 'none' |
|
||||
}); |
|
||||
} |
|
||||
} |
|
||||
}, |
|
||||
|
|
||||
// 验证信息 |
/** |
||||
checkRules() { |
* 申请健康码 |
||||
const { |
*/ |
||||
district, |
async handleHealthSign() { |
||||
address, |
try { |
||||
healthTypeId, |
if (!this.checkRules()) return; |
||||
animalHeat, |
|
||||
agree |
|
||||
} = this; |
|
||||
if (!district || district === '请选择当前所在地区') { |
|
||||
showToast('请选择当前所在地区'); |
|
||||
return; |
|
||||
} |
|
||||
if (!address) { |
|
||||
showToast('请输入当前所在地址'); |
|
||||
return; |
|
||||
} |
|
||||
if (healthTypeId < 0) { |
|
||||
showToast('请选择状态'); |
|
||||
return; |
|
||||
} |
|
||||
if (!animalHeat) { |
|
||||
showToast('请输入当前体温'); |
|
||||
return; |
|
||||
} |
|
||||
if (!agree) { |
|
||||
showToast('请确定是否为本人填写'); |
|
||||
return; |
|
||||
} |
|
||||
return true; |
|
||||
}, |
|
||||
|
|
||||
}, |
const { |
||||
}; |
address, |
||||
|
animalHeat, |
||||
|
district, |
||||
|
healthTypeId, |
||||
|
hospital, |
||||
|
token, |
||||
|
touchHubei, |
||||
|
touchSick, |
||||
|
} = this; |
||||
|
const params = { |
||||
|
param: { |
||||
|
address, |
||||
|
animalHeat, |
||||
|
district, |
||||
|
healthTypeId: healthTypeId + 1, |
||||
|
hospital, |
||||
|
token, |
||||
|
touchHubei, |
||||
|
touchSick, |
||||
|
}, |
||||
|
}; |
||||
|
|
||||
|
const res = await this.$http.post(HEALTH_SIGN, params); |
||||
|
const { success, code, msg, data } = res.data; |
||||
|
if (success && code === 200) { |
||||
|
uni.showToast({ |
||||
|
title: '申请健康码成功', |
||||
|
duration: 2000, |
||||
|
}); |
||||
|
this.success = true; |
||||
|
this.setHealthCode(data.healthCode); |
||||
|
uni.reLaunch({ |
||||
|
url: `/pages/index/index`, |
||||
|
}); |
||||
|
} else { |
||||
|
uni.showToast({ |
||||
|
title: msg || '申请健康码失败', |
||||
|
icon: 'none', |
||||
|
}); |
||||
|
} |
||||
|
} catch (error) { |
||||
|
console.log('error: ', error); |
||||
|
if (error.msg) { |
||||
|
uni.showToast({ |
||||
|
title: error.msg || '申请健康码失败', |
||||
|
icon: 'none', |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
|
||||
|
// 验证信息 |
||||
|
checkRules() { |
||||
|
const { district, address, healthTypeId, animalHeat, agree } = this; |
||||
|
if (!district || district === '请选择当前所在地区') { |
||||
|
showToast('请选择当前所在地区'); |
||||
|
return; |
||||
|
} |
||||
|
if (!address) { |
||||
|
showToast('请输入当前所在地址'); |
||||
|
return; |
||||
|
} |
||||
|
if (healthTypeId < 0) { |
||||
|
showToast('请选择状态'); |
||||
|
return; |
||||
|
} |
||||
|
if (!animalHeat) { |
||||
|
showToast('请输入当前体温'); |
||||
|
return; |
||||
|
} |
||||
|
if (!agree) { |
||||
|
showToast('请确定是否为本人填写'); |
||||
|
return; |
||||
|
} |
||||
|
return true; |
||||
|
}, |
||||
|
}, |
||||
|
}; |
||||
</script> |
</script> |
||||
|
|
||||
<style lang="scss" scoped> |
<style lang="scss" scoped> |
||||
.agree-box { |
.agree-box { |
||||
width: 70rpx; |
width: 70rpx; |
||||
} |
} |
||||
|
|
||||
.agree-text { |
.agree-text { |
||||
line-height: 60rpx; |
line-height: 60rpx; |
||||
} |
} |
||||
|
|
||||
.timer { |
.timer { |
||||
font-size: 34rpx !important; |
font-size: 34rpx !important; |
||||
color: $gray; |
color: $gray; |
||||
} |
} |
||||
|
|
||||
.primary-btn { |
.primary-btn { |
||||
border-radius: 15rpx; |
border-radius: 15rpx; |
||||
} |
} |
||||
|
|
||||
.history-btn { |
.history-btn { |
||||
position: fixed; |
position: fixed; |
||||
bottom: 40rpx; |
bottom: 40rpx; |
||||
right: 40rpx; |
right: 40rpx; |
||||
width: 96rpx; |
width: 96rpx; |
||||
height: 96rpx; |
height: 96rpx; |
||||
line-height: 96rpx; |
line-height: 96rpx; |
||||
padding: 0; |
padding: 0; |
||||
} |
} |
||||
|
|
||||
.history-btn::after { |
.history-btn::after { |
||||
border: none; |
border: none; |
||||
} |
} |
||||
</style> |
</style> |
||||
|
@ -1,14 +0,0 @@ |
|||||
<template> |
|
||||
<view>扫别人的码</view> |
|
||||
</template> |
|
||||
|
|
||||
<script> |
|
||||
export default { |
|
||||
data() { |
|
||||
return {}; |
|
||||
}, |
|
||||
}; |
|
||||
</script> |
|
||||
|
|
||||
<style lang="scss"> |
|
||||
</style> |
|
@ -1,159 +1,175 @@ |
|||||
<template> |
<template> |
||||
<view class="content flex flex-direction"> |
<view class="content flex flex-direction"> |
||||
<view v-if="healthCode" style="position: relative;"> |
<view v-if="healthCode" style="position: relative;"> |
||||
<image src="http://m.qpic.cn/psc?/V11kyB1O080aC1/cnQ2D7YjAZ5R6pY0fmc9joZ6fC6TxFlt9mW4UhUn2PEgUne7OUt4q4mNE.k9gU.rSr8Eu*pFToZoVwUOEGDrKMycDqdn1mLFGE1dxYTGUcE!/b&bo=7gKRAu4CkQIDWXw!&rf=viewer_4&t=5" |
<image |
||||
class="bg1"></image> |
src="http://m.qpic.cn/psc?/V11kyB1O080aC1/cnQ2D7YjAZ5R6pY0fmc9joZ6fC6TxFlt9mW4UhUn2PEgUne7OUt4q4mNE.k9gU.rSr8Eu*pFToZoVwUOEGDrKMycDqdn1mLFGE1dxYTGUcE!/b&bo=7gKRAu4CkQIDWXw!&rf=viewer_4&t=5" |
||||
<view class="bg-code" @click="getPreviewImg(healthCode)"> |
class="bg1" |
||||
<view class="healthy-code-bg shadow-lg"> |
></image> |
||||
<image class="healthy-code" :src="healthCode"></image> |
<view class="bg-code" @click="getPreviewImg(healthCode)"> |
||||
</view> |
<view class="healthy-code-bg shadow-lg"> |
||||
</view> |
<image class="healthy-code" :src="healthCode"></image> |
||||
</view> |
</view> |
||||
<image v-else src="http://m.qpic.cn/psc?/V11kyB1O080aC1/cnQ2D7YjAZ5R6pY0fmc9jhx9v1rh8VuBAojvYxrYvg*uVMAXaD2En3CPiaHx7AWMjFTafVrGxwJR4jZd5s4ProhQT1ceDVquyQR7HVquBKk!/b&bo=7gLuAe4C7gEDORw!&rf=viewer_4&t=5" |
</view> |
||||
class="bg"></image> |
</view> |
||||
|
<image |
||||
|
v-else |
||||
|
src="http://m.qpic.cn/psc?/V11kyB1O080aC1/cnQ2D7YjAZ5R6pY0fmc9jhx9v1rh8VuBAojvYxrYvg*uVMAXaD2En3CPiaHx7AWMjFTafVrGxwJR4jZd5s4ProhQT1ceDVquyQR7HVquBKk!/b&bo=7gLuAe4C7gEDORw!&rf=viewer_4&t=5" |
||||
|
class="bg" |
||||
|
></image> |
||||
|
|
||||
<view :class="healthCode ? 'box1' : 'box'"> |
<view :class="healthCode ? 'box1' : 'box'"> |
||||
<view v-show="!healthCode" class="cu-card flex margin bg-white shadow card-radius" hover-class="cc-active" @tap="openPage('/pages/apply-code/apply-code')"> |
<view |
||||
<view class="flex align-center padding"> |
@tap="openPage('/pages/apply-code/apply-code')" |
||||
<view class="round lg cu-avatar icon1"> |
class="cu-card flex margin bg-white shadow card-radius" |
||||
<view class="iconfont icon-qrcode"></view> |
hover-class="cc-active" |
||||
</view> |
v-show="!healthCode" |
||||
<view class="padding-left-sm flex-sub"> |
> |
||||
<view class="text-xl">领取健康码</view> |
<view class="flex align-center padding"> |
||||
<view class="text-df padding-top-xs description">领取健康码,查看健康状态</view> |
<view class="round lg cu-avatar icon1"> |
||||
</view> |
<view class="iconfont icon-qrcode"></view> |
||||
</view> |
</view> |
||||
</view> |
<view class="padding-left-sm flex-sub"> |
||||
<view class="cu-card flex margin bg-white shadow card-radius" hover-class="cc-active" @tap="openPage('/pages/punch-the-clock/punch-the-clock')"> |
<view class="text-xl">领取健康码</view> |
||||
<view class="flex align-center padding"> |
<view class="text-df padding-top-xs description">领取健康码,查看健康状态</view> |
||||
<view class="round lg cu-avatar icon2"> |
</view> |
||||
<view class="iconfont icon-carryout"></view> |
</view> |
||||
</view> |
</view> |
||||
<view class="padding-left-sm flex-sub"> |
<view |
||||
<view class="text-xl">每日健康打卡</view> |
@tap="openPage('/pages/punch-the-clock/punch-the-clock')" |
||||
<view class="text-df padding-top-xs description">山大人员健康情况打卡</view> |
class="cu-card flex margin bg-white shadow card-radius" |
||||
</view> |
hover-class="cc-active" |
||||
</view> |
> |
||||
</view> |
<view class="flex align-center padding"> |
||||
<view class="cu-card flex margin bg-white shadow card-radius" hover-class="cc-active" @tap="openPage('/pages/add-stroke/add-stroke')"> |
<view class="round lg cu-avatar icon2"> |
||||
<view class="flex align-center padding"> |
<view class="iconfont icon-carryout"></view> |
||||
<view class="round lg cu-avatar icon3"> |
</view> |
||||
<view class="iconfont icon-car"></view> |
<view class="padding-left-sm flex-sub"> |
||||
</view> |
<view class="text-xl">每日健康打卡</view> |
||||
<view class="padding-left-sm flex-sub"> |
<view class="text-df padding-top-xs description">山大人员健康情况打卡</view> |
||||
<view class="text-xl">行程上报</view> |
</view> |
||||
<view class="text-df padding-top-xs description">外出行程及时上报</view> |
</view> |
||||
</view> |
</view> |
||||
</view> |
<view |
||||
</view> |
@tap="openPage('/pages/add-stroke/add-stroke')" |
||||
<view class="cu-card flex margin bg-white shadow card-radius" hover-class="cc-active" @tap="openPage('/pages/statistics/statistics')"> |
class="cu-card flex margin bg-white shadow card-radius" |
||||
<view class="flex align-center padding"> |
hover-class="cc-active" |
||||
<view class="round lg cu-avatar icon4"> |
> |
||||
<view class="iconfont icon-linechart"></view> |
<view class="flex align-center padding"> |
||||
</view> |
<view class="round lg cu-avatar icon3"> |
||||
<view class="padding-left-sm flex-sub"> |
<view class="iconfont icon-car"></view> |
||||
<view class="text-xl">统计</view> |
</view> |
||||
<view class="text-df padding-top-xs description">山大校园疫情统计</view> |
<view class="padding-left-sm flex-sub"> |
||||
</view> |
<view class="text-xl">行程上报</view> |
||||
</view> |
<view class="text-df padding-top-xs description">外出行程及时上报</view> |
||||
</view> |
</view> |
||||
|
</view> |
||||
</view> |
</view> |
||||
</view> |
<view |
||||
|
@tap="openPage('/pages/statistics/statistics')" |
||||
|
class="cu-card flex margin bg-white shadow card-radius" |
||||
|
hover-class="cc-active" |
||||
|
> |
||||
|
<view class="flex align-center padding"> |
||||
|
<view class="round lg cu-avatar icon4"> |
||||
|
<view class="iconfont icon-linechart"></view> |
||||
|
</view> |
||||
|
<view class="padding-left-sm flex-sub"> |
||||
|
<view class="text-xl">统计</view> |
||||
|
<view class="text-df padding-top-xs description">山大校园疫情统计</view> |
||||
|
</view> |
||||
|
</view> |
||||
|
</view> |
||||
|
</view> |
||||
|
</view> |
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script> |
||||
import { |
import { mapState } from 'vuex'; |
||||
mapState |
export default { |
||||
} from 'vuex'; |
name: 'Home', |
||||
export default { |
data() { |
||||
name: 'Home', |
return {}; |
||||
data() { |
}, |
||||
return {} |
computed: mapState('user', ['userInfo', 'healthCode']), |
||||
}, |
methods: { |
||||
computed: mapState('user', ['userInfo', 'healthCode']), |
//预览图片 |
||||
methods: { |
getPreviewImg(image) { |
||||
//预览图片 |
var imgArr = []; |
||||
getPreviewImg(image) { |
imgArr.push(image); |
||||
var imgArr = []; |
uni.previewImage({ |
||||
imgArr.push(image); |
urls: imgArr, |
||||
uni.previewImage({ |
current: imgArr[0], |
||||
urls: imgArr, |
}); |
||||
current: imgArr[0] |
}, |
||||
}); |
}, |
||||
}, |
}; |
||||
|
|
||||
} |
|
||||
}; |
|
||||
</script> |
</script> |
||||
|
|
||||
<style scoped lang="scss"> |
<style scoped lang="scss"> |
||||
.bg { |
.bg { |
||||
width: 100%; |
width: 100%; |
||||
height: 495rpx; |
height: 495rpx; |
||||
} |
} |
||||
|
|
||||
|
.bg1 { |
||||
|
width: 100%; |
||||
|
height: 635rpx; |
||||
|
} |
||||
|
|
||||
.bg1 { |
.bg-code { |
||||
width: 100%; |
display: flex; |
||||
height: 635rpx; |
width: 100%; |
||||
} |
position: absolute; |
||||
|
top: 370rpx; |
||||
|
|
||||
.bg-code { |
.healthy-code-bg { |
||||
display: flex; |
margin: 0 auto; |
||||
width: 100%; |
width: 230rpx; |
||||
position: absolute; |
height: 230rpx; |
||||
top: 370rpx; |
border-radius: 6px; |
||||
|
overflow: hidden; |
||||
.healthy-code-bg { |
background: $whiteShadow; |
||||
margin: 0 auto; |
|
||||
width: 230rpx; |
|
||||
height: 230rpx; |
|
||||
border-radius: 6px; |
|
||||
overflow: hidden; |
|
||||
background: $whiteShadow; |
|
||||
|
|
||||
.healthy-code { |
|
||||
margin: 5rpx; |
|
||||
width: 220rpx; |
|
||||
height: 220rpx; |
|
||||
border-radius: 6px; |
|
||||
} |
|
||||
} |
|
||||
|
|
||||
|
.healthy-code { |
||||
} |
margin: 5rpx; |
||||
|
width: 220rpx; |
||||
|
height: 220rpx; |
||||
|
border-radius: 6px; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
.box { |
.box { |
||||
position: relative; |
position: relative; |
||||
top: -100rpx; |
top: -100rpx; |
||||
} |
} |
||||
|
|
||||
.box1 { |
.box1 { |
||||
position: relative; |
position: relative; |
||||
top: 0; |
top: 0; |
||||
} |
} |
||||
|
|
||||
.card-radius { |
.card-radius { |
||||
border-radius: 15rpx; |
border-radius: 15rpx; |
||||
} |
} |
||||
|
|
||||
.description { |
.description { |
||||
color: $grey; |
color: $grey; |
||||
} |
} |
||||
|
|
||||
.icon1 { |
.icon1 { |
||||
background: $iconGreen; |
background: $iconGreen; |
||||
} |
} |
||||
|
|
||||
.icon2 { |
.icon2 { |
||||
background: $iconCyan; |
background: $iconCyan; |
||||
} |
} |
||||
|
|
||||
.icon3 { |
.icon3 { |
||||
background: $iconBlue; |
background: $iconBlue; |
||||
} |
} |
||||
|
|
||||
.icon4 { |
.icon4 { |
||||
background: $iconPurple; |
background: $iconPurple; |
||||
} |
} |
||||
</style> |
</style> |
||||
|
Loading…
Reference in new issue