One hundred thirty-one: Wheel CMS systems multicast graphs upload picture function

 

The seven cattle js placed under the common

Get into the common interface uptoken view

The initialization seven cattle placed in banners.js

// Initialize seven cattle 
$ (function () {
qiniujs.setUp ({
'Domain': 'http://q1tp5a19s.bkt.clouddn.com/',
'browse_btn': 'the Upload-btn', // upload picture button the ID
'uptoken_url': '/ Common / uptoken /',
'Success': function (up, File, info) {
// linked to the automatic upload pictures to the input box filled
var imageInput = $ (' input [ name = "image_url"] ');
imageInput.val (file.name);
}
});
});

Reference documents and labels on the page

<script src="https://cdn.staticfile.org/Plupload/2.1.1/moxie.js"></script>
<script src="https://cdn.staticfile.org/Plupload/2.1.1/plupload.dev.js"></script>
<script src="https://cdn.staticfile.org/qiniu-js-sdk/1.0.14-beta/qiniu.js"></script>
<script src="{{ static('common/qiniujs.js') }}"></script>

给添加图片按钮加一个id,对应js里面的id

操作

 

Guess you like

Origin www.cnblogs.com/zhongyehai/p/11966819.html