linyaostalker
5 years ago
8 changed files with 240 additions and 1 deletions
-
58vendor/antgoods/goods/src/assets/custom/sku.8d54a9feac4b1fce0c54.js
-
2vendor/antgoods/goods/src/controllers/GoodsController.php
-
120vendor/antgoods/goods/src/logic/goods/GoodsManager.php
-
3vendor/antgoods/goods/src/models/ars/FilterAttr.php
-
7vendor/antgoods/goods/src/views/goods/create.php
-
22vendor/antgoods/goods/src/views/goods/filter_attribute.php
-
8vendor/antgoods/goods/src/views/goods/update.php
-
21vendor/antgoods/goods/src/web/GoodsFilterAttributeAsset.php
58
vendor/antgoods/goods/src/assets/custom/sku.8d54a9feac4b1fce0c54.js
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -0,0 +1,22 @@ |
|||
<?php |
|||
|
|||
use antgoods\goods\models\ars\Attribute; |
|||
use antgoods\goods\web\GoodsFilterAttributeAsset; |
|||
|
|||
$param = []; |
|||
$value = []; |
|||
$attrId = []; |
|||
$allFilterAttr = Attribute::find()->where(['type' => Attribute::TYPE_ATTR])->asArray()->all(); |
|||
GoodsFilterAttributeAsset::register($this); |
|||
?>
|
|||
|
|||
<div class="content-box"> |
|||
<input type="hidden" id="attribute" name="attribute"/> |
|||
<div id="filter-choose"></div> |
|||
</div> |
|||
<script> |
|||
var csrf = "<?= Yii::$app->request->csrfToken ?>"; |
|||
var allFilterAttr = <?= isset($allFilterAttr) ? json_encode($allFilterAttr) : [] ?>; // 所有数据
|
|||
var currentFilterAttr = <?= isset($filterModel) ? json_encode($filterModel) : [] ?>; // 默认数据(之前已选择的数据)
|
|||
var canNotDeleteFilterAttr =<?=isset($filterAttrValue) ? json_encode($filterAttrValue) : [] ?>; // 已设置sku的值,不可删除
|
|||
</script> |
@ -0,0 +1,21 @@ |
|||
<?php |
|||
|
|||
namespace antgoods\goods\web; |
|||
|
|||
use yii\web\AssetBundle; |
|||
|
|||
/** |
|||
* Main backend application asset bundle. |
|||
*/ |
|||
class GoodsFilterAttributeAsset extends AssetBundle |
|||
{ |
|||
public $sourcePath = "@antgoods/goods/src/assets"; |
|||
public $css = [ |
|||
]; |
|||
public $js = [ |
|||
'custom/sku.8d54a9feac4b1fce0c54.js' |
|||
]; |
|||
public $depends = [ |
|||
'yii\web\YiiAsset', |
|||
]; |
|||
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue