|
@@ -9,6 +9,9 @@
|
|
<u-section title="场馆简介" :right="false" :show-line="false" font-size="32" class="title-box"></u-section>
|
|
<u-section title="场馆简介" :right="false" :show-line="false" font-size="32" class="title-box"></u-section>
|
|
<view class="venue-text">{{venueInfo.desc}}</view>
|
|
<view class="venue-text">{{venueInfo.desc}}</view>
|
|
<u-section title="班级信息" :right="false" :show-line="false" font-size="32" class="title-box"></u-section>
|
|
<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">
|
|
<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"
|
|
<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)">
|
|
:key="index" class="class-card" @click="goToClassDetail(item)">
|
|
@@ -55,6 +58,7 @@
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ filterText: '',
|
|
venueId: '',
|
|
venueId: '',
|
|
venueInfo: {
|
|
venueInfo: {
|
|
url: '',
|
|
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) {
|
|
goToClassDetail(item) {
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
@@ -106,7 +123,15 @@
|
|
.content {
|
|
.content {
|
|
width: 100%;
|
|
width: 100%;
|
|
float: left;
|
|
float: left;
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+ .filter-box {
|
|
|
|
+ width: 100vw;
|
|
|
|
+ height: 48px;
|
|
|
|
+ padding: 10px 15px;
|
|
|
|
+ background-color: #FFFFFF;
|
|
|
|
+ float: left;
|
|
|
|
+ }
|
|
|
|
+
|
|
.title-box {
|
|
.title-box {
|
|
width: 100vw;
|
|
width: 100vw;
|
|
padding: 10px 15px 5px 15px;
|
|
padding: 10px 15px 5px 15px;
|