|
@@ -8,27 +8,23 @@
|
|
|
<scroll-view scroll-y="true" class="scroll-view" @scrolltolower="toPage" @scroll="toScroll">
|
|
|
<view class="list-scroll-view">
|
|
|
<view class="two_1">
|
|
|
- <view :class="['list',condActive==index?'activeList':'']" v-for="(item,index) in condList"
|
|
|
- :key="index" @tap="toCond(index,item)">
|
|
|
+ <view :class="['list',condActive==index?'activeList':'']" v-for="(item,index) in condList" :key="index" @tap="toCond(index,item)">
|
|
|
<view class="name" v-if="index!=2">
|
|
|
{{item.name}}
|
|
|
</view>
|
|
|
<view v-if="index==2" class="icon4">
|
|
|
<view class="icon_1">
|
|
|
- <text :class="['iconfont',item.shangActive]"
|
|
|
- v-if="condActive==index&&shang=='1'"></text>
|
|
|
+ <text :class="['iconfont',item.shangActive]" v-if="condActive==index&&shang=='1'"></text>
|
|
|
<text :class="['iconfont',item.shang]" v-else></text>
|
|
|
</view>
|
|
|
</view>
|
|
|
<view v-else class="icon">
|
|
|
<view class="icon_1">
|
|
|
- <text :class="['iconfont',item.shangActive]"
|
|
|
- v-if="condActive==index&&shang=='1'"></text>
|
|
|
+ <text :class="['iconfont',item.shangActive]" v-if="condActive==index&&shang=='1'"></text>
|
|
|
<text :class="['iconfont',item.shang]" v-else></text>
|
|
|
</view>
|
|
|
<view class="icon_1">
|
|
|
- <text :class="['iconfont', item.xiaActive]"
|
|
|
- v-if="condActive==index&&xia=='-1'"></text>
|
|
|
+ <text :class="['iconfont', item.xiaActive]" v-if="condActive==index&&xia=='-1'"></text>
|
|
|
<text :class="['iconfont', item.xia]" v-else></text>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -125,6 +121,12 @@
|
|
|
that.searchConfig();
|
|
|
that.watchLogin();
|
|
|
},
|
|
|
+ onPullDownRefresh: async function() {
|
|
|
+ const that = this;
|
|
|
+ that.clearPage();
|
|
|
+ await that.search();
|
|
|
+ uni.stopPullDownRefresh();
|
|
|
+ },
|
|
|
methods: {
|
|
|
// 查询基本设置
|
|
|
searchConfig() {
|
|
@@ -139,52 +141,6 @@
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
- // 输入框
|
|
|
- toInput(e) {
|
|
|
- const that = this;
|
|
|
- if (e.detail.value) that.$set(that.searchInfo, `name`, e.detail.value);
|
|
|
- that.clearPage();
|
|
|
- that.search();
|
|
|
- },
|
|
|
- // 筛选
|
|
|
- toCond(index, e) {
|
|
|
- const that = this;
|
|
|
- let condActive = that.condActive;
|
|
|
- that.$set(that, `condActive`, index);
|
|
|
- if (condActive != index && that.xia == '') {
|
|
|
- that.$set(that, `shang`, '0');
|
|
|
- that.$set(that, `xia`, '-1');
|
|
|
- } else if (condActive == index && that.xia == '-1') {
|
|
|
- that.$set(that, `shang`, '1');
|
|
|
- that.$set(that, `xia`, '0');
|
|
|
- } else if (condActive == index && that.shang == '1') {
|
|
|
- that.$set(that, `shang`, '0');
|
|
|
- that.$set(that, `xia`, '-1');
|
|
|
- } else if (condActive = index && that.shang == '1') {
|
|
|
- that.$set(that, `shang`, '0');
|
|
|
- that.$set(that, `xia`, '-1');
|
|
|
- }
|
|
|
- let value;
|
|
|
- if (index != 0) {
|
|
|
- value = that.shang == '0' ? that.xia : that.shang;
|
|
|
- } else {
|
|
|
- that.$set(that, `searchInfo`, {})
|
|
|
- }
|
|
|
- if (index == 1) {
|
|
|
- that.$set(that, `searchInfo`, {})
|
|
|
- that.$set(that.searchInfo, `time`, value);
|
|
|
- } else if (index == 2) {
|
|
|
- if (e.shang == 'icon-shitugonggeListBox') {
|
|
|
- that.$set(e, `shang`, 'icon-liebiaoxingshi');
|
|
|
- that.$set(that, `type`, 'list');
|
|
|
- } else {
|
|
|
- that.$set(e, `shang`, 'icon-shitugonggeListBox');
|
|
|
- that.$set(that, `type`, 'gongge');
|
|
|
- }
|
|
|
- }
|
|
|
- that.clearPage();
|
|
|
- that.search();
|
|
|
- },
|
|
|
// 监听用户是否登录
|
|
|
watchLogin() {
|
|
|
const that = this;
|
|
@@ -247,6 +203,53 @@
|
|
|
let num = Math.sign(up - e.detail.scrollTop);
|
|
|
if (num == 1) that.$set(that, `is_bottom`, false);
|
|
|
},
|
|
|
+ // 输入框
|
|
|
+ toInput(e) {
|
|
|
+ const that = this;
|
|
|
+ if (e.detail.value) that.$set(that.searchInfo, `name`, e.detail.value);
|
|
|
+ that.clearPage();
|
|
|
+ that.search();
|
|
|
+ },
|
|
|
+ // 筛选
|
|
|
+ toCond(index, e) {
|
|
|
+ const that = this;
|
|
|
+ let condActive = that.condActive;
|
|
|
+ that.$set(that, `condActive`, index);
|
|
|
+ if (condActive != index && that.xia == '') {
|
|
|
+ that.$set(that, `shang`, '0');
|
|
|
+ that.$set(that, `xia`, '-1');
|
|
|
+ } else if (condActive == index && that.xia == '-1') {
|
|
|
+ that.$set(that, `shang`, '1');
|
|
|
+ that.$set(that, `xia`, '0');
|
|
|
+ } else if (condActive == index && that.shang == '1') {
|
|
|
+ that.$set(that, `shang`, '0');
|
|
|
+ that.$set(that, `xia`, '-1');
|
|
|
+ } else if (condActive = index && that.shang == '1') {
|
|
|
+ that.$set(that, `shang`, '0');
|
|
|
+ that.$set(that, `xia`, '-1');
|
|
|
+ }
|
|
|
+ let value;
|
|
|
+ if (index != 0) {
|
|
|
+ value = that.shang == '0' ? that.xia : that.shang;
|
|
|
+ } else {
|
|
|
+ that.$set(that, `searchInfo`, {})
|
|
|
+ }
|
|
|
+ if (index == 1) {
|
|
|
+ that.$set(that, `searchInfo`, {})
|
|
|
+ that.$set(that.searchInfo, `time`, value);
|
|
|
+ } else if (index == 2) {
|
|
|
+ if (e.shang == 'icon-shitugonggeListBox') {
|
|
|
+ that.$set(e, `shang`, 'icon-liebiaoxingshi');
|
|
|
+ that.$set(that, `type`, 'list');
|
|
|
+ } else {
|
|
|
+ that.$set(e, `shang`, 'icon-shitugonggeListBox');
|
|
|
+ that.$set(that, `type`, 'gongge');
|
|
|
+ }
|
|
|
+ }
|
|
|
+ that.clearPage();
|
|
|
+ that.search();
|
|
|
+ },
|
|
|
+
|
|
|
// 详细信息
|
|
|
toView(e) {
|
|
|
const that = this;
|
|
@@ -284,19 +287,11 @@
|
|
|
const that = this;
|
|
|
that.$set(that, `list`, [])
|
|
|
that.$set(that, `skip`, 0)
|
|
|
- that.$set(that, `limit`, 5)
|
|
|
+ that.$set(that, `limit`, 6)
|
|
|
that.$set(that, `page`, 0)
|
|
|
}
|
|
|
- },
|
|
|
- onPullDownRefresh: async function() {
|
|
|
- const that = this;
|
|
|
- that.$set(that, `list`, [])
|
|
|
- that.$set(that, `skip`, 0)
|
|
|
- that.$set(that, `limit`, 6)
|
|
|
- that.$set(that, `page`, 0)
|
|
|
- await that.search();
|
|
|
- uni.stopPullDownRefresh();
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
</script>
|
|
|
|