|
|
@@ -156,7 +156,7 @@
|
|
|
<el-checkbox label="detailImg">详情图</el-checkbox>
|
|
|
<el-checkbox label="skuImg" v-if="menuIndex != '7'">SKU图</el-checkbox>
|
|
|
<el-checkbox label="commentImg" v-if="menuIndex == '3' || menuIndex == '4'">评论图</el-checkbox>
|
|
|
- <el-checkbox label="video">视频</el-checkbox>
|
|
|
+ <el-checkbox label="video">主图视频</el-checkbox>
|
|
|
</el-checkbox-group>
|
|
|
<el-popover placement="bottom" popper-class="popper-open" trigger="hover"
|
|
|
:content="menuIndex == '9' ? '视频下载的是商品视频,非商品讲解视频' : '下载类型至少选一个,评论图默认只下载商品首页展示的评论内容'">
|
|
|
@@ -245,7 +245,7 @@
|
|
|
</template>
|
|
|
<template v-if="row.status == '4'">
|
|
|
<i class="el-icon-success" style="font-size: 16px; color: #19be6b;"></i>
|
|
|
- <span>下载完成</span>
|
|
|
+ <span>下载完成,共{{row.num}}张</span>
|
|
|
</template>
|
|
|
<template v-if="row.status == '5'">
|
|
|
<i class="el-icon-error" style="font-size: 16px; color: #ed4014;"></i>
|
|
|
@@ -738,9 +738,9 @@
|
|
|
return false;
|
|
|
}
|
|
|
|
|
|
- if(this.containsAnyChar(ititle.toString(), ['\\', '/', ':', '*', '?', '"', '<', '>', '|'])){ //判断是否含有特殊字符
|
|
|
- errMsg += "第" + (index+1) + '行-名称不能包以下字符 \\ / : * ? " < > |';
|
|
|
- ititle = ititle.replace(/[\\|/|:|*|?|"|<|>||]/g, "");
|
|
|
+ if(this.containsAnyChar(ititle.toString(), ['\\', '/', ':', '*', '?', '"', '<', '>', '|', '.'])){ //判断是否含有特殊字符
|
|
|
+ errMsg += "第" + (index+1) + '行-名称不能包以下字符 \\ / : * ? " < > | .';
|
|
|
+ ititle = ititle.replace(/[\\|/|:|*|?|.|"|<|>||]/g, "");
|
|
|
}
|
|
|
if(item[1] == undefined){
|
|
|
errMsg += "第" + (index+1) + "行格式有误</br>";
|
|
|
@@ -2681,7 +2681,7 @@
|
|
|
};
|
|
|
|
|
|
//主图
|
|
|
- let arr1 = document.querySelectorAll('.module_productImage img[class*="-object-contain"]');
|
|
|
+ let arr1 = document.querySelectorAll('.module_productImage img');
|
|
|
for(let i=0; i< arr1.length; i++){
|
|
|
if(!authority && i < execNum){
|
|
|
outObj.mainImg.push(arr1[i].src);
|
|
|
@@ -3281,8 +3281,9 @@
|
|
|
let mainDiv = document.querySelectorAll('#main > div > div')[0];
|
|
|
let arr1 = mainDiv.querySelectorAll('img');
|
|
|
for(let i=0; i< arr1.length; i++){
|
|
|
- if(i > 0 && i < arr1.length-1){ // 去掉首尾重复
|
|
|
- let mainImgUrl = arr1[i].src || arr1[i].dataset.src;
|
|
|
+ // if(i > 0 && i < arr1.length-1){ // 去掉首尾重复
|
|
|
+ let mainImgUrl = arr1[i].src || arr1[i].dataset.src;
|
|
|
+ if(outObj.mainImg.indexOf(mainImgUrl) == -1){
|
|
|
if(!authority && i < execNum){
|
|
|
outObj.mainImg.push(mainImgUrl);
|
|
|
}
|
|
|
@@ -3290,12 +3291,13 @@
|
|
|
outObj.mainImg.push(mainImgUrl);
|
|
|
}
|
|
|
}
|
|
|
+ // }
|
|
|
}
|
|
|
|
|
|
//sku
|
|
|
let arr2 = document.querySelectorAll('#skuImageSlider img');
|
|
|
for(let i=0; i< arr2.length; i++){
|
|
|
- if(i > 0 && i < arr2.length-1){ // 去掉首尾重复 -去掉重复图片
|
|
|
+ //if(i > 0 && i < arr2.length-1){ // 去掉首尾重复 -去掉重复图片
|
|
|
let skuImgUrl = arr2[i].src || arr2[i].dataset.src;
|
|
|
if(outObj.skuImg.indexOf(skuImgUrl) == -1){
|
|
|
let nextEle = arr2[i].parentElement.nextElementSibling;
|
|
|
@@ -3314,7 +3316,7 @@
|
|
|
outObj.skuName.push(name);
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
+ //}
|
|
|
}
|
|
|
|
|
|
//详情图
|
|
|
@@ -3549,8 +3551,8 @@
|
|
|
}
|
|
|
if(title){
|
|
|
title = title.substring(0, 50).trim();
|
|
|
- if(this.containsAnyChar(title, ['\\', '/', ':', '*', '?', '"', '<', '>', '|'])){ //判断是否含有特殊字符
|
|
|
- title = title.replace(/[\\|/|:|*|?|"|<|>||]/g, "");
|
|
|
+ if(this.containsAnyChar(title, ['\\', '/', ':', '*', '?', '"', '<', '>', '|', '.'])){ //判断是否含有特殊字符
|
|
|
+ title = title.replace(/[\\|/|:|*|?|.|"|<|>||]/g, "");
|
|
|
}
|
|
|
if (fs.existsSync(this.downloadDir + separator + pjson.softInfo.softName + separator + title)) {
|
|
|
urlInfo.newPath = this.downloadDir + separator + pjson.softInfo.softName + separator + title;
|