active1.js 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456
  1. var content = {
  2. 'cn': {
  3. headers1: '开设账户',
  4. footer1: '版权所有 © 2024 CWG MARKETS 保留所有权利',
  5. box1item4: '欢迎来到CWG Markets',
  6. box1item4_1: '请填写此字段',
  7. box1item5: '国家/地区',
  8. box1item6: '电话号码',
  9. box1item7: '电子邮件地址',
  10. box1item8: '电子邮件验证码',
  11. box1item9: '设置密码',
  12. box1item10: '我声明并确认我不是美国公民或居民。',
  13. box1item11: '注册',
  14. box1item12: '已有账户',
  15. code: '生成',
  16. country: "请选择您的国家",
  17. email: "电子邮件地址格式错误",
  18. phone: "电话号码格式错误",
  19. password: "必须为8到15个字符,包含大写和小写字母,使用数字和字母的组合",
  20. codeInput: "请输入电子邮件验证码",
  21. agree: "请同意声明",
  22. CodeSuccess: "验证码已成功获取",
  23. emailempty: "电子邮件地址不能为空",
  24. waitCode1: "请稍候 ",
  25. waitCode2: "秒",
  26. registerSuc: "注册成功,立即登录...",
  27. SystemError: "系统错误,请重试。",
  28. LoginSuccess: "登录成功",
  29. st1: "必须为8到15个字符",
  30. nd2: "包含大写和小写字母",
  31. rd3: "使用数字和字母的组合",
  32. header1: "您的每标准手交易都能获得最高$2美金的奖励,",
  33. header2: "奖金实时返现至个人钱包,上不封顶。",
  34. header3: "*适用条款和条件",
  35. header4: "奖励实时返现",
  36. header5: "奖励金额无上限",
  37. header6: "仅限标准账户",
  38. header7: "支持跟单与EA交易",
  39. section11: "奖励无上限",
  40. section12: "交易越多奖励越高",
  41. section13: "交易量",
  42. section14: "单个标准账户每月交易前5标准手不享受奖励。",
  43. section15: "单个标准账户当月交易量超5标准手后每手奖励$1。",
  44. section16: "单个标准账户当该月交易量超过25标准手后每手奖励$2。",
  45. section17: "(累计交易手数每个自然月最后一天自动清0,次月重新累计)",
  46. section18: "示例",
  47. section19: "A客户当月交易5标准手,不享受任何奖励。",
  48. section110: "B客户当月交易15标准手,其中10标准手可享受奖励,总累计奖励$10。",
  49. section111: "C客户当月交易50标准手,其中20标准手享受$1/手的奖励,25标准手可享受$2/手的奖励,总累计奖励$70。",
  50. section21: "参与方式",
  51. section22: "步骤1:",
  52. section23: '点击下方立即开户按钮,开立CWG客户专区',
  53. section24: "步骤2:",
  54. section25: "在客户专区选择开立CWG标准账户。",
  55. section26: "步骤3:",
  56. section27: "入金交易后标准账户均享受奖励实时返现。",
  57. section31: "有疑问?",
  58. section32: "查看下面的问答。",
  59. section33: "每次存款均可申请,立即开始您的交易!",
  60. section34: "1. 账户奖励实时返现返到哪里?",
  61. section35: "所有账户奖励为实时返现,返现将直接在账户平仓后5-10分钟内自动注入个人钱包中,您可以在客户专区-个人钱包中查看。",
  62. section36: "2. 奖励每天或者每月有上限么?",
  63. section37: "标准账户交易奖励每天无上限,您的标准账户每天或每月无论交易多少手都会按照标准实时返现至您的个人钱包。",
  64. section38: "3. 我有好几个标准账户,奖励如何计算?",
  65. section39: "我们手数统计以单个交易账户计算,同个CID名下如有多个标准账户,交易手数是独立计算的,单个标准账户单月交易量超5标准手后,交易可奖励额外返现。",
  66. section310: "4. 我能参加其他促销活动吗?",
  67. section311: "是的,本活动可以和所有CWG活动同时参与。",
  68. section312: "请仔细阅读所有促销活动的条款和条件。",
  69. section313: " *适用条款和条件",
  70. section41: "立即加入CWG",
  71. section42: "开启无限奖励之旅!",
  72. section43: "您的成功,从现在开始。",
  73. section44: "已有账户?",
  74. section45: "在此登录",
  75. section46: "*完整条款和条件",
  76. section47: "*完整条款和条件"
  77. },
  78. 'en': {
  79. headers1: 'Open Account',
  80. footer1: 'Copyright © 2024 CWG MARKETS All Rights Reserved',
  81. box1item4: 'Welcome To CWG Markets',
  82. box1item4_1: 'Please fill out this field',
  83. box1item5: 'Country / Region',
  84. box1item6: 'Phone Number',
  85. box1item7: 'Email Address',
  86. box1item8: 'Email Varification Code',
  87. box1item9: 'Set Password',
  88. box1item10: 'I declared and confirmed that I am not a citizen or resident of the United States.',
  89. box1item11: 'Register',
  90. box1item12: 'Already have an account',
  91. code: 'Generate',
  92. country: "Please select your country",
  93. email: "Email Address Format Error",
  94. phone: "Phone Format Error",
  95. password: "Must be between 8 to 15 characters,Contain both uppercase and lowercase letter,Use a combination of numbers and letters",
  96. codeInput: "Please enter the Email verification code",
  97. agree: "Please agree to the declaration",
  98. CodeSuccess: "Verification code has been successfully obtained ",
  99. emailempty: "Email Address cannot be empty",
  100. waitCode1: "Please wait ",
  101. waitCode2: "s ",
  102. registerSuc: "Registration successful, log in now...",
  103. SystemError: "System Error, please try again.",
  104. LoginSuccess: "Login Successful",
  105. st1: "Must be between 8 to 15 characters",
  106. nd2: "Contain both uppercase and lowercase letter",
  107. rd3: "Use a combination of numbers and letters",
  108. header1: "Earn Rewards For Each Trade",
  109. header2: "Take advantage of withdrawable cash rewards to increase your earnings.",
  110. header3: "*Terms and Conditions Apply",
  111. header4: "Instant Cash Rewards",
  112. header5: "Unlimited Reward Amounts",
  113. header6: "Exclusive to Standard Account",
  114. header7: "Supports Copy Trading & EA Trading",
  115. section11: "Maximize Your Rewards:",
  116. section12: "The More You Trade, The More You Earn",
  117. section13: "Trading Volume",
  118. section14: "A single standard account cannot receive rewards for the first 5 traded lots.",
  119. section15: "For monthly trading volumes over 5 standard lots, each additional lot is qualified for $1.",
  120. section16: "For monthly trading volumes over 25 standard lots, each additional lot earns $2.",
  121. section17: "(Trading lots are automatically reset to zero on the last day of each month and accumulate the following month.)",
  122. section18: "Example",
  123. section19: "Customer A trades 5 lots per month and is not qualified for the trading reward.",
  124. section110: "Customer B trades 15 standard lots per month, with 10 lots qualifying for trading reward, resulting in a total money back of $10.",
  125. section111: "Customer C trades 50 standard lots per month, with 20 qualifying for $1 per lot rewards and 25 qualifying for $2 per lot rewards, summing $70 in money back.",
  126. section21: "How To Join",
  127. section22: "Step 1:",
  128. section23: "Click the “Open Account” button below to register for an account.",
  129. section24: "Step 2:",
  130. section25: "Log in to your Client Zone and open a CWG Standard Account.",
  131. section26: "Step 3:",
  132. section27: "Once you've funded and made your first trade, your Standard Account will be eligible for instant rewards .",
  133. section31: "Got Questions?",
  134. section32: "Check out our Q&A below.",
  135. section33: "Each deposit can apply, start your trading now!",
  136. section34: "1. Where are rewards credited? ",
  137. section35: "All trading rewards is credited in real-time to your Personal Area - Wallet section within 5-10 minutes after the position is closed.",
  138. section36: "2. Are there limits on rewards? ",
  139. section37: "No, there are no daily or monthly limits on rewards for Standard Account trading. Your rewards will be credited according to standard terms.",
  140. section38: "3. Can I receive rewards with multiple accounts? ",
  141. section39: "Yes, each Standard Account under the same ID is eligible for rewards individually, based on its trading volume. However, the volume from each account cannot be combined.",
  142. section310: "4. Can I participate in other promotions? ",
  143. section311: "Yes, you can participate in this promotion along with all other CWG promotions simultaneously.",
  144. section312: "Please carefully review all of the promotion's terms and conditions.",
  145. section313: " *Terms & Conditions Apply",
  146. section41: "Keep Trading &",
  147. section42: "You Will Be Rewarded!",
  148. section43: "This is not how it gets better, is it?",
  149. section44: "Already have an account?",
  150. section45: "Login here",
  151. section46: "*Full terms and conditions",
  152. section47: "*Full terms and conditions"
  153. },
  154. }
  155. let vm = new Vue({
  156. el: "#active_1",
  157. data: {
  158. flag: false,
  159. loading: false,
  160. pictLoading:false,
  161. // 验证规则
  162. rules: {
  163. // country: [
  164. // {
  165. // validator: (rule, value, callback) => {
  166. // if (value != "" && value != null) {
  167. // callback();
  168. // } else {
  169. // callback(new Error(content[sessionStorage.getItem('lang')].country));
  170. // }
  171. // },
  172. // trigger: "blur",
  173. // },
  174. // ],
  175. email: [
  176. {
  177. validator: (rule, value, callback) => {
  178. if (/^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$/.test(value)) {
  179. callback();
  180. } else {
  181. callback(new Error('Email Address Format Error'));
  182. }
  183. },
  184. trigger: "blur",
  185. },
  186. ],
  187. name: [
  188. {
  189. validator: (rule, value, callback) => {
  190. if (
  191. value != "" &&
  192. value != null
  193. ) {
  194. callback();
  195. } else {
  196. callback(new Error('Name is required'));
  197. }
  198. },
  199. trigger: "blur",
  200. },
  201. ],
  202. phone: [
  203. {
  204. validator: (rule, value, callback) => {
  205. if (/^[0-9]\d*$/.test(value)) {
  206. callback();
  207. } else {
  208. callback(new Error('Phone Format Error'));
  209. }
  210. },
  211. trigger: "blur",
  212. },
  213. ],
  214. },
  215. // 表单参数
  216. params: {
  217. sourceCode:null,
  218. name: "",
  219. email: "",
  220. country: "",
  221. phone: "",
  222. },
  223. imgUrl: '',
  224. ho: '',
  225. isPc:null,
  226. centerDialogVisible:false,
  227. },
  228. methods: {
  229. // 提交
  230. register: async function () {
  231. if (!this.params.name) {
  232. this.$message.error('Name is required');
  233. return
  234. }
  235. if (!this.params.phone) {
  236. this.$message.error('Phone Format Error');
  237. return
  238. }
  239. if (!this.params.email) {
  240. this.$message.error('Email Address Format Error');
  241. return
  242. }
  243. if (this.flag) {
  244. return;
  245. } else {
  246. this.flag = true;
  247. }
  248. axios.post(this.imgUrl + '/web/oc/add', {
  249. ...this.params
  250. //参数
  251. }).then(res => {//请求成功后的处理函数
  252. if (res.data.code == 200) {
  253. this.$message({
  254. message: res.data.msg,
  255. type: 'success'
  256. });
  257. this.flag = false;
  258. } else {
  259. this.$message.error(res.data.msg);
  260. this.flag = false;
  261. }
  262. }).catch(err => {//请求失败后的处理函数
  263. this.flag = false;
  264. })
  265. },
  266. //获取当前国家编码
  267. async getCountryMsg() {
  268. axios.get(this.imgUrl + '/country/get', {
  269. //参数
  270. }).then(res => {//请求成功后的处理函数
  271. if (res.data.code == 200) {
  272. if ((res.data.msg == "GB"||res.data.msg == "IE")&&res.data.data.indexOf('//195.224.141.218') == -1) {
  273. window.location.href = 'https://www.cwgmarkets.co.uk';
  274. } else {
  275. document.getElementById("pre").style.display = 'none'
  276. }
  277. } else {
  278. document.getElementById("pre").style.display = 'none'
  279. this.$message.error(res.data.msg);
  280. }
  281. }).catch(err => {//请求失败后的处理函数
  282. })
  283. },
  284. getQueryStringRegExp(name){
  285. var reg = new RegExp("(^|\\?|&)"+ name +"=([^&]*)(\\s|&|$)", "i");
  286. if (reg.test(location.href)) return unescape(RegExp.$2.replace(/\+/g, " ")); return "";
  287. },
  288. getCodeQuery(){
  289. this.params.sourceCode = this.getQueryStringRegExp('ex')
  290. },
  291. },
  292. mounted() {
  293. this.getCodeQuery();
  294. // || 'cwgvu'
  295. this.ho = window.location.host.split('.')[1];
  296. this.imgUrl = window.location.origin;
  297. // this.imgUrl = 'http://193.134.208.230:8000'
  298. this.getCountryMsg()
  299. },
  300. });
  301. let vm2 = new Vue({
  302. el: "#active_2",
  303. data: {
  304. flag: false,
  305. loading: false,
  306. pictLoading:false,
  307. // 验证规则
  308. rules: {
  309. // country: [
  310. // {
  311. // validator: (rule, value, callback) => {
  312. // if (value != "" && value != null) {
  313. // callback();
  314. // } else {
  315. // callback(new Error(content[sessionStorage.getItem('lang')].country));
  316. // }
  317. // },
  318. // trigger: "blur",
  319. // },
  320. // ],
  321. email: [
  322. {
  323. validator: (rule, value, callback) => {
  324. if (/^[\w-]+(\.[\w-]+)*@[\w-]+(\.[\w-]+)+$/.test(value)) {
  325. callback();
  326. } else {
  327. callback(new Error('Email Address Format Error'));
  328. }
  329. },
  330. trigger: "blur",
  331. },
  332. ],
  333. name: [
  334. {
  335. validator: (rule, value, callback) => {
  336. if (
  337. value != "" &&
  338. value != null
  339. ) {
  340. callback();
  341. } else {
  342. callback(new Error('Name is required'));
  343. }
  344. },
  345. trigger: "blur",
  346. },
  347. ],
  348. phone: [
  349. {
  350. validator: (rule, value, callback) => {
  351. if (/^[0-9]\d*$/.test(value)) {
  352. callback();
  353. } else {
  354. callback(new Error('Phone Format Error'));
  355. }
  356. },
  357. trigger: "blur",
  358. },
  359. ],
  360. },
  361. // 表单参数
  362. params: {
  363. sourceCode:null,
  364. name: "",
  365. email: "",
  366. country: "",
  367. phone: "",
  368. },
  369. imgUrl: '',
  370. ho: '',
  371. isPc:null,
  372. centerDialogVisible:false,
  373. },
  374. methods: {
  375. // 提交
  376. register: async function () {
  377. // console.log(document.getElementsByClassName(".my-mfp-zoom-in.mfp-ready.mfp-bg"));
  378. if (!this.params.name) {
  379. this.$message.error('Name is required');
  380. return
  381. }
  382. if (!this.params.phone) {
  383. this.$message.error('Phone Format Error');
  384. return
  385. }
  386. if (!this.params.email) {
  387. this.$message.error('Email Address Format Error');
  388. return
  389. }
  390. if (this.flag) {
  391. return;
  392. } else {
  393. this.flag = true;
  394. }
  395. axios.post(this.imgUrl + '/web/oc/add', {
  396. ...this.params
  397. //参数
  398. }).then(res => {//请求成功后的处理函数
  399. if (res.data.code == 200) {
  400. this.$message({
  401. message: res.data.msg,
  402. type: 'success'
  403. });
  404. this.flag = false;
  405. setTimeout(function () {
  406. location.reload();
  407. }, 500);
  408. } else {
  409. this.$message.error(res.data.msg);
  410. this.flag = false;
  411. }
  412. }).catch(err => {//请求失败后的处理函数
  413. this.flag = false;
  414. })
  415. },
  416. getQueryStringRegExp(name){
  417. var reg = new RegExp("(^|\\?|&)"+ name +"=([^&]*)(\\s|&|$)", "i");
  418. if (reg.test(location.href)) return unescape(RegExp.$2.replace(/\+/g, " ")); return "";
  419. },
  420. getCodeQuery(){
  421. this.params.sourceCode = this.getQueryStringRegExp('ex')
  422. },
  423. },
  424. mounted() {
  425. this.getCodeQuery();
  426. // || 'cwgvu'
  427. this.ho = window.location.host.split('.')[1];
  428. this.imgUrl = window.location.origin;
  429. this.getCountryMsg()
  430. },
  431. });