/** * 图片参数 * img:string 图片地址 * index:string 图片下标跟参数images对应 下标从1开始 * x:坐标x轴 * y:坐标y轴 * width:图片的宽度 * height:图片的高度 */ export interface Images { src: string; x: number; y: number; width: number; height: number; } /** * 合并图片 * @param file_server 文件服务器地址,不带/后缀,如 * @param productid 产品ID * @param imgs:IOption[] 原图片(可以通过fd-w000024控件的get_original_image方法获取) * @return Promise(最后合并的完整图片是每个数组中的最后一个值) * @example const images=merge_picture('http://192.168.40.196','jewelry_mall',{ * src: 'https://images.gitee.com/uploads/69/1961669_xiapeixu.png?1530761784',x: 0,y: 0,width: 100,height: 100, * }); */ export default function merge_picture(file_server: string, productid: string, imgs: Images[]): Promise;