diff --git a/components/AQ/AQTabber.vue b/components/AQ/AQTabber.vue index d959761..2f436e6 100644 --- a/components/AQ/AQTabber.vue +++ b/components/AQ/AQTabber.vue @@ -1,137 +1,130 @@ + .fui-wrap { + //为防止标签栏遮住页面内容,页面底部需留白高度不低于标签栏高度。非Nvue端和头条小程序如果fixedHeight属性没有设置为true,则页面外层还需加入以下样式(或者在页面最底部加入`fui-safe-area` 组件)兼容异形屏: + /* #ifndef APP-NVUE */ + padding-bottom: constant(safe-area-inset-bottom); + padding-bottom: env(safe-area-inset-bottom); + /* #endif */ + } + \ No newline at end of file diff --git a/pages/student/index/index.vue b/pages/student/index/index.vue index 0ed6992..89572ac 100644 --- a/pages/student/index/index.vue +++ b/pages/student/index/index.vue @@ -1,67 +1,6 @@ @@ -76,118 +15,31 @@ }, data() { return { - list:[], - likes:0, - type:1, - type1:1, - activity_id:0, - um_id:0, - urls:'http://medication.zeyan.wang/' + } }, onLoad() { - wx.hideTabBar({ - success: function() { - console.log('TabBar 已隐藏'); - }, - fail: function(err) { - console.error('隐藏TabBar失败', err); - } - }); - const um_id = uni.getStorageSync('um_id'); - this.um_id = um_id - if (um_id == '') { - uni.navigateTo({ - url: '/pages/login/login' - }) - } - this.fetchData(this.um_id) }, methods: { - fetchData(um_id) { - user.activity_index({ - um_id: um_id - }).then(res => { - console.log(res) - if(res.status == 200){ - if(res.data == null){ - this.list = [] - }else{ - this.list = res.data - } - }else{ - uni.showToast({ - title: res.msg, - icon: 'none' - }) - } - }); - }, - onPullDownRefresh(){ - this.fetchData(this.um_id) - }, - publishing(){ - uni.navigateTo({ - url: '/pages/index/publishing' - }) - }, - like(id,um_id){ - user.activity_like({um_id:um_id,activity_id:id,type:1}).then(res => { - if(res.status == 200){ - user.activity_index({ - um_id: um_id - }).then(res => { - console.log(res) - if(res.status == 200){ - this.list = res.data - } - }); - this.type = res.data.type - this.activity_id = res.data.activity_id - }else{ - uni.showToast({ - title: res.msg, - icon: 'none' - }) - } - }); - }, - collection(id,um_id){ - user.activity_like({um_id:um_id,activity_id:id,type:2}).then(res => { - if(res.status == 200){ - console.log(res) - this.fetchData(this.um_id) - this.type1 = res.data.type - this.activity_id = res.data.activity_id - }else{ - uni.showToast({ - title: res.msg, - icon: 'none' - }) - } - }); - }, - coninfo(item){ - // user.coninfo({id:id}).then(res => { - // if(res.status == 200){ - uni.setStorageSync('coninfo', item); - uni.navigateTo({ - url: '/pages/index/coninfo' - }) - // }else{ - // uni.showToast({ - // title: res.msg, - // icon: 'none' - // }) - // } - // }); - }, - Comment(id){ - uni.setStorageSync('actid', id); - uni.navigateTo({ - url: '/pages/index/Comment' - }) - } + // fetchData(um_id) { + // user.activity_index({ + // um_id: um_id + // }).then(res => { + // console.log(res) + // if(res.status == 200){ + // if(res.data == null){ + // this.list = [] + // }else{ + // this.list = res.data + // } + // }else{ + // uni.showToast({ + // title: res.msg, + // icon: 'none' + // }) + // } + // }); + // }, } }