feat: 修正了购物车和订单列表中的代码错误,并优化了零售订单列表的验证码生成逻辑。
This commit is contained in:
parent
c834e81c28
commit
3f75281438
@ -121,11 +121,15 @@ class CartList extends BaseAdminDataLists implements ListsSearchInterface, Lists
|
|||||||
'pay_price' => $this->total_price
|
'pay_price' => $this->total_price
|
||||||
];
|
];
|
||||||
if ($this->user_ship == 0) {
|
if ($this->user_ship == 0) {
|
||||||
$data['msg']='您已选购满500元,支付成功后即可获得'.bcmul($this->total_price,0.1,2).'元品牌礼品兑换券,可到线下门店兑换礼品。';
|
if ($data['pay_price'] < 500) {
|
||||||
|
$data['msg'] = '还差' . bcsub(500, $this->activity_price, 2) . '即可获得10%的品牌礼品兑换券,可到线下门店兑换礼品。';
|
||||||
|
} else {
|
||||||
|
$data['msg'] = '您已选购满500元,支付成功后即可获得' . bcmul($this->activity_price, 0.1, 2) . '元品牌礼品兑换券,可到线下门店兑换礼品。';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if ($this->off_activity == 1) { //1
|
if ($this->off_activity == 1) { //1
|
||||||
$data['pay_price'] = $this->activity_price;
|
$data['pay_price'] = $this->activity_price;
|
||||||
if($this->activity_price<500){
|
if ($data['pay_price'] < 500) {
|
||||||
if ($this->user_ship == 0) {
|
if ($this->user_ship == 0) {
|
||||||
$data['msg'] = '还差' . bcsub(500, $this->activity_price, 2) . '即可获得10%的品牌礼品兑换券,可到线下门店兑换礼品。';
|
$data['msg'] = '还差' . bcsub(500, $this->activity_price, 2) . '即可获得10%的品牌礼品兑换券,可到线下门店兑换礼品。';
|
||||||
}
|
}
|
||||||
|
@ -10,6 +10,7 @@ use app\common\model\store_order\StoreOrder;
|
|||||||
use app\common\model\store_order_cart_info\StoreOrderCartInfo;
|
use app\common\model\store_order_cart_info\StoreOrderCartInfo;
|
||||||
use app\common\model\store_product\StoreProduct;
|
use app\common\model\store_product\StoreProduct;
|
||||||
use app\common\model\store_product_unit\StoreProductUnit;
|
use app\common\model\store_product_unit\StoreProductUnit;
|
||||||
|
use Picqer\Barcode\BarcodeGeneratorPNG;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 零售订单列表
|
* 零售订单列表
|
||||||
@ -80,6 +81,11 @@ class OrderList extends BaseAdminDataLists implements ListsSearchInterface
|
|||||||
if($item['verify_img']){
|
if($item['verify_img']){
|
||||||
$item['verify_img'] = 'https://'.$this->request->host(true).$item['verify_img'];
|
$item['verify_img'] = 'https://'.$this->request->host(true).$item['verify_img'];
|
||||||
}
|
}
|
||||||
|
if($item['is_writeoff']==0){
|
||||||
|
$generator = new BarcodeGeneratorPNG();
|
||||||
|
$tmpFilename = $generator->getBarcode($item['verify_code'], $generator::TYPE_CODE_128);
|
||||||
|
$item['verify_base64'] = base64_encode($tmpFilename);
|
||||||
|
}
|
||||||
})
|
})
|
||||||
->toArray();
|
->toArray();
|
||||||
|
|
||||||
|
@ -506,6 +506,11 @@ class OrderLogic extends BaseLogic
|
|||||||
if ($find['verify_img']) {
|
if ($find['verify_img']) {
|
||||||
$find['verify_img'] = $url . $find['verify_img'];
|
$find['verify_img'] = $url . $find['verify_img'];
|
||||||
}
|
}
|
||||||
|
if($find['is_writeoff']==0){
|
||||||
|
$generator = new BarcodeGeneratorPNG();
|
||||||
|
$tmpFilename = $generator->getBarcode($find['verify_code'], $generator::TYPE_CODE_128);
|
||||||
|
$find['verify_base64'] = base64_encode($tmpFilename);
|
||||||
|
}
|
||||||
//处理返回最近的店铺
|
//处理返回最近的店铺
|
||||||
if ($param['lat'] && $param['long']) {
|
if ($param['lat'] && $param['long']) {
|
||||||
$storeAll = SystemStore::field('id,name,phone,address,detailed_address,latitude,longitude')->select()->toArray();
|
$storeAll = SystemStore::field('id,name,phone,address,detailed_address,latitude,longitude')->select()->toArray();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user