فهرست منبع

Merge branch 'master' into follow

lxf 2 هفته پیش
والد
کامیت
df4951ecf4

+ 2 - 1
README.md

@@ -16,4 +16,5 @@ zpzpjd333
 jdnxtestxm007@outlook.com
 xxmmttyy111
 
-szhengfang@outlook.com
+jdnxtest009571@outlook.com
+jdjd009571

+ 45 - 34
src/App.vue

@@ -51,7 +51,7 @@ export default {
     '$route'() {
       this.abnormalPopSign = false
       if (!this.$route.meta.socket) {
-        this.webSocket && this.webSocket.close()
+        this.webSocket && this.webSocket.close();
         clearInterval(this.socketTimer)
         this.socketTimer = null
         this.$store.commit('setUpdateSymbolList', [])
@@ -89,8 +89,8 @@ export default {
     if (this.$route.meta.socket) {
       this.init()
     }
-    bus.$on('abnormalPopSign', () => {
-      this.abnormalPopSign = true
+    bus.$on('abnormalPopSign', (val) => {
+      this.abnormalPopSign = val !== undefined ? val : true
     })
     bus.$on('alterProductData', this.alterProductData)
     bus.$on('resetProductDataObj', this.resetProductDataObj)
@@ -156,32 +156,43 @@ export default {
       var msg = JSON.parse(data.data)
       if (msg) {
         if (msg.type == 'depth' && this.updateSymbolList.indexOf(msg.symbol) != -1) {
-          bus.$emit('updateDepth', msg)
-        }
-        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(msg.ask, this.productDataObj[msg.symbol].digits))
-            msg.bid = Number(this.$handleDigits(msg.bid, this.productDataObj[msg.symbol].digits))
-            this.$set(this.productDataObj[msg.symbol], 'ask', msg.ask)
-            this.$set(this.productDataObj[msg.symbol], 'bid', msg.bid)
-            this.$set(this.productDataObj[msg.symbol], 'spread', this.$bigDecimal.subtract(msg.ask, item.close))
-            if (item.high < item.ask) {
-              this.$set(this.productDataObj[msg.symbol], 'high', msg.ask)
+            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))
+              }
             }
-            if (item.low > item.ask) {
-              this.$set(this.productDataObj[msg.symbol], 'low', msg.ask)
+            if (bids[0]) {
+              var bid = bids[0].price
+              this.$set(this.productDataObj[msg.symbol], 'bid', bid)
             }
-            if (item.close) {
-              this.$set(this.productDataObj[msg.symbol], 'percentage', ((((msg.ask || item.close) - item.close) / item.close) * 100).toFixed(2))
-            }
-            bus.$emit('updateChart', msg)
           }
-          if ((new Date().getTime() - this.timerSign) < 1000) {
+          bus.$emit('updateDepth', msg)
+          if ((new Date().getTime() - this.timerSign) < 700) {
             return
           }
           this.timerSign = new Date().getTime()
-          bus.$emit('updateSymbol', msg)
+          bus.$emit('updateSymbol', true)
+        }
+        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)
+            // }
+            bus.$emit('updateChart', msg)
+          }
         }
       }
     },
@@ -258,12 +269,12 @@ export default {
             } else {
               item.percentage = 100;
             }
-            if (item.high < item.ask) {
-              item.high = item.ask
-            }
-            if (item.low > item.ask) {
-              item.low = item.ask
-            }
+            // if (item.high < item.ask) {
+            //   item.high = item.ask
+            // }
+            // if (item.low > item.ask) {
+            //   item.low = item.ask
+            // }
             item.spread = this.$bigDecimal.subtract(item.ask, item.close)
             item.ask = Number(this.$handleDigits(item.ask, item.digits))
             item.bid = Number(this.$handleDigits(item.bid, item.digits))
@@ -283,12 +294,12 @@ export default {
           } else {
             item.percentage = 100;
           }
