Commit 16af735d authored by zL's avatar zL

fix:bug修复

parent 3d995962
......@@ -56,8 +56,9 @@
@click="switchPersonalClassification(item, index)"
v-for="(item, index) in MyCategories"
:key="index"
:title="item.name"
>
{{ item.name }}
{{ item.name | stringCutting(7) }}
<i
@click.stop="editorClassification(item, index)"
v-if="checkClassification === index && index !== 0"
......@@ -455,6 +456,7 @@ export default {
type: "post",
params: {
key: this.key,
folder_id: this.MyCategories[this.checkClassification].id,
},
});
if (res) {
......
......@@ -128,7 +128,17 @@ export default {
},
async fileChange(e) {
const file = e.target.files[0];
e.target.value = null; //清空值
if (!file) return;
// 限制相同文件的上传
const state = this.localObjects.some((item) => item.name === file.name);
if (state) {
this.$message({
message: "不可重复上传该音频文件",
type: "warning",
});
return;
}
if (file.size > 10485760) {
this.$message({
message: "上传音频大小不可超过10M",
......
......@@ -92,6 +92,15 @@ export default {
const file = e.target.files[0];
e.target.value = null; //清空值
if (!file) return;
// 限制相同文件的上传
const state = this.localObjects.some((item) => item.name === file.name);
if (state) {
this.$message({
message: "不可重复上传该PDF文件",
type: "warning",
});
return;
}
if (file.size > 10485760) {
this.$message({
message: "上传PDF大小不可超过10M",
......
......@@ -160,10 +160,9 @@ export default {
const state = this.locaVideos.some((item) => item.name === file.name);
if (state) {
this.$message({
message: "不可重复上传视频文件",
message: "不可重复上传视频文件",
type: "warning",
});
return;
}
if (file.type && file.type.indexOf("video/") >= 0) {
......@@ -175,7 +174,6 @@ export default {
});
return;
}
this.UpladFile(file);
} else {
this.$message({
......@@ -227,7 +225,11 @@ export default {
uploadComplete(xhr) {
//服务断接收完文件返回的结果
this.hashList.push(JSON.parse(xhr.target.response).data.hash);
console.log(this.hashList);
this.$message({
type: "success",
message: "上传成功!",
});
this.locaVideos[this.locaVideos.length - 1].url = JSON.parse(
xhr.target.response
).data.url;
......
......@@ -183,7 +183,7 @@
<span class="home-5-text"
>不需要注册和审批只需手机登录就可以直接使用</span
>
<span class="home-5-btn cursor-pointer" @click="$router.push(`/login`)"
<span class="home-5-btn cursor-pointer" @click="toLoginPanel()"
>免费使用</span
>
</section>
......
......@@ -590,8 +590,9 @@ export default class editTemplate extends Vue {
await this.fileHandler();
var newDetail = new Array();
newDetail = formatApiJson(this.rootUnitList);
console.log(newDetail);
// return
// return;
// 更新ext数据
for (let index = 0; index < newDetail.length; index++) {
const element = newDetail[index];
......
......@@ -10,7 +10,7 @@ module.exports = {
open: true,
proxy: {
'^/api': {
target: 'http://172.16.101.87:46789/',
target: 'http://172.16.101.87:46790/',
pathRewrite: {
'^/api': '',
},
......
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