lqmac 9 months ago
parent bfe5684c4d
commit c7ea1d4d34
  1. 6
      app/admin/controller/Goods.php
  2. 10
      app/common/model/Goods.php
  3. 4
      app/store/model/Goods.php
  4. 1
      public/admin/css/goods.a95c6856.css
  5. 2
      public/admin/index.html
  6. 1
      public/admin/js/app.0450eb47.js
  7. 3
      public/admin/js/goods.3d60e838.js

@ -129,7 +129,7 @@ class Goods extends Controller
* @param bool $state 为true表示上架
* @return Json
*/
public function state(array $goodsIds, bool $is_pool): Json
public function state(array $goodsIds, int $is_pool): Json
{
$model = new GoodsModel;
if (!$model->setIsPool($goodsIds, $is_pool)) {
@ -143,10 +143,10 @@ class Goods extends Controller
* @param bool $state 为true表示上架
* @return Json
*/
public function sale(array $goodsIds, bool $is_sale): Json
public function sale(array $goodsIds, int $is_sale): Json
{
$model = new GoodsModel;
if (!$model->setIsPool($goodsIds, $is_sale)) {
if (!$model->setIsSale($goodsIds, $is_sale)) {
return $this->renderError($model->getError() ?: '操作失败');
}
return $this->renderSuccess('操作成功');

@ -347,11 +347,11 @@ class Goods extends BaseModel
$GoodsCategoryRelName = (new GoodsCategoryRelModel())->getName();
$query->join($GoodsCategoryRelName, "{$GoodsCategoryRelName}.goods_id = {$this->name}.goods_id");
// 设置分类ID条件
// $query->where('goods_category_rel.category_id', '=', (int)$params['categoryId']);
$query->where([
'goods_category_rel.category_id' => (int)$params['categoryId'],
//'goods.store_id' => (int)$params['store_id'],
]);
$query->where('goods_category_rel.category_id', 'in', explode(",", $params['categoryId']));
// $query->where([
// 'goods_category_rel.category_id' => (int)$params['categoryId'],
// //'goods.store_id' => (int)$params['store_id'],
// ]);
$a = 1;
}

@ -171,7 +171,7 @@ class Goods extends GoodsModel
* @param bool $state 为true表示上架
* @return bool|false
*/
public function setIsPool(array $goodsIds, bool $is_pool): bool
public function setIsPool(array $goodsIds, int $is_pool): bool
{
// 批量更新记录
return static::updateBase(['is_pool' => $is_pool], [['goods_id', 'in', $goodsIds]]);
@ -182,7 +182,7 @@ class Goods extends GoodsModel
* @param bool $state 为true表示上架
* @return bool|false
*/
public function setIsSale(array $goodsIds, bool $is_sale): bool
public function setIsSale(array $goodsIds, int $is_sale): bool
{
// 批量更新记录
return static::updateBase(['is_sale' => $is_sale], [['goods_id', 'in', $goodsIds]]);

File diff suppressed because one or more lines are too long

@ -1 +1 @@
<!DOCTYPE html><html lang="zh-cmn-Hans"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><title>超级管理后台</title><style>#loading-mask{position:fixed;left:0;top:0;height:100%;width:100%;background:#fff;user-select:none;z-index:9999;overflow:hidden}.loading-wrapper{position:absolute;top:50%;left:50%;transform:translate(-50%,-100%)}.loading-dot{animation:antRotate 1.2s infinite linear;transform:rotate(45deg);position:relative;display:inline-block;font-size:64px;width:64px;height:64px;box-sizing:border-box}.loading-dot i{width:22px;height:22px;position:absolute;display:block;background-color:#1890ff;border-radius:100%;transform:scale(.75);transform-origin:50% 50%;opacity:.3;animation:antSpinMove 1s infinite linear alternate}.loading-dot i:nth-child(1){top:0;left:0}.loading-dot i:nth-child(2){top:0;right:0;-webkit-animation-delay:.4s;animation-delay:.4s}.loading-dot i:nth-child(3){right:0;bottom:0;-webkit-animation-delay:.8s;animation-delay:.8s}.loading-dot i:nth-child(4){bottom:0;left:0;-webkit-animation-delay:1.2s;animation-delay:1.2s}@keyframes antRotate{to{-webkit-transform:rotate(405deg);transform:rotate(405deg)}}@-webkit-keyframes antRotate{to{-webkit-transform:rotate(405deg);transform:rotate(405deg)}}@keyframes antSpinMove{to{opacity:1}}@-webkit-keyframes antSpinMove{to{opacity:1}}</style><link href="css/cloud.a47f0029.css" rel="prefetch"><link href="css/goods.9804b499.css" rel="prefetch"><link href="css/menu.ea2422ad.css" rel="prefetch"><link href="css/setting.acf5c21b.css" rel="prefetch"><link href="css/store.14ef162f.css" rel="prefetch"><link href="css/user.6c29834d.css" rel="prefetch"><link href="js/cloud.5250d74c.js" rel="prefetch"><link href="js/fail.9f520b72.js" rel="prefetch"><link href="js/goods.bf456f65.js" rel="prefetch"><link href="js/menu.532798eb.js" rel="prefetch"><link href="js/setting.9458c846.js" rel="prefetch"><link href="js/store.e9aaa387.js" rel="prefetch"><link href="js/user.8c820957.js" rel="prefetch"><link href="css/app.586c5556.css" rel="preload" as="style"><link href="css/chunk-vendors.f1c5ffe0.css" rel="preload" as="style"><link href="js/app.578b849c.js" rel="preload" as="script"><link href="js/chunk-vendors.deec1c57.js" rel="preload" as="script"><link href="css/chunk-vendors.f1c5ffe0.css" rel="stylesheet"><link href="css/app.586c5556.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but vue-antd-pro doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"><div id="loading-mask"><div class="loading-wrapper"><span class="loading-dot loading-dot-spin"><i></i><i></i><i></i><i></i></span></div></div></div><script src="config.js"></script><script src="js/chunk-vendors.deec1c57.js"></script><script src="js/app.578b849c.js"></script></body></html>
<!DOCTYPE html><html lang="zh-cmn-Hans"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><title>超级管理后台</title><style>#loading-mask{position:fixed;left:0;top:0;height:100%;width:100%;background:#fff;user-select:none;z-index:9999;overflow:hidden}.loading-wrapper{position:absolute;top:50%;left:50%;transform:translate(-50%,-100%)}.loading-dot{animation:antRotate 1.2s infinite linear;transform:rotate(45deg);position:relative;display:inline-block;font-size:64px;width:64px;height:64px;box-sizing:border-box}.loading-dot i{width:22px;height:22px;position:absolute;display:block;background-color:#1890ff;border-radius:100%;transform:scale(.75);transform-origin:50% 50%;opacity:.3;animation:antSpinMove 1s infinite linear alternate}.loading-dot i:nth-child(1){top:0;left:0}.loading-dot i:nth-child(2){top:0;right:0;-webkit-animation-delay:.4s;animation-delay:.4s}.loading-dot i:nth-child(3){right:0;bottom:0;-webkit-animation-delay:.8s;animation-delay:.8s}.loading-dot i:nth-child(4){bottom:0;left:0;-webkit-animation-delay:1.2s;animation-delay:1.2s}@keyframes antRotate{to{-webkit-transform:rotate(405deg);transform:rotate(405deg)}}@-webkit-keyframes antRotate{to{-webkit-transform:rotate(405deg);transform:rotate(405deg)}}@keyframes antSpinMove{to{opacity:1}}@-webkit-keyframes antSpinMove{to{opacity:1}}</style><link href="css/cloud.a47f0029.css" rel="prefetch"><link href="css/goods.a95c6856.css" rel="prefetch"><link href="css/menu.ea2422ad.css" rel="prefetch"><link href="css/setting.acf5c21b.css" rel="prefetch"><link href="css/store.14ef162f.css" rel="prefetch"><link href="css/user.6c29834d.css" rel="prefetch"><link href="js/cloud.5250d74c.js" rel="prefetch"><link href="js/fail.9f520b72.js" rel="prefetch"><link href="js/goods.3d60e838.js" rel="prefetch"><link href="js/menu.532798eb.js" rel="prefetch"><link href="js/setting.9458c846.js" rel="prefetch"><link href="js/store.e9aaa387.js" rel="prefetch"><link href="js/user.8c820957.js" rel="prefetch"><link href="css/app.586c5556.css" rel="preload" as="style"><link href="css/chunk-vendors.f1c5ffe0.css" rel="preload" as="style"><link href="js/app.0450eb47.js" rel="preload" as="script"><link href="js/chunk-vendors.deec1c57.js" rel="preload" as="script"><link href="css/chunk-vendors.f1c5ffe0.css" rel="stylesheet"><link href="css/app.586c5556.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but vue-antd-pro doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"><div id="loading-mask"><div class="loading-wrapper"><span class="loading-dot loading-dot-spin"><i></i><i></i><i></i><i></i></span></div></div></div><script src="config.js"></script><script src="js/chunk-vendors.deec1c57.js"></script><script src="js/app.0450eb47.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
Loading…
Cancel
Save