|
@@ -818,28 +818,28 @@
|
|
|
url: '/packageA/order/renew/index?record=' + userCardId
|
|
|
})
|
|
|
}
|
|
|
- }else if(uni.webView) {
|
|
|
- if(phoneRemainQuantity > 0){
|
|
|
- uni.webView.navigateTo({
|
|
|
- url: '/pages/order/order'
|
|
|
- })
|
|
|
- } else {
|
|
|
- uni.webView.navigateTo({
|
|
|
- url: '/pages/order/renew'
|
|
|
- })
|
|
|
- }
|
|
|
- } else if (isAndroid) { // 安卓
|
|
|
+ } else if (isAndroid && window.native) { // 安卓
|
|
|
if(phoneRemainQuantity > 0){
|
|
|
window.native.startPurchase('SVIP', 365);
|
|
|
} else {
|
|
|
window.native.startRenew();
|
|
|
}
|
|
|
- } else if (isiOS) {
|
|
|
+ } else if (isiOS && window.webkit.messageHandlers) {
|
|
|
if(phoneRemainQuantity > 0){
|
|
|
window.webkit.messageHandlers.startPurchase.postMessage({ type: 1, day: 365 });
|
|
|
} else {
|
|
|
window.webkit.messageHandlers.startRenew.postMessage({ type: 1, day: 365 });
|
|
|
}
|
|
|
+ } else {
|
|
|
+ if(phoneRemainQuantity > 0){
|
|
|
+ uni.webView.navigateTo({
|
|
|
+ url: '/pages/order/order'
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ uni.webView.navigateTo({
|
|
|
+ url: '/pages/order/renew'
|
|
|
+ })
|
|
|
+ }
|
|
|
}
|
|
|
})
|
|
|
}
|
|
@@ -1263,9 +1263,9 @@
|
|
|
}
|
|
|
$('.share-wrap')[0].addEventListener('click',() => {
|
|
|
operate('znq_2022_h5_分享');
|
|
|
- if (isAndroid) {
|
|
|
+ if (isAndroid && window.native) {
|
|
|
window.native.share('双子星云手机闪曜周年庆!大礼回馈,最高免费赠送188天!', '双子星云手机闪曜周年庆!大礼回馈,最高免费赠送188天!', `${baseUrl}/h5/microserviceUserH5/vcloud/anniversaryCelebrate.html`, '../static/img/anniversaryCelebrate/share-bg.png')
|
|
|
- } else if (isiOS) {
|
|
|
+ } else if (isiOS && window.webkit.messageHandlers) {
|
|
|
window.webkit.messageHandlers.share.postMessage({
|
|
|
title: '双子星云手机闪曜周年庆!大礼回馈,最高免费赠送188天!',
|
|
|
content: '双子星云手机闪曜周年庆!大礼回馈,最高免费赠送188天!',
|
|
@@ -1278,16 +1278,13 @@
|
|
|
},false);
|
|
|
function download() {
|
|
|
operate('znq_2022_h5_下载');
|
|
|
- if(window.__wxjs_environment === 'miniprogram'){
|
|
|
+ let ua = navigator.userAgent.toLowerCase();
|
|
|
+ if(ua.match(/MicroMessenger/i)=="micromessenger"){
|
|
|
wx.miniProgram.navigateTo({
|
|
|
url: '/pages/home/home'
|
|
|
})
|
|
|
} else if (isAndroid) {
|
|
|
- if (baseUrl.includes('prese.phone.androidscloud.com')) {
|
|
|
- window.location.href = 'http://14.18.190.144:18888/suanchou'
|
|
|
- } else {
|
|
|
- window.location.href = 'http://www.androidscloud.com/suanchou?timestamp=' + Math.random();
|
|
|
- }
|
|
|
+ window.location.href = 'http://www.androidscloud.com/suanchou?timestamp=' + Math.random();
|
|
|
} else if (isiOS) {
|
|
|
document.location.href = 'https://www.pgyer.com/gemini6?timestamp=' + Math.random();
|
|
|
} else {
|