Handy_Cao 1 anno fa
parent
commit
526bd16588

+ 1 - 1
public/config/appconfig.json

@@ -4,7 +4,7 @@
   "appTitle": "多元世纪交易中心",
   "appTitle": "多元世纪交易中心",
   "version": "1.0.8",
   "version": "1.0.8",
   "versionCode": "10008",
   "versionCode": "10008",
-  "apiUrl": "http://192.168.31.171:8080/cfg?key=test_171",
+  "apiUrl": "http://192.168.31.208:8080/cfg?key=test_208",
   "tradeChannel": "ws",
   "tradeChannel": "ws",
   "modules": [
   "modules": [
     "register",
     "register",

+ 3 - 3
src/packages/mobile/views/account/authresult/Index.vue

@@ -57,9 +57,9 @@ useRequest(getWskhOpenAccountConfigs, {
     },
     },
     onSuccess: (res) => {
     onSuccess: (res) => {
         /// 是否显示半身照和 证件背面照
         /// 是否显示半身照和 证件背面照
-        showHalfBodyPhoto.value = res.data.filter(e => { e.configid === 54})[0].configvalue ?? '0'
-        showCardBackPhoto.value = res.data.filter(e => { e.configid === 53})[0].configvalue ?? '0'
-        halfBodyPhotoTitle.value = res.data.filter(e => { e.configid === 78})[0].configvalue ?? t('user.authentication.halfbodyphoto')
+        showCardBackPhoto.value = res.data.filter(e => e.configid === 53)[0].configvalue ?? '0'
+        showHalfBodyPhoto.value = res.data.filter(e => e.configid === 54)[0].configvalue ?? '0'
+        halfBodyPhotoTitle.value = res.data.filter(e => e.configid === 78)[0].configvalue ?? t('user.authentication.halfbodyphoto')
     }
     }
 })
 })
 
 

+ 3 - 3
src/packages/mobile/views/account/certification/Index.vue

@@ -73,9 +73,9 @@ useRequest(getWskhOpenAccountConfigs, {
     },
     },
     onSuccess: (res) => {
     onSuccess: (res) => {
         /// 是否显示半身照和 证件背面照
         /// 是否显示半身照和 证件背面照
-        showHalfBodyPhoto.value = res.data.filter(e => { e.configid === 54})[0].configvalue ?? '0'
-        showCardBackPhoto.value = res.data.filter(e => { e.configid === 53})[0].configvalue ?? '0'
-        halfBodyPhotoTitle.value = res.data.filter(e => { e.configid ===  78})[0].configvalue ?? t('user.authentication.halfbodyphoto')
+        showCardBackPhoto.value = res.data.filter(e => e.configid === 53)[0].configvalue ?? '0'
+        showHalfBodyPhoto.value = res.data.filter(e => e.configid === 54)[0].configvalue ?? '0'
+        halfBodyPhotoTitle.value = res.data.filter(e => e.configid === 78)[0].configvalue ?? t('user.authentication.halfbodyphoto')
     }
     }
 })
 })
 
 

+ 7 - 0
src/packages/sbyj/views/market/list/index.less

@@ -15,6 +15,13 @@
         padding: 12px;
         padding: 12px;
     }
     }
 
 
