基础接口对接
This commit is contained in:
@@ -5,7 +5,12 @@
|
||||
<view class="content">
|
||||
<uni-forms :label-width="80">
|
||||
<uni-forms-item label="工程名称">
|
||||
<uni-easyinput v-model="formData.engineeringName" placeholder="请输入项目名称" @click.native="showDrawer" :clearable="false" />
|
||||
<uni-easyinput
|
||||
v-model="formData.engineeringName"
|
||||
placeholder="请输入项目名称"
|
||||
@click.native="showDrawer"
|
||||
:clearable="false"
|
||||
/>
|
||||
</uni-forms-item>
|
||||
<uni-forms-item label="项目名称">
|
||||
<uni-easyinput v-model="formData.name" placeholder="请输入项目名称" />
|
||||
@@ -162,19 +167,27 @@ export default {
|
||||
let arr = []
|
||||
for (let i = 0; i < this.formData.files.length; i++) {
|
||||
let item = this.formData.files[i]
|
||||
console.log(item);
|
||||
arr.push({
|
||||
name: 'files',
|
||||
url: item.url,
|
||||
uri: item.url,
|
||||
})
|
||||
}
|
||||
let data = JSON.parse(JSON.stringify(this.formData))
|
||||
delete data.files
|
||||
addAppProject(data, arr).then((res) => {
|
||||
console.warn(res);
|
||||
if (res.length === 1) {
|
||||
this.$util.toast(res[0].message)
|
||||
return
|
||||
}
|
||||
|
||||
console.log(res)
|
||||
this.$util.toast('项目创建成功')
|
||||
this.$util.prePage().store?.reload()
|
||||
setTimeout(() => {
|
||||
uni.navigateBack({ delta: 1 })
|
||||
}, 1500);
|
||||
}, 1500)
|
||||
})
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user