贝城系统开发玩法介绍与开发源代码分享

贝城众筹玩法介绍:

(一)100-3000元免费消费和抢购

(2) 购买成功,7天内自动获得10%广告补贴(70%现金)(30%购物券)

(3) 购物券可线上线下兑换

(4) 不限体线,1%手续费

例如:今天购买3000元,第八天获得3210元和3090元购物券。 购物券可随意兑换(手表、数码产品、珠宝、服装等)共赢模式的落地需要来自:消费者、分享者、布局团队负责人、湾城众筹体验中心受益于 公司的观点。

1.消费者:我们的贝城众筹让消费者免费注册,订阅购物券,兑换商城内所有商品,还可以获得10%的广告补贴,70%的体线广告补贴,30%的购物券。

2、分享者:只需直接分享给5人预约抢购一次,即可获得4%的分享补贴。

3、版面的头部:

1. 4%的组长,分享5个消费者。 会员可以在每个商品区每期订阅100-3000个配额。 获得每笔认购营业额4%的股份补贴

70%车身线,30%购物券。

2. 6%团长:服务4%团长5团,系统中有30团团团4团团长。 每个会员每期在每个商品区认购100-3000个名额。 每次订阅获得6%的分成补贴,70%的车身线,30%的购物券。

3、8%团长:直属4%团长服务10人,系统内4%团长300人。 每个会员每期在每个商品区认购100-3000个名额。 每次订阅获得8%分成补贴,70%可以使用,30%购物券,还可以享受管理奖励

四、公司视角:引流数据,产品流通,打造超级管道,线上线下互创,互联互销,形成生态闭环,打造千亿级平台。

5.开设贝城众筹体验中心!

贝城众筹系统开发部分核心代码分享:

<?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('取消失败');
    }
}

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值