Skip to content

Commit

Permalink
imageInput =》 imageUpload #3487
Browse files Browse the repository at this point in the history
  • Loading branch information
twinh committed Feb 6, 2018
1 parent 100da8e commit c3ee5f7
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions resources/views/admin/coupon/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,7 @@
</label>

<div class="col-lg-4">
<div class="input-group">
<input type="text" class="form-control js-pic" id="pic" name="pic">
<span class="input-group-btn">
<button id="select-thumb" class="btn btn-white" type="button">
<i class="fa fa-calendar bigger-110"></i>
选择图片
</button>
</span>
</div>
<input type="text" class="form-control js-pic" id="pic" name="pic" required>
</div>
</div>

Expand Down Expand Up @@ -263,7 +255,10 @@

<?= $block->js() ?>
<script>
require(['linkTo', 'form', 'ueditor', 'validator', 'assets/spectrum', 'assets/dateTimePicker'], function (linkTo) {
require([
'linkTo', 'form', 'ueditor', 'validator', 'assets/spectrum', 'assets/dateTimePicker',
'plugins/admin/js/image-upload'
], function (linkTo) {
var coupon = <?= $coupon->toJson() ?>;
$('#coupon-form')
.loadJSON(coupon)
Expand Down Expand Up @@ -310,7 +305,7 @@
});

// 点击选择图片
$('.js-pic').imageInput();
$('.js-pic').imageUpload();
});
</script>
<?= $block->end() ?>
Expand Down

0 comments on commit c3ee5f7

Please sign in to comment.