qiushang 4 月之前
父节点
当前提交
36f8488bcf
共有 3 个文件被更改,包括 46 次插入38 次删除
  1. 3 3
      nsis/test.nsi
  2. 1 1
      package.json
  3. 42 34
      src/renderer/components/home.vue

+ 3 - 3
nsis/test.nsi

@@ -1,16 +1,16 @@
 # ====================== 自定义宏 产品信息==============================
 # ====================== 自定义宏 产品信息==============================
 !define PRODUCT_MID        		    "Ds8JqlRmiiGR"
 !define PRODUCT_MID        		    "Ds8JqlRmiiGR"
-!define PRODUCT_VERSION        		"2.2.1.3"
+!define PRODUCT_VERSION        		"2.2.1.4"
 !define PRODUCT_NAME           		"星优图片下载助手"
 !define PRODUCT_NAME           		"星优图片下载助手"
 !define INSTALL_OUTPUT_NAME    		"XYCapture_XY.exe" 
 !define INSTALL_OUTPUT_NAME    		"XYCapture_XY.exe" 
 !define EXE_NAME               		"XYCapture.exe"
 !define EXE_NAME               		"XYCapture.exe"
 !define PRODUCT_PATHNAME           	"XYCapture"     #安装卸载项用到的KEY,注册表
 !define PRODUCT_PATHNAME           	"XYCapture"     #安装卸载项用到的KEY,注册表
 !define INSTALL_APPEND_PATH         "XYCapture"     #安装路径追加的名称 
 !define INSTALL_APPEND_PATH         "XYCapture"     #安装路径追加的名称 
-!define APP_DOWNLOAD_URL    		"https://xy.xingyousoft.com/soft/XYCapture/lastest2.2.1.3.7z"
+!define APP_DOWNLOAD_URL    		"https://xy.xingyousoft.com/soft/XYCapture/lastest2.2.1.4.7z"
 !define PRODUCT_PUBLISHER      	    "苏州星优办公软件有限公司"
 !define PRODUCT_PUBLISHER      	    "苏州星优办公软件有限公司"
 !define PRODUCT_LEGAL          	    "苏州星优办公软件有限公司"
 !define PRODUCT_LEGAL          	    "苏州星优办公软件有限公司"
 !define STATISTICS_url              "https://www.xingyousoft.com/api/index/user_log"   # 统计网址
 !define STATISTICS_url              "https://www.xingyousoft.com/api/index/user_log"   # 统计网址
-!define UNINSTALL_url               "https://xy.xingyousoft.com/soft/XYCapture/uninstallWeb/?v=2.2.1.3"   # 接卸优惠网址
+!define UNINSTALL_url               "https://xy.xingyousoft.com/soft/XYCapture/uninstallWeb/?v=2.2.1.4"   # 接卸优惠网址
 
 
 # ====================== 自定义宏 安装信息==============================
 # ====================== 自定义宏 安装信息==============================
 !define INSTALL_7Z_NAME 	   		"app.7z"
 !define INSTALL_7Z_NAME 	   		"app.7z"

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
 {
 	"name": "XYCapture",
 	"name": "XYCapture",
-	"version": "2.2.1.3",
+	"version": "2.2.1.4",
 	"author": "苏州星优办公软件有限公司",
 	"author": "苏州星优办公软件有限公司",
 	"description": "An electron-vue project",
 	"description": "An electron-vue project",
 	"license": "capture",
 	"license": "capture",

+ 42 - 34
src/renderer/components/home.vue

@@ -126,8 +126,12 @@
 								<el-row type="flex" justify="space-between">
 								<el-row type="flex" justify="space-between">
 									<div v-if="menuIndex == '5'" style="padding-top: 10px;">
 									<div v-if="menuIndex == '5'" style="padding-top: 10px;">
 										<label>下载类型:</label>
 										<label>下载类型:</label>
-										<el-checkbox :value="true" style="opacity: 0.6; cursor: not-allowed;">文章图/视频</el-checkbox>
-										<el-popover placement="bottom" popper-class="popper-open" trigger="hover" content="实况(Live)图下载的格式是mp4,且同时下载任务量必须为1个">
+										<el-checkbox-group :min="1" v-model="settingArr" style="display: inline-block;" @input="settingGroup">
+											<el-checkbox label="mainImg">文章图</el-checkbox>
+											<el-checkbox label="video">视频</el-checkbox>
+										</el-checkbox-group>
+										<!-- <el-checkbox :value="true" style="opacity: 0.6; cursor: not-allowed;">文章图/视频</el-checkbox> -->
+										<el-popover placement="bottom" popper-class="popper-open" trigger="hover" content="实况(Live)图下载的格式是mp4视频">
 											<i class="el-icon-info" slot="reference" style="margin-left: 10px; color: #F56C6C;"></i>
 											<i class="el-icon-info" slot="reference" style="margin-left: 10px; color: #F56C6C;"></i>
 										</el-popover>
 										</el-popover>
 									</div>
 									</div>
@@ -2380,47 +2384,51 @@
 								return outObj;
 								return outObj;
 							}, authority, this.execNum);
 							}, authority, this.execNum);
 							
 							
