Browse Source

zhjw

master
李双庆 1 year ago
parent
commit
455715f2ae
  1. 59
      components/AQ/AQTabber.vue
  2. 78
      pages/student/index/index.vue

59
components/AQ/AQTabber.vue

@ -7,21 +7,23 @@
<script>
export default {
name: 'AQTabber',
name: "AQTabber",
components: {
fuiTabbar
},
data() {
return {
userType: '', //|1=,2=,3=
userType: '1', //|1=,2=,3=
current: '0',
tabBar: []
};
},
created() {
//
uni.setStorageSync('userType', 1)
//
this.userType = uni.getStorageSync('userType')
console.log(123)
this.init()
},
methods: {
async init() {
switch (String(this.userType)) {
@ -35,20 +37,20 @@
{
text: "课表",
urlPath: 'pages/student/timetable/index', //
iconPath: "/static/images/tabbar/assembly_default_3x.png",
selectedIconPath: "/static/images/tabbar/assembly_selected_3x.png"
iconPath: "/static/images/tabbar/my.png",
selectedIconPath: "/static/images/tabbar/my.png"
},
{
text: "班级",
urlPath: 'pages/student/my/my', //
iconPath: "/static/images/tabbar/assembly_default_3x.png",
selectedIconPath: "/static/images/tabbar/assembly_selected_3x.png"
iconPath: "/static/images/tabbar/my.png",
selectedIconPath: "/static/images/tabbar/my.png"
},
{
text: "我的",
urlPath: 'pages/student/my/my', //
iconPath: "/static/images/tabbar/assembly_default_3x.png",
selectedIconPath: "/static/images/tabbar/assembly_selected_3x.png"
iconPath: "/static/images/tabbar/my.png",
selectedIconPath: "/static/images/tabbar/my.png"
}
]
break;
@ -56,20 +58,20 @@
this.tabBar = [{
text: "首页",
urlPath: 'pages/student/index/index', //
iconPath: "/static/images/tabbar/assembly_default_3x.png",
selectedIconPath: "/static/images/tabbar/assembly_selected_3x.png"
iconPath: "/static/images/tabbar/my.png",
selectedIconPath: "/static/images/tabbar/my.png"
},
{
text: "线索",
urlPath: 'pages/student/my/my', //
iconPath: "/static/images/tabbar/assembly_default_3x.png",
selectedIconPath: "/static/images/tabbar/assembly_selected_3x.png"
iconPath: "/static/images/tabbar/my.png",
selectedIconPath: "/static/images/tabbar/my.png"
},
{
text: "添加",
urlPath: 'pages/student/my/my', //
iconPath: "/static/images/tabbar/assembly_default_3x.png",
selectedIconPath: "/static/images/tabbar/assembly_selected_3x.png",
iconPath: "/static/images/tabbar/my.png",
selectedIconPath: "/static/images/tabbar/my.png",
midButton: true,
width: 96,
height: 96
@ -77,14 +79,14 @@
{
text: "数据",
urlPath: 'pages/student/my/my', //
iconPath: "/static/images/tabbar/assembly_default_3x.png",
selectedIconPath: "/static/images/tabbar/assembly_selected_3x.png"
iconPath: "/static/images/tabbar/my.png",
selectedIconPath: "/static/images/tabbar/my.png"
},
{
text: "我的",
urlPath: 'pages/student/my/my', //
iconPath: "/static/images/tabbar/assembly_default_3x.png",
selectedIconPath: "/static/images/tabbar/assembly_selected_3x.png"
iconPath: "/static/images/tabbar/my.png",
selectedIconPath: "/static/images/tabbar/my.png"
}
]
break;
@ -92,26 +94,25 @@
this.tabBar = [{
text: "首页",
urlPath: 'pages/student/index/index', //
iconPath: "/static/images/tabbar/assembly_default_3x.png",
selectedIconPath: "/static/images/tabbar/assembly_selected_3x.png"
iconPath: "/static/images/tabbar/my.png",
selectedIconPath: "/static/images/tabbar/my.png"
},
{
text: "课表",
urlPath: 'pages/student/timetable/index', //
iconPath: "/static/images/tabbar/assembly_default_3x.png",
selectedIconPath: "/static/images/tabbar/assembly_selected_3x.png"
iconPath: "/static/images/tabbar/my.png",
selectedIconPath: "/static/images/tabbar/my.png"
},
{
text: "我的",
urlPath: 'pages/student/my/my', //
iconPath: "/static/images/tabbar/assembly_default_3x.png",
selectedIconPath: "/static/images/tabbar/assembly_selected_3x.png"
iconPath: "/static/images/tabbar/my.png",
selectedIconPath: "/static/images/tabbar/my.png"
}
]
break;
}
},
openView(e) {
console.log('点击跳转', e)
},

78
pages/student/index/index.vue

@ -1,6 +1,71 @@
<template>
<view>
<<<<<<< HEAD
<AQTabber></AQTabber>
=======
<view class="top">
<view class="top_1">发现</view>
<view class="top_2" @click="publishing"><fui-icon name="plussign" size="80" fontWeight="Number"></fui-icon></view>
</view>
<view style="position: relative;" class="middle" v-for="(item, index) in list" :key="index" v-if="list.length > 0">
<view class="middles">
<view class="middles_1" v-if="item.headimg">
<image class="middles_1_img" :src="item.headimg"></image>
</view>
<view class="middles_1" v-else>
<image class="middles_1_img" src="/static/images/home/tixing.png"></image>
</view>
<view class="middles_2">
<view class="middles_info1">{{item.user}}</view>
<view class="middles_info2">{{item.timedifference}}</view>
</view>
</view>
<view class="shoucang" style="border: 5rpx #f8627f solid;color: #f8627f;" v-if="item.collections == 1" @click="collection(item.id,um_id)">收藏</view>
<view class="shoucang" style="border: 5rpx #ccc solid;" v-else @click="collection(item.id,um_id)">收藏</view>
<view @click="coninfo(item)" style="height: 300rpx;width: 100%;overflow: hidden;text-overflow: ellipsis;display: -webkit-box;-webkit-box-orient: vertical;">
<view class="middles_con">
{{item.activity}}
</view>
<view class="middles_con" v-if="item.imagesnum!=0">
<view>
<view style="width: 32%;height: 200rpx;display: inline-block;margin:2rpx;" v-for="(item1, index) in item.images" :key="index">
<image :src="item1" style="width: 100%;height: 100%;"></image>
</view>
</view>
</view>
<view class="middles_con">
{{item.content}}
</view>
</view>
<view class="middles_con" style="font-size: 20rpx;color: #ccc;" @click="coninfo(item)">
点击内容查看详情
</view>
<view class="middles_bom">
<view class="middles_bom_1 middles_boms" v-if="item.area">{{item.area}}</view>
<view class="middles_bom_2 middles_boms">
<fui-icon name="fabulous-fill" color="#f8627f" size="45" @click="like(item.id,item.um_id)"></fui-icon>
{{item.likes}}
</view>
<view class="middles_bom_3 middles_boms" @click="Comment(item.id)">
<fui-icon name="comment-fill" color="#6281a6" size="45"></fui-icon>
{{item.comment}}
</view>
</view>
<view style="width: 100%;height: 20rpx;"></view>
</view>
<view class="empty" v-if="!list.length">
<view style="width: 200rpx;">
<img src="@/static/icon-img/kkry.png" alt="" style="width: 180rpx;height: 180rpx;">
<view style="font-size: 28rpx;font-weight: 800;color: #00be8c;">
还没有任何提醒
</view>
</view>
</view>
<view style="width: 100%;height: 20rpx;"></view>
<AQTabber/>
>>>>>>> d89f93ea456d0a15a017b476c9df62a3b4c831ed
</view>
</template>
@ -11,7 +76,7 @@
export default {
components: {
fuiIcon,
AQTabber
AQTabber,
},
data() {
return {
@ -19,6 +84,17 @@
}
},
onLoad() {
<<<<<<< HEAD
=======
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)
>>>>>>> d89f93ea456d0a15a017b476c9df62a3b4c831ed
},
methods: {
// fetchData(um_id) {

Loading…
Cancel
Save