-          if (item.high < item.ask) {
-            item.high = item.ask
-          }
-          if (item.low > item.ask) {
-            item.low = item.ask
-          }
+          // if (item.high < item.ask) {
+          //   item.high = item.ask
+          // }
+          // if (item.low > item.ask) {
+          //   item.low = item.ask
+          // }
           item.spread = this.$bigDecimal.subtract(item.ask, item.close)
           item.ask = Number(this.$handleDigits(item.ask, item.digits))
           item.bid = Number(this.$handleDigits(item.bid, item.digits))

+ 9 - 3
src/components/abnormal/components/status2.vue

@@ -13,19 +13,25 @@
       <!-- 您的账号存在异常,暂时无法使用该功能,您已提交编号为RZIF202407070001的验证资料申请解除账号限制,相关信息正在审核中,请耐心等待,谢谢! -->
       {{ $t('abnormal.l52').replace('{p}', status2.ordernum) }}
     </div>
-    <div class="btn" @click="$router.push('/abnormal/prove')">
-      <!-- 重新提交资料 -->
-      {{ $t('abnormal.l53') }}
+    <div class="btn" @click="cancel">
+      <!-- 知道了 -->
+      {{ $t('abnormal.l56') }}
     </div>
   </div>
 </template>
 <script>
+import bus from '@/utils/bus'
 export default {
   props: ['status2'],
   data () {
     return {
       
     }
+  },
+  methods: {
+    cancel() {
+      bus.$emit('abnormalPopSign', false)
+    }
   }
 }
 </script>

+ 3 - 3
src/components/abnormal/components/status3.vue

@@ -14,8 +14,8 @@
       {{ $t('abnormal.l55').replace('{p}', status2.ordernum).replace('{p1}', content) }}
     </div>
     <div class="btn" @click="$router.push('/abnormal/prove')">
-      <!-- 知道了 -->
-      {{ $t('abnormal.l56') }}
+      <!-- 重新提交资料 -->
+      {{ $t('abnormal.l53') }}
     </div>
   </div>
 </template>
@@ -29,7 +29,7 @@ export default {
   },
   computed: {
     content() {
-      return ((this.handleList[0] || {}).content || '')
+      return ((this.handleList[0] || {}).comment || '')
     }
   }
 }

+ 29 - 5
src/components/abnormal/index.vue

