Skip to content
  • P
    Projects
  • G
    Groups
  • S
    Snippets
  • Help

libai / footsen

  • This project
    • Loading...
  • Sign in
Go to a project
  • Project
  • Repository
  • Issues 0
  • Merge Requests 0
  • Pipelines
  • Wiki
  • Snippets
  • Members
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Branches
  • Tags
  • Contributors
  • Graph
  • Compare
  • Charts
Switch branch/tag
  • footsen
  • js
  • langAndorid.js
Find file
Normal viewHistoryPermalink
langAndorid.js 6.35 KB
Newer Older
dabai's avatar
新版footseen
12001f84
 
dabai committed 5 years ago
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
var swiper = new Swiper('.swiper-container', {
  	loop: true,
    speed:300,
    observer: true,	
    observerParents: true,
    autoplayDisableOnInteraction: false,
	  autoplay : {
	    delay:4000
	  },
	   onSlideChangeEnd: function(swipers){ 
        swipers.update(); //swiper更新
    },
    pagination: {
	    el: '.swiper-pagination',
	  },
});

var langList = [
	//中文 英文 阿拉伯文
	{
		foot1:'儲值',
dabai's avatar
新版footseen
d16d88b5
 
dabai committed 5 years ago
22 23 24
		foot2:'https://footseen.com/img/animg1_cn.png',
		foot3:'https://footseen.com/img/animg2_cn.png',
		foot4:'https://footseen.com/img/animg3_cn.png',
dabai's avatar
新版footseen
12001f84
 
dabai committed 5 years ago
25 26 27 28 29 30 31 32
		foot5:'下載APP',
		foot6:'Andorid安裝教學',
		foot7:'1 先至「設置」→「安全性與隱私權」',
		foot8:'2 開啟「從位置來源下載應用程式」,並執行「確定」',
		foot9:'3 在該頁面點擊「下載按鈕」並同意安裝即可',
		foot10:'',
		foot11:'注:請將你的手機版本更新至安卓5.0以上,獲得更好的',
		foot12:'Foot Seen體驗',
dabai's avatar
邀请有奖
e5f5024b
 
dabai committed 4 years ago
33
		foot13:'邀請碼:',
dabai's avatar
邀请分享
0c2fdc4a
 
dabai committed 4 years ago
34
		foot14:'複製成功',
dabai's avatar
新版footseen
12001f84
 
dabai committed 5 years ago
35 36 37
	},
	{
		foot1:'Top-up',
dabai's avatar
新版footseen
d16d88b5
 
dabai committed 5 years ago
38 39 40
		foot2:'https://footseen.com/img/animg1_en.png',
		foot3:'https://footseen.com/img/animg2_en.png',
		foot4:'https://footseen.com/img/animg3_en.png',
dabai's avatar
新版footseen
12001f84
 
dabai committed 5 years ago
41 42 43 44 45 46 47 48
		foot5:'Download APP',
		foot6:'Andorid download tutrial',
		foot7:'1.Enter Settings→Security&Privacy',
		foot8:'2.Choose More Settings',
		foot9:'3.Select Download apps from external sources',
		foot10:'4.Click Download and verify installing',
		foot11:'Note:Please upgrade your mobile to Android 5.0',
		foot12:'for a better experience',
dabai's avatar
邀请分享
eaf3f3fb
 
dabai committed 4 years ago
49
		foot13:'Invitation code:',
dabai's avatar
邀请分享
0c2fdc4a
 
dabai committed 4 years ago
50
		foot14:'Copy success',
dabai's avatar
新版footseen
12001f84
 
dabai committed 5 years ago
51 52
	},
	{
dabai's avatar
翻译修改
799ad2ae
 
dabai committed 4 years ago
53
		foot1:'شحن',
dabai's avatar
新版footseen
d16d88b5
 
dabai committed 5 years ago
54 55 56
		foot2:'https://footseen.com/img/img1_ar.jpg',
		foot3:'https://footseen.com/img/img2_ar.jpg',
		foot4:'https://footseen.com/img/img3_ar.jpg',
dabai's avatar
新版footseen
12001f84
 
dabai committed 5 years ago
57 58 59 60 61 62 63 64
		foot5:'تحميل التطبيق',
		foot6:'دليل تثبيت لنظام Android',
		foot7:'1. ابحث عن "الإعدادات" وإلى "الحماية والخصوصية"',
		foot8:'2. افعل "تشيت التطيقات من مصدر غير معروف"',
		foot9:'3. إعادة إلى الموقع وانقر على "تحميل التطبيق" وتثبيهه ',
		foot10:'',
		foot11:'تنبيه: يرجى تحديث نظام هاتفك إلى 5.0 أو أحدث منه للتمتع بالامتياز ',
		foot12:'',
dabai's avatar
邀请分享
eaf3f3fb
 
dabai committed 4 years ago
65
		foot13:'شفرة الدعوة:',
dabai's avatar
邀请分享
0c2fdc4a
 
dabai committed 4 years ago
66
		foot14:'تم النسخ بنجاح',
dabai's avatar
新版footseen
12001f84
 
dabai committed 5 years ago
67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107
	}
]
var langType = 0;
var langStr =(navigator.language || navigator.browserLanguage).toLowerCase();
if(sessionStorage.lang == undefined || sessionStorage.lang == 'undefined'){
	if(langStr.indexOf('ar')>=0){
		sessionStorage.lang = 7;
		$('.langTitle font').html('العربية');
		langType = 2;
		$('.langList p').eq(2).addClass('check');
	} else if(langStr.indexOf('zh')>=0){
		sessionStorage.lang = 2;
		$('.langTitle font').html('繁體中文');
		langType = 0;
		$('.langList p').eq(0).addClass('check');
	} else {
		sessionStorage.lang = 1;
		$('.langTitle font').html('English');
		langType = 1;
		$('.langList p').eq(1).addClass('check');
	}
} else {
	 if(sessionStorage.lang == 7){
		langType = 2;
		$('.langTitle font').html('العربية');
		$('.langList p').eq(2).addClass('check');
	} else if(sessionStorage.lang == 2){
		langType = 0;
		$('.langTitle font').html('繁體中文');
		$('.langList p').eq(0).addClass('check');
	} else {
		langType = 1;
		$('.langTitle font').html('English');
		$('.langList p').eq(1).addClass('check');
	}
}

