Commit 16af735d authored by zL's avatar zL

fix:bug修复

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