作者 王智

1111

... ... @@ -20,6 +20,12 @@
<input id="c-web" data-rule="required" class="form-control" name="row[web]" type="text">
</div>
</div>
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Seller_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-seller_id" data-rule="required" data-source="seller/index" data-field="title" class="form-control selectpage" name="row[seller_id]" type="text" value="">
</div>
</div>
<!-- <div class="form-group">-->
<!-- <label class="control-label col-xs-12 col-sm-2">{:__('Weigh')}:</label>-->
<!-- <div class="col-xs-12 col-sm-8">-->
... ...
... ... @@ -4,10 +4,16 @@
<label class="control-label col-xs-12 col-sm-2">{:__('Image')}:</label>
<div class="col-xs-12 col-sm-8">
<div class="input-group">
<input id="c-image" data-rule="required" class="form-control" size="50" name="row[image]" type="text" value="{$row.image|htmlentities}">
<input id="c-image" data-rule="required" class="form-control" size="50" name="row[image]" type="text"
value="{$row.image|htmlentities}">
<div class="input-group-addon no-border no-padding">
<span><button type="button" id="faupload-image" class="btn btn-danger faupload" data-input-id="c-image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
<span><button type="button" id="fachoose-image" class="btn btn-primary fachoose" data-input-id="c-image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
<span><button type="button" id="faupload-image" class="btn btn-danger faupload"
data-input-id="c-image"
data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp"
data-multiple="false" data-preview-id="p-image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
<span><button type="button" id="fachoose-image" class="btn btn-primary fachoose"
data-input-id="c-image" data-mimetype="image/*" data-multiple="false"><i
class="fa fa-list"></i> {:__('Choose')}</button></span>
</div>
<span class="msg-box n-right" for="c-image"></span>
</div>
... ... @@ -17,15 +23,24 @@
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Web')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-web" data-rule="required" class="form-control" name="row[web]" type="text" value="{$row.web|htmlentities}">
<input id="c-web" data-rule="required" class="form-control" name="row[web]" type="text"
value="{$row.web|htmlentities}">
</div>
</div>
<!-- <div class="form-group">-->
<!-- <label class="control-label col-xs-12 col-sm-2">{:__('Weigh')}:</label>-->
<!-- <div class="col-xs-12 col-sm-8">-->
<!-- <input id="c-weigh" data-rule="required" class="form-control" name="row[weigh]" type="number" value="{$row.weigh|htmlentities}">-->
<!-- </div>-->
<!-- </div>-->
<div class="form-group">
<label class="control-label col-xs-12 col-sm-2">{:__('Seller_id')}:</label>
<div class="col-xs-12 col-sm-8">
<input id="c-seller_id" data-rule="required" data-source="seller/index" data-field="title"
class="form-control selectpage" name="row[seller_id]" type="text"
value="{$row.seller_id|htmlentities}">
</div>
</div>
<!-- <div class="form-group">-->
<!-- <label class="control-label col-xs-12 col-sm-2">{:__('Weigh')}:</label>-->
<!-- <div class="col-xs-12 col-sm-8">-->
<!-- <input id="c-weigh" data-rule="required" class="form-control" name="row[weigh]" type="number" value="{$row.weigh|htmlentities}">-->
<!-- </div>-->
<!-- </div>-->
<div class="form-group layer-footer">
<label class="control-label col-xs-12 col-sm-2"></label>
<div class="col-xs-12 col-sm-8">
... ...
... ... @@ -173,7 +173,7 @@ class Index extends Api
$this->error('店铺不存在', 0);
}
$SellerConBanner = [];
$SellerConBanner = Db::name('seller_con_banner')->order('weigh desc')->field('id,image')->select();
$SellerConBanner = Db::name('seller_con_banner')->order('weigh desc')->where('seller_id', $Id)->field('id,image')->select();
if (!empty($SellerConBanner)) {
foreach ($SellerConBanner as $k => $v) {
$SellerConBanner[$k]['image'] = $this->ImgUrl($v['image']);
... ...