$(function(){
	lang();
	$('.langTitle').on('click',function(e){
		$('.langList').show();
dabai's avatar
新版footseen
d16d88b5
 
dabai committed 5 years ago
108
		$('.langTitle img').attr('src','https://footseen.com/img/up2.png');
dabai's avatar
新版footseen
12001f84
 
dabai committed 5 years ago
109 110 111 112 113 114
		e.stopPropagation();
	})
	$('.langList p').on('click',function(e){
		$(this).addClass('check').siblings().removeClass('check');
		$('.langTitle font').html($(this).html());
		$('.langList').hide();
dabai's avatar
新版footseen
d16d88b5
 
dabai committed 5 years ago
115
		$('.langTitle img').attr('src','https://footseen.com/img/down2.png');
dabai's avatar
新版footseen
12001f84
 
dabai committed 5 years ago
116 117 118 119 120 121
		sessionStorage.lang = $(this).attr('data-lang');
		lang();
		e.stopPropagation();
	})
	$(document).on('click',function(e){
		$('.langList').hide();		
dabai's avatar
新版footseen
d16d88b5
 
dabai committed 5 years ago
122
		$('.langTitle img').attr('src','https://footseen.com/img/down2.png');
dabai's avatar
新版footseen
12001f84
 
dabai committed 5 years ago
123 124 125 126 127 128 129 130 131 132 133 134 135 136 137

		e.stopPropagation();
	})
})

function lang(){
	$('.main').removeClass('L_Ar');
	if(sessionStorage.lang == 1){
		langType = 1;
	} else if(sessionStorage.lang == 2){
		langType = 0;
	} else if(sessionStorage.lang == 7){
		langType = 2;
		$('.main').addClass('L_Ar');
	}
dabai's avatar
邀请分享
e0b6993b
 
dabai committed 4 years ago
138
	$('.code span').html(langList[langType].foot13+getRequest().agentCode);
dabai's avatar
新版footseen
12001f84
 
dabai committed 5 years ago
139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173
	$('.swiper-container').removeClass('hide');
	var str = '';
	str += '<div class="swiper-wrapper">';
	str += '	<div class="swiper-slide">';
	str += '		<img src="'+langList[langType].foot2+'"/>';
	str += '	</div>';
	str += '	<div class="swiper-slide">';
	str += '		<img src="'+langList[langType].foot3+'"/>';
	str += '	</div>';
	str += '	<div class="swiper-slide">';
	str += '		<img src="'+langList[langType].foot4+'"/>';
	str += '	</div>';
	str += '</div>';
	str += '<div class="swiper-pagination"></div>';
	$('.swiper-container').html(str);
		this.swiper.destroy(false);
		this.swiper = new Swiper('.swiper-container', {
	  	loop: true,
	    speed:300,
	    observer: true,	
	    observerParents: true,
	    autoplayDisableOnInteraction: false,
		  autoplay : {
		    delay:4000
		  },
		   onSlideChangeEnd: function(swipers){ 
	        swipers.update(); //swiper更新
	    },
	    pagination: {
		    el: '.swiper-pagination',
		  },
	});
	$('.topUp').html(langList[langType].foot1);
	$('.iosDown').html(langList[langType].foot5);
	var str2 = '';
dabai's avatar
新版footseen
6103a8b9
 
dabai committed 5 years ago
174
	str2 += '<p class="andoridDescTitle"><img src="https://www.footseen.com/img/desc.png">'+langList[langType].foot6+'</p>';
dabai's avatar
新版footseen
12001f84
 
dabai committed 5 years ago
175 176 177 178 179 180 181 182 183
	str2 += '<p class="andoridDescText andoridDescText1">'+langList[langType].foot7+'</p>';
	str2 += '<p class="andoridDescText1">'+langList[langType].foot8+'</p>';
	str2 += '<p class="andoridDescText1">'+langList[langType].foot9+'</p>';
	if(langType == 1){		
		str2 += '<p class="andoridDescText1">'+langList[langType].foot10+'</p>';
	}
	str2 += '<p class="andoridDescText andoridDescText2">'+langList[langType].foot11+'</p>';
	str2 += '<p class="andoridDescText2">'+langList[langType].foot12+'</p>';
	$('.andoridDesc').html(str2);
dabai's avatar
邀请分享
6cd8c2ef
 
dabai committed 4 years ago
184 185 186 187 188 189 190 191 192 193 194 195 196 197
}

function getRequest() {
		  var url = location.href;
		  var theRequest = new Object();
		  if (url.indexOf("?") != -1) {
		      var str = url.substr(url.indexOf("?") + 1);
		      strs = str.split("&");
		      for (var i = 0; i < strs.length; i++) {
		          theRequest[strs[i].split("=")[0]] = unescape(strs[i].split("=")[1]);
		      }
		  }
		  return theRequest;
		}