diff --git a/lib/zin/wg/thinkstepquote/v1.php b/lib/zin/wg/thinkstepquote/v1.php index ea926b6f98..0f70b7e33a 100644 --- a/lib/zin/wg/thinkstepquote/v1.php +++ b/lib/zin/wg/thinkstepquote/v1.php @@ -16,4 +16,24 @@ class thinkStepQuote extends wg 'citation?: int=1', // 引用方式 'selectColumn?: string', // 选择列 ); + + public static function getPageJS(): string + { + return file_get_contents(__DIR__ . DS . 'js' . DS . 'v1.js'); + } + protected function build(): array + { + global $lang, $app; + $app->loadLang('thinkstep'); + list($step, $setOption, $quoteTitle, $quoteQuestions, $citation, $selectColumn, $questionType) = $this->prop(array('step', 'setOption', 'quoteTitle', 'quoteQuestions', 'citation', 'selectColumn', 'questionType')); + if($step) + { + $enableOther = $step->options->enableOther ?? 0; + $setOption = isset($step->options->setOption) ? $step->options->setOption : false; + $defaultQuote = !empty($quoteQuestions) ? $quoteQuestions[0]->id : null; + $quoteTitle = isset($step->options->quoteTitle) ? $step->options->quoteTitle : $defaultQuote; + $citation = isset($step->options->citation) ? $step->options->citation : 1; + $selectColumn = isset($step->options->selectColumn) ? $step->options->selectColumn : null; + } + } } \ No newline at end of file