lxf 1 週間 前
コミット
fa9b9b4d94

+ 26 - 2
public/index.html

@@ -13,9 +13,33 @@
     <title>极度证券 JDNX | 全球持牌合规股票差价合约交易平台_场外期权报价商_国际黄金_比特币合约 | 极度新星交易平台</title>
     <script>
       if (window.location.port != '1090') {
+        var userAgent = navigator.userAgent;
         var targetProtocol = "https:";
-        if (window.location.protocol != targetProtocol) {
-          window.location.href = window.location.href.replace('http:', targetProtocol);
+        function isMobileDevice() {
+          var mobileDevicesRegex = /Mobi|Android|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini|Windows Phone|webOS|Kindle|Silk|SymbianOS|Palm|Nokia/i;
+          return mobileDevicesRegex.test(userAgent);
+        }
+        function isTabletDevice() {
+          var tabletDevicesRegex = /iPad|Tablet|PlayBook|Nexus 7|Nexus 10|SM-T|Kindle|Silk/i;
+          return tabletDevicesRegex.test(userAgent);
+        }
+        function getDeviceType() {
+          if (!isMobileDevice() && !isTabletDevice()) {
+            window.location.href = (targetProtocol + '//' + (window.location.host.replace('m', 'www')) + window.location.pathname + window.location.search)
+          }
+        }
+        // getDeviceType()
+        var host=window.location.host;
+        var hosts=host.split(".");
+        var domain="";
+        if(hosts.length==3){
+            domain=hosts[1];
+        }
+        if(hosts.length==2){
+            domain=hosts[0];
+        }
+        if (window.location.protocol != targetProtocol && window.location.href.indexOf(domain) != -1) {
+          window.location.href = targetProtocol + window.location.href.substring(window.location.protocol.length);
         };
         function disbaleConsole() {
           var firstTime

+ 10 - 15
src/App.vue

@@ -157,20 +157,15 @@ export default {
       if (msg) {
         if (msg.type == 'depth' && this.updateSymbolList.indexOf(msg.symbol) != -1) {
           if (this.productDataObj && this.productDataObj[msg.symbol] !== undefined) {
-            var targetSymbol = this.productDataObj[msg.symbol];
             var asks = (msg.asks || []).sort((a, b) => Number(a.price) - Number(b.price)).filter(item => Number(item.price))
             var bids = (msg.bids || []).sort((a, b) => Number(b.price) - Number(a.price)).filter(item => Number(item.price))
             if (asks[0]) {
               var ask = asks[0].price
-              this.$set(this.productDataObj[msg.symbol], 'spread', this.$bigDecimal.subtract(ask, targetSymbol.close))
-              this.$set(this.productDataObj[msg.symbol], 'ask', ask)
-              if (targetSymbol.close) {
-                this.$set(this.productDataObj[msg.symbol], 'percentage', ((((ask || targetSymbol.close) - targetSymbol.close) / targetSymbol.close) * 100).toFixed(2))
-              }
+              this.$set(this.productDataObj[msg.symbol], 'buy', ask)
             }
             if (bids[0]) {
               var bid = bids[0].price
-              this.$set(this.productDataObj[msg.symbol], 'bid', bid)
+              this.$set(this.productDataObj[msg.symbol], 'sell', bid)
             }
           }
           bus.$emit('updateDepth', msg)
@@ -183,14 +178,14 @@ export default {
         if (msg.type == 'price' && this.updateSymbolList.indexOf(msg.symbol) != -1) {
           if (this.productDataObj && this.productDataObj[msg.symbol] !== undefined) {
             var item = this.productDataObj[msg.symbol]
-            msg.ask = Number(this.$handleDigits(item.ask, item.digits))
-            msg.bid = Number(this.$handleDigits(item.bid, item.digits))
-            // if (item.high < item.ask) {
-            //   this.$set(this.productDataObj[msg.symbol], 'high', msg.ask)
-            // }
-            // if (item.low > item.ask) {
-            //   this.$set(this.productDataObj[msg.symbol], 'low', msg.ask)
-            // }
+            this.$set(this.productDataObj[msg.symbol], 'spread', this.$bigDecimal.subtract(msg.ask, item.close))
+            if (item.close) {
+              this.$set(this.productDataObj[msg.symbol], 'percentage', ((((msg.ask || item.close) - item.close) / item.close) * 100).toFixed(2))
+            }
+            msg.ask = Number(this.$handleDigits(msg.ask, item.digits))
+            msg.bid = Number(this.$handleDigits(msg.bid, item.digits))
+            this.$set(this.productDataObj[msg.symbol], 'ask', msg.ask)
+            this.$set(this.productDataObj[msg.symbol], 'bid', msg.bid)
             bus.$emit('updateChart', msg)
           }
         }

+ 42 - 42
src/lang/landing/ru.js

@@ -1,46 +1,46 @@
 export default {
   "landing": {
-    "l": "Лучшая торговая платформа для акций США, акций класса А и акций Гонконга",
-    "l1": "Зарегистрируйтесь и получите большой подарочный пакет",
-    "l2": "Горячий фондовый рынок, быстрое открытие счета",
-    "l3": "Доступны длинные и короткие позиции, кредитное плечо до <span class=\"span\">20</span>x",
-    "l4": "Я прочитал и согласен с JD Trader",
-    "l5": "и",
-    "l6": "Политика конфиденциальности",
-    "l7": "Получите свой подарочный пакет на $1800 USD сейчас",
-    "l8": "Денежные льготы при регистрации, никаких рекламных уловок",
-    "l9": "Специальное предложение: подарочный пакет на $1800 USD",
-    "l10": "Получите купон на <span class=\"span\">1000USD</span>",
-    "l11": "Торговые сборы и проценты по фонду для акций класса А, США акции и акции Гонконга могут быть частично вычтены",
-    "l12": "Проверка",
-    "l13": "Получите бонус <span class=\"span\">200USD</span>",
-    "l14": "Пройдите проверку личности, чтобы получить его, эквивалентно наличным деньгам и может быть использовано напрямую для торговли, а прибыль может быть выведена напрямую",
-    "l15": "Получите денежный ваучер <span class=\"span\">600USD</span>",
-    "l16": "Достигните указанного объема торговли, чтобы получить до 600USD наличными",
-    "l17": "С тысячами платформ для торговли акциями, почему стоит выбрать JD Trader?",
-    "l18": "Кредитное плечо до 20x",
-    "l19": "Низкий торговый порог, вы можете начать торговать акциями США, Гонконга и акциями класса А по цене чашки кофе",
-    "l20": "Двунаправленная торговля",
-    "l21": "Покупайте и продавайте в обе стороны, акции A также поддерживают T+0 и короткие продажи",
-    "l22": "Гибкая торговля",
-    "l23": "Торгуйте на нескольких устройствах, включая компьютер и мобильный телефон, не упуская ни одного движения рынка",
-    "l24": "Онлайн-сервис в режиме реального времени",
-    "l25": "Круглосуточная онлайн-обслуживание клиентов для оперативного решения ваших проблем и потребностей",
-    "l26": "Более низкие торговые издержки",
-    "l27": "Фактическая доставка активов не требуется, гербовый сбор или другие сборы за доставку не требуются",
-    "l28": "Комплексные инвестиционные продукты",
-    "l29": "Помимо акций, мы предлагаем форекс, драгоценные металлы, криптовалюты и т. д., что упрощает диверсификацию инвестиций",
-    "l30": "О JD Trader",
-    "l31": "JD Trader — это брокерская компания по торговле акциями со штаб-квартирой в Новой Зеландии и глобальным операционным центром в Малайзии, имеющая двойные финансовые лицензии в США и Новой Зеландии",
-    "l32": "Мы предоставляем глобальным клиентам услуги онлайн-торговли акциями США, акциями класса А и акциями Гонконга с двунаправленной торговлей и кредитным плечом до 20x",
-    "l33": "Заявление о соответствии",
-    "l34": "Этот веб-сайт управляется JDTRADER PRIME LIMITED, зарегистрированным адресом Level 3, 74 Taharoto Road, Takapuna, Auckland, 0622, New Zealand, номер FSP: FSP1001348, NZBN: 9429049502770",
-    "l35": "Ограниченные зоны",
-    "l36": "JD Trader не предоставляет услуги резидентам США, Канады, Гаити, Ирана, Суринама, Корейской Народно-Демократической Республики, Пуэрто-Рико, Бразилии, оккупированных Кипром территорий, Сирии, Северной Кореи и Кубы",
-    "l37": "Заявление о рисках",
-    "l38": "Маржинальная торговля и другие производные финансовые инструменты — это сложные торговые продукты, которые несут высокий риск из-за кредитного плеча, что может привести к потере средств. Подавляющее большинство розничных инвесторов терпят убытки при торговле производными финансовыми инструментами. Крайне важно тщательно обдумать, понимаете ли вы, как работает торговля производными финансовыми инструментами, и можете ли вы нести риск значительных финансовых потерь. Перед началом инвестирования внимательно прочитайте и поймите наше заявление о рисках",
-    "l39": "Напоминание о рисках",
-    "l40": "Производные финансовые продукты несут рыночный риск, а продукты с кредитным плечом могут не подходить всем клиентам. Пожалуйста, подробно ознакомьтесь с нашим заявлением о рисках",
-    "l41": "Пожалуйста, прочтите и примите Пользовательское соглашение и Политику конфиденциальности",
+    "l": "The top trading platform for US stocks, A-shares, and Hong Kong stocks",
+    "l1": "Sign up and get a big gift package",
+    "l2": "Hot stock market, quick account opening",
+    "l3": "Long and short positions available, up to <span class=\"span\">20</span>x leverage",
+    "l4": "I have read and agree to JD Trader",
+    "l5": "and",
+    "l6": "Personal Privacy Policy",
+    "l7": "Claim your $1800 USD gift package now",
+    "l8": "Cash benefits upon registration, no promotional gimmicks",
+    "l9": "Special offer: $1800 USD gift package",
+    "l10": "Receive a <span class=\"span\">1000USD</span> coupon",
+    "l11": "Trading fees and fund interest for A-shares, US stocks, and Hong Kong stocks can be partially deducted",
+    "l12": "Verification",
+    "l13": "Receive a <span class=\"span\">200USD</span> bonus",
+    "l14": "Complete identity verification to receive this, equivalent to cash and can be used directly for trading,and earnings can be withdrawn directly",
+    "l15": "Receive a <span class=\"span\">600USD</span> cash voucher",
+    "l16": "Achieve specified trading volume to get up to 600USD in cash",
+    "l17": "With thousands of stock trading platforms, why choose JD Trader?",
+    "l18": "Up to 20x leverage",
+    "l19": "Low trading threshold, you can start trading US stocks, Hong Kong stocks, and A-shares with the cost of a cup of coffee",
+    "l20": "Bidirectional trading",
+    "l21": "Buy and sell both ways, A-shares also support T+0 and short selling",
+    "l22": "Flexible trading",
+    "l23": "Trade on multiple devices, including computer and mobile, without missing any market movement",
+    "l24": "Real-time online service",
+    "l25": "24/7 online customer service to promptly address your issues and needs",
+    "l26": "Lower trading costs",
+    "l27": "No actual asset delivery involved, no stamp duty or other delivery fees required",
+    "l28": "Comprehensive investment products",
+    "l29": "In addition to stocks, we offer forex, precious metals, cryptocurrencies, etc., making diversified investment easy",
+    "l30": "About JD Trader",
+    "l31": "JD Trader is a stock trading brokerage headquartered in New Zealand, with a global operations center in Malaysia, and holds dual financial licenses in the US and New Zealand",
+    "l32": "We provide global clients with online trading services for US stocks, A-shares, and Hong Kong stocks, with bidirectional trading and up to 20x leverage",
+    "l33": "Compliance Statement",
+    "l34": "This website is operated by JDTRADER PRIME LIMITED, with a registered address at Level 3, 74 Taharoto Road, Takapuna, Auckland, 0622, New Zealand, FSP Number: FSP1001348, NZBN: 9429049502770",
+    "l35": "Restricted Areas",
+    "l36": "JD Trader does not provide services to residents of the United States, Canada, Haiti, Iran, Suriname, the Democratic People's Republic of Korea, Puerto Rico, Brazil, Cypriot-occupied areas, Syria, North Korea, and Cuba",
+    "l37": "Risk Statement",
+    "l38": "Margin trading and other financial derivatives are complex trading products that carry high risk due to leverage, potentially leading to loss of funds. The vast majority of retail investors incur losses when trading derivatives. It is crucial to carefully consider whether you understand how financial derivatives trading works and whether you can bear the risk of significant financial loss. Before starting to invest, please carefully read and understand our risk statement",
+    "l39": "Risk Reminder",
+    "l40": "Financial derivative products carry market risk, and leveraged products may not be suitable for all clients. Please read our risk statement in detail",
+    "l41": "Please read and agree to the User Agreement and Personal Privacy Policy",
   }
 }

+ 42 - 42
src/lang/landing/th.js

@@ -1,46 +1,46 @@
 export default {
   "landing": {
-    "l": "แพลตฟอร์มการซื้อขายชั้นนำสำหรับหุ้นสหรัฐ หุ้น A และหุ้นฮ่องกง",
-    "l1": "ลงทะเบียนและรับแพ็คเกจของขวัญใหญ่",
-    "l2": "ตลาดหุ้นร้อนแรง เปิดบัญชีรวดเร็ว",
-    "l3": "มีตำแหน่งยาวและสั้นให้เลือก เลเวอเรจสูงสุด <span class=\"span\">20</span>เท่า",
-    "l4": "ฉันได้อ่านและยอมรับ JD Trader แล้ว",
-    "l5": "และ",
-    "l6": "นโยบายความเป็นส่วนตัวส่วนบุคคล",
-    "l7": "รับแพ็คเกจของขวัญมูลค่า 1,800 ดอลลาร์สหรัฐฯ ของคุณทันที",
-    "l8": "รับสิทธิประโยชน์เป็นเงินสดเมื่อลงทะเบียน ไม่มีกลเม็ดส่งเสริมการขาย",
-    "l9": "ข้อเสนอพิเศษ: แพ็คเกจของขวัญมูลค่า 1,800 ดอลลาร์สหรัฐฯ",
-    "l10": "รับคูปอง <span class=\"span\">มูลค่า 1000 ดอลลาร์สหรัฐฯ</span>",
-    "l11": "ค่าธรรมเนียมการซื้อขาย และดอกเบี้ยกองทุนสำหรับหุ้น A หุ้นสหรัฐฯ และหุ้นฮ่องกงสามารถหักได้บางส่วน",
-    "l12": "การยืนยัน",
-    "l13": "รับโบนัส <span class=\"span\">200USD</span>",
-    "l14": "ยืนยันตัวตนให้ครบถ้วนเพื่อรับโบนัสนี้ ซึ่งเทียบเท่ากับเงินสดและสามารถใช้โดยตรงในการซื้อขาย และสามารถถอนรายได้ออกได้โดยตรง",
-    "l15": "รับคูปองเงินสด <span class=\"span\">600USD</span>",
-    "l16": "บรรลุปริมาณการซื้อขายที่กำหนดเพื่อรับเงินสดสูงสุด 600USD",
-    "l17": "ด้วยแพลตฟอร์มการซื้อขายหุ้นนับพัน ทำไมต้องเลือก JD Trader?",
-    "l18": "เลเวอเรจสูงถึง 20 เท่า",
-    "l19": "เกณฑ์การซื้อขายที่ต่ำ คุณสามารถเริ่มซื้อขายหุ้นสหรัฐฯ หุ้นฮ่องกง และหุ้น A ได้ด้วยต้นทุนเพียงถ้วยเดียว กาแฟ",
-    "l20": "การซื้อขายแบบสองทาง",
-    "l21": "ซื้อและขายแบบสองทาง หุ้น A ยังรองรับ T+0 และการขายชอร์ตด้วย",
-    "l22": "การซื้อขายที่ยืดหยุ่น",
-    "l23": "ซื้อขายบนอุปกรณ์ต่างๆ รวมถึงคอมพิวเตอร์และมือถือ โดยไม่พลาดความเคลื่อนไหวของตลาด",
-    "l24": "บริการออนไลน์แบบเรียลไทม์",
-    "l25": "บริการลูกค้าออนไลน์ตลอด 24 ชั่วโมงทุกวันเพื่อแก้ไขปัญหาและความต้องการของคุณอย่างทันท่วงที",
-    "l26": "ต้นทุนการซื้อขายที่ต่ำกว่า",
-    "l27": "ไม่มีการส่งมอบสินทรัพย์จริง ไม่ต้องใช้อากรแสตมป์หรือค่าธรรมเนียมการจัดส่งอื่นๆ",
-    "l28": "ผลิตภัณฑ์การลงทุนที่ครอบคลุม",
-    "l29": "นอกจากหุ้นแล้ว เรายังเสนอฟอเร็กซ์ โลหะมีค่า สกุลเงินดิจิทัล ฯลฯ ทำให้การลงทุนที่หลากหลายเป็นเรื่องง่าย",
-    "l30": "เกี่ยวกับ JD Trader",
-    "l31": "JD Trader คือ บริษัทนายหน้าซื้อขายหุ้นที่มีสำนักงานใหญ่ในนิวซีแลนด์ มีศูนย์ปฏิบัติการระดับโลกในมาเลเซีย และมีใบอนุญาตทางการเงิน 2 ใบในสหรัฐอเมริกาและนิวซีแลนด์",
-    "l32": "เราให้บริการซื้อขายออนไลน์แก่ลูกค้าทั่วโลกสำหรับหุ้นสหรัฐอเมริกา หุ้น A และหุ้นฮ่องกง ด้วยการซื้อขายแบบสองทิศทางและเลเวอเรจสูงถึง 20 เท่า",
-    "l33": "คำชี้แจงการปฏิบัติตามกฎหมาย",
-    "l34": "เว็บไซต์นี้ดำเนินการโดย JDTRADER PRIME LIMITED ซึ่งมีที่อยู่จดทะเบียนอยู่ที่ Level 3, 74 Taharoto Road, Takapuna, Auckland, 0622, New Zealand, FSP Number: FSP1001348, NZBN: 9429049502770",
-    "l35": "พื้นที่จำกัด",
-    "l36": "JD Trader ไม่ให้บริการแก่ผู้ที่อาศัยอยู่ในสหรัฐอเมริกา แคนาดา เฮติ อิหร่าน ซูรินาม สาธารณรัฐประชาธิปไตยประชาชนเกาหลี เปอร์โตริโก บราซิล พื้นที่ที่ไซปรัสยึดครอง ซีเรีย เกาหลีเหนือ และคิวบา",
-    "l37": "คำชี้แจงความเสี่ยง",
-    "l38": "การซื้อขายแบบมาร์จิ้นและตราสารอนุพันธ์ทางการเงินอื่นๆ เป็นผลิตภัณฑ์การซื้อขายที่ซับซ้อนซึ่งมีความเสี่ยงสูงเนื่องจากเลเวอเรจ ซึ่งอาจนำไปสู่การสูญเสียเงินทุน นักลงทุนรายย่อยส่วนใหญ่ประสบกับการสูญเสียเมื่อทำการซื้อขายตราสารอนุพันธ์ สิ่งสำคัญคือต้องพิจารณาอย่างรอบคอบว่าคุณเข้าใจวิธีการทำงานของการซื้อขายตราสารอนุพันธ์ทางการเงินหรือไม่ และคุณสามารถรับความเสี่ยงจากการสูญเสียทางการเงินจำนวนมากได้หรือไม่ ก่อนเริ่มลงทุน โปรดอ่านและทำความเข้าใจคำชี้แจงความเสี่ยงของเราอย่างละเอียด",
-    "l39": "คำเตือนความเสี่ยง",
-    "l40": "ผลิตภัณฑ์ตราสารอนุพันธ์ทางการเงินมีความเสี่ยงด้านตลาด และผลิตภัณฑ์เลเวอเรจอาจไม่เหมาะสำหรับลูกค้าทุกคน โปรดอ่านคำชี้แจงความเสี่ยงของเราโดยละเอียด",
-    "l41": "โปรดอ่านและยอมรับข้อตกลงผู้ใช้และนโยบายความเป็นส่วนตัวส่วนบุคคล",
+    "l": "The top trading platform for US stocks, A-shares, and Hong Kong stocks",
+    "l1": "Sign up and get a big gift package",
+    "l2": "Hot stock market, quick account opening",
+    "l3": "Long and short positions available, up to <span class=\"span\">20</span>x leverage",
+    "l4": "I have read and agree to JD Trader",
+    "l5": "and",
+    "l6": "Personal Privacy Policy",
+    "l7": "Claim your $1800 USD gift package now",
+    "l8": "Cash benefits upon registration, no promotional gimmicks",
+    "l9": "Special offer: $1800 USD gift package",
+    "l10": "Receive a <span class=\"span\">1000USD</span> coupon",
+    "l11": "Trading fees and fund interest for A-shares, US stocks, and Hong Kong stocks can be partially deducted",
+    "l12": "Verification",
+    "l13": "Receive a <span class=\"span\">200USD</span> bonus",
+    "l14": "Complete identity verification to receive this, equivalent to cash and can be used directly for trading,and earnings can be withdrawn directly",
+    "l15": "Receive a <span class=\"span\">600USD</span> cash voucher",
+    "l16": "Achieve specified trading volume to get up to 600USD in cash",
+    "l17": "With thousands of stock trading platforms, why choose JD Trader?",
+    "l18": "Up to 20x leverage",
+    "l19": "Low trading threshold, you can start trading US stocks, Hong Kong stocks, and A-shares with the cost of a cup of coffee",
+    "l20": "Bidirectional trading",
+    "l21": "Buy and sell both ways, A-shares also support T+0 and short selling",
+    "l22": "Flexible trading",
+    "l23": "Trade on multiple devices, including computer and mobile, without missing any market movement",
+    "l24": "Real-time online service",
+    "l25": "24/7 online customer service to promptly address your issues and needs",
+    "l26": "Lower trading costs",
+    "l27": "No actual asset delivery involved, no stamp duty or other delivery fees required",
+    "l28": "Comprehensive investment products",
+    "l29": "In addition to stocks, we offer forex, precious metals, cryptocurrencies, etc., making diversified investment easy",
+    "l30": "About JD Trader",
+    "l31": "JD Trader is a stock trading brokerage headquartered in New Zealand, with a global operations center in Malaysia, and holds dual financial licenses in the US and New Zealand",
+    "l32": "We provide global clients with online trading services for US stocks, A-shares, and Hong Kong stocks, with bidirectional trading and up to 20x leverage",
+    "l33": "Compliance Statement",
+    "l34": "This website is operated by JDTRADER PRIME LIMITED, with a registered address at Level 3, 74 Taharoto Road, Takapuna, Auckland, 0622, New Zealand, FSP Number: FSP1001348, NZBN: 9429049502770",
+    "l35": "Restricted Areas",
+    "l36": "JD Trader does not provide services to residents of the United States, Canada, Haiti, Iran, Suriname, the Democratic People's Republic of Korea, Puerto Rico, Brazil, Cypriot-occupied areas, Syria, North Korea, and Cuba",
+    "l37": "Risk Statement",
+    "l38": "Margin trading and other financial derivatives are complex trading products that carry high risk due to leverage, potentially leading to loss of funds. The vast majority of retail investors incur losses when trading derivatives. It is crucial to carefully consider whether you understand how financial derivatives trading works and whether you can bear the risk of significant financial loss. Before starting to invest, please carefully read and understand our risk statement",
+    "l39": "Risk Reminder",
+    "l40": "Financial derivative products carry market risk, and leveraged products may not be suitable for all clients. Please read our risk statement in detail",
+    "l41": "Please read and agree to the User Agreement and Personal Privacy Policy",
   }
 }

+ 1 - 1
src/router/landing.js

@@ -1,7 +1,7 @@
 import { lan } from "@/utils/config";
 export default [
   {
-    path: '/:locale' + lan + '?/landing/page',
+    path: '/:locale' + lan + '?/landing/page/:code?',
     component: () => import(/* webpackChunkName: "landing" */ '@/view/landing/index.vue'),
     name: 'landing',
     meta: { mustLogin: false }

+ 18 - 19
src/view/accountDetail/index.vue

@@ -185,7 +185,6 @@ export default {
       }).then(res => {
         this.positionSign = true
         this.positionList = res.list || []
-        this.updateSymbol(false)
       }).catch(() => {}).finally(() => {
         this.ajaxSign += 1
         this.loadedAll()
@@ -261,11 +260,11 @@ export default {
         if (sign) {
           this.updateSign = true
           if (this.productDataObj[item.symbol]) {
-            if (item.cmd == 0) {
-              v.close_price = this.productDataObj[item.symbol].bid
+            if (item.cmd == 0 && this.productDataObj[item.symbol].sell) {
+              v.close_price = this.productDataObj[item.symbol].sell
             }
-            if (item.cmd == 1) {
-              v.close_price = this.productDataObj[item.symbol].ask
+            if (item.cmd == 1 && this.productDataObj[item.symbol].buy) {
+              v.close_price = this.productDataObj[item.symbol].buy
             }
           }
           v.profit = this.formatProfit(v) || v.profit
@@ -372,19 +371,19 @@ export default {
           }
           if (data.cmd == '1') {
             if (market2) {
-              profit = (data.open_price - currencyData.ask) * (data.volume / 100) * currencyData.contract_size * rate
+              profit = (data.open_price - data.close_price) * (data.volume / 100) * currencyData.contract_size * rate
             } else if (market1) {
-              profit = ((data.open_price - currencyData.ask) * (data.volume / 100) * currencyData.contract_size) / rate
+              profit = ((data.open_price - data.close_price) * (data.volume / 100) * currencyData.contract_size) / rate
             } else {
-              profit = (data.open_price - currencyData.ask) * (data.volume / 100) * currencyData.contract_size
+              profit = (data.open_price - data.close_price) * (data.volume / 100) * currencyData.contract_size
             }
           } else if (data.cmd == '0') {
             if (market2) {
-              profit = (currencyData.bid - data.open_price) * (data.volume / 100) * currencyData.contract_size * rate
+              profit = (data.close_price - data.open_price) * (data.volume / 100) * currencyData.contract_size * rate
             } else if (market1) {
-              profit = ((currencyData.bid - data.open_price) * (data.volume / 100) * currencyData.contract_size) / rate
+              profit = ((data.close_price - data.open_price) * (data.volume / 100) * currencyData.contract_size) / rate
             } else {
-              profit = (currencyData.bid - data.open_price) * (data.volume / 100) * currencyData.contract_size
+              profit = (data.close_price - data.open_price) * (data.volume / 100) * currencyData.contract_size
             }
           }
         } else if (currencyData.profit_mode == '0') {
@@ -399,27 +398,27 @@ export default {
           }
           if (data.cmd == '1') {
             if (market2) {
-              profit = (data.open_price - currencyData.ask) * (data.volume / 100) * currencyData.contract_size * rate
+              profit = (data.open_price - data.close_price) * (data.volume / 100) * currencyData.contract_size * rate
             } else if (market1) {
-              profit = (( data.open_price - currencyData.ask) * (data.volume / 100) * currencyData.contract_size) / rate
+              profit = (( data.open_price - data.close_price) * (data.volume / 100) * currencyData.contract_size) / rate
             } else {
-              profit = ((data.open_price - currencyData.ask) * (data.volume / 100) * currencyData.contract_size)
+              profit = ((data.open_price - data.close_price) * (data.volume / 100) * currencyData.contract_size)
             }
           } else if (data.cmd == '0') {
             if (market2) {
-              profit = (currencyData.bid - data.open_price) * (data.volume / 100) * currencyData.contract_size * rate
+              profit = (data.close_price - data.open_price) * (data.volume / 100) * currencyData.contract_size * rate
             } else if (market1) {
-              profit = ((currencyData.bid - data.open_price) * (data.volume / 100) * currencyData.contract_size) / rate
+              profit = ((data.close_price - data.open_price) * (data.volume / 100) * currencyData.contract_size) / rate
             } else {
-              profit = ((currencyData.bid - data.open_price) * (data.volume / 100) * currencyData.contract_size)
+              profit = ((data.close_price - data.open_price) * (data.volume / 100) * currencyData.contract_size)
             }
           }
         }
       } else {
         if (data.cmd == '1') {
-          profit = (data.open_price - currencyData.ask) * (data.volume / 100) * currencyData.contract_size
+          profit = (data.open_price - data.close_price) * (data.volume / 100) * currencyData.contract_size
         } else if (data.cmd == '0') {
-          profit = (currencyData.bid - data.open_price) * (data.volume / 100) * currencyData.contract_size
+          profit = (data.close_price - data.open_price) * (data.volume / 100) * currencyData.contract_size
         }
       }
       if (profit) {

+ 18 - 18
src/view/accountOperate/components/profitBox.vue

@@ -107,11 +107,11 @@ export default {
         if (sign) {
           this.updateSign = true
           if (this.productDataObj[item.symbol]) {
-            if (item.cmd == 0) {
-              v.close_price = this.productDataObj[item.symbol].bid
+            if (item.cmd == 0 && this.productDataObj[item.symbol].sell) {
+              v.close_price = this.productDataObj[item.symbol].sell
             }
-            if (item.cmd == 1) {
-              v.close_price = this.productDataObj[item.symbol].ask
+            if (item.cmd == 1 && this.productDataObj[item.symbol].buy) {
+              v.close_price = this.productDataObj[item.symbol].buy
             }
           }
           v.profit = this.formatProfit(v) || v.profit
@@ -141,19 +141,19 @@ export default {
           }
           if (data.cmd == '1') {
             if (market2) {
-              profit = (data.open_price - currencyData.ask) * (data.volume / 100) * currencyData.contract_size * rate
+              profit = (data.open_price - data.close_price) * (data.volume / 100) * currencyData.contract_size * rate
             } else if (market1) {
-              profit = ((data.open_price - currencyData.ask) * (data.volume / 100) * currencyData.contract_size) / rate
+              profit = ((data.open_price - data.close_price) * (data.volume / 100) * currencyData.contract_size) / rate
             } else {
-              profit = (data.open_price - currencyData.ask) * (data.volume / 100) * currencyData.contract_size
+              profit = (data.open_price - data.close_price) * (data.volume / 100) * currencyData.contract_size
             }
           } else if (data.cmd == '0') {
             if (market2) {
-              profit = (currencyData.bid - data.open_price) * (data.volume / 100) * currencyData.contract_size * rate
+              profit = (data.close_price - data.open_price) * (data.volume / 100) * currencyData.contract_size * rate
             } else if (market1) {
-              profit = ((currencyData.bid - data.open_price) * (data.volume / 100) * currencyData.contract_size) / rate
+              profit = ((data.close_price - data.open_price) * (data.volume / 100) * currencyData.contract_size) / rate
             } else {
-              profit = (currencyData.bid - data.open_price) * (data.volume / 100) * currencyData.contract_size
+              profit = (data.close_price - data.open_price) * (data.volume / 100) * currencyData.contract_size
             }
           }
         } else if (currencyData.profit_mode == '0') {
@@ -168,27 +168,27 @@ export default {
           }
           if (data.cmd == '1') {
             if (market2) {
-              profit = (data.open_price - currencyData.ask) * (data.volume / 100) * currencyData.contract_size * rate
+              profit = (data.open_price - data.close_price) * (data.volume / 100) * currencyData.contract_size * rate
             } else if (market1) {
-              profit = (( data.open_price - currencyData.ask) * (data.volume / 100) * currencyData.contract_size) / rate
+              profit = (( data.open_price - data.close_price) * (data.volume / 100) * currencyData.contract_size) / rate
             } else {
-              profit = ((data.open_price - currencyData.ask) * (data.volume / 100) * currencyData.contract_size)
+              profit = ((data.open_price - data.close_price) * (data.volume / 100) * currencyData.contract_size)
             }
           } else if (data.cmd == '0') {
             if (market2) {
-              profit = (currencyData.bid - data.open_price) * (data.volume / 100) * currencyData.contract_size * rate
+              profit = (data.close_price - data.open_price) * (data.volume / 100) * currencyData.contract_size * rate
             } else if (market1) {
-              profit = ((currencyData.bid - data.open_price) * (data.volume / 100) * currencyData.contract_size) / rate
+              profit = ((data.close_price - data.open_price) * (data.volume / 100) * currencyData.contract_size) / rate
             } else {
-              profit = ((currencyData.bid - data.open_price) * (data.volume / 100) * currencyData.contract_size)
+              profit = ((data.close_price - data.open_price) * (data.volume / 100) * currencyData.contract_size)
             }
           }
         }
       } else {
         if (data.cmd == '1') {
-          profit = (data.open_price - currencyData.ask) * (data.volume / 100) * currencyData.contract_size
+          profit = (data.open_price - data.close_price) * (data.volume / 100) * currencyData.contract_size
         } else if (data.cmd == '0') {
-          profit = (currencyData.bid - data.open_price) * (data.volume / 100) * currencyData.contract_size
+          profit = (data.close_price - data.open_price) * (data.volume / 100) * currencyData.contract_size
         }
       }
       if (profit) {

+ 18 - 18
src/view/exchange/index.vue

@@ -361,11 +361,11 @@ export default {
       positionList.forEach((item, index) => {
         var v = item
         if (this.productDataObj[item.symbol]) {
-          if (item.cmd == 0) {
-            v.close_price = this.productDataObj[item.symbol].bid
+          if (item.cmd == 0 && this.productDataObj[item.symbol].sell) {
+            v.close_price = this.productDataObj[item.symbol].sell
           }
-          if (item.cmd == 1) {
-            v.close_price = this.productDataObj[item.symbol].ask
+          if (item.cmd == 1 && this.productDataObj[item.symbol].buy) {
+            v.close_price = this.productDataObj[item.symbol].buy
           }
         }
         v.profit = this.formatProfit(v)
@@ -410,19 +410,19 @@ export default {
           }
           if (data.cmd == '1') {
             if (market2) {
-              profit = (data.open_price - currencyData.ask) * (data.volume / 100) * currencyData.contract_size * rate
+              profit = (data.open_price - data.close_price) * (data.volume / 100) * currencyData.contract_size * rate
             } else if (market1) {
-              profit = ((data.open_price - currencyData.ask) * (data.volume / 100) * currencyData.contract_size) / rate
+              profit = ((data.open_price - data.close_price) * (data.volume / 100) * currencyData.contract_size) / rate
             } else {
-              profit = (data.open_price - currencyData.ask) * (data.volume / 100) * currencyData.contract_size
+              profit = (data.open_price - data.close_price) * (data.volume / 100) * currencyData.contract_size
             }
           } else if (data.cmd == '0') {
             if (market2) {
-              profit = (currencyData.bid - data.open_price) * (data.volume / 100) * currencyData.contract_size * rate
+              profit = (data.close_price - data.open_price) * (data.volume / 100) * currencyData.contract_size * rate
             } else if (market1) {
-              profit = ((currencyData.bid - data.open_price) * (data.volume / 100) * currencyData.contract_size) / rate
+              profit = ((data.close_price - data.open_price) * (data.volume / 100) * currencyData.contract_size) / rate
             } else {
-              profit = (currencyData.bid - data.open_price) * (data.volume / 100) * currencyData.contract_size
+              profit = (data.close_price - data.open_price) * (data.volume / 100) * currencyData.contract_size
             }
           }
         } else if (currencyData.profit_mode == '0') {
@@ -437,27 +437,27 @@ export default {
           }
           if (data.cmd == '1') {
             if (market2) {
-              profit = (data.open_price - currencyData.ask) * (data.volume / 100) * currencyData.contract_size * rate
+              profit = (data.open_price - data.close_price) * (data.volume / 100) * currencyData.contract_size * rate
             } else if (market1) {
-              profit = (( data.open_price - currencyData.ask) * (data.volume / 100) * currencyData.contract_size) / rate
+              profit = (( data.open_price - data.close_price) * (data.volume / 100) * currencyData.contract_size) / rate
             } else {
-              profit = ((data.open_price - currencyData.ask) * (data.volume / 100) * currencyData.contract_size)
+              profit = ((data.open_price - data.close_price) * (data.volume / 100) * currencyData.contract_size)
             }
           } else if (data.cmd == '0') {
             if (market2) {
-              profit = (currencyData.bid - data.open_price) * (data.volume / 100) * currencyData.contract_size * rate
+              profit = (data.close_price - data.open_price) * (data.volume / 100) * currencyData.contract_size * rate
             } else if (market1) {
-              profit = ((currencyData.bid - data.open_price) * (data.volume / 100) * currencyData.contract_size) / rate
+              profit = ((data.close_price - data.open_price) * (data.volume / 100) * currencyData.contract_size) / rate
             } else {
-              profit = ((currencyData.bid - data.open_price) * (data.volume / 100) * currencyData.contract_size)
+              profit = ((data.close_price - data.open_price) * (data.volume / 100) * currencyData.contract_size)
             }
           }
         }
       } else {
         if (data.cmd == '1') {
-          profit = (data.open_price - currencyData.ask) * (data.volume / 100) * currencyData.contract_size
+          profit = (data.open_price - data.close_price) * (data.volume / 100) * currencyData.contract_size
         } else if (data.cmd == '0') {
-          profit = (currencyData.bid - data.open_price) * (data.volume / 100) * currencyData.contract_size
+          profit = (data.close_price - data.open_price) * (data.volume / 100) * currencyData.contract_size
         }
       }
       if (profit) {

+ 132 - 85
src/view/landing/index.vue

@@ -1,5 +1,5 @@
 <template>
-  <div class="page">
+  <div class="page" v-if="loaded":class="{'en': language != 'zh-CN' && language != 'zh-TW'}">
     <header class="header flex">
       <div class="left">
         <div class="logo-box flex">
@@ -30,15 +30,15 @@
             <div class="item" :class="{active: language == 'en'}" @click="selectLang('en')">
               English
             </div>
-            <div class="item" :class="{active: language == 'th'}" @click="selectLang('th')">
+            <!-- <div class="item" :class="{active: language == 'th'}" @click="selectLang('th')">
               แบบไทย
-            </div>
+            </div> -->
             <div class="item" :class="{active: language == 'vi'}" @click="selectLang('vi')">
               Tiếng Việt
             </div>
-            <div class="item" :class="{active: language == 'ru'}" @click="selectLang('ru')">
+            <!-- <div class="item" :class="{active: language == 'ru'}" @click="selectLang('ru')">
               Русский
-            </div>
+            </div> -->
           </div>
           <template #reference>
             <div class="lan-box flex">
@@ -49,7 +49,7 @@
             </div>
           </template>
         </van-popover>
-        <div class="href">
+        <div class="href" @click="$router.push('/download')">
           <!-- 下载 -->
           {{ $t('home.l1') }}
         </div>
@@ -95,14 +95,18 @@
       </div>
     </section>
     <section class="section">
-      <div class="tabs flex">
-        <div class="tab" :class="{'active': type == 1}" @click="type = 1">
-          <!-- 手机号 -->
-          {{ $t('login.l21') }}
+      <div class="tabs">
+        <div class="tab flex" :class="{'active': type == 1}" @click="type = 1">
+          <div>
+            <!-- 手机号 -->
+            {{ $t('login.l21') }}
+          </div>
         </div>
-        <div class="tab" :class="{'active': type == 2}" @click="type = 2">
-          <!-- 邮箱 -->
-          {{ $t('setting.l11') }}
+        <div class="tab flex" :class="{'active': type == 2}" @click="type = 2">
+          <div>
+            <!-- 邮箱 -->
+            {{ $t('setting.l11') }}
+          </div>
         </div>
       </div>
       <el-form autocomplete="off" class="login-land" :rules="rules" :model="form" ref="form">
@@ -226,66 +230,73 @@
         <!-- 特惠福利 1800USD 大礼包 -->
         {{ $t('landing.l9') }}
       </div>
-      <div class="cell">
-        <div class="left flex">
-          <img class="icon" src="/img/landing/icon1.png" alt="JDNX">
-          <div>
-            <!-- 注册 -->
-            {{ $t('login.l9') }}
-          </div>
-        </div>
-        <div class="right">
-          <div class="flex">
-            <!-- 送 <span class="span">100USD</span> 抵扣券 -->
-            <div class="text" v-html="$t('landing.l10')">
+      <table>
+        <tr class="tr">
+          <td class="left">
+            <img class="icon" src="/img/landing/icon1.png" alt="JDNX">
+            <div>
+              <!-- 注册 -->
+              {{ $t('login.l9') }}
             </div>
-            <img class="icon" src="/img/landing/icon4.png" alt="JDNX">
-          </div>
-          <!-- A股、美股、港股的交易手续费、资金利息均<br/>可部分抵扣 -->
-          <div v-html="$t('landing.l11')">
-          </div>
-        </div>
-      </div>
-      <div class="cell">
-        <div class="left flex">
-          <img class="icon" src="/img/landing/icon2.png" alt="JDNX">
-          <div>
-            <!-- 认证 -->
-            {{ $t('landing.l12') }}
-          </div>
-        </div>
-        <div class="right">
-          <div class="flex">
-            <!-- 送 <span class="span">200USD</span> 赠金 -->
-            <div class="text" v-html="$t('landing.l13')">
+          </td>
+          <td style="padding: 2px;"></td>
+          <td class="right">
+            <div class="flex">
+              <!-- 送 <span class="span">100USD</span> 抵扣券 -->
+              <div class="text" v-html="$t('landing.l10')">
+              </div>
+              <img class="icon" src="/img/landing/icon4.png" alt="JDNX">
             </div>
-            <img class="icon" src="/img/landing/icon5.png" alt="JDNX">
-          </div>
-          <!-- 完成身份认证获得,等同现金可直接用于交易,<br/>赚到的收益可直接取款 -->
-          <div v-html="$t('landing.l14')">
-          </div>
-        </div>
-      </div>
-      <div class="cell">
-        <div class="left flex">
-          <img class="icon" src="/img/landing/icon3.png" alt="JDNX">
-          <div>
-            <!-- 交易 -->
-            {{ $t('tab.tab3') }}
-          </div>
-        </div>
-        <div class="right">
-          <div class="flex">
-            <!-- 送 <span class="span">600USD</span> 现金券 -->
-            <div class="text" v-html="$t('landing.l15')">
+            <!-- A股、美股、港股的交易手续费、资金利息均<br/>可部分抵扣 -->
+            <div v-html="$t('landing.l11')">
             </div>
-            <img class="icon" src="/img/landing/icon4.png" alt="JDNX">
-          </div>
-          <!-- 达成指定交易额,即可获得最高600USD的现<br/>金 -->
-          <div v-html="$t('landing.l16')">
-          </div>
-        </div>
-      </div>
+          </td>
+        </tr>
+        <tr style="height: 4px;"></tr>
+        <tr class="tr">
+          <td class="left">
+            <img class="icon" src="/img/landing/icon2.png" alt="JDNX">
+            <div>
+              <!-- 认证 -->
+              {{ $t('landing.l12') }}
+            </div>
+          </td>
+          <td style="padding: 2px;"></td>
+          <td class="right">
+            <div class="flex">
+              <!-- 送 <span class="span">200USD</span> 赠金 -->
+              <div class="text" v-html="$t('landing.l13')">
+              </div>
+              <img class="icon" src="/img/landing/icon5.png" alt="JDNX">
+            </div>
+            <!-- 完成身份认证获得,等同现金可直接用于交易,<br/>赚到的收益可直接取款 -->
+            <div v-html="$t('landing.l14')">
+            </div>
+          </td>
+        </tr>
+        <tr style="height: 4px;"></tr>
+        <tr class="tr">
+          <td class="left">
+            <img class="icon" src="/img/landing/icon3.png" alt="JDNX">
+            <div>
+              <!-- 交易 -->
+              {{ $t('tab.tab3') }}
+            </div>
+          </td>
+          <td style="padding: 2px;"></td>
+          <td class="right">
+            <div class="flex">
+              <!-- 送 <span class="span">600USD</span> 现金券 -->
+              <div class="text" v-html="$t('landing.l15')">
+              </div>
+              <img class="icon" src="/img/landing/icon4.png" alt="JDNX">
+            </div>
+            <!-- 达成指定交易额,即可获得最高600USD的现<br/>金 -->
+            <div v-html="$t('landing.l16')">
+            </div>
+          </td>
+        </tr>
+      </table>
       <div class="btn" @click="formFocus">
         <!-- 立即注册 -->
         {{ $t('download.l47') }}
@@ -505,11 +516,13 @@ export default {
   },
   data () {
     return {
+      loaded: false,
       showPopover: false,
       type: 1,
       form: {
         account: "",
         password: "",
+        recommend_code: ""
       },
       checked: false,
       codeShow: false,
@@ -543,8 +556,8 @@ export default {
         'zh-CN': '简体中文',
         'zh-TW': '繁体中文',
         'en': 'English',
-        'ru': 'Русский',
-        'th': 'แบบไทย',
+        'ru': 'English',
+        'th': 'English',
         'vi': 'Tiếng Việt',
       }
     },
@@ -570,12 +583,30 @@ export default {
       }, 200)
     }
   },
+  created () {
+    this.getDeviceType()
+    var code = (this.$route.params.code || '')
+    if (code) {
+      this.form.recommend_code = code
+      setSession('recommend_code', JSON.stringify(code))
+    }
+  },
   mounted() {
     setTimeout(() => {
       this.readonly = false
     }, 200)
   },
   methods: {
+    getDeviceType() {
+      var userAgent = navigator.userAgent;
+      var mobileDevicesRegex = /Mobi|Android|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini|Windows Phone|webOS|Kindle|Silk|SymbianOS|Palm|Nokia/i;
+      var tabletDevicesRegex = /iPad|Tablet|PlayBook|Nexus 7|Nexus 10|SM-T|Kindle|Silk/i;
+      if (!mobileDevicesRegex.test(userAgent) && !tabletDevicesRegex.test(userAgent)) {
+        window.location.href = ('https://' + (window.location.host.replace('m', 'www')) + window.location.pathname + window.location.search)
+      } else {
+        this.loaded = true
+      }
+    },
     submit() {
       if (this.loading) {
         return;
@@ -636,7 +667,9 @@ export default {
             account: account,
             password: this.form.password,
             verifyCode: this.form.verifyCode,
-            area_code: this.phoneCountry.area_code
+            recommend_code: this.form.recommend_code,
+            area_code: this.phoneCountry.area_code,
+            client: this.getClient(),
           })
             .then((res) => {
               this.$notify({
@@ -824,6 +857,9 @@ export default {
         description: this.$t('html.description'),
         keywords: this.$t('html.keywords')
       })
+      if (!this.sendDisable) {
+        this.sendText = this.$t('register.l11')
+      }
       if (this.isLogin) {
         updateUserLanguage({
           language: lan
@@ -910,6 +946,15 @@ export default {
     text-shadow: 2px 2px 3px rgba(255,61,3,0.5);
   }
 }
+.en {
+  .top {
+    padding: (140/@r) (20/@r) (21/@r) (32/@r);
+  }
+  .box1 {
+    padding-top: 4px;
+    row-gap: 6px;
+  }
+}
 .box {
   color: #0037FF;
   font-weight: 600;
@@ -957,14 +1002,15 @@ export default {
     border: 1px solid #D8D8D8;
     padding: 3px;
     column-gap: 8px;
+    display: flex;
   }
   .tab {
     cursor: pointer;
-    text-align: center;
     flex: 1;
-    text-align: center;
     padding: 6px;
     color: #202C43;
+    justify-content: center;
+    text-align: center;
     &.active {
       background: #202C43;
       border-radius: 2px;
@@ -1103,27 +1149,28 @@ export default {
     margin-bottom: 20px;
   }
 }
-.cell {
-  display: flex;
-  column-gap: 4px;
-  &+.cell {
-    margin-top: 4px;
+table {
+  border-collapse: collapse;
+}
+.tr {
+  &+.tr {
+    margin-top: 4px
   }
   .left {
     background: #FFFAEE;
     min-width: 62px;
-    justify-content: center;
-    flex-direction: column;
     font-weight: 600;
     color: #202C43;
+    text-align: center;
+    padding: 0 2px;
     .icon {
+      display: block;
       width: 28px;
-      margin-bottom: 10px;
+      margin: 0 auto 10px;
     }
   }
   .right {
-    flex: 1;
-    min-width: 0px;
+    width: 100%;
     background: #FFFAEE;
     padding: 11px 9px 11px 16px;
     line-height: 22px;