| | |
| | | } |
| | | |
| | | /** |
| | | * @description 获取云端图片真实路径 |
| | | * @return {String} url 图片路径 |
| | | */ |
| | | static getcloudurl (url) { |
| | | if (!url) return '' |
| | | |
| | | let baseurl = '' |
| | | |
| | | if (window.GLOB.cloudServiceApi) { |
| | | baseurl = window.GLOB.cloudServiceApi.replace(/webapi(.*)$/, '') |
| | | } else { |
| | | baseurl = window.GLOB.baseurl |
| | | } |
| | | |
| | | return url.match(/^http/) || url.match(/^\/\//) ? url : baseurl + url |
| | | } |
| | | |
| | | /** |
| | | * @description 获取下拉搜索查询条件 |
| | | * @return {String} item 搜索条件信息 |
| | | */ |
| | |
| | | |
| | | Api.fileuploadbase64(param).then(result => { |
| | | if (result.status) { |
| | | let url = result.Images |
| | | let baseurl = '' |
| | | |
| | | if (window.GLOB.cloudServiceApi) { |
| | | baseurl = window.GLOB.cloudServiceApi.replace(/webapi(.*)$/, '') |
| | | } else { |
| | | baseurl = window.GLOB.baseurl |
| | | } |
| | | |
| | | url = url.match(/^http/) || url.match(/^\/\//) ? url : baseurl + url |
| | | |
| | | Api.getCloudConfig({ |
| | | func: 's_PrintTemplateMSub', |
| | | ID: config.uuid, |
| | | Images: Utils.getcloudurl(result.Images), |
| | | Images: url, |
| | | Remark: '', |
| | | temp_type: 'billprint', |
| | | }).then(response => { |
| | |
| | | |
| | | Api.fileuploadbase64(param).then(result => { // 图片上传,并获取图片路径 |
| | | if (result.status) { |
| | | resolve(Utils.getcloudurl(result.Images)) |
| | | let url = result.Images |
| | | let baseurl = '' |
| | | |
| | | if (window.GLOB.cloudServiceApi) { |
| | | baseurl = window.GLOB.cloudServiceApi.replace(/webapi(.*)$/, '') |
| | | } else { |
| | | baseurl = window.GLOB.baseurl |
| | | } |
| | | |
| | | url = url.match(/^http/) || url.match(/^\/\//) ? url : baseurl + url |
| | | |
| | | resolve(url) |
| | | } else { |
| | | notification.warning({ |
| | | top: 92, |