master
cody 5 months ago
parent 506c2c3471
commit bf5f51a347

@ -135,28 +135,11 @@ class OtherController extends CommonController
public function test()
{
$courseId = 115;
$course = Course::find($courseId);
$path = config('filesystems.disks.public.root') . '/course_qrcode/' . $course->id . '_big.png';
$url = config('filesystems.disks.public.url') . '/course_qrcode/' . $course->id . '_big.png';
$fileSys = new Filesystem();
if ($fileSys->exists($path)) {
return $url;
}
$config = [
'app_id' => \config('app.applet_appid'),
'secret' => \config('app.applet_secret')
];
$app = Factory::miniProgram($config);
$tmp = $app->app_code->get('packages/course/detail?' . 'id=' . $courseId, [
'width' => 1280,
'env_version' => "release" // 正式版
// 'env_version' => "trial" // 体验版
]);
$dir = dirname($path);
$fileSys->ensureDirectoryExists($dir, 0755, true);
$fileSys->put($path, $tmp);
return $url;
$appointmentModel = Appointment::find(288);
$appointmentConfig = $appointmentModel->site_detail;
$result = (new Appointment())->appointDoor($appointmentModel, $appointmentConfig);
dd($result);
}

Loading…
Cancel
Save