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
BlameHistoryPermalink
  • dabai's avatar
    邀请有奖 · e5f5024b
    dabai committed 4 years ago
    e5f5024b
langAndorid.js 6.36 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 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 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 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 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197
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:'儲值',
		foot2:'https://footseen.com/img/animg1_cn.png',
		foot3:'https://footseen.com/img/animg2_cn.png',
		foot4:'https://footseen.com/img/animg3_cn.png',
		foot5:'下載APP',
		foot6:'Andorid安裝教學',
		foot7:'1 先至「設置」→「安全性與隱私權」',
		foot8:'2 開啟「從位置來源下載應用程式」,並執行「確定」',
		foot9:'3 在該頁面點擊「下載按鈕」並同意安裝即可',
		foot10:'',
		foot11:'注:請將你的手機版本更新至安卓5.0以上,獲得更好的',
		foot12:'Foot Seen體驗',
		foot13:'邀請碼:',
		foot14:'複製成功',
	},
	{
		foot1:'Top-up',
		foot2:'https://footseen.com/img/animg1_en.png',
		foot3:'https://footseen.com/img/animg2_en.png',
		foot4:'https://footseen.com/img/animg3_en.png',
		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',
		foot13:'Invitation code:',
		foot14:'Copy success',
	},
	{
		foot1:'العربية',
		foot2:'https://footseen.com/img/img1_ar.jpg',
		foot3:'https://footseen.com/img/img2_ar.jpg',
		foot4:'https://footseen.com/img/img3_ar.jpg',
		foot5:'تحميل التطبيق',
		foot6:'دليل تثبيت لنظام Android',
		foot7:'1. ابحث عن "الإعدادات" وإلى "الحماية والخصوصية"',
		foot8:'2. افعل "تشيت التطيقات من مصدر غير معروف"',
		foot9:'3. إعادة إلى الموقع وانقر على "تحميل التطبيق" وتثبيهه ',
		foot10:'',
		foot11:'تنبيه: يرجى تحديث نظام هاتفك إلى 5.0 أو أحدث منه للتمتع بالامتياز ',
		foot12:'',
		foot13:'شفرة الدعوة:',
		foot14:'تم النسخ بنجاح',
	}
]
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();
		$('.langTitle img').attr('src','https://footseen.com/img/up2.png');
		e.stopPropagation();
	})
	$('.langList p').on('click',function(e){
		$(this).addClass('check').siblings().removeClass('check');
		$('.langTitle font').html($(this).html());
		$('.langList').hide();
		$('.langTitle img').attr('src','https://footseen.com/img/down2.png');
		sessionStorage.lang = $(this).attr('data-lang');
		lang();
		e.stopPropagation();
	})
	$(document).on('click',function(e){
		$('.langList').hide();		
		$('.langTitle img').attr('src','https://footseen.com/img/down2.png');

		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');
	}
	$('.code span').html(langList[langType].foot13+getRequest().agentCode);
	$('.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 = '';
	str2 += '<p class="andoridDescTitle"><img src="https://www.footseen.com/img/desc.png">'+langList[langType].foot6+'</p>';
	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);
}

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;
		}