active2.js 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606
  1. var content = {
  2. 'cn': {
  3. headers1: '登陆',
  4. headers2: '在线客服',
  5. headers3: '创建账户',
  6. box1item1: '与全球150多国家的交易者一起在CWG开启您的交易之旅',
  7. box1item2: '一键交易全球外汇、股票、贵金属、指数、期货,享受低成本、极速执行和多重优惠',
  8. box1item3: '*活动受条款约束。请在我们的网站上查看优惠活动详情。',
  9. box1item4: '注册!',
  10. box1item5: '国家地区',
  11. box1item6: '联系电话',
  12. box1item7: '电子邮箱',
  13. box1item8: '邮箱验证码',
  14. box1item9: '设置密码',
  15. box1item10: '本人声明并确认本人并非美国公民或居民。',
  16. box1item11: '确认',
  17. box2item1: '最低入金',
  18. box2item2: '最高杠杆',
  19. box2item3: '点差低至',
  20. box2item4: '交易产品',
  21. box3: '为什么选择CWG?',
  22. box3item1: '产品丰富 交易全球',
  23. box3item2: 'CWG为全球交易者提供外汇、股票、贵金属、指数、期货等多达500多种金融衍生品交易',
  24. box3item3: '全面账户 极速交易',
  25. box3item4: '四种账户类型,极致交易速度,点差低至0,满足不同客户的多种选择',
  26. box3item5: '交易平台 全球领先',
  27. box3item6: 'CWG采用全球领先的MT4/5交易平台,适应于多种终端设备,随时随地开启交易',
  28. box3item7: '分析培训 交易护航',
  29. box3item8: 'CWG拥有雄厚的师资团队及专业的策略分析,为您的交易保驾护航',
  30. box3item9: '科技创新 技术领先',
  31. box3item10: 'CWG拥有MAM/PAMM/API技术支持,满足交易员跨平台多账号管理系统需求',
  32. box3item11: '顶级流动 透明交易',
  33. box3item12: 'CWG作为用户与顶级银行报价的中介,直接接入顶级流动性的全球外汇交易市场',
  34. box4: '简单三部,开户即得50美金真仓账户,盈利可取!!!',
  35. box4item1: '开立“极速账户”领取礼遇金',
  36. box4item2: '注册客户专区,开立“极速账户” ',
  37. box4item3: '领取$50,开始交易旅程',
  38. box4item4: '进入“客户专区 – 活动中心”点击“申请”,获取$50礼遇金',
  39. box4item5: '完成交易,提现盈利',
  40. box4item6: '完成交易要求,盈利随时提现',
  41. box5: '在CWG进行交易您能获得',
  42. box5item1: '多种账户类型满足不同交易需求',
  43. box5item2: '平均订单执行速度低于40毫秒',
  44. box5item3: '严格监管保障资金安全无忧',
  45. box5item4: '专业的分析研究和交易工具',
  46. box6item1: '立即领取$50礼遇金',
  47. box6item2: '开启您的无风险交易之旅!',
  48. box6item3: '立即领取',
  49. box7item1: 'CWG Markets是CWG集团的商标。',
  50. box7item2: 'Cwgvu.com由CWG集团所有并运营。CWG集团包括:',
  51. box7item3: 'CWG Markets Ltd(UK),在英格兰和威尔士注册,公司编号为08888720。该公司是一家730K投资公司,由英国金融行为监管局(FCA)完全授权和监管,公司监管编号 FRN 785129 。',
  52. box7item4: 'CWG Markets Ltd(VU),是一家证券及金融衍生品交易商,接受瓦努阿图金融服务委员会(VFSC)监管,监管编号为41694,获得授权从事证券交易业务。',
  53. box7item5: '客户必须年满18周岁才能使用CWG Markets的服务。',
  54. box7item6: '外汇和杠杆化金融产品是复杂的工具,并且由于杠杆而有快速亏损的风险。您应该考虑是否了解差价合约是如何运作的,以及您是否有能力承担损失资金的风险。您应该了解与差价合约(CFD)相关的所有风险,如果您有任何疑问,请寻求独立顾问的建议。请仔细阅读我们的',
  55. box7item7: '风险披露',
  56. box7item8: '。',
  57. box7item9: '受限地区: CWG Markets Ltd无法为特定国家/地区提供服务,例如:美国,以色列和伊朗。如果此类分发或使用违反当地法律或法规,则本网站上的信息不是分发或用于此类国家或地区的任何人。',
  58. box7item10: '本网站使用cookies为您提供最佳体验并更好地了解您。通过访问我们的网站并将您的浏览器设置为允许cookie,即表示您同意我们使用我们的隐私政策中所述的cookie。',
  59. box7item11: '© 2020 CWG MARKETS',
  60. box7item12: 'cookies政策',
  61. box7item13: '和',
  62. box7item14: ' 隐私政策',
  63. box7item15: '.',
  64. code: '获取验证码',
  65. country: "请选择您所在国家",
  66. email: "邮箱格式错误",
  67. phone: "电话格式错误",
  68. password: "使用8到15个字符,同时使用大写和小写字母,使用数字和英文字母的组合",
  69. codeInput: "请输入验证码",
  70. agree: "请同意声明",
  71. CodeSuccess: "验证码获取成功",
  72. emailempty: "邮箱不能为空",
  73. waitCode1: "等待 ",
  74. waitCode2: "s ",
  75. registerSuc: "注册成功,正在登录...",
  76. SystemError: "系统错误,请稍后再试。",
  77. LoginSuccess: "登录成功,马上进入系统。",
  78. },
  79. 'en': {
  80. headers1: 'Login',
  81. headers2: 'Live Chat',
  82. headers3: 'Create Account',
  83. box1item1: 'Start your trading journey at CWG with traders from more than 150 countries around the world',
  84. box1item2: 'Just a click away to trade global forex, stocks, precious metals, index, futures, enjoy low cost, fast execution and multiple discounts',
  85. box1item3: '*T&Cs apply. Full details of our promotions are on our website.',
  86. box1item4: 'Signup!',
  87. box1item5: 'Country',
  88. box1item6: 'Phone',
  89. box1item7: 'Email',
  90. box1item8: 'Email Varification Code',
  91. box1item9: 'Password',
  92. box1item10: 'I declared and confirmed that I am not a citizen or resident of the United States.',
  93. box1item11: 'Submit',
  94. box2item1: 'Minimum deposit',
  95. box2item2: 'Highest leverage',
  96. box2item3: 'Spread as low as',
  97. box2item4: 'Trading instruments',
  98. box3: 'Why Choose CWG?',
  99. box3item1: 'Wide-Range of Global Trading Products',
  100. box3item2: 'CWG provides global traders with more than 500 kinds of financial derivatives such as foreign exchange, stocks, precious metals, indexes and futures',
  101. box3item3: 'Dynamic Account, Instant Trading',
  102. box3item4: 'Four types of accounts, the ultimate trading speed, spread as low as 0, to meet the various choices of different customers',
  103. box3item5: 'Global Leading Trading Platform',
  104. box3item6: "CWG adopts the world's leading MT4 / 5 trading platform, which is suitable for a variety of terminal devices to start trading anytime and anywhere",
  105. box3item7: 'Analysis Training,Trade Support',
  106. box3item8: 'CWG has a strong team of consultants and professional strategy analysis to support your trading',
  107. box3item9: 'Technological Innovation, Leading Technology',
  108. box3item10: 'CWG has MAM/PAMM/API technical support to meet the needs of cross platform multi account management system for investment traders',
  109. box3item11: 'Top Liquidity With Transparency',
  110. box3item12: 'CWG act as an intermediary between users and top banks and has direct access to the top liquid global foreign exchange market',
  111. box4: 'Three simple steps to open an account with a welcome deposit of USD $50 for our new clients! ! !',
  112. box4item1: 'Open a "instant account" to receive the welcome deposit.',
  113. box4item2: 'Register at the customer zone',
  114. box4item3: 'Receive the $50 and start your trading journey',
  115. box4item4: 'Enter "Customer Area-Activity Center" and click "Apply" ',
  116. box4item5: 'Complete the transaction',
  117. box4item6: 'Complete the transaction requirements and withdraw profits at any time',
  118. box5: 'Trading with CWG you can get:',
  119. box5item1: 'Multiple account types to meet your trading needs',
  120. box5item2: 'The average order execution speed is less than 40 milliseconds',
  121. box5item3: 'Strict supervision to ensure the safety of funds',
  122. box5item4: 'Professional analytical research and trading instruments',
  123. box6item1: 'Get the $50 bonus now',
  124. box6item2: 'Start your risk-free trading journey!',
  125. box6item3: 'Claim Bonus',
  126. box7item1: 'CWG Markets is the trading name of CWG Group of companies.',
  127. box7item2: 'Cwgvu.com is owned and operated within the CWG Group of companies. CWG Group consists of:',
  128. box7item3: 'CWG Markets Ltd(UK), which is registered in England and Wales with company number 08888720. It is an investment firm fully authorised and regulated by the Financial Conduct Authority (FCA), under the firm reference number FRN 785129.',
  129. box7item4: 'CWG Markets Ltd(VU), authorized and regulated by the Vanuatu Financial Services Commission (VFSC), with registration no. 41694. and the address is 1276, Govant Building, Kumul Highway, PORT VILA, VANUATU.It is a licensed financial dealer authorized to carry on the business of dealing in securities.',
  130. box7item5: 'Clients must be at least 18 years old to use the services of CWG Markets.',
  131. box7item6: 'Forex and Leveraged Financial Instruments are complex instruments and come with a high risk of losing money rapidly due to leverage. Please ensure you fully understand the risks and take appropriate care to manage your own risk. Please read our',
  132. box7item7: ' Risk Disclosure ',
  133. box7item8: 'carefully.',
  134. box7item9: 'Restricted Regions: CWG Markets Ltd does not provide services for the residents of certain countries, such as the United States of America, Israel and the Islamic Republic of Iran. If such distribution or use violates local laws or regulations, the information on this website is not intended to be distributed or used to anyone in such countries or regions.',
  135. box7item10: 'This website uses cookies to provide you with the very best experience and to know you better. By visiting our website with your browser set to allow cookies, you consent to our cookies policy and Privacy Policy .',
  136. box7item11: '© 2020 CWG MARKETS',
  137. box7item12: 'Privacy Policy',
  138. box7item13: '.',
  139. box7item14: ' Terms & Conditions',
  140. box7item15: '.',
  141. code: 'Get Code',
  142. country: "Please select your country",
  143. email: "Email Address Format Error",
  144. phone: "Phone Format Error",
  145. password: "Must be between 8 to 15 characters,Contain both uppercase and lowercase letter,Use a combination of numbers and letters",
  146. codeInput: "Please enter the Email verification code",
  147. agree: "Please agree to the declaration",
  148. CodeSuccess: "Verification code has been successfully obtained ",
  149. emailempty: "Email Address cannot be empty",
  150. waitCode1: "Please wait ",
  151. waitCode2: "s ",
  152. registerSuc: "Registration successful, log in now...",
  153. SystemError: "System Error, please try again.",
  154. LoginSuccess: "Login Successful",
  155. }
  156. }
  157. let vm = new Vue({
  158. el: "#active1",
  159. data: {
  160. //多语言
  161. langList: {
  162. en: "ENGLISH",
  163. cn: "中文简体"
  164. },
  165. language: "en",
  166. lang: {},
  167. flag: false,
  168. loading: false,
  169. mock_options: [],
  170. // img_logo: logo,
  171. timer: 59,
  172. interval: null,
  173. getCodeString: "",
  174. notCountry:[
  175. 'AF','AI','AG','BS','BY',
  176. 'BZ','BA','BI','CF','CD','CU',
  177. 'ET','FJ','PS','GN','GW','HT',
  178. 'IR','IQ','LB','LY','ML','MM',
  179. 'NI','KP','PW','RU','SO','SS',
  180. 'SD','SY','UA','US','VE','YE','ZW','MY'
  181. ],
  182. // 表单参数
  183. params: {
  184. agentId: null,
  185. comPoint: null,
  186. sourceCode:null,
  187. subId: "",
  188. email: "",
  189. password: "",
  190. country: "",
  191. emailCode: "",
  192. agree: false,
  193. linkValue: null,
  194. },
  195. // 验证规则
  196. rules: {
  197. country: [
  198. {
  199. validator: (rule, value, callback) => {
  200. if (value != "" && value != null) {
  201. callback();
  202. } else {
  203. callback(new Error(content[sessionStorage.getItem('lang')].country));
  204. }
  205. },
  206. trigger: "blur",
  207. },
  208. ],
  209. email: [
  210. {
  211. validator: (rule, value, callback) => {
  212. if (/^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$/.test(value)) {
  213. callback();
  214. } else {
  215. callback(new Error(content[sessionStorage.getItem('lang')].email));
  216. }
  217. },
  218. trigger: "blur",
  219. },
  220. ],
  221. emailCode: [
  222. {
  223. validator: (rule, value, callback) => {
  224. if (
  225. value != "" &&
  226. value != null
  227. ) {
  228. callback();
  229. } else {
  230. callback(new Error(content[sessionStorage.getItem('lang')].codeInput));
  231. }
  232. },
  233. trigger: "blur",
  234. },
  235. ],
  236. password: [
  237. {
  238. validator: (rule, value, callback) => {
  239. if (/^(?=.*[A-Z])(?=.*[a-z])(?=.*[0-9])(?!.*([~!@&%$^\\(\\)#_]).*\\1.*\\1.*\\1)[A-Za-z0-9~!@&%$^\\(\\)#_]{8,16}$/.test(value)) {
  240. callback();
  241. } else {
  242. callback(new Error(content[sessionStorage.getItem('lang')].password));
  243. }
  244. },
  245. trigger: "blur",
  246. },
  247. ],
  248. agree: [
  249. {
  250. validator: (rule, value, callback) => {
  251. if (value) {
  252. callback();
  253. } else {
  254. callback(new Error(content[sessionStorage.getItem('lang')].agree));
  255. }
  256. },
  257. trigger: "change",
  258. },
  259. ],
  260. phone: [
  261. {
  262. validator: (rule, value, callback) => {
  263. if (/^[0-9]\d*$/.test(value)) {
  264. callback();
  265. } else {
  266. callback(new Error(content[sessionStorage.getItem('lang')].phone));
  267. }
  268. },
  269. trigger: "blur",
  270. },
  271. ],
  272. },
  273. notRegisterMsg:"",
  274. notRegisterMsgOpen:false,
  275. imgUrl: '',
  276. ho: ''
  277. },
  278. computed: {
  279. },
  280. methods: {
  281. // 语言切换函数
  282. chooseLang(key) {
  283. this.lang = content[key];
  284. this.language = key;
  285. sessionStorage.setItem("lang", this.language);
  286. location.reload();
  287. this.initTimer();
  288. },
  289. //获取国家列表
  290. async getCountry() {
  291. axios.post(this.imgUrl + '/country/get', {
  292. ...this.params
  293. //参数
  294. }).then(res => {//请求成功后的处理函数
  295. if (res.data.code == 200) {
  296. this.mock_options = res.data.data;
  297. } else {
  298. this.$message.error(res.data.msg);
  299. }
  300. }).catch(err => {//请求失败后的处理函数
  301. })
  302. },
  303. //获取当前国家编码
  304. async getCountryMsg() {
  305. axios.get(this.imgUrl + '/country/get', {
  306. //参数
  307. }).then(res => {//请求成功后的处理函数
  308. if (res.data.code == 200) {
  309. this.notRegisterMsg = res.data.msg
  310. if ((res.data.msg == "GB"||res.data.msg == "IE")&&res.data.data.indexOf('//195.224.141.218') == -1) {
  311. window.location.href = 'https://www.cwgmarkets.co.uk';
  312. } else {
  313. document.getElementById("pre").style.display = 'none'
  314. }
  315. } else {
  316. document.getElementById("pre").style.display = 'none'
  317. this.$message.error(res.data.msg);
  318. }
  319. }).catch(err => {//请求失败后的处理函数
  320. })
  321. },
  322. //获取当前国家编码
  323. async getCountryCode() {
  324. axios.post(this.imgUrl + '/country/getCodeByIp', {
  325. //参数
  326. }).then(res => {//请求成功后的处理函数
  327. if (res.data.code == 200) {
  328. if (this.notCountry.indexOf(res.data.msg)==-1) {
  329. this.params.country = res.data.msg;
  330. }
  331. if (!sessionStorage.getItem("timer")) {
  332. let lang = sessionStorage.getItem("lang")
  333. ? sessionStorage.getItem("lang")
  334. : this.params.country == "CN"
  335. ? "cn"
  336. : "en";
  337. sessionStorage.clear();
  338. sessionStorage.setItem("lang", lang);
  339. } else {
  340. let timer = sessionStorage.getItem("timer");
  341. let lang = sessionStorage.getItem("lang")
  342. ? sessionStorage.getItem("lang")
  343. : this.params.country == "CN"
  344. ? "cn"
  345. : "en";
  346. sessionStorage.clear();
  347. sessionStorage.setItem("lang", lang);
  348. sessionStorage.setItem("timer", timer);
  349. }
  350. this.language = sessionStorage.getItem("lang");
  351. this.lang = content[this.language];
  352. this.initTimer();
  353. } else {
  354. this.$message.error(res.data.msg);
  355. }
  356. }).catch(err => {//请求失败后的处理函数
  357. })
  358. },
  359. // 注册
  360. register: async function () {
  361. if (this.notRegisterMsg == 'MY') {
  362. this.notRegisterMsgOpen = true;
  363. return
  364. }
  365. this.$refs["params"].validate(async (valid) => {
  366. if (valid) {
  367. if (this.flag) {
  368. return;
  369. } else {
  370. this.flag = true;
  371. }
  372. axios.post(this.imgUrl + '/custom/register', {
  373. ...this.params
  374. //参数
  375. }).then(res => {//请求成功后的处理函数
  376. if (res.data.code == 200) {
  377. this.loading = true;
  378. this.$message({
  379. message: this.lang.registerSuc,
  380. type: 'success'
  381. });
  382. this.login();
  383. this.flag = false;
  384. } else {
  385. this.$message.error(res.data.msg);
  386. this.flag = false;
  387. }
  388. }).catch(err => {//请求失败后的处理函数
  389. })
  390. } else {
  391. return false;
  392. }
  393. });
  394. },
  395. // 登陆
  396. login: async function () {
  397. axios.post(this.imgUrl + '/custom/login', {
  398. loginName: this.params.email,
  399. password: this.params.password,
  400. //参数
  401. }).then(res => {//请求成功后的处理函数
  402. if (res.data.code == 200) {
  403. sessionStorage.setItem("access_token", res.data.data);
  404. axios.defaults.headers.common["Access-Token"] = res.data.data;
  405. this.getLoginInfo();
  406. } else {
  407. this.$message.error(res.data.msg);
  408. }
  409. }).catch(err => {//请求失败后的处理函数
  410. })
  411. },
  412. //获取登录信息
  413. async getLoginInfo() {
  414. axios.post(this.imgUrl + '/custom/info', {
  415. //参数
  416. }).then(res => {//请求成功后的处理函数
  417. if (res.data.code == 200) {
  418. this.loading = true;
  419. // this.$store.commit("InitInfo", res.data.data);
  420. this.$message({
  421. message: this.lang.LoginSuccess,
  422. type: 'success'
  423. });
  424. setTimeout(() => {
  425. this.loading = false;
  426. Session.Set("user", JSON.stringify(res.data.data), true)
  427. window.location.href = this.imgUrl + '/#/customer/index';
  428. }, 1000);
  429. } else {
  430. this.$message.error(this.lang.SystemError);
  431. }
  432. }).catch(err => {//请求失败后的处理函数
  433. })
  434. },
  435. // 获取验证码
  436. getCode: async function (val) {
  437. if (val) {
  438. if (!this.params.country) {
  439. this.$message.error(content[sessionStorage.getItem("lang")].country);
  440. return;
  441. }
  442. if (!this.params.email) {
  443. this.$message.error(content[sessionStorage.getItem("lang")].emailempty);
  444. return;
  445. }
  446. if (!/^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$/.test(this.params.email)) {
  447. this.$message.error(content[sessionStorage.getItem("lang")].email);
  448. return;
  449. }
  450. }
  451. this.getCodeString =
  452. content[sessionStorage.getItem("lang")].waitCode1 +
  453. this.timer +
  454. content[sessionStorage.getItem("lang")].waitCode2;
  455. let that = this;
  456. if (!this.interval) {
  457. this.getCode1(val);
  458. this.interval = setInterval(() => {
  459. that.timer--;
  460. sessionStorage.setItem("timer", that.timer);
  461. that.getCodeString =
  462. content[sessionStorage.getItem("lang")].waitCode1 +
  463. that.timer +
  464. content[sessionStorage.getItem("lang")].waitCode2;
  465. if (that.timer == 0) {
  466. this.getCodeString = content[sessionStorage.getItem("lang")].code;
  467. clearInterval(that.interval);
  468. that.interval = null;
  469. that.timer = 59;
  470. sessionStorage.setItem("timer", that.timer);
  471. }
  472. }, 1000);
  473. }
  474. },
  475. //验证码
  476. async getCode1(val) {
  477. if (val) {
  478. axios.post(this.imgUrl + '/custom/register/send/code', {
  479. ...this.params
  480. //参数
  481. }).then(res => {//请求成功后的处理函数
  482. if (res.data.code == 200) {
  483. this.$message({
  484. message: this.lang.CodeSuccess,
  485. type: 'success'
  486. });
  487. } else {
  488. this.$message.error(res.data.msg);
  489. }
  490. }).catch(err => {//请求失败后的处理函数
  491. })
  492. }
  493. },
  494. // 初始化定时器
  495. initTimer: function () {
  496. let t = sessionStorage.getItem("timer") || this.timer;
  497. if (t == 59) {
  498. this.getCodeString = content[sessionStorage.getItem("lang")].code;
  499. } else {
  500. this.timer = sessionStorage.getItem("timer");
  501. this.getCode(0);
  502. }
  503. },
  504. getQueryStringRegExp(name){
  505. var reg = new RegExp("(^|\\?|&)"+ name +"=([^&]*)(\\s|&|$)", "i");
  506. if (reg.test(location.href)) return unescape(RegExp.$2.replace(/\+/g, " ")); return "";
  507. },
  508. getCodeQuery(){
  509. this.params.sourceCode = this.getQueryStringRegExp('ex')
  510. this.params.w = this.getQueryStringRegExp('w')
  511. this.params.subId = this.getQueryStringRegExp('SUBID')
  512. this.params.agentId = Number(this.getQueryStringRegExp('mmdi')) || null;
  513. this.params.linkValue = this.getQueryStringRegExp('mmF')
  514. switch (this.getQueryStringRegExp('mmF')) {
  515. case "F0":
  516. this.params.comPoint = 0;
  517. break;
  518. case "F1":
  519. this.params.comPoint = 10;
  520. break;
  521. case "F2":
  522. this.params.comPoint = 20;
  523. break;
  524. case "F3":
  525. this.params.comPoint = 30;
  526. break;
  527. }
  528. switch (this.getQueryStringRegExp('mmB')) {
  529. case "B0":
  530. this.params.ibInvalid = 0;
  531. break;
  532. case "B1":
  533. this.params.ibInvalid = 1;
  534. break;
  535. }
  536. }
  537. },
  538. mounted() {
  539. // console.log(document.body.clientWidth);
  540. // this.clientWidth = document.body.clientWidth;
  541. // if (window.location.search.indexOf('&ex=') != '-1') {
  542. // this.params.sourceCode = window.location.search.split('&ex=')[1] || null;
  543. // } else if (window.location.search.indexOf('?ex=') != '-1') {
  544. // this.params.sourceCode = window.location.search.split('?ex=')[1] || null;
  545. // }
  546. this.getCodeQuery();
  547. this.ho = window.location.host.split('.')[1];
  548. this.imgUrl = window.location.origin;
  549. // this.imgUrl = 'http://8.210.194.53:8000';
  550. this.getCountryMsg()
  551. if (sessionStorage.getItem("lang")) {
  552. this.language = sessionStorage.getItem("lang"),
  553. this.lang = content[sessionStorage.getItem("lang")];
  554. } else {
  555. this.language = 'en',
  556. this.lang = content['en'];
  557. }
  558. //获取国家
  559. this.getCountryCode();
  560. this.getCountry();
  561. // this.initTimer();
  562. },
  563. destroyed() {
  564. clearInterval(this.interval);
  565. },
  566. });