四十一、下载附件

//文档下载
			startDownLoad(metarId, taskId, smsId, stsId) {
				var params = {
					id: metarId,
					taskId: taskId,
					smsId: smsId,
					stsId: stsId,
				}
				//var json = JSON.stringify(params);
				//下载附件
				let urlStr = window.location.href;
				if(urlStr.indexOf("index.html") != -1) {
					var href = window.location.href.substring(0, window.location.href.indexOf("index.html")) + "myCourses/downDocFile?id=" + metarId + "&taskId=" + taskId + "&smsId=" + smsId + "&stsId=" + stsId;
					window.open(href);
				} else {
					var url = window.location.href.substring(0, window.location.href.indexOf("index.html")) + "myCourses/downDocFile?id=" + metarId + "&taskId=" + taskId + "&smsId=" + smsId + "&stsId=" + stsId;
					window.open(url);
				}
			},

  

posted @ 2019-04-29 11:24  杰_森  阅读(128)  评论(0编辑  收藏  举报