Browse Source

修改资料修改问题

dev
396316021 1 year ago
parent
commit
0b71f6c720
  1. 3
      config/host.js
  2. 2
      pages/Index/components/HomePage/index.vue
  3. 2
      pages/Index/components/UserPage/index.vue
  4. 2
      pages/Login/index.vue
  5. 13
      pages/Project/index.vue
  6. 27
      pages/User/edit.vue

3
config/host.js

@ -1,5 +1,6 @@
// const host='http://192.168.2.92:9505/api'
const host='https://nxr.test.fanyiguanjia.com/api'
const host='https://nxr.fanyiguanjia.com/api'
// const host='https://nxr.test.fanyiguanjia.com/api'
// const host='http://192.168.2.92:9503/api'
const imghost='https://nxr.fanyiguanjia.com/icon/static/image'
const title = '暖新人'

2
pages/Index/components/HomePage/index.vue

@ -349,7 +349,7 @@ export default {
return api
},
bannerClick(e){
this.navTo(this.indexBanner[e].path);
this.navTo(this.indexBanner[e].path || '/pages/Pages/autoArticle?id='+this.indexBanner[e].id);
// this.navTo('/pages/Pages/plan');
},
getNotify(){

2
pages/Index/components/UserPage/index.vue

@ -57,7 +57,7 @@
</view>
</view>
<view class="top-right">
<view class="user-edit" @click="navTo('/pages/User/edit',true)" v-if="userInfo">
<view class="user-edit" @click="navTo('/pages/User/edit',true)" v-if="userInfo?.fxx?.id || this.userInfo?.advisor?.id">
编辑资料
</view>
<view class="user-edit" @click="logoutShow = true" v-if="userInfo">

2
pages/Login/index.vue

@ -31,7 +31,7 @@
height="88"
>
<!-- <u-icon name="weixin-fill" size="50" color="#fff" class="weixin-icon"></u-icon>-->
<u-text text="登录" color="#fff" size="32" align="center" prefix-icon="weixin-fill" :icon-style="{fontSize:'50rpx',color:'#ffffff',marginRight:'5rpx'}" custom-style="display:inline;"></u-text>
<u-text text="手机号快捷登录" color="#fff" size="32" align="center" custom-style="display:inline;"></u-text>
</u-button>
<u-button
v-else

13
pages/Project/index.vue

@ -323,8 +323,19 @@ export default {
popContent:'',
}
},
onShow(){
if(!uni.getStorageSync('token')){
uni.navigateTo({url:'/pages/Login/index'})
return;
}
this.getDetail(this.id);
},
onLoad(option) {
this.id = option.id || 0;
const obj = uni.getLaunchOptionsSync();
let scene = obj.query.scene;
scene = decodeURIComponent(scene)
this.id = option.id || scene || 0;
this.getDetail(option.id);
this.getProjectStep();
},

27
pages/User/edit.vue

@ -23,8 +23,8 @@
></u-tabs>
</view>
</view>
<FxxPage v-if="tabCheck === 'fxx'" :padding-top="false"></FxxPage>
<AdvisorPage v-if="tabCheck === 'advisor'" :padding-top="false" :is-edit="true"></AdvisorPage>
<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>
@ -47,11 +47,9 @@ export default {
data() {
return {
title:'编辑资料',
list:[
{name:'丰行侠',id:'fxx'},
{name:'社区顾问',id:'advisor'},
],
list:[],
tabCheck:'fxx',
userInfo:{},
}
},
onLoad() {
@ -61,7 +59,24 @@ export default {
},
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){

Loading…
Cancel
Save