active1.js 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703
  1. var content = {
  2. 'cn': {
  3. nav1: "关于CWG",
  4. nav2: "立即参赛",
  5. headers1: 'CWG交易之星',
  6. headers2: '(中国·新疆)特邀巅峰赛',
  7. headers3: '总奖池:',
  8. headers4: '美金',
  9. headers5: '报名截止:',
  10. headers6: '报名截止时间:',
  11. headers7: '比赛时间:',
  12. headers8: '*本次邀请赛的参赛者限定为中国新疆地区客户',
  13. headers9: '年',
  14. headers10: '月',
  15. headers11: '日',
  16. headers12: '时',
  17. headers13: '分',
  18. headers14: '秒',
  19. table1: '参加比赛并瓜分总奖金池',
  20. table2: '活跃参与者有机会参加每个交易日的每日幸运星抽奖活动',
  21. table3: '排名',
  22. table4: '账户昵称',
  23. table5: 'CWG账号',
  24. table6: '账户净值',
  25. table7: '最大回撤',
  26. table8: '盈利率',
  27. table9: '综合分',
  28. table10: '暂无数据',
  29. table11: '*排行版更新时间为每日平台时间(夏令时GMT+3,冬令时GMT+2)00:00',
  30. step1: '如何参赛',
  31. step2: '收到邀请的CWG真实客户登录CWG客户专区',
  32. step3: '在客户专区活动中心找到实盘特邀交易大赛活动入口',
  33. step4: '点击报名按钮选择参赛账户并填写完信息提交即为报名成功',
  34. footer1: '每日幸运星',
  35. footer2: 'CWG会在每个交易日从活跃参赛者中抽取一名幸运星,将得到CWG定制大赛礼盒一份。',
  36. footer3: '(*活跃参赛者即当日有任意交易或账户有持仓)',
  37. footer4: '*幸运星精品礼盒奖励将在10个工作日内按照您的报名地址寄出,如需更换地址,请在获奖后3个工作日内联系CWG官网在线客服进行处理。',
  38. },
  39. 'en': {
  40. nav1: "About CWG",
  41. nav2: "Join Now",
  42. headers1: "CWG Africa's Top Trader Challenge",
  43. headers2: 'For each new trader, we will add $10 into the prize pool, no limits!',
  44. headers3: 'Total Prize Pool:',
  45. headers4: 'USD',
  46. headers5: 'Registration Deadline:',
  47. headers6: 'Registration Deadline:',
  48. headers7: 'Competition Period:',
  49. headers8: '*Participants in this competition include all customers from the African region.',
  50. headers9: 'Year',
  51. headers10: 'Month',
  52. headers11: 'Day',
  53. headers12: 'Hour',
  54. headers13: 'Minute',
  55. headers14: 'Second',
  56. table1: 'Join now and win from our traders prize pool',
  57. table2: 'Active participants have the chance to win the daily trader prize every trading day',
  58. table3: 'Rank',
  59. table4: 'Nickname',
  60. table5: 'CWG Account',
  61. table6: 'Account Net Value',
  62. table7: 'Maximum Drawdown',
  63. table8: 'Profitability',
  64. table9: 'Overall Score',
  65. table10: 'No data available',
  66. table11: '*Rankings are updated daily at 00:00 platform time (GMT+3 during daylight saving time, GMT+2 during standard time)',
  67. step1: 'How to Participate',
  68. step2: 'Click "Join Now," fill in the registration information, and successfully create an instant account (if you already have a CWG account, please contact our customer service for registration)',
  69. step3: 'After successfully submitting, wait for dedicated customer service to contact you and open the competition channel for your account.',
  70. step4: "click on 'Sign Up for the Competition' in the client zone's activity center to successfully register and wait for the competition to start.",
  71. footer1: 'Daily Trader Prize',
  72. footer2: 'For each trading day of the challenge, CWG will randomly select one lucky trader from the pool of active participants who will receive a reward of $5 CASH!',
  73. footer3: '(Active participants refer to those who have made any trades or have open positions on that day)',
  74. footer4: "*Rewards will be credited to your customer's wallet immediately",
  75. box1item4: 'Welcome To CWG Markets',
  76. box1item4_1: 'Please fill out this field',
  77. box1item5: 'Country / Region',
  78. box1item6: 'Phone Number',
  79. box1item7: 'Email Address',
  80. box1item8: 'Email Varification Code',
  81. box1item9: 'Set Password',
  82. box1item10: 'I declared and confirmed that I am not a citizen or resident of the United States.',
  83. box1item11: 'Register',
  84. box1item12: 'Already have an account',
  85. code: 'Generate',
  86. country: "Please select your country",
  87. email: "Email Address Format Error",
  88. phone: "Phone Format Error",
  89. password: "Must be between 8 to 15 characters,Contain both uppercase and lowercase letter,Use a combination of numbers and letters",
  90. codeInput: "Please enter the Email verification code",
  91. agree: "Please agree to the declaration",
  92. CodeSuccess: "Verification code has been successfully obtained ",
  93. emailempty: "Email Address cannot be empty",
  94. waitCode1: "Please wait ",
  95. waitCode2: "s ",
  96. registerSuc: "Registration successful, log in now...",
  97. SystemError: "System Error, please try again.",
  98. LoginSuccess: "Login Successful",
  99. st1: "Must be between 8 to 15 characters",
  100. nd2: "Contain both uppercase and lowercase letter",
  101. rd3: "Use a combination of numbers and letters",
  102. },
  103. }
  104. let vm = new Vue({
  105. el: "#active1",
  106. data: {
  107. //多语言
  108. langList: {
  109. en: "ENGLISH",
  110. cn: "中文简体"
  111. },
  112. language: "en",
  113. lang: {},
  114. flag: false,
  115. loading: false,
  116. mock_options: {
  117. time:'',
  118. list:[]
  119. },
  120. mock_optionsC: [],
  121. // img_logo: logo,
  122. timer: 59,
  123. intervalCode:null,
  124. interval: null,
  125. getCodeString: "",
  126. notCountry:[
  127. 'AF','AI','AG','BS','BY',
  128. 'BZ','BA','BI','CF','CD','CU',
  129. 'ET','FJ','PS','GN','GW','HT',
  130. 'IR','IQ','LB','LY','ML','MM',
  131. 'NI','KP','PW','RU','SO','SS',
  132. 'SD','SY','UA','US','VE','YE','ZW','MY'
  133. ],
  134. // 表单参数
  135. params: {
  136. agentId: null,
  137. comPoint: null,
  138. sourceCode:null,
  139. subId: "",
  140. email: "",
  141. password: "",
  142. country: "",
  143. emailCode: "",
  144. phone: "",
  145. w: "",
  146. agree: false,
  147. linkValue: null,
  148. },
  149. dialogFormVisible:false,
  150. clientWidth:'',
  151. pagerInfo: {row: 10, current: 1, pageTotal: 0, rowTotal: 0},//分页
  152. pictLoading:false,
  153. // 验证规则
  154. rules: {
  155. country: [
  156. {
  157. validator: (rule, value, callback) => {
  158. if (value != "" && value != null) {
  159. callback();
  160. } else {
  161. callback(new Error(content[sessionStorage.getItem('lang')].country));
  162. }
  163. },
  164. trigger: "blur",
  165. },
  166. ],
  167. email: [
  168. {
  169. validator: (rule, value, callback) => {
  170. if (/^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$/.test(value)) {
  171. callback();
  172. } else {
  173. callback(new Error(content[sessionStorage.getItem('lang')].email));
  174. }
  175. },
  176. trigger: "blur",
  177. },
  178. ],
  179. emailCode: [
  180. {
  181. validator: (rule, value, callback) => {
  182. if (
  183. value != "" &&
  184. value != null
  185. ) {
  186. callback();
  187. } else {
  188. callback(new Error(content[sessionStorage.getItem('lang')].codeInput));
  189. }
  190. },
  191. trigger: "blur",
  192. },
  193. ],
  194. password: [
  195. {
  196. validator: (rule, value, callback) => {
  197. if (/^(?=.*[A-Z])(?=.*[a-z])(?=.*[0-9])(?!.*([~!@&%$^\\(\\)#_]).*\\1.*\\1.*\\1)[A-Za-z0-9~!@&%$^\\(\\)#_]{8,16}$/.test(value)) {
  198. callback();
  199. } else {
  200. callback(new Error(content[sessionStorage.getItem('lang')].password));
  201. }
  202. },
  203. trigger: "blur",
  204. },
  205. ],
  206. agree: [
  207. {
  208. validator: (rule, value, callback) => {
  209. if (value) {
  210. callback();
  211. } else {
  212. callback(new Error(content[sessionStorage.getItem('lang')].agree));
  213. }
  214. },
  215. trigger: "change",
  216. },
  217. ],
  218. phone: [
  219. {
  220. validator: (rule, value, callback) => {
  221. if (/^[0-9]\d*$/.test(value)) {
  222. callback();
  223. } else {
  224. callback(new Error(content[sessionStorage.getItem('lang')].phone));
  225. }
  226. },
  227. trigger: "blur",
  228. },
  229. ],
  230. },
  231. notRegisterMsg:"",
  232. notRegisterMsgOpen:false,
  233. imgUrl: '',
  234. ho: '',
  235. isPc:null,
  236. centerDialogVisible:false,
  237. CompetitionData:{},//基础信息
  238. rankingList:{},//排名列表
  239. Countdown:{
  240. d:'0',
  241. h:'0',
  242. m:'0',
  243. s:'0',
  244. },
  245. CountdownFlag:true,
  246. infoCode:'',
  247. },
  248. computed: {
  249. rule1: function () {
  250. if (!this.params.password) {
  251. return false;
  252. }
  253. return /^.{8,16}$/.test(this.params.password);
  254. },
  255. rule2: function () {
  256. return /^(?=.*?[a-z])(?=.*?[A-Z]).*$/.test(this.params.password);
  257. },
  258. rule3: function () {
  259. return /^(?=.*[A-Z])(?=.*[a-z])(?=.*[0-9])(?!.*([~!@&%$^\\(\\)#_]).*\\1.*\\1)[A-Za-z0-9~!@&%$^\\(\\)#_]{8,16}$/.test(
  260. this.params.password
  261. );
  262. },
  263. },
  264. methods: {
  265. // 语言切换函数
  266. chooseLang(key) {
  267. this.lang = content[key];
  268. this.language = key;
  269. sessionStorage.setItem("lang", this.language);
  270. location.reload();
  271. },
  272. //分页返回数据
  273. handleSizeChange (val) {
  274. this.pagerInfo.row = val;
  275. this.searchFunc();
  276. },
  277. handleCurrentChange (val) {
  278. this.pagerInfo.current = val;
  279. this.searchFunc();
  280. },
  281. //获取列表数据
  282. async searchFunc () {
  283. this.pictLoading = true;
  284. axios.post(this.imgUrl + '/follow/cpt/result/search/list', {
  285. "infoCode": this.infoCode,
  286. page: {
  287. current: this.pagerInfo.current,
  288. row: this.pagerInfo.row
  289. }
  290. //参数
  291. }).then(res => {//请求成功后的处理函数
  292. if (res.data.code == 200) {
  293. if (res.data.data && res.data.data.length) {
  294. this.mock_options.list = res.data.data;
  295. }
  296. if (res.data.page != null) {
  297. this.pagerInfo.rowTotal = res.data.page.rowTotal;
  298. this.pagerInfo.pageTotal = res.data.page.pageTotal;
  299. } else {
  300. this.pagerInfo.rowTotal = 0;
  301. }
  302. this.pictLoading = false;
  303. } else {
  304. this.$message.error(res.data.msg);
  305. this.pictLoading = false;
  306. }
  307. }).catch(err => {//请求失败后的处理函数
  308. this.pictLoading = false;
  309. })
  310. },
  311. //获取基础数据
  312. async searchCompetition () {
  313. this.pictLoading = true;
  314. axios.post(this.imgUrl + '/follow/cpt/info/front', {
  315. "infoCode": this.infoCode
  316. //参数
  317. }).then(res => {//请求成功后的处理函数
  318. if (res.data.code == 200) {
  319. this.CompetitionData = res.data.data;
  320. this.CompetitionData.startDate = res.data.data.startDate.split(' ')[0];
  321. this.CompetitionData.endDate = res.data.data.endDate.split(' ')[0];
  322. // this.CompetitionData.startDate = '2023-9-7'
  323. let that = this;
  324. let startTime = new Date(that.CompetitionData.signEndDate.replace(/-/g, '/')).getTime();
  325. that.interval = setInterval(() => {
  326. let timezone = 3; //目标时区时间,东3区 东时区正数 西市区负数
  327. let offset_GMT = new Date().getTimezoneOffset(); // 本地时间和格林威治的时间差,单位为分钟
  328. let nowDate = new Date().getTime(); // 本地时间距 1970 年 1 月 1 日午夜(GMT 时间)之间的毫秒数
  329. let nowTime = new Date(nowDate + offset_GMT * 60 * 1000 + timezone * 60 * 60 * 1000);
  330. let sec = 1000, min = 60 * sec, hour = min * 60, day = 24 * hour;
  331. let time = startTime - nowTime;
  332. if (time>0) {
  333. that.CountdownFlag = true;
  334. that.Countdown.d = that.getzero(Math.floor(time / day));
  335. that.Countdown.h = that.getzero(Math.floor((time % day) / hour));
  336. that.Countdown.m = that.getzero(Math.floor((time % hour) / min));
  337. that.Countdown.s = that.getzero(Math.floor((time % min) / sec));
  338. } else {
  339. that.CountdownFlag = false;
  340. this.CompetitionData.signStartDate = res.data.data.signStartDate.split(' ')[0];
  341. this.CompetitionData.signEndDate = res.data.data.signEndDate.split(' ')[0];
  342. }
  343. //时间归零,重新获取数据
  344. if (nowTime >= startTime) {
  345. clearInterval(that.interval);
  346. }
  347. }, 1000);
  348. this.pictLoading = false;
  349. } else {
  350. this.$message.error(res.data.msg);
  351. this.pictLoading = false;
  352. }
  353. }).catch(err => {//请求失败后的处理函数
  354. this.pictLoading = false;
  355. })
  356. },
  357. //时间补0
  358. getzero(time){
  359. return time > '9' ? time : '0' + time
  360. },
  361. //获取国家列表
  362. async getCountry() {
  363. axios.post(this.imgUrl + '/country/get', {
  364. ...this.params
  365. //参数
  366. }).then(res => {//请求成功后的处理函数
  367. if (res.data.code == 200) {
  368. this.mock_optionsC = res.data.data;
  369. } else {
  370. this.$message.error(res.data.msg);
  371. }
  372. }).catch(err => {//请求失败后的处理函数
  373. })
  374. },
  375. //获取当前国家编码
  376. async getCountryMsg() {
  377. axios.get(this.imgUrl + '/country/get', {
  378. //参数
  379. }).then(res => {//请求成功后的处理函数
  380. if (res.data.code == 200) {
  381. this.notRegisterMsg = res.data.msg
  382. if ((res.data.msg == "GB"||res.data.msg == "IE")&&res.data.data.indexOf('//195.224.141.218') == -1) {
  383. window.location.href = 'https://www.cwgmarkets.co.uk';
  384. } else {
  385. document.getElementById("pre").style.display = 'none'
  386. }
  387. } else {
  388. document.getElementById("pre").style.display = 'none'
  389. this.$message.error(res.data.msg);
  390. }
  391. }).catch(err => {//请求失败后的处理函数
  392. })
  393. },
  394. //获取当前国家编码
  395. async getCountryCode() {
  396. axios.post(this.imgUrl + '/country/getCodeByIp', {
  397. //参数
  398. }).then(res => {//请求成功后的处理函数
  399. if (res.data.code == 200) {
  400. if (this.notCountry.indexOf(res.data.msg)==-1) {
  401. this.params.country = res.data.msg;
  402. }
  403. if (!sessionStorage.getItem("timer")) {
  404. let lang = sessionStorage.getItem("lang")
  405. ? sessionStorage.getItem("lang")
  406. : this.params.country == "CN"
  407. ? "cn"
  408. : "en";
  409. sessionStorage.clear();
  410. sessionStorage.setItem("lang", lang);
  411. } else {
  412. let timer = sessionStorage.getItem("timer");
  413. let lang = sessionStorage.getItem("lang")
  414. ? sessionStorage.getItem("lang")
  415. : this.params.country == "CN"
  416. ? "cn"
  417. : "en";
  418. sessionStorage.clear();
  419. sessionStorage.setItem("lang", lang);
  420. sessionStorage.setItem("timer", timer);
  421. }
  422. this.language = sessionStorage.getItem("lang");
  423. this.lang = content[this.language];
  424. this.initTimer();
  425. } else {
  426. this.$message.error(res.data.msg);
  427. }
  428. }).catch(err => {//请求失败后的处理函数
  429. })
  430. },
  431. // 注册
  432. register: async function () {
  433. if (this.notRegisterMsg == 'MY') {
  434. this.notRegisterMsgOpen = true;
  435. return
  436. }
  437. this.$refs["params"].validate(async (valid) => {
  438. if (valid) {
  439. if (this.flag) {
  440. return;
  441. } else {
  442. this.flag = true;
  443. }
  444. axios.post(this.imgUrl + '/custom/register', {
  445. ...this.params
  446. //参数
  447. }).then(res => {//请求成功后的处理函数
  448. if (res.data.code == 200) {
  449. this.loading = true;
  450. this.$message({
  451. message: this.lang.registerSuc,
  452. type: 'success'
  453. });
  454. this.login();
  455. this.flag = false;
  456. } else {
  457. this.$message.error(res.data.msg);
  458. this.flag = false;
  459. }
  460. }).catch(err => {//请求失败后的处理函数
  461. })
  462. } else {
  463. return false;
  464. }
  465. });
  466. },
  467. // 登陆
  468. login: async function () {
  469. axios.post(this.imgUrl + '/custom/login', {
  470. loginName: this.params.email,
  471. password: this.params.password,
  472. //参数
  473. }).then(res => {//请求成功后的处理函数
  474. if (res.data.code == 200) {
  475. sessionStorage.setItem("access_token", res.data.data);
  476. axios.defaults.headers.common["Access-Token"] = res.data.data;
  477. this.getLoginInfo();
  478. } else {
  479. this.$message.error(res.data.msg);
  480. }
  481. }).catch(err => {//请求失败后的处理函数
  482. })
  483. },
  484. //获取登录信息
  485. async getLoginInfo() {
  486. axios.post(this.imgUrl + '/custom/info', {
  487. //参数
  488. }).then(res => {//请求成功后的处理函数
  489. if (res.data.code == 200) {
  490. this.loading = true;
  491. // this.$store.commit("InitInfo", res.data.data);
  492. this.$message({
  493. message: this.lang.LoginSuccess,
  494. type: 'success'
  495. });
  496. setTimeout(() => {
  497. this.loading = false;
  498. Session.Set("user", JSON.stringify(res.data.data), true)
  499. window.location.href = this.imgUrl + '/#/customer/index';
  500. }, 1000);
  501. } else {
  502. this.$message.error(this.lang.SystemError);
  503. }
  504. }).catch(err => {//请求失败后的处理函数
  505. })
  506. },
  507. // 获取验证码
  508. getCode: async function (val) {
  509. if (val) {
  510. if (!this.params.country) {
  511. this.$message.error(content[sessionStorage.getItem("lang")].country);
  512. return;
  513. }
  514. if (!this.params.email) {
  515. this.$message.error(content[sessionStorage.getItem("lang")].emailempty);
  516. return;
  517. }
  518. if (!/^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$/.test(this.params.email)) {
  519. this.$message.error(content[sessionStorage.getItem("lang")].email);
  520. return;
  521. }
  522. }
  523. this.getCodeString =
  524. content[sessionStorage.getItem("lang")].waitCode1 +
  525. this.timer +
  526. content[sessionStorage.getItem("lang")].waitCode2;
  527. let that = this;
  528. if (!this.intervalCode) {
  529. this.getCode1(val);
  530. this.intervalCode = setInterval(() => {
  531. that.timer--;
  532. sessionStorage.setItem("timer", that.timer);
  533. that.getCodeString =
  534. content[sessionStorage.getItem("lang")].waitCode1 +
  535. that.timer +
  536. content[sessionStorage.getItem("lang")].waitCode2;
  537. if (that.timer == 0) {
  538. this.getCodeString = content[sessionStorage.getItem("lang")].code;
  539. clearInterval(that.intervalCode);
  540. that.intervalCode = null;
  541. that.timer = 59;
  542. sessionStorage.setItem("timer", that.timer);
  543. }
  544. }, 1000);
  545. }
  546. },
  547. //验证码
  548. async getCode1(val) {
  549. if (val) {
  550. axios.post(this.imgUrl + '/custom/register/send/code', {
  551. ...this.params
  552. //参数
  553. }).then(res => {//请求成功后的处理函数
  554. if (res.data.code == 200) {
  555. this.$message({
  556. message: this.lang.CodeSuccess,
  557. type: 'success'
  558. });
  559. } else {
  560. this.$message.error(res.data.msg);
  561. }
  562. }).catch(err => {//请求失败后的处理函数
  563. })
  564. }
  565. },
  566. // 初始化定时器
  567. initTimer: function () {
  568. let t = sessionStorage.getItem("timer") || this.timer;
  569. if (t == 59) {
  570. this.getCodeString = content[sessionStorage.getItem("lang")].code;
  571. } else {
  572. this.timer = sessionStorage.getItem("timer");
  573. this.getCode(0);
  574. }
  575. },
  576. getQueryStringRegExp(name){
  577. var reg = new RegExp("(^|\\?|&)"+ name +"=([^&]*)(\\s|&|$)", "i");
  578. if (reg.test(location.href)) return unescape(RegExp.$2.replace(/\+/g, " ")); return "";
  579. },
  580. getCodeQuery(){
  581. // this.token = decodeURIComponent(this.getQueryStringRegExp('token'));
  582. this.params.sourceCode = this.getQueryStringRegExp('ex')
  583. this.params.w = this.getQueryStringRegExp('w')
  584. this.params.subId = this.getQueryStringRegExp('SUBID')
  585. this.infoCode = this.getQueryStringRegExp('code');
  586. this.params.agentId = Number(this.getQueryStringRegExp('mmdi')) || null;
  587. this.params.linkValue = this.getQueryStringRegExp('mmF')
  588. switch (this.getQueryStringRegExp('mmF')) {
  589. case "F0":
  590. this.params.comPoint = 0;
  591. break;
  592. case "F1":
  593. this.params.comPoint = 10;
  594. break;
  595. case "F2":
  596. this.params.comPoint = 20;
  597. break;
  598. case "F3":
  599. this.params.comPoint = 30;
  600. break;
  601. }
  602. switch (this.getQueryStringRegExp('mmB')) {
  603. case "B0":
  604. this.params.ibInvalid = 0;
  605. break;
  606. case "B1":
  607. this.params.ibInvalid = 1;
  608. break;
  609. }
  610. },
  611. },
  612. watch:{ },
  613. mounted() {
  614. this.ho = window.location.host.split('.')[1];
  615. this.imgUrl = window.location.origin;
  616. this.getCodeQuery();
  617. // this.imgUrl = 'https://secure.cwgmarkets.com/';
  618. // this.imgUrl = 'http://193.134.208.230:8000'
  619. this.getCountryMsg()
  620. if (sessionStorage.getItem("lang")) {
  621. this.language = sessionStorage.getItem("lang"),
  622. this.lang = content[sessionStorage.getItem("lang")];
  623. } else {
  624. // var jsSrc =(navigator.language || navigator.browserLanguage).toLowerCase();
  625. // if(jsSrc.indexOf('zh') >= 0){
  626. // this.language = 'cn'
  627. // this.lang = content['cn'];
  628. // }else{
  629. // this.language = 'en'
  630. // this.lang = content['en'];
  631. // }
  632. this.language = 'en'
  633. this.lang = content['en'];
  634. sessionStorage.setItem("lang", this.language);
  635. }
  636. this.searchFunc();//获取列表数据
  637. this.searchCompetition();
  638. this.getCountryCode();
  639. this.getCountry();
  640. },
  641. destroyed() {
  642. clearInterval(this.interval);
  643. clearInterval(this.intervalCode)
  644. },
  645. });