Initial commit
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
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'
|
||||
})
|
||||
},
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
<view class="fixed left-0 box-middle mb200 box-60x120 bg-2e3246 ulib-rr750" wx:if="{{isShow&&isAdmin}}" bindtap="backChannel">
|
||||
<view class="absolute left-0 ml10 box-middle line-height-13 font-22 color-fff">
|
||||
<view>返</view>
|
||||
<view>回</view>
|
||||
</view>
|
||||
<i class="absolute right-0 box-middle mr5 iconfont icon-jiantou-left font-22 color-fff"></i>
|
||||
</view>
|
||||
@@ -0,0 +1,5 @@
|
||||
@import "../../commons/css/common.wxss";
|
||||
.box-60x120{
|
||||
width: 60rpx;
|
||||
height: 120rpx;
|
||||
}
|
||||
Reference in New Issue
Block a user