Merge branch 'dev' of https://gitea.f2b211.com/jsasg/orico-official-website into dev
This commit is contained in:
@@ -99,6 +99,21 @@ class Article extends Common
|
||||
$share_config = $this->getSysConfig($this->lang_id, ['article_share']);
|
||||
View::assign('share_config', $share_config['article_share']);
|
||||
|
||||
// 获取文章评论数据
|
||||
$comments = ArticleLeaveMessageModel::field([
|
||||
'id',
|
||||
'name',
|
||||
'email',
|
||||
'content',
|
||||
'created_at'
|
||||
])
|
||||
->article($id)
|
||||
->audited(true)
|
||||
->order(['id' => 'desc'])
|
||||
->limit(5)
|
||||
->select();
|
||||
View::assign('comments', $comments);
|
||||
|
||||
// 获取倒序或发布时间倒序3篇文章做为推荐文章
|
||||
$recommends = ArticleModel::field([
|
||||
'id',
|
||||
|
||||
@@ -212,7 +212,7 @@ class ContactUs extends Common
|
||||
'last_name' => $form_data['last_name'],
|
||||
'email' => $form_data['email'],
|
||||
'phone' => $form_data['phone'],
|
||||
'interested' => $form_data['interested'],
|
||||
'interested' => is_array($form_data['interested']) ? implode(',', $form_data['interested']) : $form_data['interested'],
|
||||
'referer_url' => request()->header('referer'),
|
||||
'website_url' => request()->header('host'),
|
||||
'message' => $form_data['message'],
|
||||
|
||||
@@ -16,4 +16,16 @@ class ArticleLeaveMessageModel extends ArticleLeaveMessageBaseModel
|
||||
use SoftDelete;
|
||||
// 软删除字段
|
||||
protected $deleteTime = 'deleted_at';
|
||||
|
||||
// 文章文章范围查询
|
||||
public function scopeArticle($query, $article_id)
|
||||
{
|
||||
$query->where('article_id', '=', $article_id);
|
||||
}
|
||||
|
||||
// 审核状态范围查询
|
||||
public function scopeAudited($query, bool $is_audited = true)
|
||||
{
|
||||
$query->where('is_audited', '=', (int)$is_audited);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
{notempty name="interested"}
|
||||
{volist name="interested" id="it"}
|
||||
<label class="cit">
|
||||
<input name="interested" type="checkbox" value="{$it}" class="sfbcheckboxit" />{$it}
|
||||
<input name="interested[]" type="checkbox" value="{$it}" class="sfbcheckboxit" />{$it}
|
||||
</label>
|
||||
{/volist}
|
||||
{/notempty}
|
||||
|
||||
@@ -28,25 +28,19 @@
|
||||
<!-- 文本渲染 -->
|
||||
<div class="blog_content">{$detail.content|raw}</div>
|
||||
</div>
|
||||
<!-- 评论只显示前面五条--->
|
||||
{notempty name="comments"}
|
||||
<div class="plmain">
|
||||
<div class="pl">
|
||||
<span class="titlepp">评论</span>
|
||||
<span class="titlepp">{:lang_i18n('评论')}</span>
|
||||
{volist name="comments" id="cm"}
|
||||
<div class="plit">
|
||||
<span class="name">张三:</span>
|
||||
<p>12sdfksdljfksdljdksf是看大家分厘卡聖誕節分厘卡聖誕節付款了</p>
|
||||
<span class="name">{$cm.name}:</span>
|
||||
<p>{$cm.content}</p>
|
||||
</div>
|
||||
<div class="plit">
|
||||
<span class="name">张三:</span>
|
||||
<p>12sdfksdljfksdljdksf是看大家分厘卡聖誕節分厘卡聖誕節付款了</p>
|
||||
</div>
|
||||
<div class="plit">
|
||||
<span class="name">张三:</span>
|
||||
<p>12sdfksdljfksdljdksf是看大家分厘卡聖誕節分厘卡聖誕節付款了</p>
|
||||
{/volist}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{/notempty}
|
||||
</div>
|
||||
<div class="atmright">
|
||||
{notempty name="share_config"}
|
||||
@@ -54,8 +48,7 @@
|
||||
<h3>{:lang_i18n('分享')}</h3>
|
||||
<div class="share_list">
|
||||
{volist name="share_config" id="sc"}
|
||||
<a class="atdit" {if condition="!empty($sc.is_blank) && $sc.is_blank.value == 1" }target="_blank" {/if}
|
||||
{notempty name="sc.url.value" }href="{$sc.url.value}" {/notempty}> <img src="{$sc.image.value}" />
|
||||
<a class="atdit" {if condition="!empty($sc.is_blank) && $sc.is_blank.value == 1" }target="_blank" {/if} {notempty name="sc.url.value" }href="{$sc.url.value}" {/notempty}> <img src="{$sc.image.value}" />
|
||||
{eq name=":array_key_exists('triggered_qrcode', $sc)" value="true"}
|
||||
<div class="triggered_qrcode">
|
||||
<img src="{$sc.triggered_qrcode.value}" />
|
||||
@@ -72,12 +65,10 @@
|
||||
<span>{:lang_i18n('名称')}</span>
|
||||
<input class="form-control itinp new_name" type="text" name="name" style="text-indent: 10px;">
|
||||
<span>{:lang_i18n('电子邮箱')}</span>
|
||||
<input class="form-control itinp new_email" type="email" name="email"
|
||||
style="text-indent: 10px; margin-bottom:0;">
|
||||
<input class="form-control itinp new_email" type="email" name="email" style="text-indent: 10px; margin-bottom:0;">
|
||||
<p style="color: #C6C7C9; font-size: 0.75rem; margin-bottom: 0.625rem;">{:lang_i18n('您的电子邮件地址不会被公开')}</p>
|
||||
<span>{:lang_i18n('留言内容')}</span>
|
||||
<textarea class="form-control itinp new_comment" name="content" rows="3"
|
||||
style="text-indent: 10px;width: 98%; margin-top: 0.625rem;margin-bottom: 0.625rem;border: 1px solid #DBDBDB;"></textarea>
|
||||
<textarea class="form-control itinp new_comment" name="content" rows="3" style="text-indent: 10px;width: 98%; margin-top: 0.625rem;margin-bottom: 0.625rem;border: 1px solid #DBDBDB;"></textarea>
|
||||
<div class="comment_btn" style="color:#ffffff;">{:lang_i18n('提交留言')}</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
{notempty name="interested"}
|
||||
{volist name="interested" id="it"}
|
||||
<label class="cit">
|
||||
<input name="interested" type="checkbox" value="{$it}" class="sfbcheckboxit" />{$it}
|
||||
<input name="interested[]" type="checkbox" value="{$it}" class="sfbcheckboxit" />{$it}
|
||||
</label>
|
||||
{/volist}
|
||||
{/notempty}
|
||||
|
||||
Reference in New Issue
Block a user