Browse Source

修复上传图片插件加载图片问题

wechat_public_accounts
linyaostalker 5 years ago
parent
commit
342a0f22f8
  1. 4
      backend/modules/goods/models/ars/GoodsSku.php
  2. 6
      backend/modules/goods/views/goods/picture.php

4
backend/modules/goods/models/ars/GoodsSku.php

@ -6,7 +6,7 @@ use Yii;
use yii\behaviors\TimestampBehavior; use yii\behaviors\TimestampBehavior;
/** /**
* This is the model class for table "goods_goods_sku".
* This is the model class for table "atg_goods_sku".
* *
* @property int $id * @property int $id
* @property int $goods_id 商品id * @property int $goods_id 商品id
@ -38,7 +38,7 @@ class GoodsSku extends \yii\db\ActiveRecord
*/ */
public static function tableName() public static function tableName()
{ {
return 'goods_goods_sku';
return 'atg_goods_sku';
} }
/** /**

6
backend/modules/goods/views/goods/picture.php

@ -15,9 +15,8 @@ use yii\helpers\Url;
'maxCount' => 1, 'maxCount' => 1,
'fillInAttribute' => 'coverImageId', 'fillInAttribute' => 'coverImageId',
'model' => $model, 'model' => $model,
'ruleVerify' => $model->ruleVerify,
'previewConfig' => [ 'previewConfig' => [
'url' => Url::to(['image-file', 'fileidstr' => $model->coverImageId]),
'url' => Url::to(['image-file', 'fileidstr' => $model->coverImageId, 'ruleverify' => $model->ruleVerify]),
], ],
])->label('商品封面图') ?> ])->label('商品封面图') ?>
@ -30,8 +29,7 @@ use yii\helpers\Url;
'maxCount' => 5, 'maxCount' => 5,
'fillInAttribute' => 'detailImageId', 'fillInAttribute' => 'detailImageId',
'model' => $model, 'model' => $model,
'ruleVerify' => $model->ruleVerify,
'previewConfig' => [ 'previewConfig' => [
'url' => Url::to(['image-file', 'fileidstr' => $model->detailImageId]),
'url' => Url::to(['image-file', 'fileidstr' => $model->detailImageId, 'ruleverify' => $model->ruleVerify]),
], ],
])->label('商品详情图') ?> ])->label('商品详情图') ?>
Loading…
Cancel
Save