个人中心修改昵称设置头像显示区块链信息健康档案完善可修改
This commit is contained in:
@@ -42,13 +42,16 @@ const editHealthBefore = (id) => {
|
|||||||
* @Date: 2022-01-12 13:49:29
|
* @Date: 2022-01-12 13:49:29
|
||||||
*/
|
*/
|
||||||
const editHealth = (record_id, data) => {
|
const editHealth = (record_id, data) => {
|
||||||
|
console.log(data,'data............')
|
||||||
return request({
|
return request({
|
||||||
url: `health/records/${record_id}`,
|
url: `health/records/${record_id}`,
|
||||||
method: "PUT",
|
method: "PUT",
|
||||||
date: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export {
|
export {
|
||||||
recordsHealth
|
recordsHealth,
|
||||||
|
editHealthBefore,
|
||||||
|
editHealth
|
||||||
}
|
}
|
||||||
|
|||||||
34
apis/interfaces/setting.js
Normal file
34
apis/interfaces/setting.js
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
/**
|
||||||
|
* Web-zdx
|
||||||
|
* moduleName:修改头像和昵称
|
||||||
|
*/
|
||||||
|
|
||||||
|
import {
|
||||||
|
request
|
||||||
|
} from '../index'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 获取用户设置中心的信息
|
||||||
|
const getUserSettingInfo = () => {
|
||||||
|
return request({
|
||||||
|
url: 'user/setting'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 修改用户头像或昵称
|
||||||
|
const resetUserInfo = (data) => {
|
||||||
|
return request({
|
||||||
|
url: 'user/' + data.key,
|
||||||
|
method: 'PUT',
|
||||||
|
data: {
|
||||||
|
value: data.value
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export {
|
||||||
|
getUserSettingInfo,
|
||||||
|
resetUserInfo,
|
||||||
|
}
|
||||||
14
pages.json
14
pages.json
@@ -140,6 +140,15 @@
|
|||||||
"navigationBarTextStyle": "white"
|
"navigationBarTextStyle": "white"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "pages/setting/setting",
|
||||||
|
"name": "Setting",
|
||||||
|
"style": {
|
||||||
|
"navigationBarTitleText": "设置中心",
|
||||||
|
"navigationBarBackgroundColor": "#34CE98",
|
||||||
|
"navigationBarTextStyle": "white"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "pages/store/index",
|
"path": "pages/store/index",
|
||||||
"name": "Store",
|
"name": "Store",
|
||||||
@@ -574,8 +583,9 @@
|
|||||||
"path": "pages/user/files",
|
"path": "pages/user/files",
|
||||||
"name": "UserFiles",
|
"name": "UserFiles",
|
||||||
"style": {
|
"style": {
|
||||||
"navigationBarTitleText": "健康档案",
|
"navigationBarTitleText": "健康档案管理",
|
||||||
"navigationBarBackgroundColor": "#FFFFFF"
|
"navigationBarBackgroundColor": "#34CE98",
|
||||||
|
"navigationBarTextStyle": "white"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -306,16 +306,9 @@ export default {
|
|||||||
},
|
},
|
||||||
//年龄------------- 过滤出生年月日
|
//年龄------------- 过滤出生年月日
|
||||||
formatter(type, value) {
|
formatter(type, value) {
|
||||||
if (type === 'year') {
|
if (type === 'year') {return `${value}年`;}
|
||||||
return `${value}年`;
|
if (type === 'month') {return `${value}月`;}
|
||||||
}
|
if (type === 'day') {return `${value}日`;}
|
||||||
if (type === 'month') {
|
|
||||||
return `${value}月`;
|
|
||||||
}
|
|
||||||
if (type === 'day') {
|
|
||||||
return `${value}日`;
|
|
||||||
}
|
|
||||||
console.log(value);
|
|
||||||
return value;
|
return value;
|
||||||
},
|
},
|
||||||
// 体重---------标尺滚动
|
// 体重---------标尺滚动
|
||||||
|
|||||||
211
pages/setting/setting.vue
Normal file
211
pages/setting/setting.vue
Normal file
@@ -0,0 +1,211 @@
|
|||||||
|
<template>
|
||||||
|
<view class="setting">
|
||||||
|
<!-- 更多管理 -->
|
||||||
|
<view class="list">
|
||||||
|
<view class="list-item" @click="updImgs">
|
||||||
|
<view class="list-item-left">
|
||||||
|
<span>修改头像</span>
|
||||||
|
</view>
|
||||||
|
<view class="avatar" >
|
||||||
|
<image :src="avatar.showPath || require('@/static/user/cover.png')" mode="aspectFill" />
|
||||||
|
<u-icon name="arrow-right" color="#999" size="20"></u-icon>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="list-item">
|
||||||
|
<view class="list-item-left">
|
||||||
|
<span>修改昵称</span>
|
||||||
|
</view>
|
||||||
|
<view class="input">
|
||||||
|
<input type="text" :value="nickname" @blur='blur' placeholder="请输入用户的昵称" maxlength="12" />
|
||||||
|
<u-icon name="arrow-right" color="#999" size="20"></u-icon>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<u-toast ref="uToast" />
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {
|
||||||
|
getUserSettingInfo,
|
||||||
|
resetUserInfo
|
||||||
|
} from '@/apis/interfaces/setting.js'
|
||||||
|
import {
|
||||||
|
uploads
|
||||||
|
} from '@/apis/interfaces/uploading'
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
canLogin: true,
|
||||||
|
nickname: '',
|
||||||
|
avatar: {
|
||||||
|
path: '',
|
||||||
|
showPath: ''
|
||||||
|
},
|
||||||
|
is_bind: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onShow() {
|
||||||
|
this.getUserInfo()
|
||||||
|
},
|
||||||
|
onPullDownRefresh() {
|
||||||
|
this.getUserInfo()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 获取当前用户得基本信息
|
||||||
|
getUserInfo() {
|
||||||
|
getUserSettingInfo().then(res => {
|
||||||
|
this.avatar.showPath = res.avatar
|
||||||
|
this.nickname = res.nickname
|
||||||
|
this.is_bind = res.is_bind
|
||||||
|
uni.stopPullDownRefresh()
|
||||||
|
}).catch(err => {
|
||||||
|
this.$refs.uToast.show({
|
||||||
|
title: err.message,
|
||||||
|
type: 'primary',
|
||||||
|
duration: 3000
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 上传头像
|
||||||
|
updImgs(type) {
|
||||||
|
uni.chooseImage({
|
||||||
|
crop: {
|
||||||
|
width: 80,
|
||||||
|
height: 80
|
||||||
|
},
|
||||||
|
success: res => {
|
||||||
|
let path = res.tempFiles.map((val, index) => {
|
||||||
|
return {
|
||||||
|
name: 'uploads' + index,
|
||||||
|
uri: val.path
|
||||||
|
}
|
||||||
|
})
|
||||||
|
uploads(path).then(pathRes => {
|
||||||
|
this.avatar.path = pathRes.path[0]
|
||||||
|
this.avatar.showPath = pathRes.url[0]
|
||||||
|
this.resetUserInfo('avatar',pathRes.url[0])
|
||||||
|
}).catch(err => {
|
||||||
|
uni.showToast({
|
||||||
|
title: err.message,
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 修改姓名
|
||||||
|
blur(e){
|
||||||
|
let value = e.detail.value
|
||||||
|
if(value !== this.nickname){
|
||||||
|
this.resetUserInfo('nickname',value)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 修改头像或昵称
|
||||||
|
resetUserInfo(key, value) {
|
||||||
|
let data ={
|
||||||
|
key:key,
|
||||||
|
value:value
|
||||||
|
}
|
||||||
|
resetUserInfo(data).then(res=>{
|
||||||
|
uni.showToast({
|
||||||
|
title: res,
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
this.getUserInfo()
|
||||||
|
}).catch(err => {
|
||||||
|
uni.showToast({
|
||||||
|
title: err.message,
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
page {
|
||||||
|
background-color: #F8F8F8;
|
||||||
|
}
|
||||||
|
|
||||||
|
.setting {
|
||||||
|
position: relative;
|
||||||
|
background-color: #fff;
|
||||||
|
|
||||||
|
// 更多管理
|
||||||
|
.list {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: flex-start;
|
||||||
|
justify-content: flex-start;
|
||||||
|
box-sizing: border-box;
|
||||||
|
position: relative;
|
||||||
|
top: -10rpx;
|
||||||
|
border-radius: 20rpx;
|
||||||
|
margin: 0 $margin;
|
||||||
|
padding: 30rpx 0;
|
||||||
|
width: calc(100% - 80rpx);
|
||||||
|
|
||||||
|
.list-item {
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 40rpx 0;
|
||||||
|
border-bottom: solid 1rpx #f9f9f9;
|
||||||
|
box-sizing: border-box;
|
||||||
|
font-size: $title-size;
|
||||||
|
|
||||||
|
.avatar {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
box-sizing: border-box;
|
||||||
|
|
||||||
|
|
||||||
|
image {
|
||||||
|
width: 100rpx;
|
||||||
|
height: 100rpx;
|
||||||
|
border-radius: 50%;
|
||||||
|
margin-right: 20rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.input {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
box-sizing: border-box;
|
||||||
|
text-align: right;
|
||||||
|
flex: 1;
|
||||||
|
|
||||||
|
input {
|
||||||
|
padding-right: $padding - 10;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.list-item-left {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-start;
|
||||||
|
box-sizing: border-box;
|
||||||
|
|
||||||
|
image {
|
||||||
|
width: 40rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
span {
|
||||||
|
margin-left: 20rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -1,62 +1,242 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<view class="files">
|
<!-- 性别start -->
|
||||||
<view class="name">
|
<view class="files" @click="sexShow = true">
|
||||||
性别
|
<view class="name">性别</view>
|
||||||
</view>
|
|
||||||
<view class="text">
|
<view class="text">
|
||||||
{{ recordsData.sex == 1 ? '男' : '女' }}
|
<u-icon
|
||||||
|
class="target-icon"
|
||||||
|
:label="recordsData.sex == 1 ? '男士' : '女士'"
|
||||||
|
name="arrow-right"
|
||||||
|
color="#999"
|
||||||
|
size="14"
|
||||||
|
labelSize="14"
|
||||||
|
labelColor="#666"
|
||||||
|
labelPos="left"
|
||||||
|
space="10"
|
||||||
|
/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="files">
|
<u-action-sheet
|
||||||
<view class="name">
|
:actions="sexList"
|
||||||
年龄
|
title="你的性别是?"
|
||||||
</view>
|
:show="sexShow"
|
||||||
|
cancelText="暂不修改"
|
||||||
|
@select=" e => { (this.recordsData.sex = e.id), (this.sexShow = false); } "
|
||||||
|
@close="sexShow = false"
|
||||||
|
/>
|
||||||
|
<!-- 性别 end -->
|
||||||
|
|
||||||
|
<!-- 生日 start -->
|
||||||
|
<view class="files" @click="birthdayShow = true">
|
||||||
|
<view class="name">生日</view>
|
||||||
<view class="text">
|
<view class="text">
|
||||||
{{ recordsData.age }}
|
<u-icon class="target-icon" :label="showBirthday" name="arrow-right" color="#999" size="14" labelSize="14" labelColor="#666" labelPos="left" space="10" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="files">
|
<u-datetime-picker
|
||||||
<view class="name">
|
confirmColor="#34ce98"
|
||||||
身高
|
v-model="recordsData.birthday"
|
||||||
</view>
|
mode="date"
|
||||||
|
:show="birthdayShow"
|
||||||
|
:formatter="formatter"
|
||||||
|
:minDate="-302688000"
|
||||||
|
:maxDate="maxDate"
|
||||||
|
@confirm=" e => { this.recordsData.birthday = e.value, this.birthdayShow = false } "
|
||||||
|
@cancel=" () => { this.birthdayShow = false; } "
|
||||||
|
/>
|
||||||
|
<!-- 生日 end -->
|
||||||
|
|
||||||
|
<!-- 身高 start-->
|
||||||
|
<view class="files" @click="heightShow = true">
|
||||||
|
<view class="name">身高</view>
|
||||||
<view class="text">
|
<view class="text">
|
||||||
{{ recordsData.height }}cm
|
<u-icon class="target-icon" :label="recordsData.height + ` CM`" name="arrow-right" color="#999" size="14" labelSize="14" labelColor="#666" labelPos="left" space="10" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="files">
|
<u-popup :show="heightShow" @close="() => { heightShow = false }">
|
||||||
<view class="name">
|
<view class="v-scale">
|
||||||
体重
|
<view class="title"> 你的身高为?</view>
|
||||||
|
<view class="total"> {{recordsData.height}} CM </view>
|
||||||
|
<vue-scale :min="10" :max="100" :int="false" :single="10" :h="80" :styles="styles" @scroll="scrollAll('height',$event)" :scrollLeft="Number(recordsData.height)" />
|
||||||
</view>
|
</view>
|
||||||
|
</u-popup>
|
||||||
|
<!-- 身高 end -->
|
||||||
|
|
||||||
|
<!-- 最新体重 start -->
|
||||||
|
<view class="files bt30" @click="weightShow = true">
|
||||||
|
<view class="name">最新体重</view>
|
||||||
<view class="text">
|
<view class="text">
|
||||||
{{ recordsData.weight }}kg
|
<u-icon class="target-icon" :label="recordsData.weight + ` KG`" name="arrow-right" color="#999" size="14" labelSize="14" labelColor="#666" labelPos="left" space="10" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<u-popup :show="weightShow" @close="() => { weightShow = false }">
|
||||||
|
<view class="v-scale">
|
||||||
|
<view class="title"> 你的当前体重为?</view>
|
||||||
|
<view class="total"> {{recordsData.weight}} KG </view>
|
||||||
|
<vue-scale :min="10" :max="100" :int="false" :single="10" :h="80" :styles="styles" @scroll="scrollAll('weight',$event)" :scrollLeft="Number(recordsData.weight)" />
|
||||||
|
</view>
|
||||||
|
</u-popup>
|
||||||
|
<!-- 生日 end -->
|
||||||
|
|
||||||
|
<!-- 目标 start -->
|
||||||
|
<view class="files" @click="targetShow = true">
|
||||||
|
<view class="name">目标</view>
|
||||||
|
<view class="text">
|
||||||
|
<u-icon class="target-icon" :label="targetList[selectedTargetIndex].name" name="arrow-right" color="#999" size="14" labelSize="14" labelColor="#666" labelPos="left" space="10" />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<u-action-sheet
|
||||||
|
:actions="targetList"
|
||||||
|
title="你的目标是?"
|
||||||
|
:show="targetShow"
|
||||||
|
cancelText="暂不修改"
|
||||||
|
@select=" e => { (this.selectedTargetIndex = this.targetList.findIndex(item => e.id === item.id)), (this.targetShow = false); } "
|
||||||
|
@close="targetShow = false"
|
||||||
|
/>
|
||||||
|
<!-- 目标 end -->
|
||||||
|
|
||||||
|
<!-- 目标体重 start-->
|
||||||
|
<view class="files" @click="targetWeightShow = true">
|
||||||
|
<view class="name">目标体重</view>
|
||||||
|
<view class="text"><u-icon class="target-icon" :label="recordsData.goal_weight + ` KG`" name="arrow-right" color="#999" size="14" labelSize="14" labelColor="#666" labelPos="left" space="10" /></view>
|
||||||
|
</view>
|
||||||
|
<u-popup :show="targetWeightShow" @close="() => { targetWeightShow = false }">
|
||||||
|
<view class="v-scale">
|
||||||
|
<view class="title"> 你的目标体重为?</view>
|
||||||
|
<view class="total"> {{recordsData.goal_weight}} KG </view>
|
||||||
|
<vue-scale :min="10" :max="100" :int="false" :single="10" :h="80" :styles="styles" @scroll="scrollAll('goalweight',$event)" :scrollLeft="Number(recordsData.goal_weight)" />
|
||||||
|
</view>
|
||||||
|
</u-popup>
|
||||||
|
<!-- 目标体重 end -->
|
||||||
|
|
||||||
|
<!-- 运动量 start -->
|
||||||
|
<view class="files" @click="exerciseShow = true">
|
||||||
|
<view class="name">运动量</view>
|
||||||
|
<view class="text">
|
||||||
|
<u-icon class="target-icon" :label="exerciseList[selectExerciseIndex].name" name="arrow-right" color="#999" size="14" labelSize="14" labelColor="#666" labelPos="left" space="10" />
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<u-action-sheet
|
||||||
|
:actions="exerciseList"
|
||||||
|
title="你的运动量是?"
|
||||||
|
:show="exerciseShow"
|
||||||
|
cancelText="暂不修改"
|
||||||
|
@select=" e => { (this.selectExerciseIndex = this.exerciseList.findIndex(item => e.id === item.id)), (this.exerciseShow = false); } "
|
||||||
|
@close="exerciseShow = false"
|
||||||
|
/>
|
||||||
|
<!-- 运动量 end -->
|
||||||
|
<view class="sureBtn" @click="sureBtn"> 确认修改 </view>
|
||||||
|
<view class="des">修改资料后可更新并查看最新方案,预算热量可能会发生变化</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { records } from '@/apis/interfaces/user'
|
import { editHealthBefore,editHealth } from '@/apis/interfaces/essentialInfo.js';
|
||||||
export default {
|
import moment from 'moment';
|
||||||
|
import vueScale from '@/components/vueScale'; // 体重标尺
|
||||||
|
export default {
|
||||||
|
components:{
|
||||||
|
vueScale
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
recordsData: ''
|
recordsData: {},
|
||||||
|
birthdayShow: false, // 出生日期展示
|
||||||
|
maxDate: new Date().getTime(),
|
||||||
|
sexShow: false, // 性别弹窗是否显示
|
||||||
|
sexList: [{name: '男士',id: 1},{name: '女士',id: 2}],
|
||||||
|
targetShow: false, // 目标弹窗是否显示
|
||||||
|
targetList: [{name: '减脂',id: 1},{name: '保持体重',id: 2},{name: '增肌',id: 3}],
|
||||||
|
selectedTargetIndex: 0,// 默认选择了那个target
|
||||||
|
exerciseShow:false,// 运动量弹窗是否显示
|
||||||
|
exerciseList:[{name:'久坐不动',id:1},{name:'少量运动',id:2},{name:'中等运动量',id:3},{name:'超强度运动',id:4}],
|
||||||
|
selectExerciseIndex:0,//默认选择运动量是久坐不懂得
|
||||||
|
heightShow:false,
|
||||||
|
weightShow:false,
|
||||||
|
targetWeightShow:false,
|
||||||
|
styles: {
|
||||||
|
line: '#dbdbdb',
|
||||||
|
bginner: '#fbfbfb',
|
||||||
|
bgoutside: '#ffffff',
|
||||||
|
font: '#404040',
|
||||||
|
fontColor: '#404040',
|
||||||
|
fontSize: 16
|
||||||
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
computed: {
|
||||||
records().then(res => {
|
showBirthday() {
|
||||||
this.recordsData = res
|
return moment(this.recordsData.birthday).format('YYYY年MM月DD日');
|
||||||
})
|
|
||||||
}
|
}
|
||||||
};
|
},
|
||||||
|
|
||||||
|
onShow() {
|
||||||
|
let id = this.$Route.query.id;
|
||||||
|
editHealthBefore(id)
|
||||||
|
.then(res => {
|
||||||
|
this.recordsData = res;
|
||||||
|
this.recordsData.birthday = moment(res.birthday).format('YYYY-MM-DD');
|
||||||
|
this.selectExerciseIndex = this.exerciseList.findIndex(item => item.id === res.exercise)
|
||||||
|
})
|
||||||
|
.catch(err => {
|
||||||
|
conso.log(err);
|
||||||
|
});
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 身高 体重 目标体重 滚动
|
||||||
|
scrollAll(type,value) {
|
||||||
|
if(type === 'height'){
|
||||||
|
return this.recordsData.height = value;
|
||||||
|
}
|
||||||
|
if(type === 'weight'){
|
||||||
|
return this.recordsData.weight = value;
|
||||||
|
}
|
||||||
|
if(type === 'goalweight'){
|
||||||
|
return this.recordsData.goal_weight = value;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// 年龄 - 过滤 - 自定义 - 出生年月日
|
||||||
|
formatter(type, value) {
|
||||||
|
if (type === 'year') {return `${value}年`;}
|
||||||
|
if (type === 'month') {return `${value}月`;}
|
||||||
|
if (type === 'day') {return `${value}日`;}
|
||||||
|
return value;
|
||||||
|
},
|
||||||
|
// 提交按钮
|
||||||
|
sureBtn(){
|
||||||
|
|
||||||
|
let params = {
|
||||||
|
record_id:this.recordsData.record_id,
|
||||||
|
birthday:moment(this.recordsData.birthday).format('YYYY-MM-DD'),
|
||||||
|
sex:this.recordsData.sex,
|
||||||
|
height:this.recordsData.height,
|
||||||
|
weight:this.recordsData.weight,
|
||||||
|
exercise:this.exerciseList[this.selectExerciseIndex].id,
|
||||||
|
goal_weight:this.recordsData.goal_weight,
|
||||||
|
days:1
|
||||||
|
}
|
||||||
|
editHealth(params.record_id,params).then(res=>{
|
||||||
|
this.$Router.back()
|
||||||
|
}).catch(err=>{
|
||||||
|
this.$Router.back()
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.files {
|
.content {
|
||||||
display: flex;
|
|
||||||
padding: $padding;
|
padding: $padding;
|
||||||
|
}
|
||||||
|
.files {
|
||||||
|
display: flex;
|
||||||
|
padding: $padding + 10 $padding - 20;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
border-bottom: $border-color 2rpx solid;
|
border-bottom: #f9f9f9 2rpx solid;
|
||||||
|
font-size: $title-size;
|
||||||
&:last-child {
|
&:last-child {
|
||||||
border: none;
|
border: none;
|
||||||
}
|
}
|
||||||
@@ -66,5 +246,37 @@
|
|||||||
.text {
|
.text {
|
||||||
color: $text-gray;
|
color: $text-gray;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
.v-scale{
|
||||||
|
padding: $padding * 2 0;
|
||||||
|
font-size: $title-size;
|
||||||
|
.title{
|
||||||
|
text-align: center;
|
||||||
|
font-size: $title-size + 10;
|
||||||
|
margin-bottom: $margin;
|
||||||
}
|
}
|
||||||
|
.total{
|
||||||
|
font-size: $title-size;
|
||||||
|
color: $main-color;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.des {
|
||||||
|
color: $text-gray-m;
|
||||||
|
font-size: $title-size-m - 4;
|
||||||
|
margin-top: $margin * 2;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
.sureBtn{
|
||||||
|
background-color: $main-color;
|
||||||
|
color: #fff;
|
||||||
|
font-size: $title-size;
|
||||||
|
text-align: center;
|
||||||
|
padding: $padding;
|
||||||
|
border-radius: $radius;
|
||||||
|
margin-top: $margin * 2;
|
||||||
|
}
|
||||||
|
.bt30 {
|
||||||
|
border-bottom: #f9f9f9 20rpx solid;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -2,109 +2,115 @@
|
|||||||
<view class="content">
|
<view class="content">
|
||||||
<!-- 用户信息 -->
|
<!-- 用户信息 -->
|
||||||
<view class="info-box">
|
<view class="info-box">
|
||||||
<image src="@/static/user/user_back.png" mode="aspectFill"></image>
|
<image src="@/static/user/user_back.png" mode="aspectFill" />
|
||||||
<view class="user-flex">
|
<view class="user-flex">
|
||||||
<image class="cover" :src="userInfo.avatar || require('@/static/user/cover.png')" mode="aspectFill"></image>
|
<image class="cover" @click="$Router.push({ name: 'Setting' })" :src="userInfo.avatar || require('@/static/user/cover.png')" mode="aspectFill" />
|
||||||
<view class="user-content">
|
<view class="user-content">
|
||||||
<block v-if="$store.state.token != ''">
|
<block v-if="$store.state.token != ''">
|
||||||
<view class="name">{{userInfo.nickname}}</view>
|
<view class="name">{{ userInfo.nickname }}</view>
|
||||||
<view class="tabs" v-if="userInfo.identity.length != 0">
|
<view class="tabs" v-if="userInfo.identity.length !== 0">
|
||||||
<view class="tabs-item"><image src="@/static/user/icon_07.png"></image>会员</view>
|
<view class="tabs-item">
|
||||||
|
<image src="@/static/user/icon_07.png" />
|
||||||
|
VIP会员
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="tabs" v-else>
|
||||||
|
<view class="tabs-item">
|
||||||
|
<image src="@/static/user/icon_07.png" />
|
||||||
|
普通用户
|
||||||
|
</view>
|
||||||
|
</view>
|
||||||
|
<view class="chainAddress" v-if="userInfo.chain_address">
|
||||||
|
<u-icon labelPos="left" @click="copy(userInfo.chain_address)" labelSize="14" labelColor="#fff" :label="userInfo.chain_address.substr(0, 20)+'...'" space="10" :name="require('@/static/imgs/copy.png')" size="16" />
|
||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
<block v-else>
|
<block v-else><view class="name" @click="isLogin()">未登录</view></block>
|
||||||
<view class="name" @click="isLogin()">未登录</view>
|
|
||||||
</block>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
<!-- 会员卡 -->
|
<!-- 会员卡 -->
|
||||||
<view class="vip-card">
|
<view class="vip-card">
|
||||||
<view class="title">
|
<view class="title">
|
||||||
<image src="@/static/user/icon_06.png" mode="widthFix"></image>
|
<image src="@/static/user/icon_06.png" mode="widthFix" />
|
||||||
ZH会员
|
ZH会员
|
||||||
</view>
|
</view>
|
||||||
<view class="subtitle">
|
<view class="subtitle"><u-notice-bar :text="cardText" icon="" bgColor="" duration="3000" color="#fcc692" direction="column"></u-notice-bar></view>
|
||||||
<u-notice-bar
|
|
||||||
:text="cardText"
|
|
||||||
icon=""
|
|
||||||
bgColor=""
|
|
||||||
duration="3000"
|
|
||||||
color="#fcc692"
|
|
||||||
direction="column"
|
|
||||||
></u-notice-bar>
|
|
||||||
</view>
|
|
||||||
<view class="btn" @click="openVip" v-if="userInfo.identity.length === 0">开通</view>
|
<view class="btn" @click="openVip" v-if="userInfo.identity.length === 0">开通</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 健康数据 -->
|
<!-- 健康数据 -->
|
||||||
<view class="health-flex" v-if="userInfo.has_record">
|
<view class="health-flex" v-if="userInfo.has_record">
|
||||||
<view class="health-flex-item">
|
<view class="health-flex-item">
|
||||||
<view class="title">
|
<view class="title">
|
||||||
体脂率
|
体脂率
|
||||||
<image class="icon" src="@/static/user/icon_04.png" mode="widthFix"></image>
|
<image class="icon" src="@/static/user/icon_04.png" mode="widthFix" />
|
||||||
</view>
|
</view>
|
||||||
<view class="num">
|
<view class="num">
|
||||||
{{userInfo.record.fat.fat}}<text>%</text>
|
{{ userInfo.record.fat.fat }}
|
||||||
|
<text>%</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="hith">{{userInfo.record.fat.text}}</view>
|
<view class="hith">{{ userInfo.record.fat.text }}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="health-flex-item">
|
<view class="health-flex-item">
|
||||||
<view class="title">
|
<view class="title">
|
||||||
体重
|
体重
|
||||||
<image class="icon" src="@/static/user/icon_05.png" mode="widthFix"></image>
|
<image class="icon" src="@/static/user/icon_05.png" mode="widthFix" />
|
||||||
</view>
|
</view>
|
||||||
<view class="num">
|
<view class="num">
|
||||||
{{userInfo.record.weight.weight}}<text>KG</text>
|
{{ userInfo.record.weight.weight }}
|
||||||
|
<text>KG</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="hith">{{userInfo.record.weight.text}}</view>
|
<view class="hith">{{ userInfo.record.weight.text }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 订单 -->
|
<!-- 订单 -->
|
||||||
<view class="order-box">
|
<view class="order-box">
|
||||||
<view class="order-box-item" @click="onBtn('Order', {index: 0})">
|
<view class="order-box-item" @click="onBtn('Order', { index: 0 })">
|
||||||
<image class="icon" src="@/static/user/order_icon_00.png" mode="widthFix"></image>
|
<image class="icon" src="@/static/user/order_icon_00.png" mode="widthFix" />
|
||||||
<view class="title">全部订单</view>
|
<view class="title">全部订单</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="order-box-item" @click="onBtn('Order', {index: 1})">
|
<view class="order-box-item" @click="onBtn('Order', { index: 1 })">
|
||||||
<image class="icon" src="@/static/user/order_icon_01.png" mode="widthFix"></image>
|
<image class="icon" src="@/static/user/order_icon_01.png" mode="widthFix" />
|
||||||
<view class="title">待付款</view>
|
<view class="title">待付款</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="order-box-item" @click="onBtn('Order', {index: 2})">
|
<view class="order-box-item" @click="onBtn('Order', { index: 2 })">
|
||||||
<image class="icon" src="@/static/user/order_icon_02.png" mode="widthFix"></image>
|
<image class="icon" src="@/static/user/order_icon_02.png" mode="widthFix" />
|
||||||
<view class="title">待发货</view>
|
<view class="title">待发货</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="order-box-item" @click="onBtn('Order', {index: 3})">
|
<view class="order-box-item" @click="onBtn('Order', { index: 3 })">
|
||||||
<image class="icon" src="@/static/user/order_icon_03.png" mode="widthFix"></image>
|
<image class="icon" src="@/static/user/order_icon_03.png" mode="widthFix" />
|
||||||
<view class="title">待收货</view>
|
<view class="title">待收货</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="order-box-item" @click="onBtn('Order', {index: 4})">
|
<view class="order-box-item" @click="onBtn('Order', { index: 4 })">
|
||||||
<image class="icon" src="@/static/user/order_icon_04.png" mode="widthFix"></image>
|
<image class="icon" src="@/static/user/order_icon_04.png" mode="widthFix" />
|
||||||
<view class="title">已完成</view>
|
<view class="title">已完成</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 功能块 -->
|
<!-- 功能块 -->
|
||||||
<view class="btns-box">
|
<view class="btns-box">
|
||||||
<view class="btns-box-item" @click="onWallet">
|
<view class="btns-box-item" @click="onWallet">
|
||||||
<image class="icon" src="@/static/user/userIcon_00.png" mode="widthFix"></image>
|
<image class="icon" src="@/static/user/userIcon_00.png" mode="widthFix" />
|
||||||
ZH钱包
|
ZH钱包
|
||||||
<uni-icons class="forward" type="forward" color="#999"></uni-icons>
|
<uni-icons class="forward" type="forward" color="#999" />
|
||||||
</view>
|
</view>
|
||||||
<view class="btns-box-item" @click="onFiles">
|
<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" />
|
||||||
健康档案
|
健康档案
|
||||||
<uni-icons class="forward" type="forward" color="#999"></uni-icons>
|
<uni-icons class="forward" type="forward" color="#999" />
|
||||||
</view>
|
</view>
|
||||||
<view class="btns-box-item" @click="onBtn('Address', {type: 'edit'})">
|
<view class="btns-box-item" @click="onBtn('Address', { type: 'edit' })">
|
||||||
<image class="icon" src="@/static/user/userIcon_03.png" mode="widthFix"></image>
|
<image class="icon" src="@/static/user/userIcon_03.png" mode="widthFix" />
|
||||||
地址管理
|
地址管理
|
||||||
<uni-icons class="forward" type="forward" color="#999"></uni-icons>
|
<uni-icons class="forward" type="forward" color="#999" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="btns-box" v-if="$store.state.token != ''">
|
<view class="btns-box" v-if="$store.state.token != ''">
|
||||||
<view class="btns-box-item" @click="logOut">
|
<view class="btns-box-item" @click="logOut">
|
||||||
<image class="icon" src="@/static/user/userIcon_05.png" mode="widthFix"></image>
|
<image class="icon" src="@/static/user/userIcon_05.png" mode="widthFix" />
|
||||||
退出登录
|
退出登录
|
||||||
<uni-icons class="forward" type="forward" color="#999"></uni-icons>
|
<uni-icons class="forward" type="forward" color="#999" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="footer-text">
|
<view class="footer-text">
|
||||||
@@ -115,172 +121,206 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { info } from '@/apis/interfaces/user'
|
import { info } from '@/apis/interfaces/user';
|
||||||
import userAuth from '@/public/userAuth'
|
import userAuth from '@/public/userAuth';
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
cardText: ['新用户首单即赠会员', '老用户专属验证开通会员'],
|
cardText: ['新用户首单即赠会员', '老用户专属验证开通会员'],
|
||||||
userInfo: {
|
userInfo: {
|
||||||
nickname: "",
|
nickname: '',
|
||||||
avatar : "",
|
avatar: '',
|
||||||
identity: []
|
identity: []
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
this.getInfo()
|
this.getInfo();
|
||||||
},
|
},
|
||||||
methods:{
|
methods: {
|
||||||
// 用户信息
|
// 用户信息
|
||||||
getInfo(){
|
getInfo() {
|
||||||
if(this.$store.state.token === '') return
|
if (this.$store.state.token === '') return;
|
||||||
info().then(res => {
|
info()
|
||||||
|
.then(res => {
|
||||||
|
console.log(res);
|
||||||
uni.setNavigationBarTitle({
|
uni.setNavigationBarTitle({
|
||||||
title: res.nickname
|
title: res.nickname
|
||||||
|
});
|
||||||
|
this.userInfo = res;
|
||||||
|
console.log(res);
|
||||||
})
|
})
|
||||||
this.userInfo = res
|
.catch(err => {
|
||||||
}).catch(err => {
|
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: err.message,
|
title: err.message,
|
||||||
icon : 'none'
|
icon: 'none'
|
||||||
})
|
});
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
// 开通会员
|
// 开通会员
|
||||||
openVip(){
|
openVip() {
|
||||||
if(this.isLogin()){
|
if (this.isLogin()) {
|
||||||
uni.showActionSheet({
|
uni.showActionSheet({
|
||||||
itemList: ["我是新用户", "我是老用户"],
|
itemList: ['我是新用户', '我是老用户'],
|
||||||
success: res=> {
|
success: res => {
|
||||||
switch (res.tapIndex){
|
switch (res.tapIndex) {
|
||||||
case 0:
|
case 0:
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: '开通提示',
|
title: '开通提示',
|
||||||
content: '平台新用户完成首笔订单,即可获赠ZH健康会员',
|
content: '平台新用户完成首笔订单,即可获赠ZH健康会员',
|
||||||
showCancel:false,
|
showCancel: false,
|
||||||
cancelText: '去完成',
|
cancelText: '去完成',
|
||||||
success: res => {
|
success: res => {
|
||||||
console.log(res)
|
console.log(res);
|
||||||
this.$Router.pushTab({name: 'Store'})
|
this.$Router.pushTab({ name: 'Store' });
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '老用户渠道暂未开放',
|
title: '老用户渠道暂未开放',
|
||||||
icon : 'none'
|
icon: 'none'
|
||||||
})
|
});
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 开通钱包
|
// 开通钱包
|
||||||
onWallet(){
|
onWallet() {
|
||||||
if(this.isLogin()){
|
if (this.isLogin()) {
|
||||||
if(this.userInfo.is_wallet) this.$Router.push({name: 'WalletProperty'})
|
if (this.userInfo.is_wallet) this.$Router.push({ name: 'WalletProperty' });
|
||||||
else this.$Router.push({name: 'WalletAdd'})
|
else this.$Router.push({ name: 'WalletAdd' });
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 个人档案
|
// 个人档案
|
||||||
onFiles(){
|
onFiles() {
|
||||||
if(this.isLogin()){
|
if (this.isLogin()) {
|
||||||
if(!this.userInfo.has_record){
|
if (!this.userInfo.has_record) {
|
||||||
this.$Router.push({name: 'EssentialInfo'})
|
this.$Router.push({ name: 'EssentialInfo' });
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
this.$Router.push({name: 'UserFiles'})
|
// this.$Router.push({ name: 'UserFiles',params:{id:this.userInfo.record_id} });
|
||||||
|
uni.navigateTo({
|
||||||
|
url: `/pages/user/files?id=${this.userInfo.record.record_id}`
|
||||||
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 按钮导航
|
// 按钮导航
|
||||||
onBtn(name, params){
|
onBtn(name, params) {
|
||||||
if(this.isLogin()){
|
if (this.isLogin()) {
|
||||||
this.$Router.push({name, params})
|
this.$Router.push({ name, params });
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 检查登录
|
// 检查登录
|
||||||
isLogin(){
|
isLogin() {
|
||||||
if(this.$store.state.token === ''){
|
if (this.$store.state.token === '') {
|
||||||
const Auth = new userAuth()
|
const Auth = new userAuth();
|
||||||
Auth.Login()
|
Auth.Login();
|
||||||
return false
|
return false;
|
||||||
}
|
}
|
||||||
return true
|
return true;
|
||||||
},
|
},
|
||||||
// 退出登录
|
// 退出登录
|
||||||
logOut(){
|
logOut() {
|
||||||
this.userInfo = {
|
this.userInfo = {
|
||||||
nickname: "",
|
nickname: '',
|
||||||
avatar : "",
|
avatar: '',
|
||||||
identity: []
|
identity: []
|
||||||
|
};
|
||||||
|
this.$store.commit('setToken', '');
|
||||||
|
},
|
||||||
|
copy(data){
|
||||||
|
uni.setClipboardData({
|
||||||
|
data: data,
|
||||||
|
success: function () {
|
||||||
|
uni.showToast({
|
||||||
|
title:'复制成功',
|
||||||
|
icon:'none'
|
||||||
|
})
|
||||||
}
|
}
|
||||||
this.$store.commit('setToken', '')
|
});
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.content{
|
.content {
|
||||||
background: $window-color;
|
background: $window-color;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
}
|
}
|
||||||
// 版权信息
|
// 版权信息
|
||||||
.footer-text{
|
.footer-text {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: $title-size-sm;
|
font-size: $title-size-sm;
|
||||||
padding: $padding $padding $padding*2;
|
padding: $padding $padding $padding * 2;
|
||||||
color: $text-gray-m;
|
color: $text-gray-m;
|
||||||
}
|
}
|
||||||
// 用户信息
|
// 用户信息
|
||||||
.info-box{
|
.info-box {
|
||||||
position: relative;
|
position: relative;
|
||||||
background: linear-gradient(to right, #34ce98, #22aa98);
|
background: linear-gradient(to right, #34ce98, #22aa98);
|
||||||
color: white;
|
color: white;
|
||||||
@extend .ios-top;
|
@extend .ios-top;
|
||||||
&>image{
|
& > image {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
// z-index: 100;
|
||||||
}
|
}
|
||||||
.user-flex{
|
.user-flex {
|
||||||
position: relative;
|
position: relative;
|
||||||
padding: $padding*2 $padding ($padding*2 + 60);
|
padding: $padding * 2 $padding ($padding * 2 + 60);
|
||||||
height: 128rpx;
|
height: 128rpx;
|
||||||
.cover{
|
.cover {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 128rpx;
|
width: 128rpx;
|
||||||
height: 128rpx;
|
height: 128rpx;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
border:solid 6rpx white;
|
border: solid 6rpx white;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
z-index: 100;
|
||||||
}
|
}
|
||||||
.user-content{
|
.user-content {
|
||||||
padding-left: 158rpx;
|
padding-left: 158rpx;
|
||||||
height: 128rpx;
|
height: 128rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
.name{
|
position: relative;
|
||||||
|
.chainAddress {
|
||||||
|
overflow: hidden;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
font-size: $title-size-m;
|
||||||
|
padding-top: 10rpx;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-start;
|
||||||
|
position: relative;
|
||||||
|
z-index: 200;
|
||||||
|
}
|
||||||
|
.name {
|
||||||
line-height: 40rpx;
|
line-height: 40rpx;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-size: $title-size + 8;
|
font-size: $title-size + 8;
|
||||||
@extend .nowrap;
|
@extend .nowrap;
|
||||||
}
|
}
|
||||||
.tabs{
|
.tabs {
|
||||||
padding-top: 10rpx;
|
padding-top: 10rpx;
|
||||||
&-item{
|
&-item {
|
||||||
background: rgba($color: #000000, $alpha: .3);
|
background: rgba($color: #000000, $alpha: 0.3);
|
||||||
font-size: $title-size-sm - 4;
|
font-size: $title-size-sm - 4;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
line-height: 36rpx;
|
line-height: 36rpx;
|
||||||
padding: 0 20rpx;
|
padding: 0 20rpx;
|
||||||
border-radius: 20rpx;
|
border-radius: 20rpx;
|
||||||
image{
|
image {
|
||||||
width: 26rpx;
|
width: 26rpx;
|
||||||
height: 26rpx;
|
height: 26rpx;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
@@ -291,9 +331,9 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 会员卡
|
// 会员卡
|
||||||
.vip-card{
|
.vip-card {
|
||||||
position: relative;
|
position: relative;
|
||||||
margin: -60rpx $margin $margin;
|
margin: -60rpx $margin $margin;
|
||||||
background: linear-gradient(to right bottom, #3e5364, #31364a);
|
background: linear-gradient(to right bottom, #3e5364, #31364a);
|
||||||
@@ -301,11 +341,11 @@
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
color: #fcc692;
|
color: #fcc692;
|
||||||
padding: $padding ($padding + 170) $padding $padding;
|
padding: $padding ($padding + 170) $padding $padding;
|
||||||
.title{
|
.title {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-size: $title-size-lg;
|
font-size: $title-size-lg;
|
||||||
line-height: 40rpx;
|
line-height: 40rpx;
|
||||||
image{
|
image {
|
||||||
width: 32rpx;
|
width: 32rpx;
|
||||||
height: 32rpx;
|
height: 32rpx;
|
||||||
margin-right: 10rpx;
|
margin-right: 10rpx;
|
||||||
@@ -313,14 +353,14 @@
|
|||||||
margin-bottom: 4rpx;
|
margin-bottom: 4rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.subtitle{
|
.subtitle {
|
||||||
font-size: $title-size-sm;
|
font-size: $title-size-sm;
|
||||||
margin-top: 10rpx;
|
margin-top: 10rpx;
|
||||||
.u-notice-bar{
|
.u-notice-bar {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.btn{
|
.btn {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: $margin;
|
right: $margin;
|
||||||
margin-top: -30rpx;
|
margin-top: -30rpx;
|
||||||
@@ -335,43 +375,43 @@
|
|||||||
font-size: $title-size-m;
|
font-size: $title-size-m;
|
||||||
border-radius: 30rpx;
|
border-radius: 30rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 订单信息
|
// 订单信息
|
||||||
.order-box{
|
.order-box {
|
||||||
margin: $margin;
|
margin: $margin;
|
||||||
background: white;
|
background: white;
|
||||||
border-radius: $radius;
|
border-radius: $radius;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
&-item{
|
&-item {
|
||||||
width: 25%;
|
width: 25%;
|
||||||
padding: $padding $padding/2;
|
padding: $padding $padding/2;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
.icon{
|
.icon {
|
||||||
width: 48rpx;
|
width: 48rpx;
|
||||||
height: 48rpx;
|
height: 48rpx;
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
}
|
}
|
||||||
.title{
|
.title {
|
||||||
font-size: $title-size-sm;
|
font-size: $title-size-sm;
|
||||||
margin-top: $margin/3;
|
margin-top: $margin/3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 健康数据
|
// 健康数据
|
||||||
.health-flex{
|
.health-flex {
|
||||||
display: flex;
|
display: flex;
|
||||||
margin: $margin ($margin - 10);
|
margin: $margin ($margin - 10);
|
||||||
&-item{
|
&-item {
|
||||||
margin: 0 10rpx;
|
margin: 0 10rpx;
|
||||||
background: white;
|
background: white;
|
||||||
width: calc(50% - 20rpx);
|
width: calc(50% - 20rpx);
|
||||||
border-radius: $radius;
|
border-radius: $radius;
|
||||||
padding: $padding;
|
padding: $padding;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
.title{
|
.title {
|
||||||
font-size: $title-size-lg;
|
font-size: $title-size-lg;
|
||||||
.icon{
|
.icon {
|
||||||
width: 32rpx;
|
width: 32rpx;
|
||||||
height: 32rpx;
|
height: 32rpx;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
@@ -379,48 +419,48 @@
|
|||||||
margin-bottom: 2rpx;
|
margin-bottom: 2rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.num{
|
.num {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-size: $title-size + 10;
|
font-size: $title-size + 10;
|
||||||
padding: $padding/3 0;
|
padding: $padding/3 0;
|
||||||
text{
|
text {
|
||||||
font-size: 70%;
|
font-size: 70%;
|
||||||
padding-left: 10rpx;
|
padding-left: 10rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.hith{
|
.hith {
|
||||||
font-size: $title-size-sm;
|
font-size: $title-size-sm;
|
||||||
color: $text-gray;
|
color: $text-gray;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 模块
|
// 模块
|
||||||
.btns-box{
|
.btns-box {
|
||||||
background: white;
|
background: white;
|
||||||
margin: $margin;
|
margin: $margin;
|
||||||
border-radius: $radius;
|
border-radius: $radius;
|
||||||
&-item{
|
&-item {
|
||||||
position: relative;
|
position: relative;
|
||||||
line-height: 90rpx;
|
line-height: 90rpx;
|
||||||
padding: 0 $padding;
|
padding: $padding * 0.6 $padding;
|
||||||
font-size: $title-size-lg;
|
font-size: $title-size-lg;
|
||||||
&::after{
|
&::after {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
height: 1rpx;
|
height: 1rpx;
|
||||||
content: " ";
|
content: ' ';
|
||||||
left: $margin;
|
left: $margin;
|
||||||
right: $margin;
|
right: $margin;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
background-color: $border-color;
|
background-color: #f9f9f9;
|
||||||
}
|
}
|
||||||
&:last-child::after{
|
&:last-child::after {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
.forward{
|
.forward {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: $margin;
|
right: $margin;
|
||||||
}
|
}
|
||||||
.icon{
|
.icon {
|
||||||
width: 44rpx;
|
width: 44rpx;
|
||||||
height: 44rpx;
|
height: 44rpx;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
@@ -428,5 +468,5 @@
|
|||||||
margin-bottom: 8rpx;
|
margin-bottom: 8rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
BIN
static/imgs/copy.png
Normal file
BIN
static/imgs/copy.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.6 KiB |
BIN
static/user/mine-self-name.png
Normal file
BIN
static/user/mine-self-name.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.0 KiB |
BIN
static/user/user-avatar.png
Normal file
BIN
static/user/user-avatar.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 930 B |
Reference in New Issue
Block a user