|
@@ -1,45 +1,17 @@
|
|
|
<template>
|
|
|
- <view>
|
|
|
+ <view class="mineActive">
|
|
|
<statusBar :item="navBarData"></statusBar>
|
|
|
-
|
|
|
- <listBlock1 :classList="activeList"></listBlock1>
|
|
|
- <!-- <view class="activeBox" v-for="(item,index) in activeList" :key="index">
|
|
|
- <view class="teaching_case">
|
|
|
- <view class="img">
|
|
|
- <image :src="activeList[index].pic" mode="aspectFill"></image>
|
|
|
-
|
|
|
- </view>
|
|
|
-
|
|
|
- <view class="right">
|
|
|
- <view class="title">
|
|
|
- <view class="tag bqZ-font">类型</view>
|
|
|
- <text class="three-font" style="font-weight: 600;">{{ item.acName }}</text>
|
|
|
- </view>
|
|
|
-
|
|
|
- <view class="introduce">
|
|
|
- {{ item.brief }}
|
|
|
- </view>
|
|
|
-
|
|
|
- <view class="operate">
|
|
|
- <view class="left">
|
|
|
- <view class="money fNum-font"><text class="three-font">¥</text> {{ item.cost }}</view>
|
|
|
- <view class="person">已报名{{ item.bnum }}/{{ item.pers }}人</view>
|
|
|
- </view>
|
|
|
-
|
|
|
- <view class="Oright" @click="gotoDetail" :data-all="item">
|
|
|
- <view class="text">查看详情</view>
|
|
|
- <view class="arrow">
|
|
|
- <image src="https://teacherapi.cocorobo.cn/teaching-file/static/mine/arrow-right-blue.png"
|
|
|
- mode="aspectFill"></image>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
+
|
|
|
+ <scroll-view class="scrollV" scroll-y="true" @scrolltolower="relower">
|
|
|
+ <view>
|
|
|
+ <listBlock1 :classList="activeList"></listBlock1>
|
|
|
</view>
|
|
|
- </view> -->
|
|
|
- <view class="" style="width: 100%;height: 50rpx;">
|
|
|
-
|
|
|
- </view>
|
|
|
+ <view class="loading">
|
|
|
+ <view v-if="Loading==1">数据加载中...</view>
|
|
|
+ <view v-if="Loading==2">没有更多了~~</view>
|
|
|
+ </view>
|
|
|
+ </scroll-view>
|
|
|
+
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -52,6 +24,9 @@
|
|
|
btn: 1
|
|
|
},
|
|
|
activeList: [],
|
|
|
+
|
|
|
+ Loading: 0, //0默认值 1加载中 2没有更多了
|
|
|
+ currentPage: 1, //页数
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
@@ -60,152 +35,63 @@
|
|
|
uni.navigateTo({
|
|
|
url: `/pages/activityDetail/activityDetail?acId=${data.acId}`,
|
|
|
});
|
|
|
- // if(data.type<=1){
|
|
|
- // uni.navigateTo({
|
|
|
- // url: `/pages/activityDetail/activityDetail?acId=${data.acId}`,
|
|
|
- // });
|
|
|
- // }else{
|
|
|
- // uni.navigateTo({
|
|
|
- // url: `/pages/teachingDetail/teachingDetail?acId=${data.acId}`
|
|
|
- // });
|
|
|
- // }
|
|
|
+ },
|
|
|
+ // 资源库触底
|
|
|
+ lower() {
|
|
|
+ console.log('没触底?');
|
|
|
+ if (this.Loading == 2) return
|
|
|
+ this.Loading = 1
|
|
|
+ this.currentPage++
|
|
|
+ setTimeout(this.getdata, 1000)
|
|
|
},
|
|
|
// 获取数据
|
|
|
getdata() {
|
|
|
let data = {
|
|
|
oid: this.$store.state.user.openid, //用户id
|
|
|
- type: 2
|
|
|
+ type: 2,
|
|
|
+ currentPage: this.currentPage, //页数
|
|
|
+ lim:15
|
|
|
}
|
|
|
- this.$request('/selectOperator', "POST", data).then(res => {
|
|
|
+ this.$request('/selectRegistered', "POST", data).then(res => {
|
|
|
console.log('获取数据',res[0]);
|
|
|
- this.activeList = res[0]
|
|
|
+
|
|
|
+
|
|
|
+ if (!res[0].length) {
|
|
|
+ this.Loading = 2
|
|
|
+ } else {
|
|
|
+ this.Loading = 0
|
|
|
+ }
|
|
|
+
|
|
|
+ this.activeList = [...this.activeList,...res[0]]
|
|
|
+
|
|
|
+ // this.activeList = res[0]
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
onShow() {
|
|
|
+ this.activeList=[]
|
|
|
this.getdata()
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss">
|
|
|
- .activeBox {
|
|
|
- width: 100%;
|
|
|
- background-color: #fff;
|
|
|
- padding: 10px 0;
|
|
|
-
|
|
|
- .teaching_case {
|
|
|
- display: flex;
|
|
|
- justify-content: space-between;
|
|
|
- padding: 0 15px;
|
|
|
-
|
|
|
- .img {
|
|
|
- width: 160rpx;
|
|
|
- height: 160rpx;
|
|
|
-
|
|
|
- image {
|
|
|
- width: 100%;
|
|
|
- height: 100%;
|
|
|
- border-radius: 10rpx;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- .right {
|
|
|
- padding-left: 15px;
|
|
|
- flex: 1;
|
|
|
- display: flex;
|
|
|
- flex-direction: column;
|
|
|
- // align-content: flex-end;
|
|
|
- justify-content: space-between;
|
|
|
-
|
|
|
- .title {
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
-
|
|
|
- margin-bottom: 5px;
|
|
|
-
|
|
|
- .tag {
|
|
|
- border: 1px #00b2b6 solid;
|
|
|
- // font-size: 20rpx;
|
|
|
- width: 64rpx;
|
|
|
- height: 38rpx;
|
|
|
- display: flex;
|
|
|
- white-space: nowrap;
|
|
|
- justify-content: center;
|
|
|
- align-items: center;
|
|
|
- padding: 1rpx 4rpx;
|
|
|
- border-radius: 3px;
|
|
|
- margin-right: 10rpx;
|
|
|
- color: #00b2b6;
|
|
|
- }
|
|
|
-
|
|
|
- text {
|
|
|
- width: 180px;
|
|
|
- overflow: hidden;
|
|
|
- text-overflow: ellipsis;
|
|
|
- white-space: nowrap;
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
-
|
|
|
- .introduce {
|
|
|
- width: 230px;
|
|
|
- font-size: 28rpx;
|
|
|
- color: #a7a7a7;
|
|
|
- // margin-top: 8px;
|
|
|
- overflow: hidden;
|
|
|
- text-overflow: ellipsis;
|
|
|
- white-space: nowrap;
|
|
|
- }
|
|
|
-
|
|
|
- .operate {
|
|
|
- display: flex;
|
|
|
- justify-content: space-between;
|
|
|
- align-items: baseline;
|
|
|
- .left {
|
|
|
- display: flex;
|
|
|
- flex-direction: row;
|
|
|
- justify-content: space-between;
|
|
|
- align-items: baseline;
|
|
|
- width: 260rpx;
|
|
|
-
|
|
|
- .money {
|
|
|
- color: #FFA338;
|
|
|
- font-weight: bold;
|
|
|
- font-size: 36rpx;
|
|
|
- line-height: 20px;
|
|
|
- }
|
|
|
-
|
|
|
- .person {
|
|
|
- color: #00000099;
|
|
|
- font-size: 24rpx;
|
|
|
- // margin-left: 6px;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- .Oright {
|
|
|
- width: 80px;
|
|
|
- display: flex;
|
|
|
- justify-content: flex-end;
|
|
|
- align-items: center;
|
|
|
- .text {
|
|
|
- font-size: 24rpx;
|
|
|
- color: #3081E8;
|
|
|
- }
|
|
|
-
|
|
|
- .arrow {
|
|
|
- display: flex;
|
|
|
- justify-content: center;
|
|
|
- margin-top: 5rpx;
|
|
|
-
|
|
|
- image {
|
|
|
- width: 32rpx;
|
|
|
- height: 32rpx;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ .loading {
|
|
|
+ height: 30rpx;
|
|
|
+ text-align: center;
|
|
|
+ padding-top: 20rpx;
|
|
|
+ padding-bottom: 100rpx;
|
|
|
+ font-size: 26rpx;
|
|
|
+ color: #888;
|
|
|
+ line-height: 2em;
|
|
|
+ }
|
|
|
+ .mineActive{
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ height: 100%;
|
|
|
+ .scrollV{
|
|
|
+ flex: 1;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
</style>
|