全部
常见问题
产品动态
精选推荐

标准版4.033fix分销问题的几点建议

管理 管理 编辑 删除
本帖最后由 tony 于 2021-3-24 15:56 编辑

1、个人测试分销关系绑定即使设定了新用户,如果没有上级的老用户扫描了其他用户分享的产品二维码,也会绑定上下级关系。这样会导致商城多付出一份二级佣金。

2、后台管理中,修改上级推广人时,选择的是此用户的下级分销人也能成功绑定而不会提示错误,这样有可能会出现重复计算佣金的情况,最好能加入不能绑定下级用户未上级推广人的提示。

3、个人觉得/app/services/message/wechat/MessageServices.php以下写法有问题,导致已经关注公众号的用户扫描公众号推广二维码二维码经常出现 绑定推荐人失败!的提示7718

4、另外/app/services/other/QrcodeServices.php

7719

5、关于后台推广方式生成公众号推广二维码出错问题个人测试将/app/services/other/QrcodeServices.php 下的

 /**

* 获取永久二维码

* @param $type

* @param $id

* @return array|mixed|\think\Model

* @throws \think\db\exception\DataNotFoundException

* @throws \think\db\exception\DbException

* @throws \think\db\exception\ModelNotFoundException

*/

public function getForeverQrcode($type, $id)

{

$where['third_id'] = $id;

$where['third_type'] = $type;

$res = $this->dao->getOne($where);

if (!$res) {

$this->createForeverQrcode($id, $type);

$res = $this->getForeverQrcode($type, $id);

}

if (!$res['ticket']) throw new AdminException('永久二维码获取错误');

return $res;

}

/**

* 永久二维码生成

* @param $id

* @param $type

*/

public function createForeverQrcode($id, $type)

{

$qrcode = WechatService::qrcodeService();

$data = $qrcode->forever($id)->toArray();

$data['qrcode_url'] = $data['url'];

$data['url'] = $qrcode->url($data['ticket']);

$data['expire_seconds'] = 0;

$data['status'] = 1;

$data['third_id'] = $id;

$data['third_type'] = $type;

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

$this->dao->save($data);

}
改为:

    /**

* 获取永久二维码

* @param $type

* @param $id

* @return array|mixed|\think\Model

* @throws \think\db\exception\DataNotFoundException

* @throws \think\db\exception\DbException

* @throws \think\db\exception\ModelNotFoundException

*/

public function getForeverQrcode($type, $id)

{

$where['third_id'] = $id;

$where['third_type'] = $type;

$res = $this->dao->getOne($where);

if (!$res) {

$this->createForeverQrcode($id, $type);

$res = $this->getForeverQrcode($type, $id);

} else if ($res['expire_seconds'] == 0 && (empty($res['ticket']) || empty($res['url']))) {

$this->createForeverQrcode($id, $type, $res['id']);

$res = $this->getForeverQrcode($type, $id);

}

if (!$res['ticket']) throw new AdminException('永久二维码获取错误');

return $res;

}

/**

* 永久二维码生成

* @param $id

* @param $type

*/

public function createForeverQrcode($id, $type, $qrcode_id = '')

{

$qrcode = WechatService::qrcodeService();

$data = $qrcode->forever($id)->toArray();

$data['qrcode_url'] = $data['url'];

$data['url'] = $qrcode->url($data['ticket']);

$data['expire_seconds'] = 0;

$data['status'] = 1;

$data['third_id'] = $id;

$data['third_type'] = $type;

if ($qrcode_id) {

$this->dao->update($qrcode_id, $data);

} else {

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

$this->dao->save($data);

}

}

就可以解决,请官方测试一下,有问题的话请修复。谢谢

标准版4.033fix分销问题的几点建议 标准版4.033fix分销问题的几点建议 标准版4.033fix分销问题的几点建议 标准版4.033fix分销问题的几点建议
请登录后查看

CRMEB官方 最后编辑于2022-05-22 13:20:53

快捷回复
回复({{post_count}}) {{!is_user ? '我的回复' :'全部回复'}}
回复从新到旧

{{item.user_info.nickname ? item.user_info.nickname : item.user_name}}

作者 管理员 企业

{{item.floor}}# 同步到gitee 已同步到gitee {{item.is_suggest==1? '取消推荐': '推荐'}}
{{item.floor}}#
{{item.user_info.title}}
附件

{{itemf.name}}

{{item.created_at}}  {{item.ip_address}}
{{item.like_count}}
{{item.showReply ? '取消回复' : '回复'}}
删除
回复
回复

{{itemc.user_info.nickname}}

{{itemc.user_name}}

作者 管理员 企业

回复 {{itemc.comment_user_info.nickname}}

附件

{{itemf.name}}

{{itemc.created_at}}   {{itemc.ip_address}}
{{itemc.like_count}}
{{itemc.showReply ? '取消回复' : '回复'}}
删除
回复
回复
查看更多
回复
回复
1115
{{like_count}}
{{collect_count}}
添加回复 ({{post_count}})

相关推荐

CRMEB官方 作者
暂无简介

回答

0

发布

0

经验

0

快速安全登录

使用微信扫码登录
{{item.label}} {{item.label}} {{item.label}} 板块推荐 常见问题 产品动态 精选推荐 首页头条 首页动态 首页推荐
加精
取 消 确 定
回复
回复
问题:
问题自动获取的帖子内容,不准确时需要手动修改. [获取答案]
答案:
提交
bug 需求 取 消 确 定

微信登录/注册

切换手机号登录

{{ bind_phone ? '绑定手机' : '手机登录'}}

{{codeText}}
切换微信登录/注册
暂不绑定
CRMEB客服

CRMEB咨询热线 咨询热线

400-8888-794

微信扫码咨询

CRMEB开源商城下载 开源下载 CRMEB官方论坛 帮助文档
返回顶部 返回顶部
CRMEB客服