heyang před 3 roky
rodič
revize
63fbf3d7dd

+ 1 - 1
androidscloudH5/gzhDownload.html

@@ -86,7 +86,7 @@
 
   function clickDown() {
     if (isAndroid) {
-      window.location.href = window.location.protocol === 'https:' ? 'https://file.phone.androidscloud.com:8121/document/newFile/download/1/13d0arghebcc4cm49cf04/LowLevelMultipartUpload_17835766588148940877' : 'http://110.53.221.195:8210/document/newFile/download/1/13d0arghebcc4cm49cf04/LowLevelMultipartUpload_17835766588148940877'
+      window.location.href = window.location.protocol === 'https:' ? 'https://file.phone.androidscloud.com:8121/document/newFile/download/1/${uploadKey}/LowLevelMultipartUpload_17835766588148940877' : 'http://110.53.221.195:8210/document/newFile/download/1/${uploadKey}/LowLevelMultipartUpload_17835766588148940877'
     }
     if (isiOS) {
       window.location.href = window.location.href = 'https://www.pgyer.com/gemini6'

+ 8 - 0
microserviceUserH5/static/js/vender/vue/config.js

@@ -13,6 +13,14 @@ var base_url = baseUrl; //测试服务器
 
 
 const fileCenterApi = 'https://file.phone.androidscloud.com:8121';
+let uploadKey = ''
+if (window.location.origin.includes('client.phone.androidscloud.com')) {
+  uploadKey = 'edv834e74a9c43eaac02'
+} else if (window.location.origin.includes('prese.phone.androidscloud')) {
+  uploadKey = '347905r86eb745a1sc38'
+} else {
+  uploadKey = '13d0arghebcc4cm49cf04'
+}
 //const fileCenterApi = 'https://prese.phone.androidscloud.com/'
 // https://prese.phone.androidscloud.com/
 // https://prese.phone.androidscloud.com/

+ 30 - 18
microserviceUserH5/vcloud/anniversaryCelebrate.html

@@ -195,7 +195,7 @@
 	</script>
 	<script type="text/javascript" src="https://res.wx.qq.com/open/js/jweixin-1.3.2.js"></script>
 	<script type="text/javascript">
-        var baseUrl = 'http://192.168.31.198'
+        // var baseUrl = 'http://192.168.31.198'
 	    let timer,flag = true;
 		var url = window.location.href;
 		url = url.split('/')
@@ -219,6 +219,16 @@
 			phoneRemainQuantity = 0,
 			isAndroid = u.indexOf('Android') > -1 || u.indexOf('Adr') > -1; //android终端
 		// 初始化数据
+		window.onload = function(){
+			if (isAndroid && window.native) {
+				window.native.enableSharePage(
+					'您的好友送你一台免费云机',
+					'您的好友送你一台免费云机',
+					`${baseUrl}/h5/microserviceUserH5/vcloud/anniversaryCelebrate.html`,
+					'https://test.androidscloud.com/file-center/fileOperate/getImage?id=215553'
+				);
+			}
+		}
 		init();
 		function init() {
 			$.ajax({
@@ -477,8 +487,8 @@
 						for (var i = 0; i < records.length; i++) {
 							str += `<div class="light-content-wrap">
 										<div class="light-content-text">获得星曜${records[i].awardDurations}天时长</div>
-										<div class="light-content-time">${records[i].createTime.substr(6)}</div>
-										<div class="get-btn ${records[i].receive === 1 ? 'btn-active' : ''}" data-index=${i}>领取</div>
+										<div class="light-content-time" >${records[i].createTime.substr(6)}</div>
+										<div class="get-btn ${records[i].receive === 1 ? 'btn-active' : ''}" data-awardid=${records[i].id} data-awardName=${records[i].userName}>领取</div>
 									</div>`
 						}
 						$('.light-content-list').eq(0).append(str)
@@ -493,21 +503,22 @@
 		}
 		//点击领取按钮
 		$('.light-content-list')[0].addEventListener('click',(e) => {
-			if(e.target.className === 'light-content-list'){
-				return
-			}
-			receive = e.target.dataset.index;
-			if(receive == 1){
-				$('.award-change-btn')[0].className = 'award-change-btn'
-			}else{
-				$('.award-change-btn')[1].className = 'award-change-btn'
+			console.log(e)
+			if (e.target.className === 'get-btn ') {
+				let awardId = parseInt(e.target.dataset.awardid);
+				let awardName = e.target.dataset.awardname;
+				console.log(awardId)
+				console.log(awardName)
+				if (isMiniprogram) { // 小程序
+					wx.miniProgram.navigateTo({
+						url: `/packageA/activityCloudPhone/index?id=${awardId.toString()}&awardName=${awardName}`
+					})
+				} else if (isAndroid) { // 安卓
+					window.native.activatePhone(2, awardId, awardName);
+				} else if (isiOS) {
+					window.webkit.messageHandlers.activatePhone.postMessage({ type: 2, awardId: awardId, awardName: awardName });
+				}
 			}
-			$('.data-list').eq(0).text('');
-			pageNum = 1;
-			pages = 0;
-			recordFlag = true;
-			getAward();
-			$('.award-change-btn')[receive].className = 'award-change-btn active'
 		},false);
 		//点击规则
 		$('.rule-wrap')[0].addEventListener('click',(e) => {
@@ -563,9 +574,10 @@
 			})
 		},false);
 		//获取云机数量
+		getPhoneNumber();
 		function getPhoneNumber(){
 			$.ajax({
-				url: baseUrl + '/api/user/v2/meal/info?phoneType=SVIP',
+				url: baseUrl + '/api/pay/v2/meal/info?phoneType=SVIP',
 				type: 'get',
 				headers: {
 					'Authorization': id //id

+ 1 - 1
microserviceUserH5/vcloud/browser.html

@@ -63,7 +63,7 @@
 					let node = '';
 					for(let i=0; i < list.length; i++){
 						node += `<div class="tag-item" data-plateName="${list[i].plateName}" data-id="${list[i].id}">
-									<img class="icon-row" data-plateName="${list[i].plateName}" data-id="${list[i].id}" src=${fileCenterApi}/document/newFile/download/0/13d0arghebcc4cm49cf04?fileKey=${list[i].iconImage} />
+									<img class="icon-row" data-plateName="${list[i].plateName}" data-id="${list[i].id}" src=${fileCenterApi}/document/newFile/download/0/${uploadKey}?fileKey=${list[i].iconImage} />
 									<div class="icon-title" data-plateName="${list[i].plateName}" data-id="${list[i].id}">${list[i].plateName}</div>
 									<img class="right-arrow" src="../static/img/browser/right-arrow.png" data-plateName="${list[i].plateName}" data-id="${list[i].id}" />
 									<div class="right-arrow-heght"></div>

+ 2 - 2
microserviceUserH5/vcloud/browserDetail.html

@@ -141,7 +141,7 @@
 						for(let i=0; i < appList.length; i++){
 							node += `<div class="download-item">
 										<div class="main-wrap">
-											<img class="app-icon" src=${fileCenterApi}/document/newFile/download/0/13d0arghebcc4cm49cf04?fileKey=${appList[i].iconKey} />
+											<img class="app-icon" src=${fileCenterApi}/document/newFile/download/0/${uploadKey}?fileKey=${appList[i].iconKey} />
 											<div class="app-wrap">
 												<div class="app-title">${appList[i].appName}</div>
 												<div class="app-description">${appList[i].introduction}</div>
@@ -231,7 +231,7 @@
 				cache: false,
 				success: function (res) {
 					if(res.status === 0){
-						const downloadUrl = `${fileCenterApi}/document/newFile/breakpointDownloadFile/13d0arghebcc4cm49cf04?fileKey=${key}`;
+						const downloadUrl = `${fileCenterApi}/document/newFile/breakpointDownloadFile/${uploadKey}?fileKey=${key}`;
 						window.location.href = downloadUrl;
 						let xhr = new XMLHttpRequest();
 						xhr.open('GET', downloadUrl, true);