| | |
| | | <input name="hospitalQrImage" id="hospitalQrImage" type="hidden" class="layui-input" maxlength="20"/> |
| | | <blockquote class="layui-elem-quote layui-quote-nm" style="margin-top: 10px;"> |
| | | 预览效果 |
| | | <div class="layui-upload-list" id="qrImage"></div> |
| | | <div class="layui-upload-list" id="qrImage" style="text-align: center"></div> |
| | | </blockquote> |
| | | </div> |
| | | </div> |
| | |
| | | //上传二维码 |
| | | upload.render({ |
| | | elem: '#qr', |
| | | url: config.base_server + 'api-file/files-anon', |
| | | url: config.base_server + 'api-file/files-upload', |
| | | accept: 'file', |
| | | auto: true, |
| | | headers: { |
| | | "Authorization": "Bearer " + config.getToken().access_token |
| | | }, |
| | | data:{"imgType":"customerhospital"}, |
| | | before: function (obj) { |
| | | layer.load(); //上传loading |
| | | //预读本地文件示例,不支持ie8 |
| | | obj.preview(function (index, file, result) { |
| | | $("#qrImage").html(''); |
| | | $('#qrImage').append('<img src="' + result + |
| | | '" width="50px" height="50px" alt="' + file.name + |
| | | '" width="60px" height="60px" alt="' + file.name + |
| | | '" class="layui-upload-img">') |
| | | }); |
| | | }, |
| | |
| | | //微站首页图片 |
| | | upload.render({ |
| | | elem: '#phonto', |
| | | url: config.base_server + 'api-file/files-anon', |
| | | url: config.base_server + 'api-file/files-upload', |
| | | accept: 'file', |
| | | auto: true, |
| | | headers: { |
| | | "Authorization": "Bearer " + config.getToken().access_token |
| | | }, |
| | | data:{"imgType":"customerhospital"}, |
| | | before: function (obj) { |
| | | layer.load(); //上传loading |
| | | //预读本地文件示例,不支持ie8 |
| | | obj.preview(function (index, file, result) { |
| | | $("#indexImage").html(''); |
| | | $('#indexImage').append('<img src="' + result + |
| | | '" width="50px" height="50px" alt="' + file.name + |
| | | '" width="110px" height="50px" alt="' + file.name + |
| | | '" class="layui-upload-img">') |
| | | }); |
| | | }, |