NIUSHOP单商户升级到4.1.14后不能余额支付的修复文件

升级后,居然不能 余额支付了,也不知道官方发布升级包之后,是否有过测试,有点儿不严谨啊;

图片[1]-NIUSHOP单商户升级到4.1.14后不能余额支付的修复文件-共赢传播官博 ||

文件路径: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
喜欢就支持一下吧
点赞1 分享
评论 抢沙发
头像
欢迎您留下宝贵的见解!
提交
头像

昵称

取消
昵称表情代码图片