邓洁 : 修改搜索细节
This commit is contained in:
@@ -53,14 +53,14 @@
|
|||||||
options: {
|
options: {
|
||||||
styleIsolation: 'shared', // 解除样式隔离
|
styleIsolation: 'shared', // 解除样式隔离
|
||||||
},
|
},
|
||||||
watch: {
|
// watch: {
|
||||||
refresh(newVal, oldVal) {
|
// refresh(newVal, oldVal) {
|
||||||
console.log('newVal', newVal);
|
// console.log('newVal', newVal);
|
||||||
if (newVal) {
|
// // if (newVal) {
|
||||||
this.keyword = ''
|
// this.keyword = ''
|
||||||
}
|
// // }
|
||||||
}
|
// }
|
||||||
},
|
// },
|
||||||
onShow() {
|
onShow() {
|
||||||
if (this.type !== '0') {
|
if (this.type !== '0') {
|
||||||
this.open()
|
this.open()
|
||||||
@@ -70,6 +70,9 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
resetInfo() {
|
||||||
|
this.keyword = ''
|
||||||
|
},
|
||||||
changeInput(e) {
|
changeInput(e) {
|
||||||
this.$emit('getQueryInfo', e)
|
this.$emit('getQueryInfo', e)
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -71,7 +71,7 @@
|
|||||||
"navigationBarTitleText": "",
|
"navigationBarTitleText": "",
|
||||||
"navigationBarTextStyle": "white",
|
"navigationBarTextStyle": "white",
|
||||||
"navigationBarBackgroundColor": "#339967",
|
"navigationBarBackgroundColor": "#339967",
|
||||||
"enablePullDownRefresh": false
|
"enablePullDownRefresh": true
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
"path": "pages/publish/publishTransfer/publishTransfer",
|
"path": "pages/publish/publishTransfer/publishTransfer",
|
||||||
|
|||||||
@@ -27,163 +27,163 @@
|
|||||||
<rich-text :nodes="content"></rich-text>
|
<rich-text :nodes="content"></rich-text>
|
||||||
</u-modal>
|
</u-modal>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
color: '#CC3333',
|
color: '#CC3333',
|
||||||
btnText: '提交审核',
|
btnText: '提交审核',
|
||||||
member: '',
|
member: '',
|
||||||
show: false,
|
show: false,
|
||||||
disabled: false,
|
disabled: false,
|
||||||
btnDisabled: false,
|
btnDisabled: false,
|
||||||
content: `申请已提交, 请等待后台审核`,
|
content: `申请已提交, 请等待后台审核`,
|
||||||
submitForm: {
|
submitForm: {
|
||||||
real_name: '',
|
real_name: '',
|
||||||
idcard: ''
|
idcard: ''
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
},
|
|
||||||
onShow() {
|
|
||||||
this.getInfo()
|
|
||||||
},
|
|
||||||
methods: {
|
|
||||||
getInfo() {
|
|
||||||
this.$api.getUser().then(res => {
|
|
||||||
var data = res.data.data
|
|
||||||
if (data) {
|
|
||||||
this.member = data.member
|
|
||||||
if (data.member == 1) {
|
|
||||||
this.disabled = true
|
|
||||||
this.btnDisabled = true
|
|
||||||
this.color = "#C6C6C6"
|
|
||||||
this.btnText = "审核中…"
|
|
||||||
}
|
|
||||||
// else if (data.member == 2) {
|
|
||||||
// this.disabled = false
|
|
||||||
// this.btnDisabled = false
|
|
||||||
// this.color = "#CC3333"
|
|
||||||
// this.btnText = "联系客服"
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
confirm() {
|
onShow() {
|
||||||
uni.reLaunch({
|
this.getInfo()
|
||||||
url: '/pages/my/my'
|
|
||||||
})
|
|
||||||
// if (this.needAsk == 1) {
|
|
||||||
// uni.reLaunch({
|
|
||||||
// url: '/pages/index/index'
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
},
|
},
|
||||||
submit() {
|
methods: {
|
||||||
if (this.member == 0) {
|
getInfo() {
|
||||||
let reg =
|
this.$api.getUser().then(res => {
|
||||||
/^[1-9]\d{5}(18|19|20|(3\d))\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/; //正则表达式定义身份证号正确格式
|
var data = res.data.data
|
||||||
if (!reg.test(this.submitForm.idcard)) { //判断身份证号格式时候正确
|
if (data) {
|
||||||
this.$toast.warn('请输入正确的身份证号格式')
|
this.member = data.member
|
||||||
return false
|
if (data.member == 1) {
|
||||||
}
|
this.disabled = true
|
||||||
if (this.submitForm.real_name == "") {
|
this.btnDisabled = true
|
||||||
this.$toast.warn('请完善数据')
|
this.color = "#C6C6C6"
|
||||||
return false
|
this.btnText = "审核中…"
|
||||||
}
|
|
||||||
if (this.submitForm.real_name && this.submitForm.idcard) {
|
|
||||||
let data = {
|
|
||||||
...this.submitForm,
|
|
||||||
uid: uni.getStorageSync('uid')
|
|
||||||
}
|
|
||||||
console.log('成', data);
|
|
||||||
this.$api.toBePartner(data).then(res => {
|
|
||||||
if (res.data.msg == "提交成功") {
|
|
||||||
this.show = true
|
|
||||||
}
|
}
|
||||||
})
|
// else if (data.member == 2) {
|
||||||
|
// this.disabled = false
|
||||||
|
// this.btnDisabled = false
|
||||||
|
// this.color = "#CC3333"
|
||||||
|
// this.btnText = "联系客服"
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
confirm() {
|
||||||
|
uni.reLaunch({
|
||||||
|
url: '/pages/my/my'
|
||||||
|
})
|
||||||
|
// if (this.needAsk == 1) {
|
||||||
|
// uni.reLaunch({
|
||||||
|
// url: '/pages/index/index'
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
},
|
||||||
|
submit() {
|
||||||
|
if (this.member == 0) {
|
||||||
|
let reg =
|
||||||
|
/^[1-9]\d{5}(18|19|20|(3\d))\d{2}((0[1-9])|(1[0-2]))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/; //正则表达式定义身份证号正确格式
|
||||||
|
if (!reg.test(this.submitForm.idcard)) { //判断身份证号格式时候正确
|
||||||
|
this.$toast.warn('请输入正确的身份证号格式')
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
if (this.submitForm.real_name == "") {
|
||||||
|
this.$toast.warn('请完善数据')
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
if (this.submitForm.real_name && this.submitForm.idcard) {
|
||||||
|
let data = {
|
||||||
|
...this.submitForm,
|
||||||
|
uid: uni.getStorageSync('uid')
|
||||||
|
}
|
||||||
|
console.log('成', data);
|
||||||
|
this.$api.toBePartner(data).then(res => {
|
||||||
|
if (res.data.msg == "提交成功") {
|
||||||
|
this.show = true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
} else if (this.member == 2) {
|
||||||
|
console.log('联系客服');
|
||||||
}
|
}
|
||||||
} else if (this.member == 2) {
|
|
||||||
console.log('联系客服');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
</script>
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.service-btn {
|
.service-btn {
|
||||||
height: 40px;
|
height: 40px;
|
||||||
background-color: #CC3333;
|
background-color: #CC3333;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
border-radius: 25px;
|
border-radius: 25px;
|
||||||
|
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
}
|
|
||||||
|
|
||||||
.hhr {
|
|
||||||
margin-top: 50rpx;
|
|
||||||
margin-bottom: 50rpx;
|
|
||||||
width: 100%;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
|
|
||||||
.hhr-text {
|
|
||||||
margin-top: 28rpx;
|
|
||||||
width: 186rpx;
|
|
||||||
height: 50rpx;
|
|
||||||
font-size: 36rpx;
|
|
||||||
font-family: PingFang-SC, PingFang-SC;
|
|
||||||
font-weight: 800;
|
|
||||||
color: #F20C0C;
|
|
||||||
line-height: 50rpx;
|
|
||||||
letter-spacing: 1px;
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
.u-modal__button-group__wrapper--hover {
|
.hhr {
|
||||||
background: #0EBB5B !important;
|
margin-top: 50rpx;
|
||||||
}
|
margin-bottom: 50rpx;
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
.input-class {
|
.hhr-text {
|
||||||
font-weight: 1rpx;
|
margin-top: 28rpx;
|
||||||
color: #A0A0A0;
|
// width: 186rpx;
|
||||||
}
|
height: 50rpx;
|
||||||
|
font-size: 36rpx;
|
||||||
|
font-family: PingFang-SC, PingFang-SC;
|
||||||
|
font-weight: 800;
|
||||||
|
color: #F20C0C;
|
||||||
|
line-height: 50rpx;
|
||||||
|
letter-spacing: 1px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.submit-btn {
|
.u-modal__button-group__wrapper--hover {
|
||||||
width: 80%;
|
background: #0EBB5B !important;
|
||||||
margin-top: 50rpx;
|
}
|
||||||
translate: 10%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.name,
|
.input-class {
|
||||||
.id {
|
font-weight: 1rpx;
|
||||||
padding: 10rpx;
|
color: #A0A0A0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.text {
|
.submit-btn {
|
||||||
margin-left: 20rpx;
|
width: 80%;
|
||||||
}
|
margin-top: 50rpx;
|
||||||
|
translate: 10%;
|
||||||
|
}
|
||||||
|
|
||||||
.payment {
|
.name,
|
||||||
margin-top: 20rpx;
|
.id {
|
||||||
display: flex;
|
padding: 10rpx;
|
||||||
justify-content: space-between;
|
}
|
||||||
|
|
||||||
}
|
.text {
|
||||||
|
margin-left: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
.left-payment {
|
.payment {
|
||||||
display: flex;
|
margin-top: 20rpx;
|
||||||
flex-direction: column;
|
display: flex;
|
||||||
}
|
justify-content: space-between;
|
||||||
|
|
||||||
.label {
|
}
|
||||||
margin-top: 10rpx;
|
|
||||||
margin-left: 17rpx;
|
.left-payment {
|
||||||
color: #c1c1c1;
|
display: flex;
|
||||||
/* font-size: 27rpx; */
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
</style>
|
|
||||||
|
.label {
|
||||||
|
margin-top: 10rpx;
|
||||||
|
margin-left: 17rpx;
|
||||||
|
color: #c1c1c1;
|
||||||
|
/* font-size: 27rpx; */
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -59,7 +59,7 @@
|
|||||||
// }
|
// }
|
||||||
this.getShopList(q, "refresh")
|
this.getShopList(q, "refresh")
|
||||||
this.$refs.dropdown.resetInfo()
|
this.$refs.dropdown.resetInfo()
|
||||||
|
this.keyword = ''
|
||||||
// }
|
// }
|
||||||
},
|
},
|
||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
@@ -90,6 +90,11 @@
|
|||||||
this.$api.getShopList(q).then(res => {
|
this.$api.getShopList(q).then(res => {
|
||||||
this.shopListLength = res.data.data.length
|
this.shopListLength = res.data.data.length
|
||||||
this.shopInfoList = res.data.data
|
this.shopInfoList = res.data.data
|
||||||
|
if (res.data.data.length == 0) {
|
||||||
|
this.showNull = true
|
||||||
|
} else {
|
||||||
|
this.showNull = false
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getShopList(q, type) {
|
getShopList(q, type) {
|
||||||
|
|||||||
@@ -59,7 +59,7 @@
|
|||||||
// }
|
// }
|
||||||
this.getShopList(q, "refresh")
|
this.getShopList(q, "refresh")
|
||||||
this.$refs.dropdown.resetInfo()
|
this.$refs.dropdown.resetInfo()
|
||||||
|
this.keyword = ''
|
||||||
// }
|
// }
|
||||||
},
|
},
|
||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
@@ -90,6 +90,11 @@
|
|||||||
this.$api.getShopList(q).then(res => {
|
this.$api.getShopList(q).then(res => {
|
||||||
this.shopListLength = res.data.data.length
|
this.shopListLength = res.data.data.length
|
||||||
this.shopInfoList = res.data.data
|
this.shopInfoList = res.data.data
|
||||||
|
if (res.data.data.length == 0) {
|
||||||
|
this.showNull = true
|
||||||
|
} else {
|
||||||
|
this.showNull = false
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getShopList(q, type) {
|
getShopList(q, type) {
|
||||||
|
|||||||
@@ -58,6 +58,7 @@
|
|||||||
// }
|
// }
|
||||||
this.getShopList(q, "refresh")
|
this.getShopList(q, "refresh")
|
||||||
this.$refs.dropdown.resetInfo()
|
this.$refs.dropdown.resetInfo()
|
||||||
|
this.keyword = ''
|
||||||
// }
|
// }
|
||||||
},
|
},
|
||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
@@ -88,6 +89,11 @@
|
|||||||
this.$api.getShopList(q).then(res => {
|
this.$api.getShopList(q).then(res => {
|
||||||
this.searchListLength = res.data.data.length
|
this.searchListLength = res.data.data.length
|
||||||
this.searchInfoList = res.data.data
|
this.searchInfoList = res.data.data
|
||||||
|
if (res.data.data.length == 0) {
|
||||||
|
this.showNull = true
|
||||||
|
} else {
|
||||||
|
this.showNull = false
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getShopList(q, type) {
|
getShopList(q, type) {
|
||||||
|
|||||||
@@ -58,7 +58,7 @@
|
|||||||
// }
|
// }
|
||||||
this.getShopList(q, "refresh")
|
this.getShopList(q, "refresh")
|
||||||
this.$refs.dropdown.resetInfo()
|
this.$refs.dropdown.resetInfo()
|
||||||
|
this.keyword = ''
|
||||||
// }
|
// }
|
||||||
},
|
},
|
||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
@@ -89,6 +89,11 @@
|
|||||||
this.$api.getShopList(q).then(res => {
|
this.$api.getShopList(q).then(res => {
|
||||||
this.shopListLength = res.data.data.length
|
this.shopListLength = res.data.data.length
|
||||||
this.shopInfoList = res.data.data
|
this.shopInfoList = res.data.data
|
||||||
|
if (res.data.data.length == 0) {
|
||||||
|
this.showNull = true
|
||||||
|
} else {
|
||||||
|
this.showNull = false
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getShopList(q, type) {
|
getShopList(q, type) {
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<view class="sticky">
|
<view class="search-bg sticky">
|
||||||
<view class="search-box">
|
<view class="search-box">
|
||||||
<view class="search-box-input">
|
<view class="search-box-input">
|
||||||
<u-input placeholder="热门搜索" placeholder-style="color: #969696" prefixIcon="search"
|
<u-input v-model="keyword" placeholder="请输入标题进行搜索" placeholder-style="color: #969696" prefixIcon="search"
|
||||||
prefixIconStyle="font-size: 24px;color: #909399;" border="true">
|
prefixIconStyle="font-size: 24px;color: #909399;" border="true" @change="getInput">
|
||||||
</u-input>
|
</u-input>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -22,6 +22,10 @@
|
|||||||
@delItem="handleDel" @updateItem="handleUpdate4"></ShowShopList>
|
@delItem="handleDel" @updateItem="handleUpdate4"></ShowShopList>
|
||||||
<ShowShopList v-if="listId == 4" :showStyle="0" :shopInfoList="matchList"></ShowShopList>
|
<ShowShopList v-if="listId == 4" :showStyle="0" :shopInfoList="matchList"></ShowShopList>
|
||||||
</view>
|
</view>
|
||||||
|
<view v-if="showNull" class="showNull">
|
||||||
|
<text>没有符合条件的数据, 请下拉刷新重置数据~
|
||||||
|
</text>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -40,18 +44,79 @@
|
|||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
matchPageSize: 5,
|
matchPageSize: 5,
|
||||||
matchPageNum: 1,
|
matchPageNum: 1,
|
||||||
|
keyword: '',
|
||||||
|
refresh: false,
|
||||||
|
showNull: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
onPullDownRefresh() {
|
||||||
|
console.log('this.listId', this.listId);
|
||||||
|
this.refresh = true
|
||||||
|
if (this.listId !== 4) {
|
||||||
|
this.getMyPublished(this.listId + 1, this.pageSize, this.pageNum)
|
||||||
|
} else {
|
||||||
|
this.getMatch()
|
||||||
|
}
|
||||||
|
this.keyword = ''
|
||||||
|
},
|
||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
if (this.listId !== 4 && this.searchListLength !== 0) {
|
if (this.listId !== 4 && !this.refresh && this.searchListLength !== 0) {
|
||||||
this.pageNum++
|
this.pageNum++
|
||||||
this.getMyPublished(this.listId + 1, this.pageSize, 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.matchListLength !== 0) {
|
||||||
this.matchPageNum++
|
this.matchPageNum++
|
||||||
this.getMatch()
|
this.getMatch()
|
||||||
|
} else if (this.searchListLength == 0) {
|
||||||
|
this.pageNum = 1
|
||||||
}
|
}
|
||||||
|
this.keyword = ''
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getInput(val) {
|
||||||
|
console.log('搜索值', val);
|
||||||
|
if (this.pageNum !== 1) {
|
||||||
|
this.pageNum = 1
|
||||||
|
}
|
||||||
|
if (this.listId !== 4) {
|
||||||
|
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 {
|
||||||
|
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) {
|
handleUpdate1(searchid) {
|
||||||
console.log('页面更新');
|
console.log('页面更新');
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
@@ -114,6 +179,7 @@
|
|||||||
if (res.data.code == 1) {
|
if (res.data.code == 1) {
|
||||||
this.matchListLength = res.data.data.length
|
this.matchListLength = res.data.data.length
|
||||||
this.matchList = [...this.matchList, ...res.data.data[0]]
|
this.matchList = [...this.matchList, ...res.data.data[0]]
|
||||||
|
uni.stopPullDownRefresh()
|
||||||
} else {
|
} else {
|
||||||
uni.$u.toast(res.data.msg)
|
uni.$u.toast(res.data.msg)
|
||||||
}
|
}
|
||||||
@@ -125,14 +191,21 @@
|
|||||||
pageSize: pageSize,
|
pageSize: pageSize,
|
||||||
pageNum: pageNum
|
pageNum: pageNum
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
console.log('发布信息', res);
|
console.log('发布信息l', res, res.data.data.length);
|
||||||
if (res.data.code == 1) {
|
if (res.data.code == 1) {
|
||||||
this.searchListLength = res.data.data.length
|
this.searchListLength = res.data.data.length
|
||||||
if (isDelete == 1) {
|
if (isDelete == 1) {
|
||||||
this.searchInfoList = res.data.data
|
this.searchInfoList = res.data.data
|
||||||
|
this.refresh = false
|
||||||
|
if (res.data.data.length == 0) {
|
||||||
|
this.showNull = true
|
||||||
|
} else {
|
||||||
|
this.showNull = false
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
this.searchInfoList = [...this.searchInfoList, ...res.data.data]
|
this.searchInfoList = [...this.searchInfoList, ...res.data.data]
|
||||||
}
|
}
|
||||||
|
uni.stopPullDownRefresh()
|
||||||
} else {
|
} else {
|
||||||
uni.$u.toast(res.data.msg)
|
uni.$u.toast(res.data.msg)
|
||||||
}
|
}
|
||||||
@@ -176,6 +249,20 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<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 {
|
.search-box {
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
@@ -185,7 +272,6 @@
|
|||||||
|
|
||||||
.search-box-input {
|
.search-box-input {
|
||||||
border-radius: 12rpx;
|
border-radius: 12rpx;
|
||||||
margin-top: 20rpx;
|
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
opacity: 0.85;
|
opacity: 0.85;
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="root">
|
<view class="root">
|
||||||
<view class="sticky">
|
<view class="sticky">
|
||||||
<InputAndSwiper @getQueryInfo="getInput" :bannerURL="swiperList" :refresh="isRefresh"></InputAndSwiper>
|
<InputAndSwiper @getQueryInfo="getInput" :bannerURL="swiperList" ref="input"></InputAndSwiper>
|
||||||
<view class="marginLR10">
|
<view class="marginLR10">
|
||||||
<DropDown @getQueryInfo="getShopList" ref="dropdown" @cancelPageNum="cancelPageNum"></DropDown>
|
<DropDown @getQueryInfo="getShopList" ref="dropdown" @cancelPageNum="cancelPageNum"></DropDown>
|
||||||
</view>
|
</view>
|
||||||
@@ -9,7 +9,6 @@
|
|||||||
<view class="marginLR10">
|
<view class="marginLR10">
|
||||||
<SearchShopList :showStyle="1" :searchInfoList="searchInfoList" />
|
<SearchShopList :showStyle="1" :searchInfoList="searchInfoList" />
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view v-if="showNull" class="showNull">
|
<view v-if="showNull" class="showNull">
|
||||||
<text>没有符合条件的数据, 请下拉刷新重置数据~
|
<text>没有符合条件的数据, 请下拉刷新重置数据~
|
||||||
</text>
|
</text>
|
||||||
@@ -33,12 +32,12 @@
|
|||||||
customQuery: {},
|
customQuery: {},
|
||||||
searchListLength: '',
|
searchListLength: '',
|
||||||
showNull: false,
|
showNull: false,
|
||||||
refresh: false,
|
refresh: false
|
||||||
isRefresh: false
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onPullDownRefresh() {
|
onPullDownRefresh() {
|
||||||
this.refresh = true
|
this.refresh = true
|
||||||
|
this.$refs.input.resetInfo()
|
||||||
// if (this.showNull = true) {
|
// if (this.showNull = true) {
|
||||||
const q = this.$u.queryParams({
|
const q = this.$u.queryParams({
|
||||||
type: 2,
|
type: 2,
|
||||||
@@ -55,7 +54,7 @@
|
|||||||
},
|
},
|
||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
if (!this.refresh && this.searchListLength !== 0) {
|
if (!this.refresh && this.searchListLength !== 0) {
|
||||||
this.isRefresh = true
|
this.$refs.input.resetInfo()
|
||||||
this.pageNum++
|
this.pageNum++
|
||||||
this.getShopList()
|
this.getShopList()
|
||||||
console.log("触底加载");
|
console.log("触底加载");
|
||||||
@@ -91,6 +90,11 @@
|
|||||||
this.$api.getShopList(q).then(res => {
|
this.$api.getShopList(q).then(res => {
|
||||||
this.searchListLength = res.data.data.length
|
this.searchListLength = res.data.data.length
|
||||||
this.searchInfoList = res.data.data
|
this.searchInfoList = res.data.data
|
||||||
|
if (res.data.data.length == 0) {
|
||||||
|
this.showNull = true
|
||||||
|
} else {
|
||||||
|
this.showNull = false
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getShopList(q, type) {
|
getShopList(q, type) {
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<view class="root">
|
<view class="root">
|
||||||
<view class="sticky">
|
<view class="sticky">
|
||||||
<InputAndSwiper @getQueryInfo="getInput" :bannerURL="swiperList" :refresh="isRefresh">
|
<InputAndSwiper @getQueryInfo="getInput" ref="input" :bannerURL="swiperList">
|
||||||
</InputAndSwiper>
|
</InputAndSwiper>
|
||||||
<view class="marginLR10 ">
|
<view class="marginLR10 ">
|
||||||
<DropDown @getQueryInfo="getShopList" ref="dropdown" @cancelPageNum="cancelPageNum"></DropDown>
|
<DropDown @getQueryInfo="getShopList" ref="dropdown" @cancelPageNum="cancelPageNum"></DropDown>
|
||||||
@@ -9,10 +9,10 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="marginLR10">
|
<view class="marginLR10">
|
||||||
<ShowShopList :showStyle="1" :shopInfoList="shopInfoList"></ShowShopList>
|
<ShowShopList :showStyle="1" :shopInfoList="shopInfoList"></ShowShopList>
|
||||||
</view>
|
<view v-if="showNull" class="showNull">
|
||||||
<view v-if="showNull" class="showNull">
|
<text>没有符合条件的数据, 请下拉刷新重置数据~
|
||||||
<text>没有符合条件的数据, 请下拉刷新重置数据~
|
</text>
|
||||||
</text>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<TabBar :current-page="1"></TabBar>
|
<TabBar :current-page="1"></TabBar>
|
||||||
</view>
|
</view>
|
||||||
@@ -20,6 +20,9 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import DropDownItem from "@/components/DropDown/DropDownItem.vue"
|
import DropDownItem from "@/components/DropDown/DropDownItem.vue"
|
||||||
|
import {
|
||||||
|
nextTick
|
||||||
|
} from "vue"
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
DropDownItem
|
DropDownItem
|
||||||
@@ -33,8 +36,7 @@
|
|||||||
swiperList: [],
|
swiperList: [],
|
||||||
shopListLength: '',
|
shopListLength: '',
|
||||||
showNull: false,
|
showNull: false,
|
||||||
refresh: false,
|
refresh: false
|
||||||
isRefresh: false
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onPullDownRefresh() {
|
onPullDownRefresh() {
|
||||||
@@ -50,11 +52,12 @@
|
|||||||
// }
|
// }
|
||||||
this.getShopList(q, "refresh")
|
this.getShopList(q, "refresh")
|
||||||
this.$refs.dropdown.resetInfo()
|
this.$refs.dropdown.resetInfo()
|
||||||
|
this.$refs.input.resetInfo()
|
||||||
// }
|
// }
|
||||||
},
|
},
|
||||||
onReachBottom() {
|
onReachBottom() {
|
||||||
if (!this.refresh && this.shopListLength !== 0) {
|
if (!this.refresh && this.shopListLength !== 0) {
|
||||||
this.isRefresh = true
|
this.$refs.input.resetInfo()
|
||||||
this.pageNum++
|
this.pageNum++
|
||||||
this.getShopList()
|
this.getShopList()
|
||||||
console.log("触底加载");
|
console.log("触底加载");
|
||||||
@@ -90,6 +93,11 @@
|
|||||||
this.$api.getShopList(q).then(res => {
|
this.$api.getShopList(q).then(res => {
|
||||||
this.shopListLength = res.data.data.length
|
this.shopListLength = res.data.data.length
|
||||||
this.shopInfoList = res.data.data
|
this.shopInfoList = res.data.data
|
||||||
|
if (res.data.data.length == 0) {
|
||||||
|
this.showNull = true
|
||||||
|
} else {
|
||||||
|
this.showNull = false
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
getShopList(q, type) {
|
getShopList(q, type) {
|
||||||
@@ -117,6 +125,7 @@
|
|||||||
console.log('查询');
|
console.log('查询');
|
||||||
this.shopInfoList = [...this.shopInfoList, ...res.data.data]
|
this.shopInfoList = [...this.shopInfoList, ...res.data.data]
|
||||||
}
|
}
|
||||||
|
|
||||||
uni.stopPullDownRefresh()
|
uni.stopPullDownRefresh()
|
||||||
console.log(this.shopInfoList);
|
console.log(this.shopInfoList);
|
||||||
})
|
})
|
||||||
@@ -149,6 +158,9 @@
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
height: 100rpx;
|
height: 100rpx;
|
||||||
color: darkgray;
|
color: darkgray;
|
||||||
|
// position: absolute;
|
||||||
|
// top: 0;
|
||||||
|
// background-color: red;
|
||||||
}
|
}
|
||||||
|
|
||||||
.root {
|
.root {
|
||||||
|
|||||||
Reference in New Issue
Block a user