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