Files
小鱼开发 3bf5c948d8 Initial commit
2024-05-24 14:16:05 +08:00

57 lines
1.0 KiB
JavaScript

import _ from '../../commons/js/commons'
const app = getApp()
Component({
//组件的属性列表
properties: {
isShow: {
type: Boolean,
value: true,
},
},
//组件的初始数据
data: {
isAdmin:false,
},
//生命周期方法
lifetimes: {
//在组件实例进入页面节点树时执行
attached: function () {
if(app.getStorageByKey("userInfo").group_id==4){
this.setData({
isAdmin:true,
})
}
},
//在组件实例被从页面节点树移除时执行
detached: function () {
},
},
//组件所在页面的生命周期
pageLifetimes: {
//组件所在的页面被展示时执行
show: function () {
},
//组件所在的页面被隐藏时执行
hide: function () {
},
//组件所在的页面尺寸变化时执行
resize: function () {
},
},
//组件的方法列表
methods: {
backChannel(){
wx.reLaunch({
url: '/pages/channel/index'
})
},
}
})