li.shaoyi 9 mesi fa
parent
commit
1bca555b19

+ 1 - 0
src/packages/mobile/components/modules/hqchart/candlestick/index.vue

@@ -103,6 +103,7 @@ const chartOption = {
     NetworkFilter: (data: NetworkFilterData, callback: NetworkFilterCallback) => networkFilter(data, callback),
     // https://blog.csdn.net/jones2000/article/details/102928907
     Windows: [createWindowsIndex('MA')],
+    SplashTitle: 'Loading',
     IsCorssOnlyDrawKLine: true,  // 十字光标只能在K线上
     CorssCursorTouchEnd: true, // 手指离开屏幕 隐藏十字光标
     // https://blog.csdn.net/jones2000/article/details/97682466

+ 1 - 0
src/packages/mobile/components/modules/hqchart/index.less

@@ -1,5 +1,6 @@
 .app-quote-chart {
     background-color: #fff;
+    overflow-x: hidden;
     margin-top: 10px;
 
     &__header {

+ 6 - 6
src/packages/mobile/components/modules/hqchart/index.vue

@@ -1,7 +1,7 @@
 <template>
     <div class="app-quote-chart">
         <div class="app-quote-chart__header">
-            <Tabs v-model:active="tabIndex" :before-change="onTabChange">
+            <Tabs v-model:active="tabIndex" :before-change="onTabChange" :ellipsis="false">
                 <Tab :title="$t('chart.time')" />
                 <Tab>
                     <template #title>
@@ -80,19 +80,19 @@ const onPopoverSelect = (action: PopoverAction) => {
     selectedText.value = action.text
 
     switch (action.text) {
-        case '1分钟': {
+        case t('chart.oneminutes'): {
             cycleType.value = ChartCycleType.Minutes
             break
         }
-        case '5分钟': {
+        case t('chart.fiveminutes'): {
             cycleType.value = ChartCycleType.Minutes5
             break
         }
-        case '30分钟': {
+        case t('chart.thirtyminutes'): {
             cycleType.value = ChartCycleType.Minutes30
             break
         }
-        case '60分钟': {
+        case t('chart.onehour'): {
             cycleType.value = ChartCycleType.Minutes60
             break
         }
@@ -100,7 +100,7 @@ const onPopoverSelect = (action: PopoverAction) => {
             cycleType.value = ChartCycleType.Hours2
             break
         }
-        case '4小时': {
+        case t('chart.fourhour'): {
             cycleType.value = ChartCycleType.Hours4
             break
         }

+ 29 - 48
src/packages/mobile/views/bank/wallet/components/inoutapply/Index.vue

@@ -7,53 +7,30 @@
             </template>
             <app-pull-refresh ref="pullRefreshRef" v-model:loading="loading" v-model:error="error"
                 v-model:pageIndex="pageIndex" :page-count="pageCount" @refresh="onRefresh">
-                <div class="g-order-list">
-                    <div class="g-order-list__box" v-for="(item, index) in dataList" :key="index">
-                        <div class="g-order-list__titlebar">
-                            <div class="left">
-                                <h4>{{ formatDecimal(item.amount) }}</h4>
-                            </div>
-                            <div class="right">
-                                <span>{{ getInOutApplyStatusName(item.applystatus) }}</span>
-                            </div>
-                        </div>
-                        <div class="g-order-list__content">
-                            <ul>
-                                <!-- <li>
-                                    <span>姓名</span>
-                                    <span>{{ item.accountname }}</span>
-                                </li>
-                                <li>
-                                    <span>资金账号</span>
-                                    <span>{{ item.accountcode }}</span>
-                                </li>
-                                <li>
-                                    <span>开户银行</span>
-                                    <span>{{ handleNoneValue(item.bankname) }}</span>
-                                </li>
-                                <li>
-                                    <span>卡号</span>
-                                    <span>{{ handleNoneValue(item.bankaccountno) }}</span>
-                                </li> -->
-                                <li>
-                                    <span>{{ $t('banksign.wallet.inoutapply.charge') }}</span>
-                                    <span>{{ formatDecimal(item.charge) }}</span>
-                                </li>
-                                <li>
-                                    <span>{{ $t('banksign.wallet.inoutapply.executetype') }}</span>
-                                    <span>{{ getInOutExecuteTypeName(item.executetype) }}</span>
-                                </li>
-                                <li>
-                                    <span>{{ $t('banksign.wallet.inoutapply.extoperateid') }}</span>
-                                    <span>{{ handleNoneValue(item.extoperateid) }}</span>
-                                </li>
-                                <li>
-                                    <span>{{ $t('banksign.wallet.inoutapply.updatetime') }}</span>
-                                    <span>{{ formatDate(item.updatetime, 'MM/DD HH:mm:ss') }}</span>
-                                </li>
-                            </ul>
-                        </div>
-                    </div>
+                <div class="bankstatement-list" v-for="(item, index) in dataList" :key="index">
+                    <dl>
+                        <dt>
+                            <span>
+                                {{ getInOutExecuteTypeName(item.executetype) }}
+                                {{ getInOutApplyStatusName(item.applystatus) }}
+                            </span>
+                            <span>
+                                <b>{{ formatDecimal(item.amount) }}</b>
+                            </span>
+                        </dt>
+                        <dd>
+                            <span>{{ $t('banksign.wallet.inoutapply.charge') }}</span>
+                            <span>{{ formatDecimal(item.charge) }}</span>
+                        </dd>
+                        <dd>
+                            <span>{{ $t('banksign.wallet.inoutapply.extoperateid') }}</span>
+                            <span>{{ handleNoneValue(item.extoperateid) }}</span>
+                        </dd>
+                        <dd>
+                            <span>{{ $t('banksign.wallet.inoutapply.updatetime') }}</span>
+                            <span>{{ formatDate(item.updatetime) }}</span>
+                        </dd>
+                    </dl>
                 </div>
             </app-pull-refresh>
         </app-view>
@@ -90,4 +67,8 @@ const closed = (isRefresh = false) => {
 defineExpose({
     closed,
 })
-</script>
+</script>
+
+<style lang="less">
+@import './index.less';
+</style>

+ 34 - 0
src/packages/mobile/views/bank/wallet/components/inoutapply/index.less

@@ -0,0 +1,34 @@
+.bankstatement-list {
+    padding: 10px;
+    padding-bottom: 0;
+
+    dl {
+        line-height: 1.8;
+        color: #999;
+        background-color: #fff;
+        border-radius: 8px;
+        padding: 10px;
+
+        dt,
+        dd {
+            display: flex;
+            justify-content: space-between;
+            align-items: center;
+        }
+
+        dt {
+            color: #333;
+        }
+
+        dd {
+            font-size: 12px;
+
+            .van-button {
+                width: 80px;
+                border-width: 1px;
+                margin-top: 10px;
+                margin-left: auto;
+            }
+        }
+    }
+}

+ 7 - 3
src/packages/mobile/views/user/register/Index.vue

@@ -67,7 +67,9 @@
     </Form>
     <template #footer>
       <div class="g-form__footer inset">
-        <Button type="danger" @click="formRef?.submit" :round="insetStyle" block>{{ $t('user.register.freeregister') }}</Button>
+        <Button type="danger" @click="formRef?.submit" :round="insetStyle" block>
+          {{ $t('user.register.freeregister') }}
+        </Button>
       </div>
       <app-reward :show="showReward" :value="redEnvelope" :title="$t('user.register.registersuccess')"
         @click="router.back()" />
@@ -83,7 +85,7 @@ import { fullloading, dialog } from '@/utils/vant'
 import { validateRules } from '@/constants/regex'
 import { useNavigation } from '@mobile/router/navigation'
 import { userRegister, sendRegisterVerifyCode, queryMyRegisterMoney } from '@/services/api/common'
-import { i18n, useGlobalStore, useUserStore } from '@/stores'
+import { i18n, useGlobalStore, useUserStore, useErrorInfoStore } from '@/stores'
 import { getCountryCodeList } from '@/constants/unit'
 import cryptojs from 'crypto-js'
 import plus from '@/utils/h5plus'
@@ -121,6 +123,7 @@ const onConfirm = ({ selectedValues: [value] }: PickerConfirmEventParams) => {
 
 const { router, routerTo } = useNavigation()
 const globalStore = useGlobalStore()
+const errorInfoStore = useErrorInfoStore()
 const registrationCodeRule = globalStore.getSystemInfo('registrationCodeRule')
 const formRef = ref<FormInstance>()
 const checked = ref(false) // 是否同意注册条款
@@ -300,7 +303,8 @@ const formSubmit = () => {
             showSuccessToast('您的注册申请已提交!')
           }
         } else {
-          showFailToast(res.message)
+          const msg = errorInfoStore.getErrorInfoByCode(res.message)
+          showFailToast(msg ?? res.message)
         }
       }).catch((err) => {
         showFailToast(err)

+ 20 - 9
src/packages/tss/assets/themes/global/global.less

@@ -418,17 +418,28 @@
 
         .bottom {
             display: flex;
-            justify-content: space-between;
-            margin-top: 30px;
+            flex-direction: column;
+            margin-top: 12px;
+            padding-top: 12px;
+            border-top: 1px solid #f2f2f2;
 
-            label {
-                font-size: 12px;
-                margin-right: 5px;
-            }
+            div {
+                display: flex;
+                justify-content: space-between;
+                align-items: center;
+                line-height: 1.3;
 
-            span {
-                font-size: 22px;
-                color: #C19239;
+                label {
+                    font-size: 12px;
+                    font-weight: bold;
+                }
+
+                span {
+                    font-size: 16px;
+                    font-weight: bold;
+                    color: #C19239;
+                    margin-left: auto;
+                }
             }
         }
     }

+ 2 - 8
src/packages/tss/views/bank/wallet/Index.vue

@@ -9,7 +9,7 @@
                 </template>
             </app-navbar>
         </template>
-        <Tabs class="van-tabs--list" v-model:active="active">
+        <Tabs class="van-tabs--list" v-model:active="active" :ellipsis="false">
             <Tab :title="$t('banksign.wallet.cashin')">
                 <app-deposit />
             </Tab>
@@ -39,10 +39,4 @@ const { componentRef, componentId, openComponent, closeComponent } = useComponen
 const { getQueryStringToNumber } = useNavigation()
 
 const active = shallowRef(getQueryStringToNumber('tab'))
-</script>
-
-<style lang="less" scoped>
-.van-tabs--list {
-    --van-tabs-bottom-bar-width: 50%;
-}
-</style>
+</script>

+ 35 - 36
src/packages/tss/views/bank/wallet/components/inoutapply/Index.vue

@@ -1,46 +1,41 @@
 <!-- 出入金- 申请流水 -->
 <template>
     <app-modal direction="right-top" height="100%" width="100%" v-model:show="showModal" :refresh="refresh">
-        <app-view class="g-form">
+        <app-view>
             <template #header>
                 <app-navbar :title="$t('banksign.wallet.inoutapply.title')" @back="closed" />
             </template>
             <app-pull-refresh ref="pullRefreshRef" v-model:loading="loading" v-model:error="error"
                 v-model:pageIndex="pageIndex" :page-count="pageCount" @refresh="onRefresh">
-                <div class="g-order-list">
-                    <div class="g-order-list__box" v-for="(item, index) in dataList" :key="index">
-                        <div class="g-order-list__titlebar">
-                            <div class="left">
-                                <h4>{{ formatDecimal(item.amount) }}</h4>
-                            </div>
-                            <div class="right">
-                                <span>{{ getInOutApplyStatusName(item.applystatus) }}</span>
-                            </div>
-                        </div>
-                        <div class="g-order-list__content">
-                            <ul>
-                                <li>
-                                    <span>{{ $t('banksign.wallet.inoutapply.charge') }}</span>
-                                    <span>{{ formatDecimal(item.charge) }}</span>
-                                </li>
-                                <li>
-                                    <span>{{ $t('banksign.wallet.inoutapply.executetype') }}</span>
-                                    <span>{{ getInOutExecuteTypeName(item.executetype) }}</span>
-                                </li>
-                                <li>
-                                    <span>{{ $t('banksign.wallet.inoutapply.extoperateid') }}</span>
-                                    <span>{{ handleNoneValue(item.extoperateid) }}</span>
-                                </li>
-                                <li>
-                                    <span>{{ $t('banksign.wallet.inoutapply.updatetime') }}</span>
-                                    <span>{{ formatDate(item.updatetime, 'MM/DD HH:mm:ss') }}</span>
-                                </li>
-                            </ul>
-                        </div>
-                        <div class="g-order-list__btnbar" v-if="item.applystatus === 10">
-                            <Button size="small" @click="goToAmtInByPaidUrl(item)" round>{{ $t('banksign.wallet.inoutapply.pay') }}</Button>
-                        </div>
-                    </div>
+                <div class="bankstatement-list" v-for="(item, index) in dataList" :key="index">
+                    <dl>
+                        <dt>
+                            <span>
+                                {{ getInOutExecuteTypeName(item.executetype) }}
+                                {{ getInOutApplyStatusName(item.applystatus) }}
+                            </span>
+                            <span>
+                                <b>{{ formatDecimal(item.amount) }}</b>
+                            </span>
+                        </dt>
+                        <dd>
+                            <span>{{ $t('banksign.wallet.inoutapply.charge') }}</span>
+                            <span>{{ formatDecimal(item.charge) }}</span>
+                        </dd>
+                        <dd>
+                            <span>{{ $t('banksign.wallet.inoutapply.extoperateid') }}</span>
+                            <span>{{ handleNoneValue(item.extoperateid) }}</span>
+                        </dd>
+                        <dd>
+                            <span>{{ $t('banksign.wallet.inoutapply.updatetime') }}</span>
+                            <span>{{ formatDate(item.updatetime) }}</span>
+                        </dd>
+                        <dd v-if="item.applystatus === 10">
+                            <Button size="small" @click="goToAmtInByPaidUrl(item)" round>
+                                {{ $t('banksign.wallet.inoutapply.pay') }}
+                            </Button>
+                        </dd>
+                    </dl>
                 </div>
             </app-pull-refresh>
         </app-view>
@@ -105,4 +100,8 @@ const openWebview = (url: string) => {
 defineExpose({
     closed,
 })
-</script>
+</script>
+
+<style lang="less">
+@import './index.less';
+</style>

+ 34 - 0
src/packages/tss/views/bank/wallet/components/inoutapply/index.less

@@ -0,0 +1,34 @@
+.bankstatement-list {
+    padding: 10px;
+    padding-bottom: 0;
+
+    dl {
+        line-height: 1.8;
+        color: #999;
+        background-color: #fff;
+        border-radius: 8px;
+        padding: 10px;
+
+        dt,
+        dd {
+            display: flex;
+            justify-content: space-between;
+            align-items: center;
+        }
+
+        dt {
+            color: #333;
+        }
+
+        dd {
+            font-size: 12px;
+
+            .van-button {
+                width: 80px;
+                border-width: 1px;
+                margin-top: 10px;
+                margin-left: auto;
+            }
+        }
+    }
+}

+ 2 - 8
src/packages/tss/views/order/delivery/Index.vue

@@ -3,7 +3,7 @@
         <template #header>
             <app-navbar :title="$t('delivery.title')" />
         </template>
-        <Tabs class="van-tabs--list" v-model:active="active" :swipe-threshold="4">
+        <Tabs class="van-tabs--list" v-model:active="active" :swipe-threshold="4" :ellipsis="false">
             <template v-for="(item, index) in components" :key="index">
                 <Tab :title="item.title" :name="index">
                     <component :is="item.component" />
@@ -44,10 +44,4 @@ const components = [
 ]
 
 const active = shallowRef(0)
-</script>
-
-<style lang="less" scoped>
-.van-tabs--list {
-    --van-tabs-bottom-bar-width: calc(~'100% / 4');
-}
-</style>
+</script>

+ 4 - 2
src/packages/tss/views/order/delivery/components/online/Index.vue

@@ -56,8 +56,10 @@
                         </div>
                     </div>
                 </div>
-                <div class="g-product-list__btnbar">
-                    <Button size="small" @click="onCancel(item)" v-if="item.orderstatus === 1" round>{{ $t('operation.cancel2') }}</Button>
+                <div class="g-product-list__btnbar" v-if="item.orderstatus === 1">
+                    <Button size="small" @click="onCancel(item)" round>
+                        {{ $t('operation.cancel2') }}
+                    </Button>
                 </div>
             </div>
         </div>

+ 2 - 2
src/packages/tss/views/order/delivery/components/spot/Index.vue

@@ -56,8 +56,8 @@
                         </div>
                     </div>
                 </div>
-                <div class="g-product-list__btnbar">
-                    <Button size="small" @click="onCancel(item)" v-if="item.orderstatus === 1" round>{{ $t('operation.cancel2') }}</Button>
+                <div class="g-product-list__btnbar" v-if="item.orderstatus === 1">
+                    <Button size="small" @click="onCancel(item)" round>{{ $t('operation.cancel2') }}</Button>
                 </div>
             </div>
         </div>

+ 2 - 8
src/packages/tss/views/order/list/Index.vue

@@ -3,7 +3,7 @@
         <template #header>
             <app-navbar :title="$t('order.title1')" />
         </template>
-        <Tabs class="van-tabs--list" v-model:active="active" :swipe-threshold="4">
+        <Tabs class="van-tabs--list" v-model:active="active" :ellipsis="false">
             <template v-for="(item, index) in components" :key="index">
                 <Tab :title="item.title" :name="index">
                     <component :is="item.component" />
@@ -34,10 +34,4 @@ const components = [
 ]
 
 const active = shallowRef(0)
-</script>
-
-<style lang="less" scoped>
-.van-tabs--list {
-    --van-tabs-bottom-bar-width: 50%;
-}
-</style>
+</script>

+ 5 - 4
src/packages/tss/views/order/list/fullpayment/Index.vue

@@ -48,9 +48,10 @@
                         </div>
                     </div>
                 </div>
-                <div class="g-product-list__btnbar">
-                    <Button size="small" @click="onCancel(item)" v-if="item.orderstatus === 1" round>{{
-                        $t('operation.cancel2') }}</Button>
+                <div class="g-product-list__btnbar" v-if="item.orderstatus === 1">
+                    <Button size="small" @click="onCancel(item)" round>
+                        {{ $t('operation.cancel2') }}
+                    </Button>
                 </div>
 
             </div>
@@ -123,7 +124,7 @@ const goodsname = (item: Model.MineTradeGoodsDeliveryOfflinesRsp) => {
             return item.goodsname
         case 'en-US':
             return item.goodsnameen
-         case 'zh-TW':
+        case 'zh-TW':
             return item.goodsnametw
         default:
             return item.goodsnameth

+ 7 - 7
src/packages/tss/views/order/position/Index.vue

@@ -49,7 +49,7 @@
                                         <span>{{ $t('position.goods.preamounts') }}:</span>
                                         <span>
                                             {{ formatDecimal(item.tHDetailEx.payedDeposit
-                                            +item.tHDetailEx.restockDeposit) }}
+                                                + item.tHDetailEx.restockDeposit) }}
                                         </span>
                                     </li>
                                     <li>
@@ -61,16 +61,16 @@
                                 </ul>
                             </div>
                         </div>
-                        <div class="bottom">
-                            <div class="bottom-left">
+                        <ul class="bottom">
+                            <li>
                                 <label>{{ $t('position.goods.holderprice') }}</label>
                                 <span>{{ formatDecimal(item.tHDetailEx.holderPrice, item.decimalPlace) }}</span>
-                            </div>
-                            <div class="bottom-right">
+                            </li>
+                            <li>
                                 <label>{{ $t('position.goods.holderamount') }}</label>
                                 <span>{{ formatDecimal(item.tHDetailEx.holderAmount) }}</span>
-                            </div>
-                        </div>
+                            </li>
+                        </ul>
                     </div>
                     <div class="order-list__btnbar" v-if="item.tHDetailEx.holderQty">
                         <Button type="primary" :disabled="!enableqty(item) || ![1, 3].includes(goodstradetype(item))"

+ 21 - 10
src/packages/tss/views/order/position/index.less

@@ -64,17 +64,28 @@
 
         .bottom {
             display: flex;
-            justify-content: space-between;
+            flex-direction: column;
             margin-top: 12px;
-
-            label {
-                font-size: 12px;
-                margin-right: 5px;
-            }
-
-            span {
-                font-size: 22px;
-                color: #C19239;
+            padding-top: 12px;
+            border-top: 1px solid #f2f2f2;
+
+            li {
+                display: flex;
+                justify-content: space-between;
+                align-items: center;
+                line-height: 1.3;
+
+                label {
+                    font-size: 12px;
+                    font-weight: bold;
+                }
+
+                span {
+                    font-size: 16px;
+                    font-weight: bold;
+                    color: #C19239;
+                    margin-left: auto;
+                }
             }
         }
     }

+ 2 - 2
src/stores/modules/errorInfo.ts

@@ -27,8 +27,8 @@ export const useErrorInfoStore = defineStore(() => {
     }
 
     // 根据 code 获取错误信息
-    const getErrorInfoByCode = (code: number) => {
-        const error = errorInfos.value.find((e) => e.errorid === code)
+    const getErrorInfoByCode = (code: number | string) => {
+        const error = errorInfos.value.find((e) => e.errorid.toString() === code.toString())
         switch (i18n.global.locale) {
             case Language.Simplified:
                 return error?.description

+ 1 - 2
src/stores/modules/global.ts

@@ -2,7 +2,6 @@ import { reactive, toRefs } from 'vue'
 import { AppTheme } from '@/constants/theme'
 import { defineStore } from '../store'
 import { localData } from '../storage'
-import axios from 'axios'
 import plus from '@/utils/h5plus'
 
 export interface SystemInfo {
@@ -59,7 +58,7 @@ export const useGlobalStore = defineStore(() => {
 
     // 获取系统配置项
     const getSystemConfig = async () => {
-        const data = await plus.getLocalFileContent('./config/appconfig.json')
+        const data = await plus.getLocalFileContent<SystemInfo>('./config/appconfig.json')
         state.systemInfo = {
             ...state.systemInfo,
             ...data

+ 2 - 2
src/utils/h5plus/index.ts

@@ -401,8 +401,8 @@ export default new (class {
      * @param filePath 
      * @returns 
      */
-    getLocalFileContent(filePath: string) {
-        return new Promise<any>((resolve, reject) => {
+    getLocalFileContent<T>(filePath: string) {
+        return new Promise<T>((resolve, reject) => {
             if (this.hasPlus()) {
                 this.onPlusReady((plus) => {
                     plus.io.resolveLocalFileSystemURL('_www/' + filePath, (entry: any) => {