@@ -1,5 +1,6 @@
const _Http = getApp().globalData.http;
let content = null;
+let condition = "";
Page({
data: {
@@ -10,7 +11,10 @@ Page({
"classname": "saletool.courseware.courseware",
"method": "selectMenu",
"content": {
- pageSize: 999
+ pageSize: 999,
+ "where": {
+ condition
+ }
}
}).then(res => {
console.log('分类', res)
@@ -30,7 +34,7 @@ Page({
"pageNumber": 1,
"pageSize": 15,
"where": {
- "condition": ""
@@ -44,6 +48,10 @@ Page({
})
},
+ onSearch({detail}){
+ condition = detail;
+ this.getList()
+ },
onShow() {
this.getList()
@@ -1,4 +1,7 @@
-<van-tabs class="tabs" tab-class='tab-class' color='#3874F6' title-active-color='#3874F6' bind:change="tabsChange">
+<view style="position: sticky;top: 0;width: 100vw;z-index: 999;">
+ <van-search shape="round" background="#085CDF" placeholder="请输入搜索关键词" bind:search='onSearch' bind:clear='onSearch' sticky />
+</view>
+<van-tabs sticky class="tabs" tab-class='tab-class' color='#3874F6' title-active-color='#3874F6' bind:change="tabsChange" offset-top='54'>
<van-tab title="课程列表">
<view class="main-1">
<navigator url="./list?id={{item.sat_courseware_classid}}" class="item" wx:for="{{list}}" wx:key="sat_courseware_classid">