107 lines
3.6 KiB
JavaScript
107 lines
3.6 KiB
JavaScript
/* eslint-disable semi */
|
|
/* eslint-disable no-undef */
|
|
let urlData = getQueryString()
|
|
let urlPrefix = getUrlPrefix()
|
|
//获取url参数
|
|
let channelData = urlData.channel
|
|
var simulator = 'https://image.nnbc123.cn/yinmeng_mlq.apk';
|
|
//定义官方渠道包
|
|
const channelDict = {
|
|
'yinmeng0': 'https://image.lecheng163.com/yinmeng_yinmeng0.apk',
|
|
'yinmeng1': 'https://image.lecheng163.com/yinmeng_yinmeng1.apk',
|
|
'yinmeng2': 'https://image.lecheng163.com/yinmeng_yinmeng2.apk',
|
|
'yinmeng3': 'https://image.lecheng163.com/yinmeng_yinmeng3.apk',
|
|
'yinmeng4': 'https://image.lecheng163.com/yinmeng_yinmeng4.apk',
|
|
'yinmeng5': 'https://image.lecheng163.com/yinmeng_yinmeng5.apk',
|
|
'yinmeng6': 'https://image.lecheng163.com/yinmeng_yinmeng6.apk',
|
|
'yinmeng7': 'https://image.lecheng163.com/yinmeng_yinmeng7.apk',
|
|
'yinmeng8': 'https://image.lecheng163.com/yinmeng_yinmeng8.apk',
|
|
'yinmeng9': 'https://image.lecheng163.com/yinmeng_yinmeng9.apk',
|
|
'yinmeng10': 'https://image.lecheng163.com/yinmeng_yinmeng10.apk',
|
|
'gongzhonghao': 'https://image.lecheng163.com/yinmeng_gongzhonghao.apk'
|
|
// 'baomihua01': 'https://image.lecheng163.com/accompany_release_v_213_1_baomihua01_sign.apk'
|
|
}
|
|
|
|
function swiperFun() {
|
|
var swiper = new Swiper('.swiper', {
|
|
direction: 'vertical',
|
|
pagination: '.swiper-pagination',
|
|
paginationClickable :true,
|
|
loop: true,
|
|
autoplay: 5000,
|
|
// nextButton: ".swiper-button-next",
|
|
// prevButton: ".swiper-button-prev",
|
|
|
|
});
|
|
}
|
|
function swiperFun2() {
|
|
var swiper2 = new Swiper('.swiper2', {
|
|
direction: 'horizontal',
|
|
pagination: '.swiper-pagination',
|
|
paginationClickable :true,
|
|
loop: true,
|
|
autoplay: 5000,
|
|
// nextButton: ".swiper-button-next",
|
|
// prevButton: ".swiper-button-prev",
|
|
|
|
});
|
|
}
|
|
|
|
$(function () {
|
|
let version = checkVersion()
|
|
//判断url参数是否是与渠道包名一致
|
|
let androidUrl = null;
|
|
channelDict.hasOwnProperty(channelData) ? androidUrl = channelDict[channelData] : androidUrl = 'https://yinmeng-1318633625.cos.ap-guangzhou.myqcloud.com/yinmeng_official.apk';
|
|
// let iosUrl = 'http://doudouyue.com/8axv' //ios企业包
|
|
let iosUrl = 'http://show.nnbc123.cn/sbz6' //ios企业包
|
|
// let iosUrl = 'http://fir.gzmangguo.cn/sbz6' //ios商店包
|
|
|
|
$(document).ready(function () {
|
|
var deviceWidth = document.documentElement.clientWidth;
|
|
if (deviceWidth > 768) {
|
|
document.documentElement.style.fontSize = deviceWidth / 19.20 + 'px';
|
|
swiperFun();
|
|
} else {
|
|
document.documentElement.style.fontSize = deviceWidth / 7.50 + 'px';
|
|
swiperFun2()
|
|
}
|
|
|
|
});
|
|
window.onresize = function () {
|
|
var deviceWidth = document.documentElement.clientWidth;
|
|
if (deviceWidth > 768) {
|
|
document.documentElement.style.fontSize = deviceWidth / 19.20 + 'px';
|
|
swiperFun();
|
|
} else {
|
|
document.documentElement.style.fontSize = deviceWidth / 7.50 + 'px';
|
|
swiperFun2()
|
|
}
|
|
|
|
}
|
|
|
|
// 下载
|
|
$('.android').on('click', function () {
|
|
window.location.href = androidUrl;
|
|
})
|
|
$('.iphone').on('click', function () {
|
|
window.location.href = iosUrl;
|
|
})
|
|
$('.simulator').on('click', function () {
|
|
window.location.href = simulator;
|
|
})
|
|
//联系客服按钮
|
|
$('.homePc .kefu').click(function () {
|
|
$('.service').fadeIn()
|
|
})
|
|
$('.service .close').click(function () {
|
|
$('.service').fadeOut()
|
|
})
|
|
// 跳转充值
|
|
$('.homePc .charge').click(function () {
|
|
window.location.href = tranUrl +'/yinmeng/modules/payment_pc/index.html';
|
|
})
|
|
$('.homeM .charge').click(function () {
|
|
window.location.href = tranUrl +'/yinmeng/modules/payment/index.html';
|
|
})
|
|
|
|
}) |