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

页面修改

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