登录对接

This commit is contained in:
仲么了
2023-07-03 09:16:54 +08:00
parent e9b1e9a417
commit 5f67499e57
19 changed files with 358 additions and 181 deletions

View File

@@ -59,8 +59,10 @@
:key="key"
/> -->
<uni-file-picker
ref="filePicker"
v-model="topologyDiagramPage"
:sourceType="['album']"
:auto-upload="false"
@select="addAppTopologyDiagram"
@delete="deleteTopologyDiagramPage"
></uni-file-picker>
@@ -119,6 +121,30 @@ export default {
e.tempFiles[0].path
).then((res) => {
console.log(res)
if (res.length > 1) {
const result = JSON.parse(res[1].data)
console.log(result)
if (result.code === 'A0000') {
this.topologyDiagramPage.push({
name: result.name,
extname: 'img',
url: result.filePath,
...result,
})
} else {
this.$refs.filePicker.clearFiles(this.topologyDiagramPage.length - 1)
uni.showToast({
title: result.message,
icon: 'none',
})
}
} else {
uni.showToast({
title: '上传失败',
icon: 'none',
})
this.$refs.filePicker.clearFiles(this.topologyDiagramPage.length - 1)
}
})
},
deleteTopologyDiagramPage(e) {