-							if(imgInfo.mainImg.length >= 3){
+							if(imgInfo.mainImg.length >= 3 && authority){
 								imgInfo.mainImg = imgInfo.mainImg.slice(1, imgInfo.mainImg.length-1); //小红书轮播图第一个/最后一个和内容重复去掉
 								imgInfo.mainImg = imgInfo.mainImg.slice(1, imgInfo.mainImg.length-1); //小红书轮播图第一个/最后一个和内容重复去掉
 							}
 							}
 							imgInfo.video = responseVideo;
 							imgInfo.video = responseVideo;
 							
 							
-							// 主图下载
-							for(let j = 0; j < imgInfo.mainImg.length; j++){
-								let fileName = imgInfo.mainImg[j].split('/').pop();
-								if(fileName){
-									let queryIndex = fileName.indexOf('?');
-									if (queryIndex !== -1) {
-										fileName = fileName.substr(0, queryIndex);  
-									}
-									
-									let num = Number(j) + 1;
-									let suffix = '.jpg';
-									if(fileName.lastIndexOf('.') > -1){
-										suffix = fileName.substr(fileName.lastIndexOf('.'));
+							if(this.settingArr.indexOf('mainImg') > -1){
+								// 主图下载
+								for(let j = 0; j < imgInfo.mainImg.length; j++){
+									let fileName = imgInfo.mainImg[j].split('/').pop();
+									if(fileName){
+										let queryIndex = fileName.indexOf('?');
+										if (queryIndex !== -1) {
+											fileName = fileName.substr(0, queryIndex);  
+										}
+										
+										let num = Number(j) + 1;
+										let suffix = '.jpg';
+										if(fileName.lastIndexOf('.') > -1){
+											suffix = fileName.substr(fileName.lastIndexOf('.'));
+										}
+										
+										let outputPath = urlInfo.newPath + '\\文章图' + num + suffix;
+										await this.downloadImage(imgInfo.mainImg[j], outputPath, urlInfo);
 									}
 									}
-									
-									let outputPath = urlInfo.newPath + '\\文章图' + num + suffix;
-									await this.downloadImage(imgInfo.mainImg[j], outputPath, urlInfo);
 								}
 								}
 							}
 							}
 							
 							
-							//视频下载
-							for(let j = 0; j < imgInfo.video.length; j++){
-								let fileName = imgInfo.video[j].split('/').pop();
-								if(fileName){
-									let queryIndex = fileName.indexOf('?');
-									if (queryIndex !== -1) {
-										fileName = fileName.substr(0, queryIndex);  
-									}
-									
-									let num = Number(j) + 1;
-									let suffix = '.mp4';
-									if(fileName.lastIndexOf('.') > -1){
-										suffix = fileName.substr(fileName.lastIndexOf('.'));
+							if(this.settingArr.indexOf('video') > -1){
+								//视频下载
+								for(let j = 0; j < imgInfo.video.length; j++){
+									let fileName = imgInfo.video[j].split('/').pop();
+									if(fileName){
+										let queryIndex = fileName.indexOf('?');
+										if (queryIndex !== -1) {
+											fileName = fileName.substr(0, queryIndex);  
+										}
+										
+										let num = Number(j) + 1;
+										let suffix = '.mp4';
+										if(fileName.lastIndexOf('.') > -1){
+											suffix = fileName.substr(fileName.lastIndexOf('.'));
+										}
+										let outputPath = urlInfo.newPath + '\\视频' + num + suffix;
+										await this.downloadImage(imgInfo.video[j], outputPath, urlInfo);
 									}
 									}
-									let outputPath = urlInfo.newPath + '\\视频' + num + suffix;
-									await this.downloadImage(imgInfo.video[j], outputPath, urlInfo);
 								}
 								}
 							}
 							}