添加生成商户线下收款码
This commit is contained in:
parent
eb20948bcb
commit
bf09ec7935
@ -4,6 +4,7 @@ namespace app\controller\api\store\order;
|
|||||||
|
|
||||||
use app\common\model\store\product\Product;
|
use app\common\model\store\product\Product;
|
||||||
use app\common\repositories\store\product\ProductRepository;
|
use app\common\repositories\store\product\ProductRepository;
|
||||||
|
use app\controller\api\Common;
|
||||||
use crmeb\basic\BaseController;
|
use crmeb\basic\BaseController;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -26,10 +27,19 @@ class ScanPay extends BaseController
|
|||||||
$productRepo = app()->make(ProductRepository::class);
|
$productRepo = app()->make(ProductRepository::class);
|
||||||
$productRepo->force = true;
|
$productRepo->force = true;
|
||||||
$data = $productRepo->detail((int)$product['product_id'], $this->request->userInfo, $param['product_type']);
|
$data = $productRepo->detail((int)$product['product_id'], $this->request->userInfo, $param['product_type']);
|
||||||
if (!$data){
|
if (!$data) {
|
||||||
return app('json')->fail('商品已下架');
|
return app('json')->fail('商品已下架');
|
||||||
}
|
}
|
||||||
return app('json')->success($data);
|
return app('json')->success($data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function qrcode()
|
||||||
|
{
|
||||||
|
$merId = $this->request->get('mer_id');
|
||||||
|
$common = app()->make(Common::class);
|
||||||
|
$siteUrl = systemConfig('site_url');
|
||||||
|
$data = $common->Qrcode(['code' => $siteUrl . 'pages/payment/get_payment?mer_id=' . $merId, 'id' => $this->request->uid]);
|
||||||
|
return app('json')->success(['url' => $data]);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -48,6 +48,7 @@ Route::group('api/', function () {
|
|||||||
Route::group(function () {
|
Route::group(function () {
|
||||||
|
|
||||||
Route::get('scanPay/product', 'api.store.order.ScanPay/product');
|
Route::get('scanPay/product', 'api.store.order.ScanPay/product');
|
||||||
|
Route::get('scanPay/qrcode', 'api.store.order.ScanPay/qrcode');
|
||||||
Route::any('qrcode', 'api.user.User/qrcode');
|
Route::any('qrcode', 'api.user.User/qrcode');
|
||||||
Route::get('merchantRecord', 'api.user.User/merchantRecord');
|
Route::get('merchantRecord', 'api.user.User/merchantRecord');
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user