0
0
Files
Babyclass/app/Admin/Views/goods/setting.blade.php
2020-08-04 10:09:42 +08:00

90 lines
4.6 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<div class="pageContent">
<form method="post" action="{{ route('Admin.goods.setting', $good) }}" class="pageForm required-validate" onsubmit="return validateCallback(this, dialogAjaxDone)">
<div class="pageFormContent" layoutH="55">
<div class="unit">
<label style="width: 150px">商品名称:</label>
<input type="text" value="{{ $good->title }}" size="50" readonly/>
</div>
<div class="unit">
<label style="width: 150px">推荐到[首页全积分购]</label>
<select name="is_recommend" class="combox">
<option value="0" @if($good->is_recommend == 0) selected @endif></option>
<option value="1" @if($good->is_recommend == 1) selected @endif></option>
</select>
</div>
<div class="unit">
<label style="width: 150px">推荐到[首页全现金购]</label>
<select name="is_hot_sell" class="combox">
<option value="0" @if($good->is_hot_sell == 0) selected @endif></option>
<option value="1" @if($good->is_hot_sell == 1) selected @endif></option>
</select>
</div>
<div class="unit">
<label style="width: 150px">推荐到[首页积分+现金]</label>
<select name="is_hot_changed" class="combox">
<option value="0" @if($good->is_hot_changed == 0) selected @endif></option>
<option value="1" @if($good->is_hot_changed == 1) selected @endif></option>
</select>
</div>
<div class="unit">
<label style="width: 150px">推荐到[首页99套餐]</label>
<select name="is_seller_package" class="combox" id="banner_setting">
<option value="0" @if($good->is_seller_package == 0) selected @endif></option>
<option value="1" @if($good->is_seller_package == 1) selected @endif></option>
</select>
</div>
<div class="unit" id="banner_cover" @if($good->is_seller_package == 0) style="display: none" @endif>
<label style="width: 150px">[首页99套餐推荐图]</label>
<div class="col-md-4">
<input id="testFileInput" type="file" name="image" uploaderOption="{
swf:'{{ admin_assets('uploadify/scripts/uploadify.swf') }}',
uploader:'{{ route('RuLong.storages.upload', ['name'=>'fileup']) }}',
formData:{_token: '{{ csrf_token() }}'},
fileObjName: 'fileup',
buttonText:'选择封面图片',
fileSizeLimit:'20MB',
auto:true,
multi:false,
onUploadSuccess: function(file, res) {
var d = JSON.parse(res)
$('.cover img').attr('src', d.data.url).show();
$('#storageID').val(d.data.id);
}}"/>
<div class="cover" style="border:1px solid #B8D0D6;min-width:200px;min-height:100px">
@if ($good->banner->path)
<img src="{{$good->banner->path}}" style="width:200px;height: 100px" alt="">
@else
<img src="" style="display:none;width:200px;height: 100px" alt="">
@endif
</div>
<input type="hidden" id="storageID" name="banner_id" value="{{ $good->banner_id }}">
</div>
</div>
<div class="unit">
<label style="width: 150px">推荐位排序:</label>
<input type="text" value="{{ $good->sort }}" size="40" name="sort"/>
<span style="float:right;color: red">数字越大,手机端越靠前显示</span>
</div>
</div>
@csrf
<div class="formBar">
<ul>
@csrf
@method('PUT')
<li><div class="buttonActive"><div class="buttonContent"><button type="submit">保存</button></div></div></li>
<li><div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div></li>
</ul>
</div>
</form>
</div>
<script type="text/javascript">
$('#banner_setting').change(function(){
var banner_setting=$(this).val();
if (banner_setting == 1) {
$('#banner_cover').show();
}else{
$('#banner_cover').hide();
}
})
</script>