|
@@ -18,19 +18,20 @@ Page({
|
|
{
|
|
{
|
|
title: '个人信息',
|
|
title: '个人信息',
|
|
icon: 'user-icon',
|
|
icon: 'user-icon',
|
|
- url: '/pages/student/user/user',
|
|
|
|
-
|
|
|
|
|
|
+ studenturl: '/pages/student/user/user',
|
|
|
|
+ teacherurl:'/pages/student/user/user'
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '我的投诉建议',
|
|
title: '我的投诉建议',
|
|
icon: 'tousu',
|
|
icon: 'tousu',
|
|
- url: '/pages/student/proposalList/proposalList',
|
|
|
|
-
|
|
|
|
|
|
+ studenturl: '/pages/student/proposalList/proposalList',
|
|
|
|
+ teacherurl:''
|
|
},
|
|
},
|
|
{
|
|
{
|
|
title: '我的设置',
|
|
title: '我的设置',
|
|
icon: 'shezhi',
|
|
icon: 'shezhi',
|
|
- url: 'setting/index',
|
|
|
|
|
|
+ studenturl: 'setting/index',
|
|
|
|
+ teacherurl:'setting/index'
|
|
}
|
|
}
|
|
]
|
|
]
|
|
|
|
|
|
@@ -40,7 +41,8 @@ Page({
|
|
let userInfo = wx.getStorageSync('user')
|
|
let userInfo = wx.getStorageSync('user')
|
|
this.setData({
|
|
this.setData({
|
|
photo: userInfo.headImage ? api.total.split('.if')[0]+userInfo.headImage :'/images/default-urser.png',
|
|
photo: userInfo.headImage ? api.total.split('.if')[0]+userInfo.headImage :'/images/default-urser.png',
|
|
- viewName: userInfo.userName
|
|
|
|
|
|
+ viewName: userInfo.userName,
|
|
|
|
+ roleType:wx.getStorageSync('user').roleType
|
|
})
|
|
})
|
|
// if (!userInfo){
|
|
// if (!userInfo){
|
|
// let { viewName = '', photo = '' } = await getUserInfo()
|
|
// let { viewName = '', photo = '' } = await getUserInfo()
|
|
@@ -56,9 +58,16 @@ Page({
|
|
// }
|
|
// }
|
|
},
|
|
},
|
|
navigate_auth:function(e){
|
|
navigate_auth:function(e){
|
|
- wx.navigateTo({
|
|
|
|
- url: e.currentTarget.dataset.url,
|
|
|
|
- })
|
|
|
|
|
|
+ if (e.currentTarget.dataset.url){
|
|
|
|
+ wx.navigateTo({
|
|
|
|
+ url: e.currentTarget.dataset.url,
|
|
|
|
+ })
|
|
|
|
+ }else{
|
|
|
|
+ wx.showToast({
|
|
|
|
+ title: '功能开发中',
|
|
|
|
+ icon:'none'
|
|
|
|
+ })
|
|
|
|
+ }
|
|
},
|
|
},
|
|
updateimage:function(){
|
|
updateimage:function(){
|
|
let that=this
|
|
let that=this
|