From 6898a19dcf7f52a1f93f8775cdfafc1685b4ee97 Mon Sep 17 00:00:00 2001
From: zhao_js <349234519@qq.com>
Date: 星期四, 04 一月 2024 13:53:17 +0800
Subject: [PATCH] no message

---
 H5/pages/ad_page/product_sc.vue |   29 +++++++++++++++++++++--------
 1 files changed, 21 insertions(+), 8 deletions(-)

diff --git a/H5/pages/ad_page/product_sc.vue b/H5/pages/ad_page/product_sc.vue
index 7d0ab0d..b913ce5 100644
--- a/H5/pages/ad_page/product_sc.vue
+++ b/H5/pages/ad_page/product_sc.vue
@@ -58,7 +58,12 @@
 												<view style="margin: 0.3rem;"
 													v-for="(linkitem, linkindex) in currentLink" :key="linkindex">
 													<button @click="download(linkitem)" type="primary">
-														涓嬭浇{{linkindex}}
+														鍥剧墖{{linkindex}}
+													</button>
+												</view>
+												<view v-if="videoLink&&videoLink.length>0">
+													<button @click="download(videoLink)" type="primary">
+														涓诲浘瑙嗛
 													</button>
 												</view>
 											</view>
@@ -91,6 +96,7 @@
 				pageCount: 10,
 				totalNum: 0,
 				currentLink: [],
+				videoLink:'',
 				currentId: ''
 			}
 		},
@@ -123,9 +129,8 @@
 					console.log(err);
 				})
 			},
-			refreshList()
-			{
-				this.productList=[];
+			refreshList() {
+				this.productList = [];
 				this.getTemplateData();
 			},
 			//鏌ョ湅閾鸿揣鍗�
@@ -175,8 +180,9 @@
 				this.$http.post('/api/ProductInfo/GetDaiFaDetail', param).then(e => {
 					var prodetail = e.result;
 					var linkArr = prodetail.productImage.images;
-					linkArr.push(prodetail.mainVedio);
+					//linkArr.push(prodetail.mainVedio);
 					this.currentLink = prodetail.productImage.images;
+					this.videoLink=prodetail.mainVedio;
 					this.currentId = id;
 				}).catch(function(err) {
 					console.log(err);
@@ -184,19 +190,26 @@
 			},
 			//涓嬭浇
 			download(link) {
+				uni.showLoading({
+					title: '涓嬭浇涓�'
+				})
 				uni.downloadFile({
 					url: link,
 					success: (res) => {
+						uni.hideLoading();
 						if (res.statusCode === 200) {
-							var oA = document.createElement("a");
+							 var oA = document.createElement("a");
 							oA.download = ''; // 璁剧疆涓嬭浇鐨勬枃浠跺悕锛岄粯璁ゆ槸'涓嬭浇'
 							oA.href = res.tempFilePath; //涓存椂璺緞鍐嶄繚瀛樺埌鏈湴
 							document.body.appendChild(oA);
 							oA.click();
-							oA.remove(); // 涓嬭浇涔嬪悗鎶婂垱寤虹殑鍏冪礌鍒犻櫎
+							oA.remove(); // 涓嬭浇涔嬪悗鎶婂垱寤虹殑鍏冪礌鍒犻櫎 */
 						}
 					},
-					fail: (res) => {}
+					fail: (res) => {
+						uni.hideLoading();
+						
+					}
 				});
 			},
 			toTab(tabtype) {

--
Gitblit v1.9.3