diff --git a/src/mods/AppServiceOnlineNew/serviceForm.vue b/src/mods/AppServiceOnlineNew/serviceForm.vue
index 2d4c60a..a5caa68 100644
--- a/src/mods/AppServiceOnlineNew/serviceForm.vue
+++ b/src/mods/AppServiceOnlineNew/serviceForm.vue
@@ -29,7 +29,7 @@
*
+
上传照片
@@ -347,7 +347,8 @@ export default {
const i = e.target.dataset.i
const dict = e.target.dataset.dict
const value = e.detail.value
- const key = this.$dict.getLabel(dict, value)
+ // const key = this.$dict.getLabel(dict, value)
+ const key = this.$dict.getDict(dict)[value].dictName
this.$set(this.tableForm[index][i], 'fieldValue', value)
this.$set(this.tableForm[index][i], 'fieldDictName', key)
@@ -373,7 +374,7 @@ export default {
/**
* 图片上传
*/
- upload(index) {
+ uploads(index) {
uni.chooseImage({
count: 1,
sizeType: ['compressed'],
@@ -382,7 +383,7 @@ export default {
const path = res.tempFilePaths[0]
// this.$loading()
uni.uploadFile({
- url: this.$instance.baseURL + '/admin/file/add',
+ url: this.$instance.config.baseURL + '/admin/file/add2',
filePath: path,
name: 'file',
header: {
@@ -391,10 +392,12 @@ export default {
},
success: (res) => {
const data = JSON.parse(res.data)
-
if (data.code === 0) {
- this.$set(this.info.processAnnexDefs[index], 'src', data.data[0].split(';')[0])
- this.$set(this.info.processAnnexDefs[index], 'annexFileId', data.data[0].split(';')[1])
+ // this.$set(this.info.processAnnexDefs[index], 'src', data.data[0].split(';')[0])
+ // this.$set(this.info.processAnnexDefs[index], 'annexFileId', data.data[0].split(';')[1])
+
+ this.$set(this.info.processAnnexDefs[index], 'src', data.data.url)
+ this.$set(this.info.processAnnexDefs[index], 'id', data.data.id)
} else {
this.$toast(data.msg)
}
@@ -410,7 +413,7 @@ export default {
next() {
if (this.currIndex === 2) {
for (let item of this.info.processAnnexDefs) {
- if (item.mustFill === '1' && !item.annexFileId) {
+ if (item.mustFill === '1' && !item.id) {
return this.$toast(`请上传${item.annexName}`)
}
}