创意发布
This commit is contained in:
@@ -355,17 +355,37 @@
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
submitForm() {
|
submitForm() {
|
||||||
|
console.log(this.fileList1)
|
||||||
if (!/^1[3456789]\d{9}$/.test(this.needsPublishForm.mobile)) {
|
if (!/^1[3456789]\d{9}$/.test(this.needsPublishForm.mobile)) {
|
||||||
this.$toast.warn('请输入正确的手机号')
|
this.$toast.warn('请输入正确的手机号')
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
this.needsPublishForm.type = Number(this.tabCurrent + 1)
|
this.needsPublishForm.type = Number(this.tabCurrent + 1)
|
||||||
this.needsPublishForm.pub_time = new Date().getTime()
|
this.needsPublishForm.pub_time = this.needsPublishForm.pub_time ? this.needsPublishForm.pub_time : new Date().getTime()
|
||||||
|
const temp = []
|
||||||
|
if(this.fileList1.length > 0) {
|
||||||
|
this.fileList1.map(item => {
|
||||||
|
temp.push(item.url)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
this.needsPublishForm.images = temp.join(';')
|
||||||
const data = {
|
const data = {
|
||||||
|
type: null,
|
||||||
|
name: null,
|
||||||
|
pname: null,
|
||||||
|
area_code: null,
|
||||||
|
area_name: null,
|
||||||
|
images: null,
|
||||||
|
mobile: null,
|
||||||
|
class: null,
|
||||||
|
product: null,
|
||||||
|
loc: null,
|
||||||
|
desc: null,
|
||||||
|
pub_time: null,
|
||||||
...this.needsPublishForm
|
...this.needsPublishForm
|
||||||
}
|
}
|
||||||
apiService.submitIdeasAndNeeds(data).then(res => {
|
apiService.submitIdeasAndNeeds(data).then(res => {
|
||||||
this.$toast.success(res.msg)
|
this.$toast.success(res.data.msg)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
reOnLoad() {
|
reOnLoad() {
|
||||||
|
|||||||
@@ -375,6 +375,13 @@ const apiService = {
|
|||||||
resolve(service.post(url, data))
|
resolve(service.post(url, data))
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 提交
|
||||||
|
submitIdeasAndNeeds(data) {
|
||||||
|
const url = `/require/release/`
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
resolve(service.putWithFormData(url, data))
|
||||||
|
})
|
||||||
|
},
|
||||||
getIdeasAndNeedsFormdata(data) {
|
getIdeasAndNeedsFormdata(data) {
|
||||||
const url = `/require/formdata/`
|
const url = `/require/formdata/`
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user