qiushang 8 달 전
부모
커밋
01e80dca25
1개의 변경된 파일42개의 추가작업 그리고 2개의 파일을 삭제
  1. 42 2
      src/renderer/components/home.vue

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

@@ -128,7 +128,7 @@
 									
 									<div v-if="['1', '2', '3', '4'].indexOf(menuIndex) > -1" style="padding-top: 10px;">
 										<label>下载类型:</label>
-										<el-checkbox-group :min="1" v-model="settingArr" style="display: inline-block;">
+										<el-checkbox-group :min="1" v-model="settingArr" style="display: inline-block;" @input="settingGroup">
 											<el-checkbox label="mainImg">主图</el-checkbox>
 											<el-checkbox label="detailImg">详情图</el-checkbox>
 											<el-checkbox label="skuImg">SKU图</el-checkbox>
@@ -264,6 +264,19 @@
 							<el-button v-else @click="loginVisible = false; loginUrl('https://login.taobao.com')">点击登录天猫/淘宝账号</el-button>
 						</div>
 					</el-dialog>
+					
+					<!-- 非会员转换提示框 -->
+					<el-dialog title="非会员提示" :visible.sync="tipsModal" width="400px">
+						<div class="member-model">
+							<div class="tips-flex">
+								<i class="el-icon-s-opportunity"></i>
+								<p class="m-title">{{tipsDesc}}</p>
+							</div>
+							<div class="member-btn">
+								<el-button size="small" round type="primary" @click="openVip()">开通会员</el-button>
+							</div>
+						</div>
+					</el-dialog>
 			
 				</el-main>
 				
@@ -311,6 +324,8 @@
 		},
 		data() {
 			return {
+				tipsModal: false,
+				tipsDesc: "非VIP用户不能下载视频,如需完整功能请开通VIP会员。",
 				settingArr: ['mainImg'],
 				loginVisible: false,
 				addVisible: false,
@@ -670,7 +685,14 @@
 					}
 				});
 			},
-			
+			settingGroup(name){
+				let authority = this.$refs.headerRef.authority.isAuthority;
+				let index = name.indexOf('video');
+				if(index > -1 && !authority){ // 非会员选中下载视频选项-提示
+					this.tipsModal = true;
+					name.splice(index, 1);
+				}
+			},
 			// 清除缓存
 			async clearCache(){
 				this.jdStatus = 3;
@@ -2645,4 +2667,22 @@
 		user-select: none; 
 	}
 	
+	.tips-flex{
+		display: flex;
+		flex-wrap: nowrap;
+		justify-content: space-around;
+		align-items: center;
+		
+		.el-icon-s-opportunity{
+			font-size: 50px;
+			color: #f73131;
+			margin-right: 10px;
+		}
+		
+		.m-title{
+			flex: 1;
+			color: #f73131;
+		}
+	}
+	
 </style>