From f580b148d2fa4676244e990e7ada70c2a7812043 Mon Sep 17 00:00:00 2001 From: zeyan <258785420@qq.com> Date: Mon, 28 Jul 2025 17:10:09 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=B4=E6=97=B6=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- niucloud/app/api/controller/upload/Upload.php | 24 + niucloud/app/api/route/file.php | 2 + .../app/service/api/upload/UploadService.php | 13 + niucloud/core/upload/Tencent.php | 13 + uniapp/pages.json | 253 +--- uniapp/pages/academic/home/index.vue | 263 ---- uniapp/pages/coach/class/info.vue | 638 --------- uniapp/pages/coach/class/list.vue | 299 ----- uniapp/pages/coach/course/info.vue | 234 ---- uniapp/pages/coach/course/info_list.vue | 793 ------------ uniapp/pages/coach/course/list.vue | 648 ---------- uniapp/pages/coach/job/add.vue | 407 ------ uniapp/pages/coach/job/list.vue | 836 ------------ uniapp/pages/coach/my/arrival_statistics.vue | 276 ---- uniapp/pages/coach/my/index.vue | 431 ------- uniapp/pages/coach/my/my_attendance.vue | 497 ------- uniapp/pages/coach/my/service_detail.vue | 870 ------------- uniapp/pages/coach/my/service_list.vue | 565 -------- .../coach/my/teaching_management_info.vue | 168 --- .../pages/coach/schedule/schedule_detail.vue | 481 ------- uniapp/pages/coach/student/info.vue | 599 --------- uniapp/pages/coach/student/student_detail.vue | 499 ------- uniapp/pages/coach/student/work_details.vue | 130 -- uniapp/pages/common/contract_list.vue | 765 ----------- .../pages/common/personnel/add_personnel.vue | 8 +- uniapp/pages/demo/dict_optimization.vue | 542 -------- uniapp/pages/demo/mock-demo.vue | 352 ----- .../clue/class_arrangement_detail_bak.vue | 633 --------- uniapp/pages/market/clue/clue_info.less | 149 +++ uniapp/pages/market/clue/clue_info.vue | 119 +- .../market/clue/clue_info_refactored.vue | 549 -------- uniapp/pages/market/clue/new_task.vue | 425 ------ uniapp/pages/market/clue/order_list.vue | 1149 ----------------- uniapp/pages/market/clue/writing_followUp.vue | 1014 --------------- uniapp/pages/market/course/course_detail.vue | 514 -------- uniapp/pages/market/data/index.vue | 836 ------------ uniapp/pages/market/home/index.vue | 390 ------ uniapp/pages/market/index/index.vue | 6 - uniapp/pages/market/my/firm_info.vue | 207 --- .../parent/contracts/contract-detail.vue | 177 --- uniapp/pages/parent/courses/course-detail.vue | 187 --- .../parent/materials/material-detail.vue | 181 --- .../pages/parent/messages/message-detail.vue | 174 --- uniapp/pages/parent/orders/order-detail.vue | 182 --- .../pages/parent/services/service-detail.vue | 159 --- uniapp/pages/student/index/index.vue | 1 - uniapp/pages/student/index/job_list.vue | 272 ---- uniapp/pages/student/index/work_details.vue | 114 -- uniapp/pages/student/my/my.vue | 379 ------ uniapp/pages/student/timetable/index.vue | 607 --------- uniapp/pages/student/timetable/list.vue | 254 ---- 51 files changed, 322 insertions(+), 18962 deletions(-) delete mode 100644 uniapp/pages/academic/home/index.vue delete mode 100644 uniapp/pages/coach/class/info.vue delete mode 100644 uniapp/pages/coach/class/list.vue delete mode 100644 uniapp/pages/coach/course/info.vue delete mode 100644 uniapp/pages/coach/course/info_list.vue delete mode 100644 uniapp/pages/coach/course/list.vue delete mode 100644 uniapp/pages/coach/job/add.vue delete mode 100644 uniapp/pages/coach/job/list.vue delete mode 100644 uniapp/pages/coach/my/arrival_statistics.vue delete mode 100644 uniapp/pages/coach/my/index.vue delete mode 100644 uniapp/pages/coach/my/my_attendance.vue delete mode 100644 uniapp/pages/coach/my/service_detail.vue delete mode 100644 uniapp/pages/coach/my/service_list.vue delete mode 100644 uniapp/pages/coach/my/teaching_management_info.vue delete mode 100644 uniapp/pages/coach/schedule/schedule_detail.vue delete mode 100644 uniapp/pages/coach/student/info.vue delete mode 100644 uniapp/pages/coach/student/student_detail.vue delete mode 100644 uniapp/pages/coach/student/work_details.vue delete mode 100644 uniapp/pages/common/contract_list.vue delete mode 100644 uniapp/pages/demo/dict_optimization.vue delete mode 100644 uniapp/pages/demo/mock-demo.vue delete mode 100644 uniapp/pages/market/clue/class_arrangement_detail_bak.vue delete mode 100644 uniapp/pages/market/clue/clue_info_refactored.vue delete mode 100644 uniapp/pages/market/clue/new_task.vue delete mode 100644 uniapp/pages/market/clue/order_list.vue delete mode 100644 uniapp/pages/market/clue/writing_followUp.vue delete mode 100644 uniapp/pages/market/course/course_detail.vue delete mode 100644 uniapp/pages/market/data/index.vue delete mode 100644 uniapp/pages/market/home/index.vue delete mode 100644 uniapp/pages/market/my/firm_info.vue delete mode 100644 uniapp/pages/parent/contracts/contract-detail.vue delete mode 100644 uniapp/pages/parent/courses/course-detail.vue delete mode 100644 uniapp/pages/parent/materials/material-detail.vue delete mode 100644 uniapp/pages/parent/messages/message-detail.vue delete mode 100644 uniapp/pages/parent/orders/order-detail.vue delete mode 100644 uniapp/pages/parent/services/service-detail.vue delete mode 100644 uniapp/pages/student/index/job_list.vue delete mode 100644 uniapp/pages/student/index/work_details.vue delete mode 100644 uniapp/pages/student/my/my.vue delete mode 100644 uniapp/pages/student/timetable/index.vue delete mode 100644 uniapp/pages/student/timetable/list.vue diff --git a/niucloud/app/api/controller/upload/Upload.php b/niucloud/app/api/controller/upload/Upload.php index 69a433a6..64a3dfdf 100644 --- a/niucloud/app/api/controller/upload/Upload.php +++ b/niucloud/app/api/controller/upload/Upload.php @@ -91,4 +91,28 @@ class Upload extends BaseApiController $base64_service = new Base64Service(); return success($base64_service->image($data['content'])); } + + /** + * 头像上传(无token验证) + * @return Response + */ + public function avatar(Request $request){ + $extraData = $request->all(); + + $data = $this->request->params([ + ['file', 'file'], + ]); + $upload_service = new UploadService(); + + $res = $upload_service->avatar($data['file'],$extraData); + + $res['ext'] = ''; // 初始化文件扩展名 + $res['name'] = ''; // 初始化文件名称 + if (isset($res['url'])) { + $res['ext'] = pathinfo($res['url'], PATHINFO_EXTENSION); + $res['name'] = basename($res['url']); + } + + return success($res); + } } diff --git a/niucloud/app/api/route/file.php b/niucloud/app/api/route/file.php index 0b382cd8..64b01813 100644 --- a/niucloud/app/api/route/file.php +++ b/niucloud/app/api/route/file.php @@ -39,6 +39,8 @@ Route::group('file', function() { //base64图片 Route::post('image/base64', 'upload.Upload/imageBase64'); + //头像上传(无token验证) + Route::post('avatar', 'upload.Upload/avatar'); })->middleware(ApiChannel::class) ->middleware(ApiLog::class); diff --git a/niucloud/app/service/api/upload/UploadService.php b/niucloud/app/service/api/upload/UploadService.php index b666bf47..ddec552f 100644 --- a/niucloud/app/service/api/upload/UploadService.php +++ b/niucloud/app/service/api/upload/UploadService.php @@ -41,6 +41,19 @@ class UploadService extends BaseApiService return $core_upload_service->image($file, $dir, $this->cate_id); } + /** + * 头像上传(使用腾讯云存储) + * @param $file + * @return array + * @throws Exception + */ + public function avatar($file,array $extraData = []) + { + $dir = $this->root_path . '/' . 'avatar' . '/' . date('Ym') . '/' . date('d');//打印结果 例如=file/avatar/202505/29 + $core_upload_service = new CoreUploadService(); + return $core_upload_service->image($file, $dir, $this->cate_id); + } + /** * 附件库上传视频 * @param $file diff --git a/niucloud/core/upload/Tencent.php b/niucloud/core/upload/Tencent.php index a5b03ceb..f2cfc03a 100644 --- a/niucloud/core/upload/Tencent.php +++ b/niucloud/core/upload/Tencent.php @@ -61,14 +61,27 @@ class Tencent extends BaseUpload $this->validate(); $bucket = $this->config['bucket']; try { + // 临时关闭PHP警告,避免deprecated警告被当作异常 + $old_error_reporting = error_reporting(E_ERROR | E_PARSE); + $result = $this->client()->putObject(array( 'Bucket' => $bucket, //存储桶名称,由BucketName-Appid 组成,可以在COS控制台查看 https://console.tencentcloud.com/cos5/bucket 'Key' => $this->getFullPath($dir), 'Body' => fopen($this->getRealPath(), 'rb'), )); + + // 恢复错误报告级别 + error_reporting($old_error_reporting); + // 请求成功 return true; } catch ( Exception $e ) { + // 恢复错误报告级别 + error_reporting($old_error_reporting); + + // 输出详细错误信息用于调试 + error_log("Tencent COS Upload Error: " . $e->getMessage()); + error_log("Tencent COS Config: " . json_encode($this->config)); throw new UploadFileException($e->getMessage()); } } diff --git a/uniapp/pages.json b/uniapp/pages.json index cb51c551..8233762f 100644 --- a/uniapp/pages.json +++ b/uniapp/pages.json @@ -18,24 +18,6 @@ "navigationBarTextStyle": "white" } }, - { - "path": "pages/student/timetable/index", - "style": { - "navigationBarTitleText": "课表", - "navigationStyle": "custom", - "navigationBarBackgroundColor": "#292929", - "navigationBarTextStyle": "white" - } - }, - { - "path": "pages/student/my/my", - "style": { - "navigationBarTitleText": "我的", - "navigationStyle": "custom", - "navigationBarBackgroundColor": "#29d3b4", - "navigationBarTextStyle": "white" - } - }, { "path": "pages/student/my/my_coach", "style": { @@ -45,16 +27,6 @@ "navigationBarTextStyle": "white" } }, - { - "path": "pages/demo/mock-demo", - "style": { - "navigationBarTitleText": "Mock数据演示", - "navigationStyle": "default", - "navigationBarBackgroundColor": "#1890ff", - "navigationBarTextStyle": "white" - } - }, - { "path": "pages/student/login/forgot", "style": { @@ -64,15 +36,6 @@ "navigationBarTextStyle": "black" } }, - { - "path": "pages/student/index/work_details", - "style": { - "navigationBarTitleText": "作业详情", - "navigationStyle": "default", - "navigationBarBackgroundColor": "#fff", - "navigationBarTextStyle": "black" - } - }, { "path": "pages/student/index/physical_examination", "style": { @@ -91,15 +54,6 @@ "navigationBarTextStyle": "white" } }, - { - "path": "pages/student/timetable/list", - "style": { - "navigationBarTitleText": "场馆", - "navigationStyle": "default", - "navigationBarBackgroundColor": "#292929", - "navigationBarTextStyle": "black" - } - }, { "path": "pages/student/my/set_up", "style": { @@ -145,36 +99,6 @@ "navigationBarTextStyle": "white" } }, - { - "path": "pages/student/index/job_list", - "style": { - "navigationBarTitleText": "作业列表", - "navigationStyle": "default", - "navigationBarBackgroundColor": "#29d3b4", - "navigationBarTextStyle": "white" - } - }, - - - { - "path": "pages/market/home/index", - "style": { - "navigationStyle": "default", - "navigationBarBackgroundColor": "#29d3b4", - "navigationBarTextStyle": "white" - } - }, - { - "path": "pages/market/course/course_detail", - "style": { - "navigationBarTitleText": "课程详情", - "navigationStyle": "default", - "navigationBarBackgroundColor": "#fff", - "navigationBarTextStyle": "black" - } - }, - - { "path": "pages/common/privacy_agreement", "style": { @@ -229,15 +153,6 @@ "navigationBarTextStyle": "white" } }, - { - "path": "pages/common/contract_list", - "style": { - "navigationBarTitleText": "订单列表", - "navigationStyle": "default", - "navigationBarBackgroundColor": "#292929", - "navigationBarTextStyle": "white" - } - }, { "path": "pages/common/my_attendance", "style": { @@ -293,86 +208,6 @@ "navigationBarTextStyle": "white" } }, - { - "path": "pages/coach/job/add", - "style": { - "navigationBarTitleText": "发布作业", - "navigationStyle": "default", - "navigationBarBackgroundColor": "#292929", - "navigationBarTextStyle": "white" - } - }, - { - "path": "pages/coach/job/list", - "style": { - "navigationBarTitleText": "全部作业", - "navigationStyle": "default", - "navigationBarBackgroundColor": "#292929", - "navigationBarTextStyle": "white" - } - }, - { - "path": "pages/coach/course/list", - "style": { - "navigationBarTitleText": "课表", - "navigationBarBackgroundColor": "#29d3b4", - "navigationBarTextStyle": "white" - } - }, - { - "path": "pages/coach/course/info_list", - "style": { - "navigationBarTitleText": "课时详情", - "navigationStyle": "default", - "navigationBarBackgroundColor": "#292929", - "navigationBarTextStyle": "white" - } - }, - { - "path": "pages/coach/course/info", - "style": { - "navigationBarTitleText": "课时详情", - "navigationStyle": "default", - "navigationBarBackgroundColor": "#292929", - "navigationBarTextStyle": "white" - } - }, - { - "path": "pages/coach/class/list", - "style": { - "navigationBarTitleText": "班级", - "navigationStyle": "custom", - "navigationBarBackgroundColor": "#292929", - "navigationBarTextStyle": "white" - } - }, - { - "path": "pages/coach/class/info", - "style": { - "navigationBarTitleText": "班级详情", - "navigationStyle": "default", - "navigationBarBackgroundColor": "#292929", - "navigationBarTextStyle": "white" - } - }, - { - "path": "pages/coach/student/info", - "style": { - "navigationBarTitleText": "学员详情", - "navigationStyle": "default", - "navigationBarBackgroundColor": "#29d3b4", - "navigationBarTextStyle": "white" - } - }, - { - "path": "pages/coach/student/work_details", - "style": { - "navigationBarTitleText": "作业任务", - "navigationStyle": "default", - "navigationBarBackgroundColor": "#29d3b4", - "navigationBarTextStyle": "white" - } - }, { "path": "pages/coach/student/physical_examination", "style": { @@ -390,31 +225,6 @@ "navigationBarTextStyle": "white" } }, - { - "path": "pages/coach/student/student_detail", - "style": { - "navigationBarTitleText": "学员详情", - "navigationBarBackgroundColor": "#29d3b4", - "navigationBarTextStyle": "white" - } - }, - { - "path": "pages/coach/my/index", - "style": { - "navigationBarTitleText": "我的", - "navigationBarBackgroundColor": "#29d3b4", - "navigationBarTextStyle": "white" - } - }, - { - "path": "pages/coach/my/arrival_statistics", - "style": { - "navigationBarTitleText": "到课统计", - "navigationStyle": "default", - "navigationBarBackgroundColor": "#29d3b4", - "navigationBarTextStyle": "white" - } - }, { "path": "pages/coach/my/due_soon", "style": { @@ -468,15 +278,6 @@ "navigationBarTextStyle": "white" } }, - { - "path": "pages/coach/my/teaching_management_info", - "style": { - "navigationBarTitleText": "文章详情", - "navigationStyle": "default", - "navigationBarBackgroundColor": "#fff", - "navigationBarTextStyle": "white" - } - }, { "path": "pages/coach/my/gotake_exam", "style": { @@ -531,15 +332,6 @@ "navigationBarTextStyle": "black" } }, - { - "path": "pages/market/clue/order_list", - "style": { - "navigationBarTitleText": "订单列表", - "navigationStyle": "default", - "navigationBarBackgroundColor": "#29d3b4", - "navigationBarTextStyle": "black" - } - }, { "path": "pages/market/clue/index", "style": { @@ -552,7 +344,7 @@ { "path": "pages/market/index/index", "style": { - "navigationBarTitleText": "首页" + "navigationBarTitleText": "销售数据" } }, { @@ -627,24 +419,6 @@ "navigationBarTextStyle": "white" } }, - { - "path": "pages/market/my/firm_info", - "style": { - "navigationBarTitleText": "企业信息", - "navigationStyle": "default", - "navigationBarBackgroundColor": "#292929", - "navigationBarTextStyle": "white" - } - }, - { - "path": "pages/market/data/index", - "style": { - "navigationBarTitleText": "数据", - "navigationStyle": "custom", - "navigationBarBackgroundColor": "#fff", - "navigationBarTextStyle": "black" - } - }, { "path": "pages/market/clue/class_arrangement", "style": { @@ -695,23 +469,6 @@ "navigationBarTextStyle": "white" } }, - { - "path": "pages/coach/my/service_detail", - "style": { - "navigationBarTitleText": "服务详情", - "navigationBarBackgroundColor": "#29d3b4", - "navigationBarTextStyle": "white", - "enablePullDownRefresh": true - } - }, - { - "path": "pages/coach/my/service_list", - "style": { - "navigationBarTitleText": "服务列表", - "navigationBarBackgroundColor": "#29d3b4", - "navigationBarTextStyle": "white" - } - }, { "path": "pages/coach/schedule/schedule_table", "style": { @@ -745,14 +502,6 @@ "navigationBarTextStyle": "white" } }, - { - "path": "pages/academic/home/index", - "style": { - "navigationBarTitleText": "教务首页", - "navigationBarBackgroundColor": "#007ACC", - "navigationBarTextStyle": "white" - } - }, { "path": "pages/market/clue/clue_table", "style": { diff --git a/uniapp/pages/academic/home/index.vue b/uniapp/pages/academic/home/index.vue deleted file mode 100644 index 5bae2baa..00000000 --- a/uniapp/pages/academic/home/index.vue +++ /dev/null @@ -1,263 +0,0 @@ - - - - - \ No newline at end of file diff --git a/uniapp/pages/coach/class/info.vue b/uniapp/pages/coach/class/info.vue deleted file mode 100644 index 245ff5db..00000000 --- a/uniapp/pages/coach/class/info.vue +++ /dev/null @@ -1,638 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/uniapp/pages/coach/class/list.vue b/uniapp/pages/coach/class/list.vue deleted file mode 100644 index 6ac9e2a0..00000000 --- a/uniapp/pages/coach/class/list.vue +++ /dev/null @@ -1,299 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/uniapp/pages/coach/course/info.vue b/uniapp/pages/coach/course/info.vue deleted file mode 100644 index 4efe2bc2..00000000 --- a/uniapp/pages/coach/course/info.vue +++ /dev/null @@ -1,234 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/uniapp/pages/coach/course/info_list.vue b/uniapp/pages/coach/course/info_list.vue deleted file mode 100644 index 8b9d3bde..00000000 --- a/uniapp/pages/coach/course/info_list.vue +++ /dev/null @@ -1,793 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/uniapp/pages/coach/course/list.vue b/uniapp/pages/coach/course/list.vue deleted file mode 100644 index 31752bc1..00000000 --- a/uniapp/pages/coach/course/list.vue +++ /dev/null @@ -1,648 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/uniapp/pages/coach/job/add.vue b/uniapp/pages/coach/job/add.vue deleted file mode 100644 index 6fa5823f..00000000 --- a/uniapp/pages/coach/job/add.vue +++ /dev/null @@ -1,407 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/uniapp/pages/coach/job/list.vue b/uniapp/pages/coach/job/list.vue deleted file mode 100644 index 4e55da69..00000000 --- a/uniapp/pages/coach/job/list.vue +++ /dev/null @@ -1,836 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/uniapp/pages/coach/my/service_list.vue b/uniapp/pages/coach/my/service_list.vue deleted file mode 100644 index 2eb2f362..00000000 --- a/uniapp/pages/coach/my/service_list.vue +++ /dev/null @@ -1,565 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/uniapp/pages/coach/my/teaching_management_info.vue b/uniapp/pages/coach/my/teaching_management_info.vue deleted file mode 100644 index f087daef..00000000 --- a/uniapp/pages/coach/my/teaching_management_info.vue +++ /dev/null @@ -1,168 +0,0 @@ - - - - - \ No newline at end of file diff --git a/uniapp/pages/coach/schedule/schedule_detail.vue b/uniapp/pages/coach/schedule/schedule_detail.vue deleted file mode 100644 index b3d6158c..00000000 --- a/uniapp/pages/coach/schedule/schedule_detail.vue +++ /dev/null @@ -1,481 +0,0 @@ - - - - - \ No newline at end of file diff --git a/uniapp/pages/coach/student/info.vue b/uniapp/pages/coach/student/info.vue deleted file mode 100644 index 90e8fc43..00000000 --- a/uniapp/pages/coach/student/info.vue +++ /dev/null @@ -1,599 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/uniapp/pages/coach/student/student_detail.vue b/uniapp/pages/coach/student/student_detail.vue deleted file mode 100644 index d4b86b2e..00000000 --- a/uniapp/pages/coach/student/student_detail.vue +++ /dev/null @@ -1,499 +0,0 @@ - - - - - \ No newline at end of file diff --git a/uniapp/pages/coach/student/work_details.vue b/uniapp/pages/coach/student/work_details.vue deleted file mode 100644 index 690aa614..00000000 --- a/uniapp/pages/coach/student/work_details.vue +++ /dev/null @@ -1,130 +0,0 @@ - - - - - diff --git a/uniapp/pages/common/contract_list.vue b/uniapp/pages/common/contract_list.vue deleted file mode 100644 index 6f8c7620..00000000 --- a/uniapp/pages/common/contract_list.vue +++ /dev/null @@ -1,765 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/uniapp/pages/common/personnel/add_personnel.vue b/uniapp/pages/common/personnel/add_personnel.vue index 88bafa8a..b75955a8 100644 --- a/uniapp/pages/common/personnel/add_personnel.vue +++ b/uniapp/pages/common/personnel/add_personnel.vue @@ -390,12 +390,9 @@ export default { uni.showLoading({ title: '上传中...' }) uni.uploadFile({ - url: this.$baseUrl + '/uploadImage', + url: this.$baseUrl + '/file/avatar', filePath: filePath, name: 'file', - header: { - 'Authorization': uni.getStorageSync('token') - }, success: (res) => { const data = JSON.parse(res.data) if (data.code === 1) { @@ -405,7 +402,8 @@ export default { uni.showToast({ title: data.msg || '上传失败', icon: 'none' }) } }, - fail: () => { + fail: (error) => { + console.error('头像上传失败:', error) uni.showToast({ title: '上传失败', icon: 'none' }) }, complete: () => { diff --git a/uniapp/pages/demo/dict_optimization.vue b/uniapp/pages/demo/dict_optimization.vue deleted file mode 100644 index e7723979..00000000 --- a/uniapp/pages/demo/dict_optimization.vue +++ /dev/null @@ -1,542 +0,0 @@ - - - - - \ No newline at end of file diff --git a/uniapp/pages/demo/mock-demo.vue b/uniapp/pages/demo/mock-demo.vue deleted file mode 100644 index 6f85594c..00000000 --- a/uniapp/pages/demo/mock-demo.vue +++ /dev/null @@ -1,352 +0,0 @@ - - - - - \ No newline at end of file diff --git a/uniapp/pages/market/clue/class_arrangement_detail_bak.vue b/uniapp/pages/market/clue/class_arrangement_detail_bak.vue deleted file mode 100644 index 6a23b2a7..00000000 --- a/uniapp/pages/market/clue/class_arrangement_detail_bak.vue +++ /dev/null @@ -1,633 +0,0 @@ - - - - - \ No newline at end of file diff --git a/uniapp/pages/market/clue/clue_info.less b/uniapp/pages/market/clue/clue_info.less index 4ea4dbff..18342cfd 100644 --- a/uniapp/pages/market/clue/clue_info.less +++ b/uniapp/pages/market/clue/clue_info.less @@ -2361,4 +2361,153 @@ color: #999; font-size: 28rpx; } +} + +// 二维码支付弹窗样式 +.qrcode-payment-modal { + width: 600rpx; + background: #fff; + border-radius: 20rpx; + overflow: hidden; + + .modal-header { + display: flex; + align-items: center; + justify-content: space-between; + padding: 40rpx 40rpx 20rpx; + border-bottom: 1px solid #f0f0f0; + + .modal-title { + font-size: 36rpx; + font-weight: 600; + color: #333; + } + + .close-btn { + width: 60rpx; + height: 60rpx; + display: flex; + align-items: center; + justify-content: center; + border-radius: 50%; + background: #f5f5f5; + color: #666; + font-size: 32rpx; + transition: all 0.3s ease; + + &:active { + background: #e5e5e5; + transform: scale(0.95); + } + } + } + + .order-info { + padding: 30rpx 40rpx; + + .info-row { + display: flex; + align-items: center; + margin-bottom: 20rpx; + + &:last-child { + margin-bottom: 0; + } + + .label { + font-size: 28rpx; + color: #666; + margin-right: 20rpx; + } + + .value { + font-size: 28rpx; + color: #333; + flex: 1; + } + + .amount { + font-size: 32rpx; + color: #ff4757; + font-weight: 600; + flex: 1; + } + } + } + + .qrcode-container { + display: flex; + flex-direction: column; + align-items: center; + padding: 40rpx; + background: #fafafa; + + .qrcode-image { + width: 300rpx; + height: 300rpx; + border: 1px solid #e5e5e5; + border-radius: 12rpx; + background: #fff; + margin-bottom: 20rpx; + } + + .qrcode-placeholder { + width: 300rpx; + height: 300rpx; + display: flex; + align-items: center; + justify-content: center; + border: 1px dashed #ccc; + border-radius: 12rpx; + background: #fff; + color: #999; + font-size: 24rpx; + margin-bottom: 20rpx; + } + + .qrcode-tip { + font-size: 24rpx; + color: #666; + text-align: center; + line-height: 1.4; + } + } + + .modal-buttons { + display: flex; + padding: 30rpx 40rpx 40rpx; + gap: 20rpx; + + .btn { + flex: 1; + height: 80rpx; + display: flex; + align-items: center; + justify-content: center; + border-radius: 40rpx; + font-size: 28rpx; + font-weight: 500; + transition: all 0.3s ease; + + &.secondary { + background: #f5f5f5; + color: #666; + + &:active { + background: #e5e5e5; + transform: scale(0.98); + } + } + + &.primary { + background: #29d3b4; + color: #fff; + + &:active { + background: #1ea08e; + transform: scale(0.98); + } + } + } + } } \ No newline at end of file diff --git a/uniapp/pages/market/clue/clue_info.vue b/uniapp/pages/market/clue/clue_info.vue index 0f0043c8..0bb89b26 100644 --- a/uniapp/pages/market/clue/clue_info.vue +++ b/uniapp/pages/market/clue/clue_info.vue @@ -223,6 +223,49 @@ @confirm="handleOrderFormConfirm" /> + + + + + + + 扫码支付 + + + + + + + + + 订单号: + {{ qrCodePaymentData.order.order_no }} + + + 支付金额: + ¥{{ qrCodePaymentData.order.total_amount }} + + + + + + + 二维码加载中... + 请使用微信扫码完成支付 + + + + + 取消支付 + 已完成支付 + + + @@ -289,6 +332,10 @@ export default { // 订单表单弹窗 showOrderForm: false, + // 二维码支付弹窗 + showQRCodeModal: false, + qrCodePaymentData: null, + // 编辑相关 remark_content: '', currentRecord: null, @@ -1063,8 +1110,76 @@ export default { }, // 扫码支付 - showQRCodePayment(order) { -console.log('扫码支付:', order) + async showQRCodePayment(order) { + console.log('扫码支付:', order) + + try { + uni.showLoading({ title: '生成支付二维码...' }) + + // 调用接口获取支付二维码 + const res = await apiRoute.getOrderPayQrcode({ + order_id: order._raw?.id || order.id + }) + + uni.hideLoading() + + if (res.code === 1 && res.data) { + // 显示二维码支付弹窗 + this.openQRCodeModal({ + order: order, + qrcode: res.data.code_url, + qrcodeImage: res.data.qrcode_url + }) + } else { + uni.showToast({ + title: res.msg || '获取支付二维码失败', + icon: 'none' + }) + } + } catch (error) { + uni.hideLoading() + console.error('获取支付二维码失败:', error) + uni.showToast({ + title: '获取支付二维码失败', + icon: 'none' + }) + } + }, + + // 打开二维码支付弹窗 + openQRCodeModal(paymentData) { + this.qrCodePaymentData = paymentData + this.showQRCodeModal = true + }, + + // 关闭二维码支付弹窗 + closeQRCodeModal() { + this.showQRCodeModal = false + this.qrCodePaymentData = null + }, + + // 确认二维码支付完成 + async confirmQRCodePayment() { + if (!this.qrCodePaymentData?.order) return + + const order = this.qrCodePaymentData.order + + uni.showModal({ + title: '支付确认', + content: '请确认是否已完成扫码支付?', + success: async (res) => { + if (res.confirm) { + try { + // 更新订单状态为已支付 + await this.updateOrderStatus(order, 'paid', `QR${Date.now()}`) + this.closeQRCodeModal() + } catch (error) { + console.error('支付确认失败:', error) + uni.showToast({ title: '支付确认失败', icon: 'none' }) + } + } + } + }) }, // 订阅支付 diff --git a/uniapp/pages/market/clue/clue_info_refactored.vue b/uniapp/pages/market/clue/clue_info_refactored.vue deleted file mode 100644 index c3ab18ed..00000000 --- a/uniapp/pages/market/clue/clue_info_refactored.vue +++ /dev/null @@ -1,549 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/uniapp/pages/market/clue/new_task.vue b/uniapp/pages/market/clue/new_task.vue deleted file mode 100644 index 86181d3d..00000000 --- a/uniapp/pages/market/clue/new_task.vue +++ /dev/null @@ -1,425 +0,0 @@ - - - - - \ No newline at end of file diff --git a/uniapp/pages/market/clue/order_list.vue b/uniapp/pages/market/clue/order_list.vue deleted file mode 100644 index 2ff1ef79..00000000 --- a/uniapp/pages/market/clue/order_list.vue +++ /dev/null @@ -1,1149 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/uniapp/pages/market/clue/writing_followUp.vue b/uniapp/pages/market/clue/writing_followUp.vue deleted file mode 100644 index b95c4b8c..00000000 --- a/uniapp/pages/market/clue/writing_followUp.vue +++ /dev/null @@ -1,1014 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/uniapp/pages/market/course/course_detail.vue b/uniapp/pages/market/course/course_detail.vue deleted file mode 100644 index a7dab243..00000000 --- a/uniapp/pages/market/course/course_detail.vue +++ /dev/null @@ -1,514 +0,0 @@ - - - - - \ No newline at end of file diff --git a/uniapp/pages/market/data/index.vue b/uniapp/pages/market/data/index.vue deleted file mode 100644 index f118eb47..00000000 --- a/uniapp/pages/market/data/index.vue +++ /dev/null @@ -1,836 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/uniapp/pages/market/home/index.vue b/uniapp/pages/market/home/index.vue deleted file mode 100644 index 3be0424e..00000000 --- a/uniapp/pages/market/home/index.vue +++ /dev/null @@ -1,390 +0,0 @@ - - - - - \ No newline at end of file diff --git a/uniapp/pages/market/index/index.vue b/uniapp/pages/market/index/index.vue index 85108fde..dd368cc8 100644 --- a/uniapp/pages/market/index/index.vue +++ b/uniapp/pages/market/index/index.vue @@ -111,19 +111,13 @@ - - - - diff --git a/uniapp/pages/parent/contracts/contract-detail.vue b/uniapp/pages/parent/contracts/contract-detail.vue deleted file mode 100644 index 3b445110..00000000 --- a/uniapp/pages/parent/contracts/contract-detail.vue +++ /dev/null @@ -1,177 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/uniapp/pages/parent/courses/course-detail.vue b/uniapp/pages/parent/courses/course-detail.vue deleted file mode 100644 index 9545e57c..00000000 --- a/uniapp/pages/parent/courses/course-detail.vue +++ /dev/null @@ -1,187 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/uniapp/pages/parent/materials/material-detail.vue b/uniapp/pages/parent/materials/material-detail.vue deleted file mode 100644 index f85b09e0..00000000 --- a/uniapp/pages/parent/materials/material-detail.vue +++ /dev/null @@ -1,181 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/uniapp/pages/parent/messages/message-detail.vue b/uniapp/pages/parent/messages/message-detail.vue deleted file mode 100644 index 4e093ff3..00000000 --- a/uniapp/pages/parent/messages/message-detail.vue +++ /dev/null @@ -1,174 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/uniapp/pages/parent/orders/order-detail.vue b/uniapp/pages/parent/orders/order-detail.vue deleted file mode 100644 index 95283255..00000000 --- a/uniapp/pages/parent/orders/order-detail.vue +++ /dev/null @@ -1,182 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/uniapp/pages/parent/services/service-detail.vue b/uniapp/pages/parent/services/service-detail.vue deleted file mode 100644 index 1ac6537e..00000000 --- a/uniapp/pages/parent/services/service-detail.vue +++ /dev/null @@ -1,159 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/uniapp/pages/student/index/index.vue b/uniapp/pages/student/index/index.vue index 026c9b5c..6c50f806 100644 --- a/uniapp/pages/student/index/index.vue +++ b/uniapp/pages/student/index/index.vue @@ -161,7 +161,6 @@ - diff --git a/uniapp/pages/student/index/job_list.vue b/uniapp/pages/student/index/job_list.vue deleted file mode 100644 index 9c4ff5b9..00000000 --- a/uniapp/pages/student/index/job_list.vue +++ /dev/null @@ -1,272 +0,0 @@ - - - - - diff --git a/uniapp/pages/student/index/work_details.vue b/uniapp/pages/student/index/work_details.vue deleted file mode 100644 index 8d4d32e0..00000000 --- a/uniapp/pages/student/index/work_details.vue +++ /dev/null @@ -1,114 +0,0 @@ - - - - - diff --git a/uniapp/pages/student/my/my.vue b/uniapp/pages/student/my/my.vue deleted file mode 100644 index eab026c2..00000000 --- a/uniapp/pages/student/my/my.vue +++ /dev/null @@ -1,379 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/uniapp/pages/student/timetable/index.vue b/uniapp/pages/student/timetable/index.vue deleted file mode 100644 index 5cc8b6bb..00000000 --- a/uniapp/pages/student/timetable/index.vue +++ /dev/null @@ -1,607 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/uniapp/pages/student/timetable/list.vue b/uniapp/pages/student/timetable/list.vue deleted file mode 100644 index 5fed8d89..00000000 --- a/uniapp/pages/student/timetable/list.vue +++ /dev/null @@ -1,254 +0,0 @@ - - - - - - \ No newline at end of file