From 378be0587ca8dcef3bb357e4f64e74823ea27be9 Mon Sep 17 00:00:00 2001
From: aihe <961836564@qq.com>
Date: Mon, 4 Dec 2023 16:14:24 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
common/untool.js | 31 +++-
pages/post/post.vue | 328 +--------------------------------
pages/tabBar/search/search.vue | 29 +--
static/images/post/gangbo.png | Bin 0 -> 1232 bytes
4 files changed, 43 insertions(+), 345 deletions(-)
create mode 100644 static/images/post/gangbo.png
diff --git a/common/untool.js b/common/untool.js
index 3998368..48779aa 100644
--- a/common/untool.js
+++ b/common/untool.js
@@ -31,8 +31,37 @@ const reLaunch = (opt = {})=> {
}
+const setClipboardData = (val)=> {
+ uni.setClipboardData({
+ data: val,
+ success: () => {
+ uni.showToast({ title: "复制成功", icon: 'none' })
+ },
+ })
+}
+
+const confirmModal = (title) => {
+ return new Promise((resolve)=> {
+ uni.showModal({ content: title, confirmColor: '#B12D29' }).then((res)=> {
+ if(res.confirm) {
+ resolve()
+ }
+ })
+ })
+}
+
+const showLoading = ()=> {
+ uni.showLoading({
+ mask: true,
+ title: '加载中'
+ });
+}
+
export {
reLaunch,
goto,
- goBack
+ goBack,
+ setClipboardData,
+ confirmModal,
+ showLoading,
}
diff --git a/pages/post/post.vue b/pages/post/post.vue
index a940f93..6004535 100644
--- a/pages/post/post.vue
+++ b/pages/post/post.vue
@@ -1,176 +1,8 @@
-
-
-
-
-
- { handleSearchParamChange() }" :show-action="false">
-
-
-
-
-
-
-
-
- {{orsItem.title}}
- (0)
-
-
-
-
-
-
-
-
-
- {{hasExtSchParam?'已':''}}筛选
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 进仓确认
- 再来一单
-
- 取消
- 去付款
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ 啊实打实
-
@@ -184,30 +16,11 @@
// }
},
computed: {
- hasExtSchParam() {
- return Object.values(this.tmpSearchParam).filter(v=> !!v).length > 0
- },
+
},
data() {
return {
- ...JSON.parse(JSON.stringify({ ordStaEnum, ordStatusList, payTypeEnum, payTypeList, dlvTypeEnum, dlvTypeList, dateTypeEnum, dateTypeList })),
- searchParam: {
- keyword: '',
- ordStatus: 1 // 订单状态, 1:寄件; 2:收件; 3:待付款;
- },
- showSearchMore: false,
- showCladar: false,
- tmpSearchParam: {
- postStatus: '', // 快递状态
- payType: '', // 支付类型
- dateType: '', // 日期类型
- date: '' // 日期
- },
- ordList: [
- {},{},{},{},{},{},{},{}
- ],
- showLoadMore: false,
- loadedAll: false
+ showCladar: false
}
},
onShareAppMessage() {
@@ -220,8 +33,7 @@
this.initData();
},
onUnload() {
- this.ordList = [],
- this.showLoadMore = false;
+
},
methods: {
getCdnUrl,
@@ -230,101 +42,11 @@
// uni.showLoading({
// title: '加载中'
// });
- setTimeout(() => {
-
- uni.stopPullDownRefresh();
- }, 300);
- },
- setListData() {
-
- },
-
- onScrollBottom() {
- console.log("onScrollBottom");
- if (this.loadedAll) {
- return;
- }
- this.showLoadMore = true;
- setTimeout(() => {
- this.setListData();
- }, 300);
- },
- handleSearchMoreBtn(){
- if(!this.showLoadMore) {
- // 回显更多条件
- Object.keys(this.tmpSearchParam).map(t=> {
- this.tmpSearchParam[t] = this.searchParam[t] || ''
- })
- }
- this.showSearchMore = !this.showSearchMore
- },
- handleSearchParamChange(key, val) {
- this.searchParam[key] = val
- },
- handleDealItem(item, deal = { type: '1' }) {
- switch (deal.type){
- case 1: // 跳转
- break;
- case 2: // 复制订单号
- uni.setClipboardData({
- data: "xxxxxxxxx",
- success: () => {
- uni.showToast({ title: "复制成功" })
- },
- })
- break;
- case 3: // 删除
- uni.showModal({ content: "确认要删除吗?", }).then((res)=> {
- if(res.confirm) {
-
- }
- })
- break;
- case 4: // 取消
- uni.showModal({ content: "确认要取消吗?", }).then((res)=> {
- if(res.confirm) {
-
- }
- })
- break;
- default:
- break;
- }
- },
- handleResetTempSearch(){
- Object.keys(this.tmpSearchParam).map(t=> {
- this.tmpSearchParam[t] = ''
- })
- },
- 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
- },
- 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)
- const val = [ary[0], ary[ary.length-1]].join("~")
- this.handleSwitchCladar()
- this.tmpSearchParam.date = val
},
handleSwitchCladar() {
this.showCladar = !this.showCladar
if(!this.showCladar) {
- !this.tmpSearchParam.date && (this.tmpSearchParam.dateType = '')
+
}
}
}
@@ -341,41 +63,5 @@
\ No newline at end of file
diff --git a/pages/tabBar/search/search.vue b/pages/tabBar/search/search.vue
index 6860dac..f5b14fa 100644
--- a/pages/tabBar/search/search.vue
+++ b/pages/tabBar/search/search.vue
@@ -174,6 +174,7 @@