wecenter侧边栏的推荐内容丢失原因和解决方案

君笑尘
君笑尘 This guy is lazy,Introduction has not been set

0 People liked this article · 1439 views

在wecenter详情页的侧边栏,有一个推荐内容,但是升级到3.6以后,很多人发现不见了,

其实不是不见了,是需要登录后才可见,我们可以通过简单的修改代码,让未登录的人也看到


打开/app/question/main.php 大约319行的位置,找到以下代码

  if ($question_topics)
{
foreach ($question_topics AS $key => $val)
{
$question_topic_ids[] = $val['topic_id'];
}
}

并把他移出 if 外层,即放在317行的 $this->user_id 上面,这样即使未登录,也可以看到推荐内容了

Published on 2021-11-15 14:51

Disclaimers:

This document is written by 君笑尘 Original published on 君笑尘的站长朋友 ,The copyright belongs to the author。

Log in,More exciting content waiting for you to find,Contribute wonderful answers,Participate in comment interaction

go Sign in! No accountgoregister

客服QQ:21407787

服务时间 09:00-18:00

服务热线

13800138000

价格和优惠

获取内部资料

了解最新功能和特性

扫码加好友

All Rights Reserved Powered BY WeCenter V4.1.0 © 2025