2022 采用uni-app开发的多端圈子社区论坛系统

2022 采用uni-app开发的多端圈子社区论坛系统

系统基于TP6+Uni-app框架开发;客户移动端采用uni-app开发,管理后台TH6开发。

系统支持微信公众号端、微信小程序端、H5端、PC端多端账号同步,可快速打包生成APP。

拥有完善的后台管理,不需要你懂PHP,按照教程3分钟安装完即可使用。

堪比深夜的杜蕾斯还方便。我们为你准备漂亮的UI前端。

导入UNI,2分钟编译为小程序,3分钟编译为安卓app,5分钟编译为ios系统。

全开源开发。全开源!!!全开源!!!全开源!!!

话不多说上效果图

前端截图

在这里插入图片描述
在这里插入图片描述在这里插入图片描述

后台截图

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

在这里插入图片描述
在这里插入图片描述

附上点源码:

<?php
// +----------------------------------------------------------------------
// | 小牛Admin
// +----------------------------------------------------------------------
// | Website: www.xnadmin.cn
// +----------------------------------------------------------------------
// | Author: dav <85168163@qq.com>
// +----------------------------------------------------------------------

namespace app\admin\controller;

use app\common\controller\AdminBase;
use app\common\model\AuthRule;
use utils\Data;

class Auth extends AdminBase
{
    public function index()
    {
        $list = AuthRule::order('sort asc, id asc')->select()->toArray();
        $list = Data::tree($list, 'title','id');
        return view('',['list'=>$list])->filter(function($content){
            return str_replace("&amp;emsp;",'&emsp;',$content);
        });
    }

    /**
     * 编辑节点
     * @return \think\response\View
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\DbException
     * @throws \think\db\exception\ModelNotFoundException
     */
    public function edit()
    {
        if( $this->request->isPost() ) {
            $param = $this->request->param();
            $result = AuthRule::update($param);
            if( $result ) {
                if(isset($param['is_curd']) && $param['is_curd'] == 1){
                    //自动生成add  eidt  delete
                    // $this->curd($param,$param);
                }
                xn_add_admin_log('编辑权限节点');
                $this->success('操作成功');
            } else {
                $this->error('操作失败');
            }
        }
        $id = $this->request->get('id');
        $data = AuthRule::where('id',$id)->find();
        $list = AuthRule::select()->toArray();
        $list = Data::tree($list, 'title','id');
        return view('form',['data'=>$data,'list'=>$list,'pid'=>$data['pid']])->filter(function($content){
            return str_replace("&amp;emsp;",'&emsp;',$content);
        });
    }

    /**
     * 添加节点
     * @return \think\response\View
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\DbException
     * @throws \think\db\exception\ModelNotFoundException
     */
    public function add()
    {
        if( $this->request->isPost() ) {
            $param = $this->request->param();
            $result = AuthRule::create($param);
            if( $result ) {
                if(isset($param['is_curd']) && $param['is_curd'] == 1){
                    //自动生成add  eidt  delete
                    $this->curd($param,$result->toArray());
                }
                xn_add_admin_log('添加权限节点');
                $this->success('操作成功');
            } else {
                $this->success('操作失败');
            }
        }
        $list = AuthRule::select()->toArray();
        $list = Data::tree($list, 'title','id');
        return view('form',['list'=>$list,'pid'=>$this->request->get('pid')])->filter(function($content){
            return str_replace("&amp;emsp;",'&emsp;',$content);
        });
    }

    public function curd($param,$pid)
    {
        $pid = $pid['id'];
        $curd = [
            [
                'pid' => $pid,
                'title' => '添加',
                'name'  => xn_str_lreplace(strrchr($param['name'],'/'),'/add',$param['name'])
            ],
            [
                'pid' => $pid,
                'title' => '编辑',
                'name'  => xn_str_lreplace(strrchr($param['name'],'/'),'/edit',$param['name'])
            ],
            [
                'pid' => $pid,
                'title' => '删除',
                'name'  => xn_str_lreplace(strrchr($param['name'],'/'),'/delete',$param['name'])
            ]
        ];
        // var_dump($curd);exit;
        foreach ($curd as $v){
            $res = AuthRule::create($v);
        }
        return $res;
    }

    /**
     * 删除节点
     */
    public function delete()
    {
        $id = intval($this->request->get('id'));
        !($id>0) && $this->error('参数错误');
        $child_count = AuthRule::where('pid',$id)->count();
        $child_count && $this->error('请先删除子节点');
        AuthRule::destroy($id);
        xn_add_admin_log('删除权限节点');
        $this->success('删除成功');
    }

    /**
     * 排序
     */
    public function sort()
    {
        $param = $this->request->post();
        foreach ($param as $k => $v) {
            $v=empty($v) ? null : $v;
            AuthRule::where('id', $k)->save(['sort'=>$v]);
        }
        $this->success('排序成功', url('index'));
    }
}

需要源码的小伙伴留下联系方式我会联系你!

感谢阅读。留下个宝贵的关注和点赞收藏吧!

  • 2
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 8
    评论
uni-app开发app端时,可能会遇到以下一些安全性问题: 1. 客户端漏洞:在app端开发中,客户端可能存在漏洞,例如不安全的代码编写、未经验证的输入等。攻击者可以利用这些漏洞进行代码注入、跨站脚本攻击(XSS)等。 2. 数据传输安全:在app端与服务器之间的数据传输过程中,如果没有适当的加密机制,攻击者可能会截获敏感数据。因此,使用HTTPS协议进行数据传输是一个重要的安全措施。 3. 身份验证与授权:在app中,用户的身份验证和授权是非常重要的。如果身份验证机制存在漏洞,攻击者可以冒充合法用户的身份进行恶意操作。因此,需要使用安全的身份验证和授权机制,例如使用令牌(Token)进行用户身份验证。 4. 代码混淆与反编译:由于uni-app开发app是基于前端技术实现的,攻击者可以通过反编译app获取源代码,并进行逆向工程分析。为了增加代码的安全性,可以采用代码混淆技术来对代码进行保护。 5. 动态加载与远程代码执行:uni-app支持动态加载远程代码的功能,这也增加了一定的安全风险。如果不对加载的代码进行有效的验证和过滤,攻击者可以通过远程代码执行漏洞进行攻击。 为了提高app端的安全性,开发者可以采取以下措施: - 定期更新与升级:及时更新uni-app框架和相关插件,以修复已知的安全漏洞。 - 代码审计与测试:进行代码审计,发现潜在的安全问题,并进行相关测试以确保代码的安全性。 - 安全编码实践:采用安全编码实践,例如避免使用不安全的函数、过滤用户输入等。 - 强化身份验证与授权:使用安全的身份验证和授权机制,例如使用双因素身份验证、限制权限等。 - 加密与传输安全:使用合适的加密算法和协议保护数据传输的安全性。 以上是一些常见的uni-app开发app端时可能遇到的安全性问题和相应的解决方案。开发者在开发过程中应该注重安全性并采取相应的措施来保护用户数据和应用程序的安全。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 8
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

程序员-南

你的鼓励将是我创作最大的动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值