登录对接
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user