暖心人
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

99 lines
2.2 KiB

<template>
<view class="body-background"></view>
<u-navbar
:title="title"
:auto-back="true"
left-icon-size="40rpx"
:safe-area-inset-top="true"
:placeholder="true"
bgColor="#ffffff"
></u-navbar>
<view class="edit-tabs-container">
<view class="edit-tabs-body">
<u-tabs
:list="list"
lineWidth="64"
lineHeight="4"
lineColor="#F47210"
:inactiveStyle="{color:'#AFB5BE'}"
:activeStyle="{color:'#FF9545'}"
:scrollable="false"
:custom-style="{margin:'auto',width:'auto'}"
@change="tabsChange"
></u-tabs>
</view>
</view>
<FxxPage v-if="tabCheck === 'fxx' && userInfo?.fxx?.id" :padding-top="false"></FxxPage>
<AdvisorPage v-if="tabCheck === 'advisor' && userInfo?.advisor?.id" :padding-top="false" :is-edit="true"></AdvisorPage>
</template>
<script>
import {
imghost
} from '@/config/host.js'
import MzSubsection from '@/components/MzSubsection/Index.vue';
import FxxPage from '@/components/FxxPage/Index.vue';
import AdvisorPage from '@/components/AdvisorPage/Index.vue';
import api from '@/utils/functions.js';
import {userDetail, userEdit, userExtends} from "@/api/user";
import {getCommonStreet, systemConfig} from "@/api/other";
export default {
components: {
MzSubsection,
FxxPage,
AdvisorPage
},
data() {
return {
title:'编辑资料',
list:[],
tabCheck:'fxx',
userInfo:{},
}
},
onLoad() {
},
onReady() {
},
mounted() {
if(uni.getStorageSync('user')){
this.userInfo = uni.getStorageSync('user');
}else{
userDetail().then((res)=>{
this.userInfo = res.data;
})
}
if(this.userInfo){
let list = [];
if(this.userInfo?.fxx?.id){
list.push({name:'丰行侠',id:'fxx'})
}
if(this.userInfo?.advisor?.id){
list.push({name:'社区顾问',id:'advisor'});
}
this.list = list;
}
},
methods: {
tabsChange(e){
this.tabCheck = e.id;
}
},
onPageScroll(res) {
if (res.scrollTop <= 20) {
uni.$emit('isTop', true);
} else {
uni.$emit('isTop', false);
}
},
}
</script>
<style lang="scss">
@import './components/index.scss';
</style>