升级后,居然不能 余额支付了,也不知道官方发布升级包之后,是否有过测试,有点儿不严谨啊;
文件路径:addon/fenxiao/model/FenxiaoOrder.php
//分享绑定上下级
public function alterShareRelation($data){
$model = new ConfigModel();
$basics = $model->getFenxiaoRelationConfig($data['site_id'])['data']['value']['child_condition'] ?? 1;
if($basics == 1){
$fenxiao = new Fenxiao();
$fenxiao->bindRelation($data['member_id']);
}
}
//下单绑定上下级
public function memberCreateOrder($order){
$order_member_id = model('order')->getInfo([['order_id','=',$order['order_id']]],'member_id,site_id');
if(empty($order_member_id['member_id'])){
return $this->error('', '订单不存在');
}
$order_count = model('order')->getCount([['member_id','=',$order_member_id['member_id'],['site_id','=',$order_member_id['site_id']]]]);
$model = new Config();
$basics = $model->getFenxiaoRelationConfig($order_member_id['site_id'])['data']['value']['child_condition'] ?? 1;
if($order_count == 1 && $basics == 2){
$fenxiao = new Fenxiao();
$fenxiao->bindRelation($order_member_id['member_id']);
}
}
// 支付绑定上下级
public function memberPayment($order){
$order_member_id = model('order')->getInfo([['order_id','=',$order['order_id']]],'member_id,site_id');
if(empty($order_member_id['member_id'])){
return $this->error('', '订单不存在');
}
$order_count = model('order')->getCount([['member_id','=',$order_member_id['member_id']],['site_id','=',$order_member_id['site_id']],['order_status','NOT IN','0,-1']]);
$model = new Config();
$basics = $model->getFenxiaoRelationConfig($order_member_id['site_id'])['data']['value']['child_condition'] ?? 1;
if($order_count == 1 && $basics == 3){
$fenxiao = new Fenxiao();
$fenxiao->bindRelation($order_member_id['member_id']);
}
}
补充的代码如下,直接加上去就行了
另外,还有坑
升级以后,小程序端不能生成海报,问题很简单,官方代码多了一个 / ,不知道是不是 我用了 OSS 云端存储 的原因,海报没有显示我设置的背景图
文件路径:addon/postertemplate/shop/view/poster_template/add.html 大约512行
修改前
<div class="poster-right design-sketch" style="position: relative;border: 1px solid #d6d6d6;
{notempty name='$template_data.background'}background-image:url({:img($template_data.background)}); background-size: 100%; background-repeat: no-repeat;{/notempty}
{{# if (d.background) { }}background-image:url(/{{ d.background }});background-size: 100%;background-repeat: no-repeat;{{# } }}
">
修改后,去掉 url(/{{ d.background }}) 里面的 / 后台就可以正常显示
<div class="poster-right design-sketch" style="position: relative;border: 1px solid #d6d6d6;
{notempty name='$template_data.background'}background-image:url({:img($template_data.background)}); background-size: 100%; background-repeat: no-repeat;{/notempty}
{{# if (d.background) { }}background-image:url({{ d.background }});background-size: 100%;background-repeat: no-repeat;{{# } }}
© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END