+    .servertime {
+        color: #333;
+        font-size: 12px;
+        padding: 12px;
+        text-align: right;
+    }
+
     &-table {
     &-table {
         width: 100%;
         width: 100%;
         background-color: #fff;
         background-color: #fff;

+ 59 - 3
src/packages/sbyj/views/market/list/index.vue

@@ -5,6 +5,14 @@
                 :style="'--header-bg:url(\'../img/market-title-bg.jpg\')'" />
                 :style="'--header-bg:url(\'../img/market-title-bg.jpg\')'" />
         </template>
         </template>
         <table class="market-table" cellspacing="0" cellpadding="0">
         <table class="market-table" cellspacing="0" cellpadding="0">
+            <thead v-if="market">
+                <tr>
+                    <th class="servertime" colspan="4">
+                        {{ serverTime?.format('YYYY-MM-DD HH:mm:ss') }}
+                        {{ [2, 6].includes(market.runstatus) ? getRunStatusName(market.runstatus) : '未开盘' }}
+                    </th>
+                </tr>
+            </thead>
             <thead>
             <thead>
                 <tr>
                 <tr>
                     <th>商品</th>
                     <th>商品</th>
@@ -53,18 +61,27 @@
 </template>
 </template>
 
 
 <script lang="ts" setup>
 <script lang="ts" setup>
-import { shallowRef, computed, onActivated, onDeactivated } from 'vue'
+import { shallowRef, computed, onActivated, onDeactivated, ref, onMounted, onUnmounted } from 'vue'
+import moment, { Moment } from 'moment'
+import { getServerTime } from '@/services/api/common'
 import { handleNumberValue, formatDecimal } from '@/filters'
 import { handleNumberValue, formatDecimal } from '@/filters'
 import { useNavigation } from '@mobile/router/navigation'
 import { useNavigation } from '@mobile/router/navigation'
-import quoteSocket from '@/services/websocket/quote'
 import { queryTouristGoods, queryTouristQuoteDay } from '@/services/api/goods'
 import { queryTouristGoods, queryTouristQuoteDay } from '@/services/api/goods'
 import { useFuturesStore, useLoginStore } from '@/stores'
 import { useFuturesStore, useLoginStore } from '@/stores'
+import { timerTask } from '@/utils/timer'
+import { useRequest } from '@/hooks/request'
+import { getRunStatusName } from '@/constants/market'
+import { queryMarketRun } from '@/services/api/market'
+import quoteSocket from '@/services/websocket/quote'
 
 
 const { router } = useNavigation()
 const { router } = useNavigation()
 const futuresStore = useFuturesStore()
 const futuresStore = useFuturesStore()
 const loginStore = useLoginStore()
 const loginStore = useLoginStore()
 const subscribe = quoteSocket.createSubscribe()
 const subscribe = quoteSocket.createSubscribe()
-const subscribeData = shallowRef<string[]>([]) // 订阅的商品代码
+// 订阅的商品代码
+const subscribeData = shallowRef<string[]>([]) 
+// 系统时间
+const serverTime = ref<Moment>()
 
 
 // 构建游客交易商品
 // 构建游客交易商品
 const touristTradeGoodsList = computed(() => {
 const touristTradeGoodsList = computed(() => {
@@ -87,6 +104,17 @@ const rowClick = (row: Model.GoodsQuote) => {
     })
     })
 }
 }
 
 
+// 校验服务器时间
+const checkServerTime = () => {
+  getServerTime().then((res) => {
+    serverTime.value = moment.parseZone(res.data)
+    // 每1分钟同步一次服务器时间
+    timerTask.setTimeout(() => {
+      checkServerTime()
+    }, 60 * 1000, 'getServerTime')
+  })
+}
+
 if (loginStore.token) {
 if (loginStore.token) {
     futuresStore.onDataCompleted(() => {
     futuresStore.onDataCompleted(() => {
         subscribeData.value = futuresStore.goodsList.map((e) => e.goodscode)
         subscribeData.value = futuresStore.goodsList.map((e) => e.goodscode)
@@ -113,8 +141,36 @@ if (loginStore.token) {
     })
     })
 }
 }
 
 
+const { data: market, run: marketRun } = useRequest(queryMarketRun, {
+    params: {
+        marketID: touristTradeGoodsList.value[0].marketid
+    },
+    onSuccess: (res) => {
+        market.value = res.data[0]
+        // 每1分钟轮询刷新
+        timerTask.setTimeout(() => marketRun(), 60 * 1000, 'getMarketRun')
+    }
+})
+
+onMounted(() => {
+  serverTime.value = moment(new Date())
+  // 
+  checkServerTime()
+  /// 获取市场运行情况
+  marketRun()
+  timerTask.setInterval(() => {
+    serverTime.value = moment(serverTime.value).add(1000, 'ms')
+  }, 1000, 'refreshTime')
+})
+
 onActivated(() => subscribeData.value.length && subscribe.start(...subscribeData.value))
 onActivated(() => subscribeData.value.length && subscribe.start(...subscribeData.value))
 onDeactivated(() => subscribe.stop())
 onDeactivated(() => subscribe.stop())
+
+onUnmounted(() => {
+    timerTask.clearInterval('refreshTime')
+    timerTask.clearTimeout('getServerTime')
+    timerTask.clearTimeout('getMarketRun')
+})
 </script>
 </script>
 
 
 <style lang="less">
 <style lang="less">

+ 3 - 2
src/packages/sbyj/views/order/history/index.vue

@@ -12,6 +12,7 @@
                             <h4 :class="item.buyorsell === BuyOrSell.Buy ? 'g-price-up' : 'g-price-down'">
                             <h4 :class="item.buyorsell === BuyOrSell.Buy ? 'g-price-up' : 'g-price-down'">
                                 {{ item.buyorsell === BuyOrSell.Buy ? '买料:' : '卖料:' }}
                                 {{ item.buyorsell === BuyOrSell.Buy ? '买料:' : '卖料:' }}
                                 {{ item.goodscode + '/' + item.goodsname }}
                                 {{ item.goodscode + '/' + item.goodsname }}
+                                {{ formatDecimal(item.openprice, item.decimalplace) }}
                             </h4>
                             </h4>
                         </div>
                         </div>
                     </div>
                     </div>
@@ -39,10 +40,10 @@
                                 <span>订单金额</span>
                                 <span>订单金额</span>
                                 <span>{{ item.tradeamount }}</span>
                                 <span>{{ item.tradeamount }}</span>
                             </li> -->
                             </li> -->
-                            <li>
+                            <!-- <li>
                                 <span>订单价格</span>
                                 <span>订单价格</span>
                                 <span>{{ formatDecimal(item.openprice, item.decimalplace) }}</span>
                                 <span>{{ formatDecimal(item.openprice, item.decimalplace) }}</span>
-                            </li>
+                            </li> -->
                             <li>
                             <li>
                                 <span>已付定金</span>
                                 <span>已付定金</span>
                                 <span>{{ item.payeddeposit }}</span>
                                 <span>{{ item.payeddeposit }}</span>