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..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)); } @@ -145,9 +146,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/crmeb/app/adminapi/controller/v1/file/SystemAttachmentCategory.php b/crmeb/app/adminapi/controller/v1/file/SystemAttachmentCategory.php index c04f1b913..34c9e9164 100644 --- a/crmeb/app/adminapi/controller/v1/file/SystemAttachmentCategory.php +++ b/crmeb/app/adminapi/controller/v1/file/SystemAttachmentCategory.php @@ -38,15 +38,20 @@ 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() { $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/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%"); } } 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 e0f043cff..01f360b0a 100644 --- a/crmeb/app/services/system/attachment/SystemAttachmentCategoryServices.php +++ b/crmeb/app/services/system/attachment/SystemAttachmentCategoryServices.php @@ -41,14 +41,24 @@ 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['all'] == 1) { + $list = $this->tidyMenuTier($list); + } else { + foreach ($list as &$item) { + $item['title'] = $item['name']; + if ($where['name'] == '' && $this->dao->count(['pid' => $item['id']])) { + $item['loading'] = false; + $item['children'] = []; + } + } } return compact('list'); } @@ -67,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; } } 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); } /** 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'] = ''; 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' }); } 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) { 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: '', }; 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}}