This commit is contained in:
zhangmanman
2022-01-14 12:07:59 +08:00
parent 235932ddae
commit 1f45ed3e57
4 changed files with 102 additions and 4 deletions

View File

@@ -14,6 +14,14 @@ const info = () =>{
}) })
} }
export { // 我的档案
info const records = () =>{
return request({
url: 'health/records'
})
}
export {
info,
records
} }

View File

@@ -20,6 +20,13 @@
"navigationBarTitleText": "", "navigationBarTitleText": "",
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, {
"path": "pages/index/files",
"name": "indexFiles",
"style": {
"navigationBarTitleText": "健康档案",
"navigationStyle": "custom"
}
}, { }, {
"path": "pages/record/index", "path": "pages/record/index",
"name": "Record", "name": "Record",

77
pages/index/files.vue Normal file
View File

@@ -0,0 +1,77 @@
<template>
<view class="content">
<view class="files">
<view class="name">
性别
</view>
<view class="text">
{{ recordsData.sex == 1 ? '男' : '女' }}
</view>
</view>
<view class="files">
<view class="name">
年龄
</view>
<view class="text">
{{ recordsData.age }}
</view>
</view>
<view class="files">
<view class="name">
身高
</view>
<view class="text">
{{ recordsData.height }}cm
</view>
</view>
<view class="files">
<view class="name">
体重
</view>
<view class="text">
{{ recordsData.weight }}kg
</view>
</view>
</view>
</template>
<script>
import { records } from '@/apis/interfaces/user'
export default {
data() {
return {
recordsData: ''
};
},
mounted() {
// 获取首页
this.getGuide()
},
methods: {
// 引导图片
getGuide(){
records().then(res => {
this.recordsData = res
})
}
}
};
</script>
<style lang="scss" scoped>
.files {
display: flex;
padding: $padding;
box-sizing: border-box;
border-bottom: $border-color 2rpx solid;
&:last-child {
border: none;
}
.name {
flex: 1;
}
.text {
color: $text-gray;
}
}
</style>

View File

@@ -89,7 +89,7 @@
ZH钱包 ZH钱包
<uni-icons class="forward" type="forward" color="#999"></uni-icons> <uni-icons class="forward" type="forward" color="#999"></uni-icons>
</view> </view>
<view class="btns-box-item"> <view class="btns-box-item" @click="onFiles">
<image class="icon" src="@/static/user/userIcon_02.png" mode="widthFix"></image> <image class="icon" src="@/static/user/userIcon_02.png" mode="widthFix"></image>
健康档案 健康档案
<uni-icons class="forward" type="forward" color="#999"></uni-icons> <uni-icons class="forward" type="forward" color="#999"></uni-icons>
@@ -183,6 +183,12 @@
else this.$Router.push({name: 'WalletAdd'}) else this.$Router.push({name: 'WalletAdd'})
} }
}, },
// 个人档案
onFiles(){
if(this.isLogin()){
this.$Router.push({name: 'indexFiles'})
}
},
// 按钮导航 // 按钮导航
onBtn(name, params){ onBtn(name, params){
if(this.isLogin()){ if(this.isLogin()){