卷轴模式系统会员分销体系介绍和核心源码

以下内容是关于卷轴模式系统开发的内容,关于会员分销体系的会员升级开发的核心源码段和会员升级要求的内容

一、以下是卷轴模式商城里会员分销和升级的部分核心源码

public function regionAgentDetail()
    {
        $title = '区域代理';
        if (empty($this->uid)) {
            return $this->outMessage($title, null, '-9999', "无法获取会员登录信息");
        }
        $nfx_region_agent = new NfxRegionAgent();
        $shop_info = $nfx_region_agent->getShopRegionAgentConfig($this->instance_id);
        
        $region_agent_info = $nfx_region_agent->getPromoterRegionAgentValidDetail($this->instance_id, $this->uid);
        $address = new Address();
        $address_info = $address->getProvinceName($region_agent_info['agent_provinceid']);
        $agent_name = '省代';
        if ($region_agent_info['agent_type'] > 1) {
            $address_info .= $address->getCityName($region_agent_info['agent_cityid']);
            $agent_name = '市代';
        }
        if ($region_agent_info['agent_type'] > 2) {
            $address_info .= $address->getDistrictName($region_agent_info['agent_districtid']);
            $agent_name = '区代';
        }
        $nfx_user = new NfxUser();
        $user_account = $nfx_user->getNfxUserAccount($this->uid, $this->instance_id); // 佣金
        if ($region_agent_info["agent_type"] == 1) {
            $rate = $shop_info["province_rate"];
        } elseif ($region_agent_info["agent_type"] == 2) {
            $rate = $shop_info["city_rate"];
        } else {
            $rate = $shop_info["district_rate"];
        }
        $data = array(
            'agent_name' => $agent_name,
            'address_info' => $address_info,
            'commission_region_agent' => $user_account['commission_region_agent'],
            'rate' => $rate
        );
        return $this->outMessage($title, $data);
    }
    
    /**
     * 分销商申请检测
     */
    public function checkApplyPromoter()
    {
        $title = '分销商申请信息';
        if (empty($this->uid)) {
            return $this->outMessage($title, null, '-9999', "无法获取会员登录信息");
        }
        $reapply = isset($this->params['reapply']) ? $this->params['reapply'] : 0;
        // 分销商信息表
        $nfx_promoter = new NfxPromoter();
        $promoter_info = $nfx_promoter->getUserPromoter($this->uid);
        
        $shop_config = new NfxShopConfig();
        $nfx_shop_config = $shop_config->getShopConfigDetail();
        if ($nfx_shop_config['is_distribution_enable'] == 0) {
            return $this->outMessage($title, null, -10, '当前店铺未开启分销');
        }
        
        $promoter_info = empty($promoter_info) ? null : $promoter_info;
        
        // 获取店铺分销商等级
        $promoter_level = $nfx_promoter->getPromoterLevelAll($this->instance_id, "level_money asc");
        if (empty($promoter_level)) {
            return $this->outMessage($title, null, -10, '当前店铺未设置分销商');
        }
        
        // 获取用户在本店的消费
        $member_service = new MemberService();
        $uid = $this->uid;
        $user_consume = $member_service->getShopUserConsume($uid);
        $data = array(
            'reapply' => $reapply,
            'user_consume' => $user_consume,
            'promoter_level' => $promoter_level,
            'promoter_info' => $promoter_info
        );
        return $this->outMessage($title, $data);
    }

二、邀请码表现形式是多样的
1.在微信小程序里分享,默认带用户邀请码;
2.在微信公众号网页地址里分享用户,默认带openidd;
3.在H5地址里分享,url地址里带一个邀请码参数的形式;
4.在二维码图片扫码注册的时候,二维码里的url地址邀请码也是自动加载绑定;
5.注册强制邀请码,否则不能注册,在用户注册页面,可以强制要求用户输入专属邀请码

卷轴模式的系统客户端是APP,设置的分享码是二维码海报和邀请地址的形式,当把分享信息发给用户注册的时候,邀请码自动填写的;

三、卷轴模式系统APP客户端会员的分销数据查看
1.在卷轴系统里,分享用户注册,通过实名认证,可以设定系统奖励推荐人活力值。
2.会员注册后,在推荐的推荐列表里看到会员的基本信息,例如:昵称,隐藏了中间号码的电话,注册时间,会员等级。
3.列表查看会员基本信息。按照注册会员和有效会员方式查看;按照会员等级查看有效会员统计数据;

四、卷轴系统里分销邀请会员的升级机制设计规则:
在系统服务端里设置相关的参数指标,每个数字指标都能自由设定,方便运营的时候做调整。
1.升级当前会员级别,直推有效注册会员数量设定 。
2.升级当前会员级别,直推特殊级别会员数量设定。
2.升级当前会员级别,系统后台设定大区活跃值指标。
3.升级当前会员级别,系统后台设定小区活跃度指标
以上中括弧里的数字,都是需要在服务端设定控制面板来填写。会员升级触发机制,自动触发,例如当前白银会员的条件满足了黄金级别的指标,那么程序自动触发升级当前会员等级为黄金会员身份。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值