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 5.74 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 33 34 35
		foot5:'下載APP',
		foot6:'Andorid安裝教學',
		foot7:'1 先至「設置」→「安全性與隱私權」',
		foot8:'2 開啟「從位置來源下載應用程式」,並執行「確定」',
		foot9:'3 在該頁面點擊「下載按鈕」並同意安裝即可',
		foot10:'',
		foot11:'注:請將你的手機版本更新至安卓5.0以上,獲得更好的',
		foot12:'Foot Seen體驗',
	},
	{
		foot1:'Top-up',
dabai's avatar
新版footseen
d16d88b5
 
dabai committed 5 years ago
36 37 38
		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
39 40 41 42 43 44 45 46 47 48 49
		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',
	},
	{
		foot1:'العربية',
dabai's avatar
新版footseen
d16d88b5
 
dabai committed 5 years ago
50 51 52
		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
53 54 55 56 57 58 59 60 61 62 63 64 65 66 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
		foot5:'تحميل التطبيق',
		foot6:'دليل تثبيت لنظام Android',
		foot7:'1. ابحث عن "الإعدادات" وإلى "الحماية والخصوصية"',
		foot8:'2. افعل "تشيت التطيقات من مصدر غير معروف"',
		foot9:'3. إعادة إلى الموقع وانقر على "تحميل التطبيق" وتثبيهه ',
		foot10:'',
		foot11:'تنبيه: يرجى تحديث نظام هاتفك إلى 5.0 أو أحدث منه للتمتع بالامتياز ',
		foot12:'',
	}
]
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
102
		$('.langTitle img').attr('src','https://footseen.com/img/up2.png');
dabai's avatar
新版footseen
12001f84
 
dabai committed 5 years ago
103 104 105 106 107 108
		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
109
		$('.langTitle img').attr('src','https://footseen.com/img/down2.png');
dabai's avatar
新版footseen
12001f84
 
dabai committed 5 years ago
110 111 112 113 114 115
		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
116
		$('.langTitle img').attr('src','https://footseen.com/img/down2.png');
dabai's avatar
新版footseen
12001f84
 
dabai committed 5 years ago
117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 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

		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');
	}
	$('.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
167
	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
168 169 170 171 172 173 174 175 176 177
	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);
}