From 03f26e9257af4db60f00f11b2ecd301d15cc3e1f Mon Sep 17 00:00:00 2001 From: evoxwht <442384644@qq.com> Date: Wed, 28 Jun 2023 09:57:14 +0800 Subject: [PATCH 01/12] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=9B=BE=E7=89=87?= =?UTF-8?q?=E5=88=86=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/v1/file/SystemAttachmentCategory.php | 6 +++++- .../attachment/SystemAttachmentCategoryServices.php | 10 ++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/crmeb/app/adminapi/controller/v1/file/SystemAttachmentCategory.php b/crmeb/app/adminapi/controller/v1/file/SystemAttachmentCategory.php index c04f1b913..9095b6694 100644 --- a/crmeb/app/adminapi/controller/v1/file/SystemAttachmentCategory.php +++ b/crmeb/app/adminapi/controller/v1/file/SystemAttachmentCategory.php @@ -38,7 +38,11 @@ class SystemAttachmentCategory extends AuthController /** * 显示资源列表 - * @return mixed + * @return \think\Response + * @throws \ReflectionException + * @throws \think\db\exception\DataNotFoundException + * @throws \think\db\exception\DbException + * @throws \think\db\exception\ModelNotFoundException */ public function index() { diff --git a/crmeb/app/services/system/attachment/SystemAttachmentCategoryServices.php b/crmeb/app/services/system/attachment/SystemAttachmentCategoryServices.php index e0f043cff..9d69b39f9 100644 --- a/crmeb/app/services/system/attachment/SystemAttachmentCategoryServices.php +++ b/crmeb/app/services/system/attachment/SystemAttachmentCategoryServices.php @@ -41,14 +41,20 @@ class SystemAttachmentCategoryServices extends BaseServices * 获取分类列表 * @param array $where * @return array + * @throws \ReflectionException + * @throws \think\db\exception\DataNotFoundException + * @throws \think\db\exception\DbException + * @throws \think\db\exception\ModelNotFoundException */ public function getAll(array $where) { $list = $this->dao->getList($where); foreach ($list as &$item) { $item['title'] = $item['name']; - $item['children'] = []; - if ($where['name'] == '' && $this->dao->count(['pid' => $item['id']])) $item['loading'] = false; + if ($where['name'] == '' && $this->dao->count(['pid' => $item['id']])) { + $item['loading'] = false; + $item['children'] = []; + } } return compact('list'); } From 10dfe84822224bd9bd5085d33ae5aa2841325d82 Mon Sep 17 00:00:00 2001 From: evoxwht <442384644@qq.com> Date: Wed, 28 Jun 2023 10:10:29 +0800 Subject: [PATCH 02/12] =?UTF-8?q?=E6=89=AB=E7=A0=81=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E5=B8=A6=E4=B8=8A=E5=88=86=E7=B1=BBpid?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crmeb/app/adminapi/controller/PublicController.php | 7 ++++--- crmeb/app/adminapi/controller/v1/file/SystemAttachment.php | 5 ++++- template/admin/src/api/uploadPictures.js | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/crmeb/app/adminapi/controller/PublicController.php b/crmeb/app/adminapi/controller/PublicController.php index 0fd00d819..1bc31e70f 100644 --- a/crmeb/app/adminapi/controller/PublicController.php +++ b/crmeb/app/adminapi/controller/PublicController.php @@ -59,15 +59,16 @@ class PublicController */ public function scanUpload(Request $request, $upload_type = 0, $type = 0) { - [$file, $uploadToken] = $request->postMore([ + [$file, $uploadToken, $pid] = $request->postMore([ ['file', 'file'], - ['uploadToken', ''] + ['uploadToken', ''], + ['pid', 0] ], true); $service = app()->make(SystemAttachmentServices::class); if ($service->cacheDriver()->get('scan_upload') != $uploadToken) { return app('json')->fail(410086); } - $service->upload(0, $file, $upload_type, $type, '', $uploadToken); + $service->upload($pid, $file, $upload_type, $type, '', $uploadToken); return app('json')->success(100032); } } diff --git a/crmeb/app/adminapi/controller/v1/file/SystemAttachment.php b/crmeb/app/adminapi/controller/v1/file/SystemAttachment.php index 01bb604e2..e470cff10 100644 --- a/crmeb/app/adminapi/controller/v1/file/SystemAttachment.php +++ b/crmeb/app/adminapi/controller/v1/file/SystemAttachment.php @@ -145,9 +145,12 @@ class SystemAttachment extends AuthController */ public function scanUploadQrcode() { + $pid = $this->request->getMore([ + ['pid', 0] + ], true); $uploadToken = md5(time()); $this->service->cacheDriver()->set('scan_upload', $uploadToken, 600); - $url = sys_config('site_url') . '/app/upload?token=' . $uploadToken; + $url = sys_config('site_url') . '/app/upload?token=' . $uploadToken . '&pid=' . $pid; return app('json')->success(['url' => $url]); } diff --git a/template/admin/src/api/uploadPictures.js b/template/admin/src/api/uploadPictures.js index 8ad8c5d1b..5a116f38c 100644 --- a/template/admin/src/api/uploadPictures.js +++ b/template/admin/src/api/uploadPictures.js @@ -118,7 +118,7 @@ export function onlineUpload(data) { */ export function scanUploadCode() { return request({ - url: 'scan_upload/qrcode ', + url: 'file/scan_upload/qrcode ', method: 'delete' }); } From c2920579e50db0731df393cc22fb2861882a423a Mon Sep 17 00:00:00 2001 From: evoxwht <442384644@qq.com> Date: Wed, 28 Jun 2023 10:12:25 +0800 Subject: [PATCH 03/12] =?UTF-8?q?=E6=89=AB=E7=A0=81=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E5=B8=A6=E4=B8=8A=E5=88=86=E7=B1=BBpid?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crmeb/app/adminapi/controller/v1/file/SystemAttachment.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crmeb/app/adminapi/controller/v1/file/SystemAttachment.php b/crmeb/app/adminapi/controller/v1/file/SystemAttachment.php index e470cff10..e6dbb12b4 100644 --- a/crmeb/app/adminapi/controller/v1/file/SystemAttachment.php +++ b/crmeb/app/adminapi/controller/v1/file/SystemAttachment.php @@ -145,7 +145,7 @@ class SystemAttachment extends AuthController */ public function scanUploadQrcode() { - $pid = $this->request->getMore([ + [$pid] = $this->request->getMore([ ['pid', 0] ], true); $uploadToken = md5(time()); From fc4bd5b578058cadb2570bb13f6362a20e59cce9 Mon Sep 17 00:00:00 2001 From: evoxwht <442384644@qq.com> Date: Wed, 28 Jun 2023 10:14:57 +0800 Subject: [PATCH 04/12] =?UTF-8?q?=E5=9B=BE=E7=89=87=E7=A7=BB=E5=8A=A8?= =?UTF-8?q?=E5=88=86=E7=B1=BB=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../services/system/attachment/SystemAttachmentServices.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/crmeb/app/services/system/attachment/SystemAttachmentServices.php b/crmeb/app/services/system/attachment/SystemAttachmentServices.php index 7ee49f2ec..7a12d593f 100644 --- a/crmeb/app/services/system/attachment/SystemAttachmentServices.php +++ b/crmeb/app/services/system/attachment/SystemAttachmentServices.php @@ -157,8 +157,7 @@ class SystemAttachmentServices extends BaseServices */ public function move(array $data) { - $res = $this->dao->move($data); - if (!$res) throw new AdminException(400600); + $this->dao->move($data); } /** From 0239ec3e25a0f8e7f43f96eb41dd26c4ecc956c2 Mon Sep 17 00:00:00 2001 From: evoxwht <442384644@qq.com> Date: Wed, 28 Jun 2023 10:21:52 +0800 Subject: [PATCH 05/12] =?UTF-8?q?=E9=99=84=E4=BB=B6=E5=88=86=E7=B1=BB?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/v1/file/SystemAttachmentCategory.php | 5 +++-- .../attachment/SystemAttachmentCategoryServices.php | 10 ++++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/crmeb/app/adminapi/controller/v1/file/SystemAttachmentCategory.php b/crmeb/app/adminapi/controller/v1/file/SystemAttachmentCategory.php index 9095b6694..34c9e9164 100644 --- a/crmeb/app/adminapi/controller/v1/file/SystemAttachmentCategory.php +++ b/crmeb/app/adminapi/controller/v1/file/SystemAttachmentCategory.php @@ -48,9 +48,10 @@ class SystemAttachmentCategory extends AuthController { $where = $this->request->getMore([ ['name', ''], - ['pid', 0] + ['pid', 0], + ['all', 0] ]); - if ($where['name'] != '') $where['pid'] = ''; + if ($where['name'] != '' || $where['all'] == 1) $where['pid'] = ''; return app('json')->success($this->service->getAll($where)); } diff --git a/crmeb/app/services/system/attachment/SystemAttachmentCategoryServices.php b/crmeb/app/services/system/attachment/SystemAttachmentCategoryServices.php index 9d69b39f9..a1ece2c55 100644 --- a/crmeb/app/services/system/attachment/SystemAttachmentCategoryServices.php +++ b/crmeb/app/services/system/attachment/SystemAttachmentCategoryServices.php @@ -49,11 +49,13 @@ class SystemAttachmentCategoryServices extends BaseServices public function getAll(array $where) { $list = $this->dao->getList($where); - foreach ($list as &$item) { - $item['title'] = $item['name']; - if ($where['name'] == '' && $this->dao->count(['pid' => $item['id']])) { - $item['loading'] = false; + if ($where['all'] == 1) { + $list = $this->tidyMenuTier($list); + } else { + foreach ($list as &$item) { + $item['title'] = $item['name']; $item['children'] = []; + if ($where['name'] == '' && $this->dao->count(['pid' => $item['id']])) $item['loading'] = false; } } return compact('list'); From 563f553c5b6be66d09d13a5f4a1b695e266325f2 Mon Sep 17 00:00:00 2001 From: evoxwht <442384644@qq.com> Date: Wed, 28 Jun 2023 10:25:52 +0800 Subject: [PATCH 06/12] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BD=A3=E9=87=91?= =?UTF-8?q?=E6=8F=90=E7=8E=B0=E5=88=B0=E4=BD=99=E9=A2=9D=E7=9A=84=E6=8F=90?= =?UTF-8?q?=E7=8E=B0=E6=96=B9=E5=BC=8F=E4=B8=BA=E4=BD=99=E9=A2=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crmeb/app/services/user/UserBrokerageServices.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crmeb/app/services/user/UserBrokerageServices.php b/crmeb/app/services/user/UserBrokerageServices.php index 17ac88075..2cc163560 100644 --- a/crmeb/app/services/user/UserBrokerageServices.php +++ b/crmeb/app/services/user/UserBrokerageServices.php @@ -414,7 +414,7 @@ class UserBrokerageServices extends BaseServices } elseif ($extract_type == 'bank') { $item['extract_type'] = '银行卡'; } else { - $item['extract_type'] = '其他'; + $item['extract_type'] = '余额'; } } else { $item['extract_type'] = ''; From 619b3359b2d999b918a4f449f14513cc28470087 Mon Sep 17 00:00:00 2001 From: evoxwht <442384644@qq.com> Date: Wed, 28 Jun 2023 10:43:11 +0800 Subject: [PATCH 07/12] =?UTF-8?q?=E8=99=9A=E6=8B=9F=E8=AF=84=E8=AE=BA?= =?UTF-8?q?=E9=BB=98=E8=AE=A45=E6=98=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- template/admin/src/pages/product/components/addReply.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/template/admin/src/pages/product/components/addReply.vue b/template/admin/src/pages/product/components/addReply.vue index 05820aa24..a1a7ba197 100644 --- a/template/admin/src/pages/product/components/addReply.vue +++ b/template/admin/src/pages/product/components/addReply.vue @@ -104,8 +104,8 @@ export default { nickname: '', comment: '', }, - product_score: 0, - service_score: 0, + product_score: 5, + service_score: 5, pics: [], add_time: '', }; From 282003d9979218272c351e3684e9b23896f4faaa Mon Sep 17 00:00:00 2001 From: evoxwht <442384644@qq.com> Date: Wed, 28 Jun 2023 10:43:28 +0800 Subject: [PATCH 08/12] =?UTF-8?q?=E6=89=AB=E7=A0=81=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E5=89=8D=E7=AB=AF=E5=A2=9E=E5=8A=A0=E5=88=86=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- template/admin/src/pages/app/upload/index.vue | 3 +++ 1 file changed, 3 insertions(+) diff --git a/template/admin/src/pages/app/upload/index.vue b/template/admin/src/pages/app/upload/index.vue index 2a053f05e..21c700fd2 100644 --- a/template/admin/src/pages/app/upload/index.vue +++ b/template/admin/src/pages/app/upload/index.vue @@ -62,10 +62,12 @@ export default { uploading: true, limit: 20, loading: false, + pid: 0 }; }, created() { this.token = this.$route.query.token; + this.pid = this.$route.query.pid; document.title = '手机端扫码上传'; }, methods: { @@ -117,6 +119,7 @@ export default { const formData = new FormData(); formData.append('file', file); formData.append('uploadToken', this.token); + formData.append('pid', this.pid); scanUpload(formData) .then((res) => { if (res.status == 200) { From ddce35e733a134f706242ed413b03ebfb89d81a6 Mon Sep 17 00:00:00 2001 From: evoxwht <442384644@qq.com> Date: Wed, 28 Jun 2023 10:43:46 +0800 Subject: [PATCH 09/12] =?UTF-8?q?=E9=80=80=E6=AC=BE=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E9=80=80=E6=AC=BE=E7=90=86=E7=94=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- template/uni-app/pages/goods/order_details/index.vue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/template/uni-app/pages/goods/order_details/index.vue b/template/uni-app/pages/goods/order_details/index.vue index 827c938c3..902362772 100644 --- a/template/uni-app/pages/goods/order_details/index.vue +++ b/template/uni-app/pages/goods/order_details/index.vue @@ -176,9 +176,13 @@ - + + + {{$t(`申请理由`)}}: + {{orderInfo.refund_reason}} + - {{$t(`申请理由`)}}: + {{$t(`用户备注`)}}: {{orderInfo.refund_explain}} From 2764ead2da0ef0a6c598180ae708e1c189e26fba Mon Sep 17 00:00:00 2001 From: evoxwht <442384644@qq.com> Date: Wed, 28 Jun 2023 12:13:56 +0800 Subject: [PATCH 10/12] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E9=99=84=E4=BB=B6=E5=88=86=E7=B1=BB=E5=88=97=E8=A1=A8=20?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=95=86=E5=AE=B6=E5=AF=84=E4=BB=B6=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crmeb/app/services/order/StoreOrderServices.php | 4 ++-- .../system/attachment/SystemAttachmentCategoryServices.php | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/crmeb/app/services/order/StoreOrderServices.php b/crmeb/app/services/order/StoreOrderServices.php index b50170b72..936b54509 100644 --- a/crmeb/app/services/order/StoreOrderServices.php +++ b/crmeb/app/services/order/StoreOrderServices.php @@ -2689,7 +2689,7 @@ HTML; } //发起取消商家寄件 - $res = app()->make(ServeServices::class)->express()->shipmentCancelOrder([ + app()->make(ServeServices::class)->express()->shipmentCancelOrder([ 'task_id' => $orderInfo->kuaidi_task_id, 'order_id' => $orderInfo->kuaidi_order_id, 'cancel_msg' => $msg, @@ -2717,7 +2717,7 @@ HTML; $orderInfo->save(); }); - return $res; + return true; } public function checkSubOrderNotSend(int $pid, int $order_id) diff --git a/crmeb/app/services/system/attachment/SystemAttachmentCategoryServices.php b/crmeb/app/services/system/attachment/SystemAttachmentCategoryServices.php index a1ece2c55..d46b05aad 100644 --- a/crmeb/app/services/system/attachment/SystemAttachmentCategoryServices.php +++ b/crmeb/app/services/system/attachment/SystemAttachmentCategoryServices.php @@ -54,8 +54,10 @@ class SystemAttachmentCategoryServices extends BaseServices } else { foreach ($list as &$item) { $item['title'] = $item['name']; - $item['children'] = []; - if ($where['name'] == '' && $this->dao->count(['pid' => $item['id']])) $item['loading'] = false; + if ($where['name'] == '' && $this->dao->count(['pid' => $item['id']])) { + $item['loading'] = false; + $item['children'] = []; + } } } return compact('list'); From 637aade62a987eb920ab70aa6095c86f71a37dfe Mon Sep 17 00:00:00 2001 From: evoxwht <442384644@qq.com> Date: Wed, 28 Jun 2023 12:16:48 +0800 Subject: [PATCH 11/12] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E9=99=84=E4=BB=B6=E5=88=86=E7=B1=BB=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/attachment/SystemAttachmentCategoryServices.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/crmeb/app/services/system/attachment/SystemAttachmentCategoryServices.php b/crmeb/app/services/system/attachment/SystemAttachmentCategoryServices.php index d46b05aad..01f360b0a 100644 --- a/crmeb/app/services/system/attachment/SystemAttachmentCategoryServices.php +++ b/crmeb/app/services/system/attachment/SystemAttachmentCategoryServices.php @@ -77,7 +77,11 @@ class SystemAttachmentCategoryServices extends BaseServices if ($menu['pid'] == $pid) { unset($menusList[$k]); $menu['children'] = $this->tidyMenuTier($menusList, $menu['id']); - if ($menu['children']) $menu['expand'] = true; + if (count($menu['children'])) { + $menu['expand'] = true; + } else { + unset($menu['children']); + } $navList[] = $menu; } } From a4ac1b426af704b7f1c8581fafd3e5546b452a3a Mon Sep 17 00:00:00 2001 From: evoxwht <442384644@qq.com> Date: Wed, 28 Jun 2023 14:34:13 +0800 Subject: [PATCH 12/12] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=99=84=E4=BB=B6?= =?UTF-8?q?=E5=9B=BE=E7=89=87=E6=90=9C=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../adminapi/controller/v1/file/SystemAttachment.php | 3 ++- .../app/model/system/attachment/SystemAttachment.php | 12 +++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/crmeb/app/adminapi/controller/v1/file/SystemAttachment.php b/crmeb/app/adminapi/controller/v1/file/SystemAttachment.php index e6dbb12b4..ef6a44781 100644 --- a/crmeb/app/adminapi/controller/v1/file/SystemAttachment.php +++ b/crmeb/app/adminapi/controller/v1/file/SystemAttachment.php @@ -43,7 +43,8 @@ class SystemAttachment extends AuthController public function index() { $where = $this->request->getMore([ - ['pid', 0] + ['pid', 0], + ['real_name', ''] ]); return app('json')->success($this->service->getImageList($where)); } diff --git a/crmeb/app/model/system/attachment/SystemAttachment.php b/crmeb/app/model/system/attachment/SystemAttachment.php index 2b2e86b45..0acadcff1 100644 --- a/crmeb/app/model/system/attachment/SystemAttachment.php +++ b/crmeb/app/model/system/attachment/SystemAttachment.php @@ -63,6 +63,16 @@ class SystemAttachment extends BaseModel */ public function searchLikeNameAttr($query, $value) { - if ($value) $query->where('name','LIKE' ,"$value%"); + if ($value) $query->where('name', 'LIKE', "$value%"); + } + + /** + * real_name模糊搜索 + * @param Model $query + * @param $value + */ + public function searchRealNameAttr($query, $value) + { + if ($value != '') $query->where('real_name', 'LIKE', "%$value%"); } }