富络经典源码富络经典系统开发原理分享

富络经典作为一款线上场景体验式APP,让用户通过线上虚拟场景与线下实际相结合,采用B2C商业模式,不仅做到品牌推广宣传,还能通过线上+线下相结合,参与企业的发展盈利,实现企业平台化,公司股东化,全民参与化

实现先体验后消费的共赢目的,彻底解决传统企业发展难,销售难的问题,真正打造人+场+货一体化商业闭环

富络经典参与规则

向平台兑换酒粮后,在酒窖里进行发酵,从而得到酒体,酒体可以在公司的商店里进行回购,得到余额,余额可以提现

如果不兑换酒体,可以转换成酒粮继续酿酒,产生收益

每仓有50%以预约的方式,50%以抢占的方式,2天/仓,仓/30%增长

第三仓满仓后,第一仓的酒粮成功酿出酒体,可以得到6%的增值收益

例如:100斤的酒粮=106斤酒体
两天一仓,三仓为一轮,也就是6天,按照一个月30天,等于可以酿5轮的酒体,5x6%=30%【增值收益相当于月化率30%】,这是个人收益,还不包含团队收益,每仓以30%的规模增长,假如到了第100仓的时候,酒窖没有达到规模,那么就意味着酿酒失败,该仓酒粮全部返还,最后预约的20人将获得该酒窖整体酒粮流水0.1%的奖励
该仓倒数一仓,二仓(第99仓,98仓)酿酒失败,可以获得70%的酒体,30%的积分+优先权
兑换产品后额外获赠相应的广告值        每天酒粮整体流水的1%
例:今日酒粮流水是1亿,积分看广告是1千万,A手上持有300的广告值,那么A今天获得的酒粮相当于1亿/1千万x300=A所得酒粮
该仓酿酒失败后,从第一仓开始循环,周而复始,生生不息

富络经典系统开发源码分享:

<?php



namespace app\admin\controller\article;



use app\admin\controller\AuthController;

use app\admin\model\system\SystemAttachment;

use crmeb\services\{

    UtilService as Util, JsonService as Json

};

use app\admin\model\article\{

    ArticleCategory as ArticleCategoryModel, Article as ArticleModel

};



/**

 * 图文管理

 * Class WechatNews

 * @package app\admin\controller\wechat

 */

class Article extends AuthController

{

    /**

     * TODO 显示后台管理员添加的图文

     * @return mixed

     * @throws \think\db\exception\DataNotFoundException

     * @throws \think\db\exception\ModelNotFoundException

     * @throws \think\exception\DbException

     */

    public function index()

    {

        $where = Util::getMore([

            ['title', ''],

            ['cid', $this->request->param('pid', '')],

        ], $this->request);

        $this->assign('where', $where);

        $where['merchant'] = 0;//区分是管理员添加的图文显示  0 还是 商户添加的图文显示  1

        $tree = sort_list_tier(ArticleCategoryModel::getArticleCategoryList());

        $this->assign(compact('tree'));

        $this->assign(ArticleModel::getAll($where));

        return $this->fetch();

    }

​

    /**

     * TODO 文件添加和修改

     * @return mixed

     * @throws \think\db\exception\DataNotFoundException

     * @throws \think\db\exception\ModelNotFoundException

     * @throws \think\exception\DbException

     */

    public function create()

    {

        $id = $this->request->param('id');

        $cid = $this->request->param('cid');

        $news = [];

        $all = [];

        $news['id'] = '';

        $news['image_input'] = '';

        $news['title'] = '';

        $news['author'] = '';

        $news['is_banner'] = '';

        $news['is_hot'] = '';

        $news['content'] = '';

        $news['synopsis'] = '';

        $news['url'] = '';

        $news['cid'] = [];

        $select = 0;

        if ($id) {

            $news = ArticleModel::where('n.id', $id)->alias('n')->field('n.*,c.content')->join('ArticleContent c', 'c.nid=n.id', 'left')->find();

            if (!$news) return $this->failed('数据不存在!');

            $news['cid'] = explode(',', $news['cid']);

            $news['content'] = htmlspecialchars_decode($news['content']);

        }

        if ($cid && in_array($cid, ArticleCategoryModel::getArticleCategoryInfo(0, 'id'))) {

            $all = ArticleCategoryModel::getArticleCategoryInfo($cid);

            $select = 1;

        }

        if (!$select) {

            $list = ArticleCategoryModel::getTierList();

            foreach ($list as $menu) {

                $all[$menu['id']] = $menu['html'] . $menu['title'];

            }

        }

        $this->assign('all', $all);

        $this->assign('news', $news);

        $this->assign('cid', $cid);

        $this->assign('select', $select);

        return $this->fetch();

    }



