小储云优化默认用户中心公告无法打开问题

老韩
2022-06-15 / 0 评论 / 304 阅读 / 正在检测是否收录...
温馨提示:
本文最后更新于2022年06月15日,已超过706天没有更新,若内容或图片失效,请留言反馈。

默认用户打开公告 就会无限制加载转圈圈。导致无法正常查看公告内容,很烦。

https://tva4.sinaimg.cn/large/007d4KVKly8h38xiu28r0j30zj0h2q4h.jpg

应用商店已经发布了一个优化签到功能的插件,没法再上传其他插件。两个一起安装会有一个的代码被覆盖掉。

动手能力强的自己按照教程来一遍吧。

第一步

将该段代码粘贴至路径:

includes/fun.core.php
/**
 * 查看公告
 * */
public static function notification($id){
    $DB = SQL::DB();
    $Get = $DB->get('notice', ['content', 'title', 'date'], ['id' => (int)$id]);
    if (!$Get) {
        show_msg('温馨提示', '公告通知不存在!', 4);
    }
    show_msg($Get['title'], $Get['content'] . '<hr>发布时间:' . $Get['date'], 3);
}

https://tva4.sinaimg.cn/large/007d4KVKly8h38xbapab2j30p10m0n08.jpg

第二步

将该段代码粘贴至目录:

user/ajax.php
case 'notification':
    reward::notification($_QET['id']);
    break;

https://tva1.sinaimg.cn/large/007d4KVKly8h38xcccrxsj310k0mb0x1.jpg

# 第三步

将该段代码粘贴至目录:

user/index.php

function notification(id){
      let a = layer.open({
        type: 2,
        title: '通知',
        shadeClose: true,
        shade: false,
        maxmin: true, //开启最大化最小化按钮
        area: ['80%', '80%'],
        content: "ajax.php?act=notification&id="+id
      });
      layer.full(a);
  }

https://tva3.sinaimg.cn/large/007d4KVKly8h38xf1s71vj30p20jemzd.jpg

点击公告后的效果是这样的

l4f8fpge.png

18

评论 (0)

取消