浏览代码

fix: getCurrentInstance import + canvasToTempFilePath正确传参

Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent)

Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
liaoxg 3 月之前
父节点
当前提交
16c1c98f90
共有 2 个文件被更改,包括 4 次插入3 次删除
  1. 2 1
      client/pages/login/index.vue
  2. 2 2
      client/pages/profile/index.vue

+ 2 - 1
client/pages/login/index.vue

@@ -61,7 +61,8 @@
 </template>
 
 <script setup>
-import { ref, onLoad } from '@dcloudio/uni-app'
+import { ref } from 'vue'
+import { onLoad } from '@dcloudio/uni-app'
 import { useUserStore } from '@/stores/user'
 import { profileApi } from '@/utils/api'
 

+ 2 - 2
client/pages/profile/index.vue

@@ -210,7 +210,7 @@
 
 <script setup>
 import { computed } from 'vue'
-import { onShow } from '@dcloudio/uni-app'
+import { onShow, getCurrentInstance } from '@dcloudio/uni-app'
 import { useUserStore } from '@/stores/user'
 import { profileApi } from '@/utils/api'
 
@@ -306,7 +306,7 @@ function generatePoster() {
       return downloadImage(url)
     })
   ]).then(([avatarPath, qrPath]) => {
-    const ctx = uni.createCanvasContext('posterCanvas', getCurrentInstance())
+    const ctx = uni.createCanvasContext('posterCanvas')
     const W = 375, H = 670
 
     // Background