代码如下
<?php echo dr_field_form([
'name' => '内容',
'ismain' => 1,
'fieldtype' => 'Ueditor',
'fieldname' => 'content',
'setting' => array('option' => array( 'mode' => 3, 'height' => 220, 'width' => '100%', 'tool' => IS_PC ? '\'undo\', \'bold\', \'forecolor\'' : '\'undo\', \'bold\''), 'validate' => array('xss' => 1))
]);
?>
但是到了移动端后发现 前端控制台报错了 "Uncaught ReferenceError: baidu is not defined"
代码是一样的
<?php echo dr_field_form([
'name' => '内容',
'ismain' => 1,
'fieldtype' => 'Ueditor',
'fieldname' => 'content',
'setting' => array('option' => array( 'mode' => 3, 'height' => 220, 'width' => '100%', 'tool' => IS_PC ? '\'undo\', \'bold\', \'forecolor\'' : '\'undo\', \'bold\''), 'validate' => array('xss' => 1))
]);
?>这个问题的出现是的时期是,我将移动端和pc端分别给了不同的域名,就出现了这样的结果
是这个吗
pja.html模版
{if $member && dr_in_array(2, $member['groupid'])} <form action="" method="post" id="myform_comment" class="comment-form" style="box-sizing: border-box;"> {dr_form_hidden()} <input type="hidden" name="is_ajax" value="1"> <input type="hidden" name="catid" value="{$catid}"> <div id="respond-textarea"> <?php echo dr_field_form([ 'name' => '内容', 'ismain' => 1, 'fieldtype' => 'Ueditor', 'fieldname' => 'content', 'setting' => array('option' => array( 'mode' => 3, 'height' => 150, 'width' => '100%', 'tool' => IS_PC ? '\'undo\', \'bold\', \'forecolor\'' : '\'undo\', \'bold\''), 'validate' => array('xss' => 1)) ]); ?> </div> </div> <button class="flex-col justify-start items-center button_6" id="comment_submit" onclick="dr_bbs_comment()" type="button" style="outline: none;border: none;color: #fff;font-size: 1.25rem; line-height: 1.22rem;width: 100%; margin-top: 15px;">发表</button> </form> {/if}pja.html
{if $member && dr_in_array(2, $member['groupid'])} <form action="" method="post" id="myform_comment" class="comment-form" style="padding: 0 15px; box-sizing: border-box;"> {dr_form_hidden()} <input type="hidden" name="is_ajax" value="1"> <input type="hidden" name="catid" value="{$catid}"> <div id="respond-textarea"> <?php echo dr_field_form([ 'name' => '内容', 'ismain' => 1, 'fieldtype' => 'Ueditor', 'fieldname' => 'content', 'setting' => array('option' => array( 'mode' => 3, 'height' => 220, 'width' => '100%', 'tool' => IS_PC ? '\'undo\', \'bold\', \'forecolor\'' : '\'undo\', \'bold\''), 'validate' => array('xss' => 1)) ]); ?> </div> <p class="form-submit" style="margin-top: 20px; text-align: right; margin-bottom: 20px;"> <button class="color button dark_button medium button_4" id="comment_submit" onclick="dr_bbs_comment()" type="button" style="outline: none;border: none;color: #fff;font-size: 1.25rem; line-height: 1.22rem;">回复</button> </p> </form> {/if}