master
cody 8 months ago
parent 4d58d79fe4
commit be72c236af

@ -216,11 +216,11 @@ class Course extends SoftDeletesModel
/** /**
* 获取问卷小程序码 * 获取问卷小程序码
*/ */
public function getEvaluationQrcode($courseId) public function getEvaluationQrcode($id)
{ {
$course = Course::find($courseId); $courseContentEvaluation = CourseContentEvaluation::find($id);
$path = config('filesystems.disks.public.root') . '/course_evaluation_qrcode/' . $course->id . '.png'; $path = config('filesystems.disks.public.root') . '/course_evaluation_qrcode/' . $courseContentEvaluation->id . '.png';
$url = config('filesystems.disks.public.url') . '/course_evaluation_qrcode/' . $course->id . '.png'; $url = config('filesystems.disks.public.url') . '/course_evaluation_qrcode/' . $courseContentEvaluation->id . '.png';
$fileSys = new Filesystem(); $fileSys = new Filesystem();
if ($fileSys->exists($path)) { if ($fileSys->exists($path)) {
return $url; return $url;
@ -230,7 +230,7 @@ class Course extends SoftDeletesModel
'secret' => \config('app.applet_secret') 'secret' => \config('app.applet_secret')
]; ];
$app = Factory::miniProgram($config); $app = Factory::miniProgram($config);
$tmp = $app->app_code->get('packages/surveyFill/index?id=' . $courseId, [ $tmp = $app->app_code->get('packages/surveyFill/index?id=' . $id, [
// todo:: 版本切换 // todo:: 版本切换
// 'env_version' => "release" // 正式版 // 'env_version' => "release" // 正式版
'env_version' => "trial" // 体验版 'env_version' => "trial" // 体验版

Loading…
Cancel
Save