From 1156b2f4e2fbfaf48f0c58bc04074ce893c70828 Mon Sep 17 00:00:00 2001 From: jsasg <735273025@qq.com> Date: Thu, 19 Mar 2026 17:41:23 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=89=AB=E7=A0=81=E7=AD=BE=E5=88=B0?= =?UTF-8?q?=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lang/zh-cn/wdsxh/activity/activity.php | 3 +- .../zh-cn/wdsxh/activity/activity_apply.php | 5 +- .../admin/model/wdsxh/activity/Activity.php | 50 +- .../wdsxh/activity/activity_apply/index.html | 5 - .../controller/wdsxh/activity/Activity.php | 59 ++- .../wdsxh/activity/ActivityApply.php | 55 ++- .../api/model/wdsxh/activity/Activity.php | 6 +- .../js/backend/wdsxh/activity/activity.js | 428 +++++++++--------- .../backend/wdsxh/activity/activity_apply.js | 195 ++++---- 9 files changed, 457 insertions(+), 349 deletions(-) diff --git a/application/admin/lang/zh-cn/wdsxh/activity/activity.php b/application/admin/lang/zh-cn/wdsxh/activity/activity.php index 1098675..2e6d2ed 100644 --- a/application/admin/lang/zh-cn/wdsxh/activity/activity.php +++ b/application/admin/lang/zh-cn/wdsxh/activity/activity.php @@ -1,6 +1,6 @@ '自助签到(范围1000米)', 'Verification_method 2' => '管理员核销', 'Applet_activity_qrcode_path' => '活动小程序码', + 'Checked_in_qrcode' => '签到二维码', 'Points_status' => '设置是否获得积分', 'Points_status 1' => '是', 'Points_status 2' => '否', diff --git a/application/admin/lang/zh-cn/wdsxh/activity/activity_apply.php b/application/admin/lang/zh-cn/wdsxh/activity/activity_apply.php index 9c27a2e..6aac613 100644 --- a/application/admin/lang/zh-cn/wdsxh/activity/activity_apply.php +++ b/application/admin/lang/zh-cn/wdsxh/activity/activity_apply.php @@ -1,6 +1,6 @@ '退款中', 'State 4' => '已退款', 'State 5' => '已驳回', + 'check_in_status' => '签到状态', + 'checked_in' => '已签到', + 'unchecked_in' => '未签到', 'Is_sign_in' => '核销状态', 'Is_sign_in 1' => '已核销', 'Is_sign_in 2' => '未核销', diff --git a/application/admin/model/wdsxh/activity/Activity.php b/application/admin/model/wdsxh/activity/Activity.php index a9931a0..81ed4a3 100644 --- a/application/admin/model/wdsxh/activity/Activity.php +++ b/application/admin/model/wdsxh/activity/Activity.php @@ -1,6 +1,6 @@ app_code->getUnlimit($ids, [ 'page' => $path, 'check_path' => false, + 'env_version' => 'develop', ]); if ($response instanceof \EasyWeChat\Kernel\Http\StreamResponse) { @@ -202,6 +204,48 @@ class Activity extends Model return $value; } + public function getCheckedInQrcodeAttr($value, $data) + { + $row = $data; + $row['createtime'] = self::where('id',$row['id'])->value('createtime'); + $save_path = '/uploads/wdsxh/check_in_qrcode/'.$row['id'].'/'.$row['createtime'].'.png'; + if (is_file(ROOT_PATH."public".$save_path)) { + $value = $save_path; + } else { + if(isset($row['id'])) { + $configObj = (new \app\admin\model\wdsxh\Config())->where('id',1)->find(); + if (!empty($configObj['applet_appid']) && !empty($configObj['applet_secret'])) { + $path = 'pagesActivity/index/details'; + $config = [ + 'app_id' => $configObj['applet_appid'], + 'secret' => $configObj['applet_secret'], + 'response_type' => 'array', + 'log' => [ + 'level' => 'debug', + ], + ]; + + $app = Factory::miniProgram($config); + $scene = http_build_query(['id' => $row['id'], 'op' => 'checked_in']); + $response = $app->app_code->getUnlimit($scene, [ + 'page' => $path, + 'check_path' => false, + 'env_version' => 'develop', + ]); + + if ($response instanceof \EasyWeChat\Kernel\Http\StreamResponse) { + $response->saveAs('uploads/wdsxh/check_in_qrcode/'.$row['id'], $row['createtime'].'.png'); + $value = $save_path; + } + } + } + } + if (!empty($value)) { + $value = request()->domain().$value; + } + return $value; + } + public function getPointsStatusList() { return ['2' => __('Points_status 2'), '1' => __('Points_status 1')]; @@ -216,6 +260,4 @@ class Activity extends Model { return ['1' => __('启用单独证书'), '2' => __('使用统一证书')]; } - - } diff --git a/application/admin/view/wdsxh/activity/activity_apply/index.html b/application/admin/view/wdsxh/activity/activity_apply/index.html index 34fb651..2142942 100644 --- a/application/admin/view/wdsxh/activity/activity_apply/index.html +++ b/application/admin/view/wdsxh/activity/activity_apply/index.html @@ -9,11 +9,6 @@ {:__('Add')} - - - - -