From 045619b37a9840c890870d47ed90dcafa0015d4b Mon Sep 17 00:00:00 2001
From: aihe <961836564@qq.com>
Date: Wed, 6 Dec 2023 18:37:54 +0800
Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0tags=E3=80=81search=20?=
=?UTF-8?q?=E7=BB=84=E4=BB=B6?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
components/tpx-search/tpx-search.vue | 96 ++++++++++++++++++++
components/tpx-tags/tpx-tags.vue | 128 +++++++++++++++++++++++++++
pages/post/post.vue | 39 +++-----
pages/tabBar/search/search.vue | 71 +++++----------
4 files changed, 258 insertions(+), 76 deletions(-)
create mode 100644 components/tpx-search/tpx-search.vue
create mode 100644 components/tpx-tags/tpx-tags.vue
diff --git a/components/tpx-search/tpx-search.vue b/components/tpx-search/tpx-search.vue
new file mode 100644
index 0000000..d5a29c9
--- /dev/null
+++ b/components/tpx-search/tpx-search.vue
@@ -0,0 +1,96 @@
+
+
+
+
+
+ {{item.title}}
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/components/tpx-tags/tpx-tags.vue b/components/tpx-tags/tpx-tags.vue
new file mode 100644
index 0000000..32690bf
--- /dev/null
+++ b/components/tpx-tags/tpx-tags.vue
@@ -0,0 +1,128 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/post/post.vue b/pages/post/post.vue
index aaec3c8..bc16921 100644
--- a/pages/post/post.vue
+++ b/pages/post/post.vue
@@ -178,11 +178,7 @@
给快递员捎话
-
-
-
-
+
@@ -257,35 +253,20 @@
},
data() {
return {
- sendTypeList: [{
- title: '上门取件',
- val: 1
- },
- {
- title: '仓库收货',
- val: 2
- },
- {
- title: '整柜提货',
- val: 3
- }
+ sendTypeList: [
+ { title: '上门取件', val: 1 },
+ { title: '仓库收货', val: 2 },
+ { title: '整柜提货', val: 3 }
],
- tipsList: [{
- title: '请带纸箱',
- val: 3
- },
- {
- title: '需要爬楼',
- val: 3
- },
- {
- title: '来前电话',
- val: 3
- },
+ tipsList: [
+ { title: '请带纸箱', val: '请带纸箱' },
+ { title: '需要爬楼', val: '需要爬楼' },
+ { title: '来前电话', val: '来前电话' },
],
showCladar: false,
agreePrivateRule: false,
submitParam: {
+ tips: [],
type: 1,
otherDes: ''
}
diff --git a/pages/tabBar/search/search.vue b/pages/tabBar/search/search.vue
index ee9dca2..d7d8670 100644
--- a/pages/tabBar/search/search.vue
+++ b/pages/tabBar/search/search.vue
@@ -42,39 +42,18 @@
-
-
-
-
+
-
-
-
-
+
-
-
-
-
-
-
-
-
-
-
+
+
@@ -196,10 +175,7 @@
showSearchMore: false,
showCladar: false,
tmpSearchParam: {
- postStatus: '', // 快递状态
- payType: '', // 支付类型
- dateType: '', // 日期类型
- date: '' // 日期
+
},
ordList: [
{},{},{},{},{},{},{},{}
@@ -215,6 +191,7 @@
}
},
onLoad() {
+ this.initTmpSrchParam()
this.initData();
},
onUnload() {
@@ -228,8 +205,17 @@
uni.stopPullDownRefresh();
}, 300);
},
- setListData() {
-
+ initTmpSrchParam(){
+ this.tmpSearchParam = {
+ postStatus: [], // 快递状态
+ payType: [], // 支付类型
+ dateType: [], // 日期类型
+ date: '' // 日期
+ }
+ },
+ loadListData() {
+ // 请求列表数据 TODO
+ console.log('====this.searchParam===', this.searchParam)
},
onScrollBottom() {
@@ -238,15 +224,14 @@
return;
}
this.showLoadMore = true;
- setTimeout(() => {
- this.setListData();
- }, 300);
+ this.handleSearchParamChange();
},
handleSearchMoreBtn(){
if(!this.showLoadMore) {
// 回显更多条件
Object.keys(this.tmpSearchParam).map(t=> {
- this.tmpSearchParam[t] = this.searchParam[t] || ''
+ const val = this.searchParam[t]
+ typeof val != 'undefined' && (this.tmpSearchParam[t] = val)
})
}
this.showSearchMore = !this.showSearchMore
@@ -255,7 +240,7 @@
if(key) {
this.searchParam[key] = val
}
-
+ this.loadListData()
},
async handleDealItem(item, deal = { type: '1' }) {
switch (deal.type){
@@ -275,28 +260,20 @@
}
},
handleResetTempSearch(){
- Object.keys(this.tmpSearchParam).map(t=> {
- this.tmpSearchParam[t] = ''
- })
+ this.initTmpSrchParam()
},
handleConfirmTempSearch(){
Object.assign(this.searchParam, this.tmpSearchParam)
- // Object.keys(this.tmpSearchParam).map(t=> {
- // this.searchParam[t] = this.tmpSearchParam[t]
- // })
- },
- handleCheckBoxClick(item, key){
- item.checked = !item.checked
+ this.showSearchMore = false
+ this.handleSearchParamChange();
},
handleCheckDate(item) {
let newVal = item.val
if(newVal == dateTypeEnum.custom) {
this.handleSwitchCladar()
} else {
- newVal == this.tmpSearchParam.dateType && (newVal = '')
this.tmpSearchParam.date = ''
}
- this.tmpSearchParam.dateType = newVal
},
handleClaOk(res){
const ary = Object.values(res)