Browse Source

优化low,异常账户

lxf 2 weeks ago
parent
commit
2dcece1778

+ 2 - 1
README.md

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

+ 2 - 2
src/App.vue

@@ -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)

+ 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>

+ 2 - 2
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 - 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,

+ 4 - 2
src/mixins/tradeAssets.js

@@ -19,10 +19,12 @@ export default {
     isLogin(val) {
       if (!val) {
         this.updateTradeAssetSocket && this.updateTradeAssetSocket.close()
-        clearInterval(this.sendTimer)
+        (this.sendTimer && clearInterval(this.sendTimer))
         return
       }
-      this.creatSocket1(getCookie('userToken') || Math.random())
+      if (val) {
+        this.creatSocket1(getCookie('userToken') || Math.random())
+      }
     }
   },
   created () {

+ 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">