    /**

     * 上传图文图片

     * @return \think\response\Json

     */

    public function upload_image()

    {

        $res = Upload::instance()->setUploadPath('wechat/image/' . date('Ymd'))->image($_POST['file']);

        if (!is_array($res)) return Json::fail($res);

        SystemAttachment::attachmentAdd($res['name'], $res['size'], $res['type'], $res['dir'], $res['thumb_path'], 5, $res['image_type'], $res['time']);

        return Json::successful('上传成功!', ['url' => $res['dir']]);

    }



    /**

     * 添加和修改图文

     */

    public function add_new()

    {

        $data = Util::postMore([

            ['id', 0],

            ['cid', []],

            'title',

            'author',

            'image_input',

            'content',

            'synopsis',

            'share_title',

            'share_synopsis',

            ['visit', 0],

            ['sort', 0],

            'url',

            ['is_banner', 0],

            ['is_hot', 0],

            ['status', 1],]);

        $data['cid'] = implode(',', $data['cid']);

        $content = $data['content'];

        unset($data['content']);

        if ($data['id']) {

            $id = $data['id'];

            unset($data['id']);

            $res = false;

            ArticleModel::beginTrans();

            $res1 = ArticleModel::edit($data, $id, 'id');

            $res2 = ArticleModel::setContent($id, $content);

            if ($res1 && $res2) {

                $res = true;

            }

            ArticleModel::checkTrans($res);

            if ($res)

                return Json::successful('修改图文成功!', $id);

            else

                return Json::fail('修改图文失败,您并没有修改什么!', $id);

        } else {

            $data['add_time'] = time();

            $data['admin_id'] = $this->adminId;

            $res = false;

            ArticleModel::beginTrans();

            $res1 = ArticleModel::create($data);

            $res2 = false;

            if ($res1)

                $res2 = ArticleModel::setContent($res1->id, $content);

            if ($res1 && $res2) {

                $res = true;

            }

            ArticleModel::checkTrans($res);

            if ($res)

                return Json::successful('添加图文成功!', $res1->id);

            else

                return Json::successful('添加图文失败!', $res1->id);

        }

    }



    /**

     * 删除图文

     * @param $id

     * @return \think\response\Json

     */

    public function delete($id)

    {

        $res = ArticleModel::del($id);

        if (!$res)

            return Json::fail('删除失败,请稍候再试!');

        else

            return Json::successful('删除成功!');

    }



    public function merchantIndex()

    {

        $where = Util::getMore([

            ['title', '']

        ], $this->request);

        $this->assign('where', $where);

        $where['cid'] = input('cid');

        $where['merchant'] = 1;//区分是管理员添加的图文显示  0 还是 商户添加的图文显示  1

        $this->assign(ArticleModel::getAll($where));

        return $this->fetch();

    }



    /**

     * 关联文章 id

     * @param int $id

     */

    public function relation($id = 0)

    {

        $this->assign('id', $id);

        return $this->fetch();

    }



    /**

     * 保存选择的产品

     * @param int $id

     */

    public function edit_article($id = 0)

    {

        if (!$id) return Json::fail('缺少参数');

        list($product_id) = Util::postMore([

            ['product_id', 0]

        ], $this->request, true);

        if (ArticleModel::edit(['product_id' => $product_id], ['id' => $id]))

            return Json::successful('保存成功');

        else

            return Json::fail('保存失败');

    }



    /**

     * 取消绑定的产品id

     * @param int $id

     */

    public function unrelation($id = 0)

    {

        if (!$id) return Json::fail('缺少参数');

        if (ArticleModel::edit(['product_id' => 0], $id))

            return Json::successful('取消关联成功!');

        else

            return Json::fail('取消失败');

    }

}





 

猜你喜欢

转载自blog.csdn.net/weixin_59284282/article/details/124979453