|
@@ -9,6 +9,9 @@
|
|
|
<u-section title="场馆简介" :right="false" :show-line="false" font-size="32" class="title-box"></u-section>
|
|
|
<view class="venue-text">{{venueInfo.desc}}</view>
|
|
|
<u-section title="班级信息" :right="false" :show-line="false" font-size="32" class="title-box"></u-section>
|
|
|
+ <view class="filter-box">
|
|
|
+ <u-search placeholder="请输入班级名" v-model="filterText" @search="setFilterText" @custom="setFilterText"></u-search>
|
|
|
+ </view>
|
|
|
<view class="class-box">
|
|
|
<u-card :head-border-bottom="false" :foot-border-top="false" padding="0" margin="10px" v-for="(item, index) in venueInfo.classListResList"
|
|
|
:key="index" class="class-card" @click="goToClassDetail(item)">
|
|
@@ -55,6 +58,7 @@
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ filterText: '',
|
|
|
venueId: '',
|
|
|
venueInfo: {
|
|
|
url: '',
|
|
@@ -90,6 +94,19 @@
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
+ setFilterText() {
|
|
|
+ if(this.filterText) {
|
|
|
+ let arr = []
|
|
|
+ this.venueInfo.classListResList.forEach(item => {
|
|
|
+ if(item.name.indexOf(this.filterText) >= 0) {
|
|
|
+ arr.push(item)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.venueInfo.classListResList = arr
|
|
|
+ } else {
|
|
|
+ this.initialize()
|
|
|
+ }
|
|
|
+ },
|
|
|
// 跳转班级详情
|
|
|
goToClassDetail(item) {
|
|
|
uni.navigateTo({
|
|
@@ -106,7 +123,15 @@
|
|
|
.content {
|
|
|
width: 100%;
|
|
|
float: left;
|
|
|
-
|
|
|
+
|
|
|
+ .filter-box {
|
|
|
+ width: 100vw;
|
|
|
+ height: 48px;
|
|
|
+ padding: 10px 15px;
|
|
|
+ background-color: #FFFFFF;
|
|
|
+ float: left;
|
|
|
+ }
|
|
|
+
|
|
|
.title-box {
|
|
|
width: 100vw;
|
|
|
padding: 10px 15px 5px 15px;
|