Merge pull request 'dj' (#119) from dj into master
Reviewed-on: http://git.feashow.cn/odjbin/city-store-transfer/pulls/119
This commit is contained in:
@@ -53,14 +53,14 @@
|
||||
options: {
|
||||
styleIsolation: 'shared', // 解除样式隔离
|
||||
},
|
||||
watch: {
|
||||
refresh(newVal, oldVal) {
|
||||
console.log('newVal', newVal);
|
||||
if (newVal) {
|
||||
this.keyword = ''
|
||||
}
|
||||
}
|
||||
},
|
||||
// watch: {
|
||||
// refresh(newVal, oldVal) {
|
||||
// console.log('newVal', newVal);
|
||||
// // if (newVal) {
|
||||
// this.keyword = ''
|
||||
// // }
|
||||
// }
|
||||
// },
|
||||
onShow() {
|
||||
if (this.type !== '0') {
|
||||
this.open()
|
||||
@@ -70,6 +70,9 @@
|
||||
|
||||
},
|
||||
methods: {
|
||||
resetInfo() {
|
||||
this.keyword = ''
|
||||
},
|
||||
changeInput(e) {
|
||||
this.$emit('getQueryInfo', e)
|
||||
},
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
"navigationBarTitleText": "",
|
||||
"navigationBarTextStyle": "white",
|
||||
"navigationBarBackgroundColor": "#339967",
|
||||
"enablePullDownRefresh": false
|
||||
"enablePullDownRefresh": true
|
||||
}
|
||||
}, {
|
||||
"path": "pages/publish/publishTransfer/publishTransfer",
|
||||
|
||||
@@ -133,7 +133,7 @@
|
||||
|
||||
.hhr-text {
|
||||
margin-top: 28rpx;
|
||||
width: 186rpx;
|
||||
// width: 186rpx;
|
||||
height: 50rpx;
|
||||
font-size: 36rpx;
|
||||
font-family: PingFang-SC, PingFang-SC;
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
// }
|
||||
this.getShopList(q, "refresh")
|
||||
this.$refs.dropdown.resetInfo()
|
||||
|
||||
this.keyword = ''
|
||||
// }
|
||||
},
|
||||
onReachBottom() {
|
||||
@@ -90,6 +90,11 @@
|
||||
this.$api.getShopList(q).then(res => {
|
||||
this.shopListLength = res.data.data.length
|
||||
this.shopInfoList = res.data.data
|
||||
if (res.data.data.length == 0) {
|
||||
this.showNull = true
|
||||
} else {
|
||||
this.showNull = false
|
||||
}
|
||||
})
|
||||
},
|
||||
getShopList(q, type) {
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
// }
|
||||
this.getShopList(q, "refresh")
|
||||
this.$refs.dropdown.resetInfo()
|
||||
|
||||
this.keyword = ''
|
||||
// }
|
||||
},
|
||||
onReachBottom() {
|
||||
@@ -90,6 +90,11 @@
|
||||
this.$api.getShopList(q).then(res => {
|
||||
this.shopListLength = res.data.data.length
|
||||
this.shopInfoList = res.data.data
|
||||
if (res.data.data.length == 0) {
|
||||
this.showNull = true
|
||||
} else {
|
||||
this.showNull = false
|
||||
}
|
||||
})
|
||||
},
|
||||
getShopList(q, type) {
|
||||
|
||||
@@ -58,6 +58,7 @@
|
||||
// }
|
||||
this.getShopList(q, "refresh")
|
||||
this.$refs.dropdown.resetInfo()
|
||||
this.keyword = ''
|
||||
// }
|
||||
},
|
||||
onReachBottom() {
|
||||
@@ -88,6 +89,11 @@
|
||||
this.$api.getShopList(q).then(res => {
|
||||
this.searchListLength = res.data.data.length
|
||||
this.searchInfoList = res.data.data
|
||||
if (res.data.data.length == 0) {
|
||||
this.showNull = true
|
||||
} else {
|
||||
this.showNull = false
|
||||
}
|
||||
})
|
||||
},
|
||||
getShopList(q, type) {
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
// }
|
||||
this.getShopList(q, "refresh")
|
||||
this.$refs.dropdown.resetInfo()
|
||||
|
||||
this.keyword = ''
|
||||
// }
|
||||
},
|
||||
onReachBottom() {
|
||||
@@ -89,6 +89,11 @@
|
||||
this.$api.getShopList(q).then(res => {
|
||||
this.shopListLength = res.data.data.length
|
||||
this.shopInfoList = res.data.data
|
||||
if (res.data.data.length == 0) {
|
||||
this.showNull = true
|
||||
} else {
|
||||
this.showNull = false
|
||||
}
|
||||
})
|
||||
},
|
||||
getShopList(q, type) {
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<template>
|
||||
<view>
|
||||
<view class="sticky">
|
||||
<view class="search-bg sticky">
|
||||
<view class="search-box">
|
||||
<view class="search-box-input">
|
||||
<u-input placeholder="热门搜索" placeholder-style="color: #969696" prefixIcon="search"
|
||||
prefixIconStyle="font-size: 24px;color: #909399;" border="true">
|
||||
<u-input v-model="keyword" placeholder="请输入标题进行搜索" placeholder-style="color: #969696" prefixIcon="search"
|
||||
prefixIconStyle="font-size: 24px;color: #909399;" border="true" @change="getInput">
|
||||
</u-input>
|
||||
</view>
|
||||
</view>
|
||||
@@ -22,6 +22,10 @@
|
||||
@delItem="handleDel" @updateItem="handleUpdate4"></ShowShopList>
|
||||
<ShowShopList v-if="listId == 4" :showStyle="0" :shopInfoList="matchList"></ShowShopList>
|
||||
</view>
|
||||
<view v-if="showNull" class="showNull">
|
||||
<text>没有符合条件的数据, 请下拉刷新重置数据~
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
@@ -40,18 +44,84 @@
|
||||
pageNum: 1,
|
||||
matchPageSize: 5,
|
||||
matchPageNum: 1,
|
||||
keyword: '',
|
||||
refresh: false,
|
||||
showNull: false,
|
||||
}
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
this.refresh = true
|
||||
if (this.listId !== 4) {
|
||||
this.getMyPublished(this.listId + 1, this.pageSize, 1)
|
||||
} else {
|
||||
this.getMatch(this.matchPageSize, 1)
|
||||
}
|
||||
this.keyword = ''
|
||||
},
|
||||
onReachBottom() {
|
||||
if (this.listId !== 4 && this.searchListLength !== 0) {
|
||||
if (this.listId !== 4 && !this.refresh && this.searchListLength !== 0) {
|
||||
this.pageNum++
|
||||
this.getMyPublished(this.listId + 1, this.pageSize, this.pageNum)
|
||||
} else if (this.listId == 4 && this.matchListLength !== 0) {
|
||||
} else if (this.listId == 4 && !this.refresh &&this.matchListLength !== 0) {
|
||||
this.matchPageNum++
|
||||
this.getMatch()
|
||||
this.getMatch(this.matchPageSize, this.matchPageNum)
|
||||
} else if (this.searchListLength == 0) {
|
||||
this.pageNum = 1
|
||||
} else if (this.matchListLength == 0) {
|
||||
this.matchPageNum = 1
|
||||
}
|
||||
this.keyword = ''
|
||||
},
|
||||
methods: {
|
||||
getInput(val) {
|
||||
console.log('搜索值', val);
|
||||
|
||||
if (this.listId !== 4) {
|
||||
if (this.pageNum !== 1) {
|
||||
this.pageNum = 1
|
||||
}
|
||||
this.$api.getMyPublished({
|
||||
type: this.listId + 1,
|
||||
pageSize: this.pageSize,
|
||||
pageNum: this.pageNum,
|
||||
title: val
|
||||
}).then(res => {
|
||||
console.log('发布信息', res);
|
||||
if (res.data.code == 1) {
|
||||
this.searchListLength = res.data.data.length
|
||||
this.searchInfoList = res.data.data
|
||||
if (res.data.data.length == 0) {
|
||||
this.showNull = true
|
||||
} else {
|
||||
this.showNull = false
|
||||
}
|
||||
} else {
|
||||
uni.$u.toast(res.data.msg)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
if (this.matchPageNum !== 1) {
|
||||
this.matchPageNum = 1
|
||||
}
|
||||
this.$api.getMyMatch({
|
||||
pageSize: this.matchPageSize,
|
||||
pageNum: this.matchPageNum,
|
||||
title: val
|
||||
}).then(res => {
|
||||
if (res.data.code == 1) {
|
||||
this.matchListLength = res.data.data.length
|
||||
this.matchList = res.data.data[0]
|
||||
if (res.data.data.length == 0) {
|
||||
this.showNull = true
|
||||
} else {
|
||||
this.showNull = false
|
||||
}
|
||||
} else {
|
||||
uni.$u.toast(res.data.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
handleUpdate1(searchid) {
|
||||
console.log('页面更新');
|
||||
uni.navigateTo({
|
||||
@@ -106,14 +176,25 @@
|
||||
})
|
||||
|
||||
},
|
||||
getMatch() {
|
||||
getMatch(pageSize,pageNum) {
|
||||
this.$api.getMyMatch({
|
||||
pageSize: this.matchPageSize,
|
||||
pageNum: this.matchPageNum
|
||||
pageSize: pageSize,
|
||||
pageNum: pageNum
|
||||
}).then(res => {
|
||||
if (res.data.code == 1) {
|
||||
this.matchListLength = res.data.data.length
|
||||
if(this.refresh){
|
||||
this.refresh = false
|
||||
if (res.data.data.length == 0) {
|
||||
this.showNull = true
|
||||
} else {
|
||||
this.showNull = false
|
||||
}
|
||||
this.matchList = res.data.data[0]
|
||||
}else{
|
||||
this.matchList = [...this.matchList, ...res.data.data[0]]
|
||||
}
|
||||
uni.stopPullDownRefresh()
|
||||
} else {
|
||||
uni.$u.toast(res.data.msg)
|
||||
}
|
||||
@@ -125,14 +206,21 @@
|
||||
pageSize: pageSize,
|
||||
pageNum: pageNum
|
||||
}).then(res => {
|
||||
console.log('发布信息', res);
|
||||
console.log('发布信息l', res, res.data.data.length);
|
||||
if (res.data.code == 1) {
|
||||
this.searchListLength = res.data.data.length
|
||||
if (isDelete == 1) {
|
||||
if (isDelete == 1|| this.refresh) {
|
||||
this.searchInfoList = res.data.data
|
||||
this.refresh = false
|
||||
if (res.data.data.length == 0) {
|
||||
this.showNull = true
|
||||
} else {
|
||||
this.showNull = false
|
||||
}
|
||||
} else {
|
||||
this.searchInfoList = [...this.searchInfoList, ...res.data.data]
|
||||
}
|
||||
uni.stopPullDownRefresh()
|
||||
} else {
|
||||
uni.$u.toast(res.data.msg)
|
||||
}
|
||||
@@ -165,9 +253,8 @@
|
||||
|
||||
if (this.titletext == '我的匹配') {
|
||||
this.listId = 4
|
||||
this.getMatch()
|
||||
this.getMatch(this.matchPageSize, this.matchPageNum)
|
||||
}
|
||||
|
||||
},
|
||||
computed: {
|
||||
|
||||
@@ -176,6 +263,20 @@
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.showNull {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 100rpx;
|
||||
color: darkgray;
|
||||
}
|
||||
|
||||
.search-bg {
|
||||
height: 28px;
|
||||
padding-top: 20rpx;
|
||||
padding-bottom: 20rpx;
|
||||
}
|
||||
|
||||
.search-box {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
@@ -185,7 +286,6 @@
|
||||
|
||||
.search-box-input {
|
||||
border-radius: 12rpx;
|
||||
margin-top: 20rpx;
|
||||
background-color: #fff;
|
||||
opacity: 0.85;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<view class="root">
|
||||
<view class="sticky">
|
||||
<InputAndSwiper @getQueryInfo="getInput" :bannerURL="swiperList" :refresh="isRefresh"></InputAndSwiper>
|
||||
<InputAndSwiper @getQueryInfo="getInput" :bannerURL="swiperList" ref="input"></InputAndSwiper>
|
||||
<view class="marginLR10">
|
||||
<DropDown @getQueryInfo="getShopList" ref="dropdown" @cancelPageNum="cancelPageNum"></DropDown>
|
||||
</view>
|
||||
@@ -9,7 +9,6 @@
|
||||
<view class="marginLR10">
|
||||
<SearchShopList :showStyle="1" :searchInfoList="searchInfoList" />
|
||||
</view>
|
||||
|
||||
<view v-if="showNull" class="showNull">
|
||||
<text>没有符合条件的数据, 请下拉刷新重置数据~
|
||||
</text>
|
||||
@@ -33,12 +32,12 @@
|
||||
customQuery: {},
|
||||
searchListLength: '',
|
||||
showNull: false,
|
||||
refresh: false,
|
||||
isRefresh: false
|
||||
refresh: false
|
||||
}
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
this.refresh = true
|
||||
this.$refs.input.resetInfo()
|
||||
// if (this.showNull = true) {
|
||||
const q = this.$u.queryParams({
|
||||
type: 2,
|
||||
@@ -55,7 +54,7 @@
|
||||
},
|
||||
onReachBottom() {
|
||||
if (!this.refresh && this.searchListLength !== 0) {
|
||||
this.isRefresh = true
|
||||
this.$refs.input.resetInfo()
|
||||
this.pageNum++
|
||||
this.getShopList()
|
||||
console.log("触底加载");
|
||||
@@ -91,6 +90,11 @@
|
||||
this.$api.getShopList(q).then(res => {
|
||||
this.searchListLength = res.data.data.length
|
||||
this.searchInfoList = res.data.data
|
||||
if (res.data.data.length == 0) {
|
||||
this.showNull = true
|
||||
} else {
|
||||
this.showNull = false
|
||||
}
|
||||
})
|
||||
},
|
||||
getShopList(q, type) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<view class="root">
|
||||
<view class="sticky">
|
||||
<InputAndSwiper @getQueryInfo="getInput" :bannerURL="swiperList" :refresh="isRefresh">
|
||||
<InputAndSwiper @getQueryInfo="getInput" ref="input" :bannerURL="swiperList">
|
||||
</InputAndSwiper>
|
||||
<view class="marginLR10 ">
|
||||
<DropDown @getQueryInfo="getShopList" ref="dropdown" @cancelPageNum="cancelPageNum"></DropDown>
|
||||
@@ -9,17 +9,20 @@
|
||||
</view>
|
||||
<view class="marginLR10">
|
||||
<ShowShopList :showStyle="1" :shopInfoList="shopInfoList"></ShowShopList>
|
||||
</view>
|
||||
<view v-if="showNull" class="showNull">
|
||||
<text>没有符合条件的数据, 请下拉刷新重置数据~
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
<TabBar :current-page="1"></TabBar>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import DropDownItem from "@/components/DropDown/DropDownItem.vue"
|
||||
import {
|
||||
nextTick
|
||||
} from "vue"
|
||||
export default {
|
||||
components: {
|
||||
DropDownItem
|
||||
@@ -33,8 +36,7 @@
|
||||
swiperList: [],
|
||||
shopListLength: '',
|
||||
showNull: false,
|
||||
refresh: false,
|
||||
isRefresh: false
|
||||
refresh: false
|
||||
}
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
@@ -50,11 +52,12 @@
|
||||
// }
|
||||
this.getShopList(q, "refresh")
|
||||
this.$refs.dropdown.resetInfo()
|
||||
this.$refs.input.resetInfo()
|
||||
// }
|
||||
},
|
||||
onReachBottom() {
|
||||
if (!this.refresh && this.shopListLength !== 0) {
|
||||
this.isRefresh = true
|
||||
this.$refs.input.resetInfo()
|
||||
this.pageNum++
|
||||
this.getShopList()
|
||||
console.log("触底加载");
|
||||
@@ -90,6 +93,11 @@
|
||||
this.$api.getShopList(q).then(res => {
|
||||
this.shopListLength = res.data.data.length
|
||||
this.shopInfoList = res.data.data
|
||||
if (res.data.data.length == 0) {
|
||||
this.showNull = true
|
||||
} else {
|
||||
this.showNull = false
|
||||
}
|
||||
})
|
||||
},
|
||||
getShopList(q, type) {
|
||||
@@ -117,6 +125,7 @@
|
||||
console.log('查询');
|
||||
this.shopInfoList = [...this.shopInfoList, ...res.data.data]
|
||||
}
|
||||
|
||||
uni.stopPullDownRefresh()
|
||||
console.log(this.shopInfoList);
|
||||
})
|
||||
@@ -149,6 +158,9 @@
|
||||
justify-content: center;
|
||||
height: 100rpx;
|
||||
color: darkgray;
|
||||
// position: absolute;
|
||||
// top: 0;
|
||||
// background-color: red;
|
||||
}
|
||||
|
||||
.root {
|
||||
|
||||
Reference in New Issue
Block a user