以下内容是关于卷轴模式系统开发的内容,关于会员分销体系的会员升级开发的核心源码段和会员升级要求的内容
一、以下是卷轴模式商城里会员分销和升级的部分核心源码
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.升级当前会员级别,系统后台设定小区活跃度指标
以上中括弧里的数字,都是需要在服务端设定控制面板来填写。会员升级触发机制,自动触发,例如当前白银会员的条件满足了黄金级别的指标,那么程序自动触发升级当前会员等级为黄金会员身份。