diff --git a/src/components/AiSelect/AiSelect.vue b/src/components/AiSelect/AiSelect.vue index e7b0bc6..192831f 100644 --- a/src/components/AiSelect/AiSelect.vue +++ b/src/components/AiSelect/AiSelect.vue @@ -36,7 +36,7 @@ export default { return this.dictKey ? this.$dict.getDict(this.dict).map(e => ({ value: e.dictValue, label: e.dictName - })) : this.list + })) : this.list || [] } }, data() { @@ -47,7 +47,7 @@ export default { } }, - mounted () { + mounted() { this.dict && this.$dict.load(this.dict).then(() => { this.dictKey = this.dict }) @@ -56,7 +56,6 @@ export default { handleConfirm(v) { this.selected = v this.$emit("data", this.selected) - console.log(v) this.$emit("input", v[0].value) this.$forceUpdate() }, diff --git a/src/components/AiUploader/AiUploader.vue b/src/components/AiUploader/AiUploader.vue index 7b72044..b84bcc7 100644 --- a/src/components/AiUploader/AiUploader.vue +++ b/src/components/AiUploader/AiUploader.vue @@ -16,10 +16,10 @@ @@ -124,8 +124,8 @@ export default { uni.hideLoading() } else { uni.uploadFile({ - url: this.$instance.defaults.baseURL + this.action, - filePath: img, + url: this.$instance.config.baseURL + this.action, + filePath: img.path, name: 'file', header: { 'Content-Type': 'multipart/form-data', @@ -138,7 +138,7 @@ export default { this.$emit('data', res.data) this.$u.toast('上传成功!') if (this.action == '/admin/file/add') { - this.fileList.push({url: res.data?.split(";")?.[0], id: res.data?.split(";")?.[1]}) + this.fileList.push({url: res.data?.[0]?.split(";")?.[0], id: res.data?.[0]?.split(";")?.[1]}) this.$emit('input', [...this.fileList]) this.$emit('change', [...this.fileList]) } else if (this.action == '/admin/file/add2') { @@ -153,6 +153,10 @@ export default { } else { this.$u.toast(res.msg) } + }, + fail: err => { + console.log(err) + uni.hideLoading() } }) } @@ -202,8 +206,10 @@ export default { } } - div[btn] { + div.btn { color: $uni-color-primary; + margin-right: 16px; + } div:nth-child(4) { diff --git a/src/mods/AppAgProducts/agAdd.vue b/src/mods/AppAgProducts/agAdd.vue index 8778757..745bcc7 100644 --- a/src/mods/AppAgProducts/agAdd.vue +++ b/src/mods/AppAgProducts/agAdd.vue @@ -19,11 +19,7 @@
* -
- - 请选择 - {{ form.typeName }} -
+
@@ -65,19 +61,19 @@
提交
-