当前位置:网站首页>Fuluo classic source code Fuluo classic system development principle sharing

Fuluo classic source code Fuluo classic system development principle sharing

2022-06-11 02:58:00 Procedure 15528175269

Fuluo classic is an online scene experience APP, Let users combine online virtual scenes with offline reality , use B2C Business model , Not only do brand promotion , And online + Combine offline , Participate in the development and profit of the enterprise , Realize enterprise platformization , Shareholders of the company , Participation of the whole people

Realize the win-win goal of "experience before consumption" , Thoroughly solve the difficulties in the development of traditional enterprises , The problem of difficult sales , Really build people + site + Goods integration business closed loop

Fuluo classic participation rules

Exchange wine and grain to the platform , Ferment in a wine cellar , To get the wine body , The wine body can be bought back in the company's store , Get the balance , The balance can be withdrawn

If you don't exchange for wine , It can be converted into wine and grain to continue brewing , Generate revenue

Each warehouse has 50% By appointment ,50% In a preemptive manner ,2 God / warehouse , warehouse /30% growth

After the third warehouse is full , The first storehouse of wine and grain has successfully brewed wine , You can get 6% Value added income

for example :100 Jin of wine and grain =106 Jin wine body
One warehouse for two days , Three positions are a round , That is to say 6 God , According to a month 30 God , Equal to can brew 5 Round wine body ,5x6%=30%【 The value-added income is equivalent to the monthly rate 30%】, This is a personal gain , Not including team benefits , Each warehouse is marked with 30% The scale of growth , If we arrive at the 100 When I was in the warehouse , The wine cellar has not reached the scale , Then it means that wine making fails , All wine and grain in this warehouse will be returned , Last appointment 20 People will get the whole wine and grain flowing water of the wine cellar 0.1% Reward
This position counts down to one , Second warehouse ( The first 99 warehouse ,98 warehouse ) Wine making failed , You can get 70% Body of wine ,30% Integral + Priority
After exchanging the product, you will get the corresponding advertising value         Every day, the whole wine and grain flow 1%
example : Today's wine and grain flow is 1 Billion , To see advertising with points is 1 Ten million ,A Hold... In your hands 300 Advertising value of , that A Today's wine and grain is equivalent to 1 Billion /1 Ten million x300=A Wine and grain
After this warehouse failed to make wine , Start circulation from the first warehouse , Go round and begin again , Circle of life

Fuluo classic system development source code sharing :

<?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

};



/**

 *  Graphic management 

 * Class WechatNews

 * @package app\admin\controller\wechat

 */

class Article extends AuthController

{

    /**

     * TODO  Display the pictures and texts added by the background administrator 

     * @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;// The distinction is the graphic display added by the Administrator   0  still   Graphic display added by the merchant   1

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

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

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

        return $this->fetch();

    }

​

    /**

     * TODO  File addition and modification 

     * @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(' The data doesn't exist !');

            $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();

    }



    /**

     *  Upload graphic pictures 

     * @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(' Upload successful !', ['url' => $res['dir']]);

    }



    /**

     *  Add and modify graphics and text 

     */

    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(' The picture and text were modified successfully !', $id);

            else

                return Json::fail(' Failed to modify the picture and text , You didn't change anything !', $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(' Successfully added picture and text !', $res1->id);

            else

                return Json::successful(' Failed to add picture and text !', $res1->id);

        }

    }



    /**

     *  Delete text 

     * @param $id

     * @return \think\response\Json

     */

    public function delete($id)

    {

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

        if (!$res)

            return Json::fail(' Delete failed , Please try again later !');

        else

            return Json::successful(' Delete successful !');

    }



    public function merchantIndex()

    {

        $where = Util::getMore([

            ['title', '']

        ], $this->request);

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

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

        $where['merchant'] = 1;// The distinction is the graphic display added by the Administrator   0  still   Graphic display added by the merchant   1

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

        return $this->fetch();

    }



    /**

     *  Related articles  id

     * @param int $id

     */

    public function relation($id = 0)

    {

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

        return $this->fetch();

    }



    /**

     *  Save your product selection 

     * @param int $id

     */

    public function edit_article($id = 0)

    {

        if (!$id) return Json::fail(' Lack of parameter ');

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

            ['product_id', 0]

        ], $this->request, true);

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

            return Json::successful(' Saved successfully ');

        else

            return Json::fail(' Save failed ');

    }



    /**

     *  Unbound products id

     * @param int $id

     */

    public function unrelation($id = 0)

    {

        if (!$id) return Json::fail(' Lack of parameter ');

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

            return Json::successful(' Disassociation succeeded !');

        else

            return Json::fail(' Cancellation failed ');

    }

}





 

原网站

版权声明
本文为[Procedure 15528175269]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/162/202206110230067070.html