@@ -18,13 +18,24 @@ export default {
   },
   data () {
     return {
-      status2: {},
-      handleList: []
+      status3: {},
+      status6: {},
     }
   },
   computed: {
+    status2() {
+      if (!this.status3.id && !this.status6.id) {
+        return {}
+      }
+      var time3 = new Date((this.status3.insert_datetime || '0').replace(new RegExp(/-/gm), "/")).getTime()
+      var time6 = new Date((this.status6.insert_datetime || '0').replace(new RegExp(/-/gm), "/")).getTime()
+      return time3 > time6 ? this.status3 : this.status6
+    },
+    handleList() {
+      return this.status2.handleList || []
+    },
     step() {
-      if (this.handleList.length > 0) {
+      if (this.status2.status == 6) {
         return 3
       }
       if (this.status2.id) {
@@ -49,8 +60,21 @@ export default {
         if (obj.content) {
           obj.content = JSON.parse(obj.content)
         }
-        this.status2 = obj
-        this.handleList = this.status2.handleList || []
+        this.status3 = obj
+      }).catch(() => {
+      })
+      getWorkOrderList({
+        pageNum: 1,
+        pageSize: 1,
+        type: 100,
+        status: 6
+      }).then(res => {
+        var list = res.list || []
+        var obj = list[0] || {}
+        if (obj.content) {
+          obj.content = JSON.parse(obj.content)
+        }
+        this.status6 = obj
       }).catch(() => {
       })
     },

+ 4 - 4
src/components/positionList/components/closeView.vue

@@ -48,10 +48,10 @@ export default {
       this.$emit('cancel')
     },
     closePosition() {
-      if (this.userInfo.group == 9999) {
-        bus.$emit('abnormalPopSign')
-        return
-      }
+      // if (this.userInfo.group == 9999) {
+      //   bus.$emit('abnormalPopSign')
+      //   return
+      // }
       this.fullscreenLoading = true
       closePosition({
         ticket: this.info.ticket,

+ 3 - 1
src/lang/en.js

@@ -44,7 +44,9 @@
     "211": "Forbidden trade",
     "1000": "The account is in the state of {p}, the operation cannot be performed",
     "1001": "The account has been modified within 24 hours, and the operation cannot be performed for the moment",
-    "1002": "Account/password is wrong",
+    "1002": "Password wrong",
+    "1011": "Mobile number does not exist",
+    "1012": "Email number does not exist",
     "10021": "The original password is incorrect",
     "1003": "The password does not meet the rules",
     "1004": "The password is inconsistent",

+ 3 - 1
src/lang/ru.js

@@ -44,7 +44,9 @@ export default {
     "211": "Транзакция запрещена",
     "1000": "Учетная запись находится в статусе {p}, и эту операцию невозможно выполнить",
     "1001": "Эта учетная запись изменила важную информацию в течение 24 часов, и эта операция временно недоступна",
-    "1002": "Учетная запись/пароль неверны",
+    "1002": "Неправильный пароль",
+    "1011": "Номер мобильного телефона не существует",
+    "1012": "Номер электронной почты не существует",
     "10021": "Исходный пароль неверен",
     "1003": "Пароль не соответствует правилам",
     "1004": "Пароли, введенные дважды, несовместимы",

+ 3 - 1
src/lang/th.js

@@ -44,7 +44,9 @@ export default {
     "211": "ห้ามทำธุรกรรม",
     "1000": "บัญชีอยู่ในสถานะ {p} และการดำเนินการนี้ไม่สามารถทำได้",
     "1001": "บัญชีนี้ได้แก้ไขข้อมูลสำคัญภายใน 24 ชั่วโมง และการดำเนินการนี้ไม่สามารถใช้งานได้ชั่วคราว",
-    "1002": "บัญชี/รหัสผ่านไม่ถูกต้อง",
+    "1002": "รหัสผ่านผิด",
+    "1011": "ไม่มีหมายเลขโทรศัพท์มือถือ",
+    "1012": "ไม่มีหมายเลขอีเมล",
     "10021": "รหัสผ่านเดิมไม่ถูกต้อง",
     "1003": "รหัสผ่านไม่เป็นไปตามกฎ",
     "1004": "รหัสผ่านที่ป้อนสองครั้งไม่สอดคล้องกัน",

+ 3 - 1
src/lang/vi.js

@@ -44,7 +44,9 @@ export default {
     "211": "Giao dịch bị cấm",
     "1000": "Tài khoản ở trạng thái {p} và thao tác này không thể thực hiện được",
     "1001": "Tài khoản này đã sửa đổi thông tin quan trọng trong vòng 24 giờ và thao tác này tạm thời không khả dụng",
-    "1002": "Tài khoản/mật khẩu không chính xác",
+    "1002": "Mật khẩu sai",
+    "1011": "Số điện thoại di động không tồn tại",
+    "1012": "Số email không tồn tại",
     "10021": "Mật khẩu ban đầu không đúng",
     "1003": "Mật khẩu không tuân thủ quy tắc",
     "1004": "Mật khẩu nhập hai lần không nhất quán",

+ 3 - 1
src/lang/zh-CN.js

@@ -45,7 +45,9 @@ export default {
     "211": "禁止交易",
     "1000": "账号正处于{p}状态,无法进行该操作",
     "1001": "该帐号24小时内修改过重要信息,暂时无法进行该操作",
-    "1002": "账号/密码有误",
+    "1002": "密码错误",
+    "1011": "手机号码不存在",
+    "1012": "邮箱号码不存在",
     "10021": "原始密码不正确",
     "1003": "密码不符合规则",
     "1004": "两次输入的密码不一致",

+ 3 - 1
src/lang/zh-TW.js

@@ -44,7 +44,9 @@ export default {
     "211": "禁止交易",
     "1000": "帳號正處於{p}狀態,無法進行該操作",
     "1001": "此帳號24小時內修改過重要訊息,暫時無法進行該動作",
-    "1002": "帳號/密碼有誤",
+    "1002": "密碼錯誤",
+    "1011": "手機號碼不存在",
+    "1012": "郵箱號碼不存在",
     "10021": "原始密碼不正確",
     "1003": "密碼不符合規則",
     "1004": "兩次輸入的密碼不一致",

+ 5 - 3
src/mixins/tradeAssets.js

@@ -18,11 +18,13 @@ export default {
   watch: {
     isLogin(val) {
       if (!val) {
-        this.updateTradeAssetSocket && this.updateTradeAssetSocket.close()
-        clearInterval(this.sendTimer)
+        this.updateTradeAssetSocket && this.updateTradeAssetSocket.close();
+        (this.sendTimer && clearInterval(this.sendTimer));
         return
       }
-      this.creatSocket1(getCookie('userToken') || Math.random())
+      if (val) {
+        this.creatSocket1(getCookie('userToken') || Math.random())
+      }
     }
   },
   created () {

+ 8 - 1
src/router/index.js

@@ -77,6 +77,7 @@ import notices from '@/view/notices'
 import noticesList from '@/view/notices/list'
 
 import empty from '@/view/empty'
+import ad from '@/view/ad'
 
 import layout from '@/layout'
 export const constantRoutes = [
@@ -176,7 +177,13 @@ export const constantRoutes = [
     path: '/:locale' + lan + '?/empty',
     component: empty,
     name: 'empty',
-    meta: { socket: true }
+    meta: {  }
+  },
+  {
+    path: '/:locale' + lan + '?/ad/:code',
+    component: ad,
+    name: 'ad',
+    meta: { }
   },
   {
     path: '/:locale' + lan + '?/exchange/:symbol/:type?/:id?',

+ 4 - 0
src/utils/request.js

@@ -105,6 +105,10 @@ service.interceptors.response.use(
         if (data.code == -2) {
           return Promise.reject(response.data)
         }
+        if (data.group == 9999) {
+          bus.$emit('abnormalPopSign')
+          return Promise.reject(response.data)
+        }
         if (data.code !== 5003) {
           Notify({
             message: data.code ? getErrMsg(data, response.config.type) : data.msg,

+ 15 - 0
src/view/ad/index.vue

@@ -0,0 +1,15 @@
+<template>
+  <div></div>
+</template>
+<script>
+import { setSession } from '@/utils/sessionStorage'
+export default {
+  created () {
+    var code = (this.$route.params.code || '')
+    if (code) {
+      setSession('recommend_code', JSON.stringify(code))
+    }
+    this.$router.replace('/')
+  }
+}
+</script>

+ 6 - 1
src/view/download/components/apk.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="components flex">
-    <div class="box flex" v-if="apk.url || apk.url2" @click="downloadApk(getUrl(apk.url || apk.url2))">
+    <div class="box flex" v-if="apk.url || apk.url2" @click="downloadApk(getUrl((apk.url || apk.url2) + '?' + getRandomInt(1, 100000)))">
       <img class="img" src="/img/download/apk.png" alt="极度证券">
       <div class="right">
         <div>Android APK</div>
@@ -29,6 +29,11 @@ export default {
     downloadApk(url) {
       location.href = url
     },
+    getRandomInt(min, max) {
+      min = Math.ceil(min);
+      max = Math.floor(max);
+      return Math.floor(Math.random() * (max - min + 1)) + min;
+    },
     getUrl(url) {
       if (window.location.hostname == 'localhost' || window.location.hostname == 'm.jdnx.com') {
         return url

+ 1 - 1
src/view/market/cfd/index.vue

@@ -11,7 +11,7 @@
         <div class="line"></div>
       </div>
     </div>
-    <marketList :swipeList="swipeList" :market="market"/>
+    <marketList :key="market" :swipeList="swipeList" :market="market"/>
   </div>
 </template>
 <script>

+ 3 - 0
src/view/market/stock/components/list.vue

@@ -124,6 +124,9 @@ export default {
       }
       getProductList(data)
         .then((res) => {
+          if (this.$route.params.market && this.$route.params.market != this.market) {
+            return
+          }
           var list1 = res.list || [];
           var list = list1;
           if (!this.appParams.uncrypto) {

+ 1 - 1
src/view/market/stock/index.vue

@@ -23,7 +23,7 @@
         <div class="line"></div>
       </div>
     </div>
-    <marketList :swipeList="swipeList" :market="market"/>
+    <marketList :key="market":swipeList="swipeList" :market="market"/>
   </div>
 </template>
 <script>

+ 1 - 1
src/view/optionView/lists/index.vue

@@ -49,7 +49,7 @@
       </div>
     </div>
     <hotList v-if="market == '1'" :market="market" :mounth="mounth" />
-    <list v-else :market="market" :mounth="mounth" />
+    <list v-else :market="market" :mounth="mounth" :key="market" />
   </div>
 </template>
 <script>

+ 18 - 2
src/view/productDetail/index.vue

@@ -167,7 +167,7 @@ export default {
       countDownPop: false,
       serviceTipsPop: false,
       tabList: [],
-      symbolOpen: '',
+      symbolOpen: {},
       allTablist: [
         // {
         //   title: '财务',
@@ -233,6 +233,7 @@ export default {
   },
   beforeDestroy() {
     (this.tradeStateTimer && clearTimeout(this.tradeStateTimer))
+    bus.$off('updateChart', this.updateSymbolOpen)
   },
   created () {
     this.symbol = this.$route.params.symbol
@@ -244,6 +245,7 @@ export default {
       getData: [this.symbol],
       subscribeList: [this.symbol],
     });
+    bus.$on('updateChart', this.updateSymbolOpen)
     if (this.isLogin) {
       bus.$emit('updateAssets', ['getAccountList'])
       var serviceTipsPop = sessionStorage.getItem('serviceTipsPop')
@@ -327,6 +329,10 @@ export default {
     },
     toExchange(url) {
       if (this.isLogin) {
+        if (this.userInfo.group == 9999) {
+          bus.$emit('abnormalPopSign')
+          return
+        }
         var trade_protocol = this.userInfo.trade_protocol ? JSON.parse(this.userInfo.trade_protocol) : [];
         var sign = 0
         trade_protocol.forEach(item => {
@@ -473,8 +479,18 @@ export default {
       }
       getPriceList(data).then(res => {
         var list = res || [];
-        this.symbolOpen = (list[list.length - 1] || {}).open || ''
+        this.symbolOpen = (list[list.length - 1] || {})
       }).catch(() => {})
+    },
+    updateSymbolOpen(data) {
+      if ((this.symbol == data.symbol)) {
+        if (this.symbolOpen.high < data.ask) {
+          this.$set(this.symbolOpen, 'high', data.ask)
+        }
+        if (this.symbolOpen.low > data.ask) {
+          this.$set(this.symbolOpen, 'low', data.ask)
+        }
+      }
     }
   }
 }

+ 5 - 3
src/view/productDetail/quotation/index.vue

@@ -34,7 +34,7 @@
             <div class="label">
               {{ $t('product.l60') }}
             </div>
-            <div v-if="symbolOpen">{{ $handleDigits(symbolOpen, symbolInfo.digits) }}</div>
+            <div v-if="symbolOpen.open">{{ $handleDigits(symbolOpen.open, symbolInfo.digits) }}</div>
             <div v-else>--</div>
           </div>
         </van-col>
@@ -53,7 +53,8 @@
             <div class="label">
               {{ $t('product.l62') }}
             </div>
-            <div class="val up">{{ $handleDigits(symbolInfo.high, symbolInfo.digits) }}</div>
+            <div class="val up" v-if="symbolOpen.high">{{ $handleDigits(symbolOpen.high, symbolInfo.digits) }}</div>
+            <div v-else>--</div>
           </div>
         </van-col>
       </van-row>
@@ -64,7 +65,8 @@
             <div class="label">
               {{ $t('product.l63') }}
             </div>
-            <div class="val down">{{ $handleDigits(symbolInfo.low, symbolInfo.digits) }}</div>
+            <div class="val down" v-if="symbolOpen.low">{{ $handleDigits(symbolOpen.low, symbolInfo.digits) }}</div>
+            <div v-else>--</div>
           </div>
         </van-col>
         <van-col span="8">