feat: 签名优化
- 解决签名异常的问题
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import { computed, onMounted, ref, useTemplateRef } from 'vue';
|
||||
import CommonApi from '@/api/common.js';
|
||||
import { computed, onMounted, ref, useTemplateRef, watch } from 'vue';
|
||||
import { showConfirmDialog } from 'vant';
|
||||
|
||||
// question 属性
|
||||
const element = defineModel<question>('element', { default: {} });
|
||||
// 属性框是否激活
|
||||
@@ -185,15 +186,24 @@ const emitValue = () => {
|
||||
emit('update:element', element.value);
|
||||
};
|
||||
|
||||
let aIndex = 1;
|
||||
/**
|
||||
* 上传文件
|
||||
*/
|
||||
async function handleUploadImg() {
|
||||
const file = new File([saveCanvas('blob')!], 'sign.png', { type: 'image/png' });
|
||||
const res = await CommonApi.cosUpload(file);
|
||||
console.log(`sign upload url`, res);
|
||||
// 传递答案
|
||||
answer.value = res;
|
||||
// const file = new File([saveCanvas('blob')!], 'sign.png', { type: 'image/png' });
|
||||
// const res = await CommonApi.cosUpload(file);
|
||||
// console.log(`sign upload url`, res);
|
||||
// // 传递答案
|
||||
// answer.value = res;
|
||||
showConfirmDialog({
|
||||
title: '提示',
|
||||
message: '上传成功',
|
||||
showCancelButton: false
|
||||
}).then(() => {
|
||||
aIndex++;
|
||||
answer.value = 'this is test' + aIndex;
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user