Merge pull request 'dev' (#161) from dev into master

Reviewed-on: #161
This commit is contained in:
mkm 2024-03-01 15:06:55 +08:00
commit 4ea908e0b2
29 changed files with 37 additions and 36 deletions

View File

@ -35,6 +35,7 @@ class ParameterValueRepository extends BaseRepository
public function create($id, $data,$merId)
{
if (empty($data)) return ;
$create=[];
foreach ($data as $datum) {
if ($datum['name'] && $datum['value']) {
$create[] = [
@ -48,7 +49,7 @@ class ParameterValueRepository extends BaseRepository
];
}
}
if ($create) $this->dao->insertAll($create);
if (count($create)>0) $this->dao->insertAll($create);
}

View File

@ -110,7 +110,7 @@ class MerchantRepository extends BaseRepository
'merchantType'
])
->order('mer_id','desc')
->field('sort, mer_id, mer_name, real_name, mer_phone, mer_address, mark, status, create_time,is_best,is_trader,type_id,category_id,copy_product_num,export_dump_num,is_margin,margin,mer_avatar')->select();
->field('sort, mer_id, mer_name, real_name, mer_phone, mer_address, mark, status, create_time,is_best,is_trader,type_id,category_id,copy_product_num,export_dump_num,is_margin,margin,mer_avatar,sale_amount,purchase_amount')->select();
return compact('count', 'list');
}

View File

@ -306,30 +306,30 @@ class StoreProduct extends BaseController
public function copy($product_id = 0, $mer_id = 0, $street_code = 0, $type_id = 0, $category_id = 0)
{
if ($product_id == 0) return app('json')->fail('参数错误');
$find= Db::name('merchant')->where('mer_id',$mer_id)->find();
// $find= Db::name('merchant')->where('mer_id',$mer_id)->find();
$products = $this->repository->getAdminOneProduct($product_id, 0);
$product = $products->toArray();
$product['mer_id'] = $mer_id;
$product['old_product_id'] = $product['product_id'];
$productId = $this->repository->create($product, 0, 1);
$data = [
'product_id' => $productId,
'mer_id' => $mer_id,
'source_mer_id' => $products['mer_id'],
'street_code' => $street_code,
'weight' => 1,
'status' => 1,
'create_time' => date('Y-m-d H:i:s'),
'type_id' => $type_id,
'category_id' => $category_id,
'cate_id' => 2244,
'long' => $find['long'],
'lat' => $find['lat'],
'lat' => $find['lat'],
'store_name' => $products['store_name'],
'activity_id' =>2,
];
Db::name('cloud_product')->insert($data);
// $data = [
// 'product_id' => $productId,
// 'mer_id' => $mer_id,
// 'source_mer_id' => $products['mer_id'],
// 'street_code' => $street_code,
// 'weight' => 1,
// 'status' => 1,
// 'create_time' => date('Y-m-d H:i:s'),
// 'type_id' => $type_id,
// 'category_id' => $category_id,
// 'cate_id' => 2244,
// 'long' => $find['long'],
// 'lat' => $find['lat'],
// 'lat' => $find['lat'],
// 'store_name' => $products['store_name'],
// 'activity_id' =>2,
// ];
// Db::name('cloud_product')->insert($data);
return $productId;
}
}

View File

@ -644,7 +644,7 @@ class Common extends BaseController
public function Qrcode($data)
{
$siteUrl = systemConfig('site_url');
$name = 'orcode'.$data['id'] .md5(date('Ymd')) . '.png';
$name = 'orcode'.$data['id'] .md5(date('code') . date('Ymd')) . '.png';
$attachmentRepository = app()->make(AttachmentRepository::class);
$imageInfo = $attachmentRepository->getWhere(['attachment_name' => $name]);

View File

@ -36,6 +36,7 @@ class ScanPay extends BaseController
public function qrcode()
{
$merId = $this->request->get('mer_id');
/** @var Common $common */
$common = app()->make(Common::class);
$siteUrl = systemConfig('site_url');
$user = $this->request->userInfo();

View File

@ -2,4 +2,4 @@
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')
if(window.location.protocol == 'https:'){
document.write('<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">')
}</script><link rel=stylesheet href=/static/index.2da1efab.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/static/js/chunk-vendors.c6349b23.js></script><script src=/static/js/index.c19c6f8b.js></script></body></html>
}</script><link rel=stylesheet href=/static/index.2da1efab.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/static/js/chunk-vendors.c6349b23.js></script><script src=/static/js/index.0bfdbb83.js></script></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long