Commit 9355289b authored by 黄奎's avatar 黄奎

页面修改

parent 05df3500
...@@ -258,7 +258,7 @@ ...@@ -258,7 +258,7 @@
} }
}, },
ChangeItem(item, subItem) { ChangeItem(item, subItem) {
if (item && item.length > 0) { if (item && item.OptionList.length > 0) {
item.OptionList.forEach(childItem => { item.OptionList.forEach(childItem => {
childItem.IsAnswer = false; childItem.IsAnswer = false;
}) })
......
...@@ -21,9 +21,9 @@ ...@@ -21,9 +21,9 @@
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
.koreaUpload .avatar-uploader{
} .koreaUpload .avatar-uploader {}
</style> </style>
<template> <template>
<div class="koreaUpload"> <div class="koreaUpload">
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
data() { data() {
return { return {
data: '', data: '',
fliename:'', fliename: '',
}; };
}, },
created() { created() {
...@@ -60,10 +60,9 @@ ...@@ -60,10 +60,9 @@
}, },
methods: { methods: {
uploadFile(files) { uploadFile(files) {
console.log(files)
let ft = files.name.substring(files.name.lastIndexOf('.') + 1, files.name.length) let ft = files.name.substring(files.name.lastIndexOf('.') + 1, files.name.length)
let stringArr = this.data.FileType let stringArr = this.data.FileType
if (stringArr.indexOf(ft) == '-1') {//判断文件格式 if (stringArr.indexOf(ft) == '-1') { //判断文件格式
this.$q.notify({ this.$q.notify({
type: 'negative', type: 'negative',
message: `请上传正确的文件格式!`, message: `请上传正确的文件格式!`,
...@@ -71,7 +70,7 @@ ...@@ -71,7 +70,7 @@
}) })
return false; return false;
} }
if (this.data.FileSizeLimit > 0) {//判断文件大小 if (this.data.FileSizeLimit > 0) { //判断文件大小
const size = files.size / 1024 / 1024 const size = files.size / 1024 / 1024
this.FileName = size this.FileName = size
if (size > this.data.FileSizeLimit) { if (size > this.data.FileSizeLimit) {
...@@ -84,13 +83,14 @@ ...@@ -84,13 +83,14 @@
} }
} }
UploadViittoFile('korea/Test/Upload', files, res => { UploadViittoFile('korea/Test/Upload', files, res => {
console.log(res)
if (res.Code == 1) { if (res.Code == 1) {
res.data = this.data; res.data = this.data;
wx.miniProgram.navigateBack({ delta: 1 }) wx.miniProgram.navigateBack({
wx.miniProgram.postMessage({ data: res }) delta: 1
})
wx.miniProgram.postMessage({
data: res
})
} else { } else {
this.$q.notify({ this.$q.notify({
type: 'negative', type: 'negative',
...@@ -108,9 +108,8 @@ ...@@ -108,9 +108,8 @@
return false; return false;
}) })
}, },
}, },
mounted() { } mounted() {}
}; };
</script> </script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment