Browse Source

1.我的健康打卡 2.我的行程

remotes/origin/HEAD
songsong428 5 years ago
parent
commit
368123acb2
  1. 12
      pages.json
  2. 14
      pages/add-stroke/add-stroke.vue
  3. 24
      pages/apply-code/apply-code.vue
  4. 125
      pages/index/components/home.vue
  5. 80
      pages/index/components/mine.vue
  6. 170
      pages/my-code/my-code.vue
  7. 116
      pages/my-trips/my-trips.vue

12
pages.json

@ -43,6 +43,18 @@
"style": {
"navigationBarTitleText": "申请健康码"
}
},
{
"path": "pages/my-code/my-code",
"style": {
"navigationBarTitleText": "我的健康打卡"
}
},
{
"path": "pages/my-trips/my-trips",
"style": {
"navigationBarTitleText": "我的行程"
}
}
],
"globalStyle": {

14
pages/add-stroke/add-stroke.vue

@ -34,6 +34,8 @@
</view>
</view>
<button class="bg-cyan margin primary-btn" hover-class="cc-active" @tap="addStroke">确认提交</button>
<!-- 历史 -->
<button class="shadow round text-cyan history-btn iconfont icon-history" hover-class="cc-active" @tap="openPage('/pages/my-trips/my-trips')"></button>
</view>
</template>
@ -141,4 +143,16 @@ export default {
.primary-btn{
border-radius: 15rpx;
}
.history-btn{
position: fixed;
top: 30rpx;
right: 30rpx;
width: 96rpx;
height: 96rpx;
line-height: 96rpx;
padding: 0;
}
.history-btn::after{
border: none;
}
</style>

24
pages/apply-code/apply-code.vue

@ -6,8 +6,8 @@
<input placeholder="请输入当前所在地区" name="input" type="text" v-model="area" />
</view>
<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>
<input placeholder="请输入当前所在城市" name="input" type="text" v-model="city" />
<view class="title padding-bottom-sm"><span class="text-red padding-right-xs">*</span>当前所在详细地址</view>
<input placeholder="请输入详细地址(含门牌号)" name="input" type="text" v-model="address" />
</view>
<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>
@ -66,6 +66,8 @@
</view>
</view>
<button class="bg-cyan margin primary-btn" hover-class="cc-active" @tap="addStroke">确认提交</button>
<!-- 历史 -->
<button class="shadow round text-cyan history-btn iconfont icon-history" hover-class="cc-active" @tap="openPage('/pages/my-code/my-code')"></button>
</view>
</template>
@ -76,7 +78,7 @@ export default {
data() {
return {
area: '',
city: '',
address: '',
status: [
{
value: '0',
@ -174,8 +176,8 @@ export default {
showToast('请输入当前所在地区');
return;
}
if (!this.city) {
showToast('请输入当前所在城市');
if (!this.address) {
showToast('请输入当前所在地址');
return;
}
if (!this.status) {
@ -210,4 +212,16 @@ export default {
.primary-btn{
border-radius: 15rpx;
}
.history-btn{
position: fixed;
top: 30rpx;
right: 30rpx;
width: 96rpx;
height: 96rpx;
line-height: 96rpx;
padding: 0;
}
.history-btn::after{
border: none;
}
</style>

125
pages/index/components/home.vue

@ -1,13 +1,15 @@
<template>
<view class="content flex flex-direction">
<view v-if="coad" style="position: relative;">
<image src="http://m.qpic.cn/psc?/V11kyB1O080aC1/cnQ2D7YjAZ5R6pY0fmc9joZ6fC6TxFlt9mW4UhUn2PEgUne7OUt4q4mNE.k9gU.rSr8Eu*pFToZoVwUOEGDrKMycDqdn1mLFGE1dxYTGUcE!/b&bo=7gKRAu4CkQIDWXw!&rf=viewer_4&t=5" class="bg1"></image>
<image src="http://m.qpic.cn/psc?/V11kyB1O080aC1/cnQ2D7YjAZ5R6pY0fmc9joZ6fC6TxFlt9mW4UhUn2PEgUne7OUt4q4mNE.k9gU.rSr8Eu*pFToZoVwUOEGDrKMycDqdn1mLFGE1dxYTGUcE!/b&bo=7gKRAu4CkQIDWXw!&rf=viewer_4&t=5"
class="bg1"></image>
<view class="bg-code">
<image class="healthy-code" src="../../../static/img/qrcode.png" :style="{'background':healthyCodeColor}"></image>
</view>
</view>
</view>
<image v-else src="http://m.qpic.cn/psc?/V11kyB1O080aC1/cnQ2D7YjAZ5R6pY0fmc9jhx9v1rh8VuBAojvYxrYvg*uVMAXaD2En3CPiaHx7AWMjFTafVrGxwJR4jZd5s4ProhQT1ceDVquyQR7HVquBKk!/b&bo=7gLuAe4C7gEDORw!&rf=viewer_4&t=5" class="bg"></image>
<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="coad ? 'box1' : 'box'">
<view v-show="!coad" class="cu-card flex margin bg-white shadow card-radius" hover-class="cc-active" @tap="openPage('/pages/get-code/get-code')">
<view class="flex align-center padding">
@ -59,61 +61,72 @@
</template>
<script>
export default {
name: 'Home',
data() {
return {
coad: false,
healthyCodeColor: '#11A20D',
export default {
name: 'Home',
data() {
return {
coad: false,
healthyCodeColor: '#11A20D',
}
}
}
};
};
</script>
<style scoped lang="scss">
.bg{
width: 100%;
height: 495rpx;
}
.bg1{
width: 100%;
height: 635rpx;
}
.bg-code{
display: flex;
width: 100%;
position: absolute;
top: 370rpx;
.healthy-code{
margin: 0 auto;
width: 230rpx;
height: 230rpx;
.bg {
width: 100%;
height: 495rpx;
}
.bg1 {
width: 100%;
height: 635rpx;
}
.bg-code {
display: flex;
width: 100%;
position: absolute;
top: 370rpx;
.healthy-code {
margin: 0 auto;
width: 230rpx;
height: 230rpx;
}
}
.box {
position: relative;
top: -100rpx;
}
.box1 {
position: relative;
top: 0;
}
.card-radius {
border-radius: 15rpx;
}
.description {
color: $grey;
}
.icon1 {
background: $iconGreen;
}
.icon2 {
background: $iconCyan;
}
.icon3 {
background: $iconBlue;
}
.icon4 {
background: $iconPurple;
}
}
.box {
position: relative;
top: -100rpx;
}
.box1 {
position: relative;
top: 0;
}
.card-radius{
border-radius: 15rpx;
}
.description{
color: $grey;
}
.icon1{
background: $iconGreen;
}
.icon2{
background: $iconCyan;
}
.icon3{
background: $iconBlue;
}
.icon4{
background: $iconPurple;
}
</style>

80
pages/index/components/mine.vue

@ -16,22 +16,22 @@
<!-- 列表 -->
<view class="bg-white margin-top">
<view class="cu-list menu margin-lr">
<view class="cu-item" hover-class="cc-active" @tap="openPage('/pages/basic-info/basic-info')">
<text class="text-xl">个人信息</text>
<view class="iconfont icon-right more"></view>
</view>
<view class="cu-item" hover-class="cc-active">
<text class="text-xl">我的健康打卡</text>
<view class="iconfont icon-right more"></view>
</view>
<view class="cu-item" hover-class="cc-active">
<text class="text-xl">我的行程</text>
<view class="iconfont icon-right more"></view>
</view>
<view class="cu-item" hover-class="cc-active" @tap="openPage('/pages/my-signs/my-signs')">
<text class="text-xl">我的校园打卡</text>
<view class="iconfont icon-right more"></view>
</view>
<view class="cu-item" hover-class="cc-active" @tap="openPage('/pages/basic-info/basic-info')">
<text class="text-xl">个人信息</text>
<view class="iconfont icon-right more"></view>
</view>
<view class="cu-item" hover-class="cc-active" @tap="openPage('/pages/my-code/my-code')">
<text class="text-xl">我的健康打卡</text>
<view class="iconfont icon-right more"></view>
</view>
<view class="cu-item" hover-class="cc-active" @tap="openPage('/pages/my-trips/my-trips')">
<text class="text-xl">我的行程</text>
<view class="iconfont icon-right more"></view>
</view>
<view class="cu-item" hover-class="cc-active" @tap="openPage('/pages/my-signs/my-signs')">
<text class="text-xl">我的校园打卡</text>
<view class="iconfont icon-right more"></view>
</view>
</view>
</view>
</view>
@ -39,30 +39,32 @@
</template>
<script>
export default {
name: 'Mine',
data() {
return {
userInfo: {
avatarUrl: '../../../static/head-portrait.jpg',
nickName: '丁菲菲',
classes: '计算机19级软工二班',
healthyCodeColor: '#11A20D',
},
};
},
};
export default {
name: 'Mine',
data() {
return {
userInfo: {
avatarUrl: '../../../static/head-portrait.jpg',
nickName: '丁菲菲',
classes: '计算机19级软工二班',
healthyCodeColor: '#11A20D',
},
};
},
};
</script>
<style lang="scss" scoped>
.portrait {
overflow: hidden;
}
.healthy-coad {
font-size: 40px;
}
.more {
font-size: 18px;
color: $grey;
}
.portrait {
overflow: hidden;
}
.healthy-coad {
font-size: 40px;
}
.more {
font-size: 18px;
color: $grey;
}
</style>

170
pages/my-code/my-code.vue

@ -0,0 +1,170 @@
<template>
<view>
<!-- 添加 -->
<button class="shadow round bg-cyan add-btn iconfont icon-plus" hover-class="cc-active" @tap="openPage('/pages/apply-code/apply-code')"></button>
<view class="card radius shadow-warp bg-white margin" :key="index" v-for="(item,index) in tableList">
<view class="card-head solid-bottom">
<view class="round bg-green cu-avatar">{{ index+1 }}</view>
<view class="flex flex-sub"></view>
<view class="flex justify-end">
<text class="text-grey text-xl">{{ item.date }}</text>
</view>
</view>
<view class="card-content padding-lr">
<view class="data-wrap">
<view class="data-item">
<view class="data-title">当前所在地区
<text class="text-gray padding-left-xs">{{ item.area }}</text>
</view>
</view>
<view class="data-item">
<view class="data-title">当前所在详细地址:
<text class="text-gray padding-left-xs">{{ item.address }}</text>
</view>
</view>
<view class="data-item">
<view class="data-title">当前状态:
<text class="text-gray padding-left-xs">{{ item.state }}</text>
</view>
</view>
<view class="data-item">
<view class="data-title">就诊医院:
<text class="text-gray padding-left-xs">{{ item.hospital }}</text>
</view>
</view>
<view class="data-item">
<view class="data-title">最近14天是否有武汉居住史旅游史或武汉亲戚来访
<text class="text-gray padding-left-xs">{{ item.tour }}</text>
</view>
</view>
<view class="data-item">
<view class="data-title">最近14天是否有新冠肺炎患者或疑似患者接触史
<text class="text-gray padding-left-xs">{{ item.touch }}</text>
</view>
</view>
<view class="data-item">
<view class="data-title">当前体温:
<text class="text-gray padding-left-xs">{{ item.temperature }}</text>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import {
showToast
} from 'common/script/util';
export default {
data() {
return {
tableList: [{
date: '2020-02-05',
area: '太原',
address: '小店',
state: '正常',
hospital: '无',
tour: '否',
touch: '否',
temperature: '36'
},
{
date: '2020-02-05',
area: '太原',
address: '迎泽',
state: '正常',
hospital: '无',
tour: '否',
touch: '否',
temperature: '36.5'
},
{
date: '2020-02-05',
area: '太原',
address: '迎泽',
state: '正常',
hospital: '无',
tour: '否',
touch: '否',
temperature: '36.3'
},
{
date: '2020-02-05',
area: '太原',
address: '迎泽',
state: '正常',
hospital: '无',
tour: '否',
touch: '否',
temperature: '36.5'
},
{
date: '2020-02-05',
area: '太原',
address: '迎泽',
state: '正常',
hospital: '无',
tour: '否',
touch: '否',
temperature: '36'
},
{
date: '2020-02-05',
area: '太原',
address: '迎泽',
state: '正常',
hospital: '无',
tour: '否',
touch: '否',
temperature: '36'
}
],
};
},
methods: {
},
};
</script>
<style lang="scss" scoped>
.data-wrap {
display: flex;
flex-direction: column;
align-items: left;
justify-content: flex-start;
padding: 40rpx 0;
.data-item {
display: flex;
flex-wrap: wrap;
align-items: left;
font-size: 36rpx;
margin-bottom: 20rpx;
.data-title{
line-height: 60rpx;
color: $black;
}
}
}
.add-btn{
position: fixed;
bottom: 40rpx;
right: 40rpx;
width: 96rpx;
height: 96rpx;
line-height: 96rpx;
padding: 0;
z-index: 1;
}
.add-btn::after{
border: none;
}
</style>

116
pages/my-trips/my-trips.vue

@ -0,0 +1,116 @@
<template>
<view>
<!-- 添加 -->
<button class="shadow round bg-cyan add-btn iconfont icon-plus" hover-class="cc-active" @tap="openPage('/pages/add-stroke/add-stroke')"></button>
<view class="card radius shadow-warp bg-white margin" :key="index" v-for="(item,index) in tableList">
<view class="card-head solid-bottom">
<view class="round bg-green cu-avatar">{{ index+1 }}</view>
<view class="flex flex-sub"></view>
<view class="flex justify-end">
<text class="text-grey text-xl">{{ item.date }}</text>
</view>
</view>
<view class="card-content padding-lr">
<view class="data-wrap">
<view class="data-item">
<view class="data-title">出发时间
<text class="text-gray padding-left-xs">{{ item.startTime }}</text>
</view>
</view>
<view class="data-item">
<view class="data-title">抵达时间:
<text class="text-gray padding-left-xs">{{ item.endTime }}</text>
</view>
</view>
<view class="data-item">
<view class="data-title">出行交通方式:
<text class="text-gray padding-left-xs">{{ item.transport }}</text>
</view>
</view>
<view class="data-item">
<view class="data-title">乘坐航班车次或车牌号码及座位号:
<text class="text-gray padding-left-xs">{{ item.carNumber }}</text>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import {
showToast
} from 'common/script/util';
export default {
data() {
return {
tableList: [{
date: '2020-02-05',
startTime: '2020-02-04',
endTime: '2020-02-05',
transport: '铁路',
carNumber: '32'
},
{
date: '2020-02-05',
startTime: '2020-02-04',
endTime: '2020-02-05',
transport: '飞机',
carNumber: '3282'
},
{
date: '2020-02-05',
startTime: '2020-02-04',
endTime: '2020-02-05',
transport: '自驾',
carNumber: '35212'
}
],
};
},
methods: {
},
};
</script>
<style lang="scss" scoped>
.data-wrap {
display: flex;
flex-direction: column;
align-items: left;
justify-content: flex-start;
padding: 40rpx 0;
.data-item {
display: flex;
flex-wrap: wrap;
align-items: left;
font-size: 36rpx;
margin-bottom: 20rpx;
.data-title{
line-height: 60rpx;
color: $black;
}
}
}
.add-btn{
position: fixed;
bottom: 40rpx;
right: 40rpx;
width: 96rpx;
height: 96rpx;
line-height: 96rpx;
padding: 0;
z-index: 1;
}
.add-btn::after{
border: none;
}
</style>
Loading…
Cancel
Save