uni-canvas-image 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "uni-canvas-image",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "租房项目使用uniapp canvas合并图片",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -13,7 +13,7 @@ async function noteImage(params = {}) {
13
13
  : await handleItem(items[0], canvasId, api) // 单个房源
14
14
  }
15
15
 
16
- function handleItem(obj, canvasId) {
16
+ function handleItem(obj, canvasId, api) {
17
17
  return new Promise(async (resolve, reject) => {
18
18
  const imgInfo = await getImageInfo(obj.imageUrl, 750 / 340)
19
19
  const newImgInfo = {
@@ -50,7 +50,7 @@ function handleItem(obj, canvasId) {
50
50
  resolve(url)
51
51
  })
52
52
  }
53
- function handleItems(arr, canvasId) {
53
+ function handleItems(arr, canvasId, api) {
54
54
  return new Promise(async (resolve, reject) => {
55
55
  const newObj = []
56
56
  const newArr = arr.slice(0, 2)