소스 검색

feat:优化

ljc 3 주 전
부모
커밋
c80500fa5a

+ 2 - 0
components/cwg-label-line-value.vue

@@ -37,6 +37,7 @@ const props = defineProps({
 
 
     .label {
     .label {
         color: var(--bs-emphasis-color);
         color: var(--bs-emphasis-color);
+      white-space: nowrap;
     }
     }
     .line {
     .line {
         flex: 1;
         flex: 1;
@@ -48,6 +49,7 @@ const props = defineProps({
     .value {
     .value {
         display: flex;
         display: flex;
         align-items: flex-end;
         align-items: flex-end;
+        max-width: 50%;
         font-weight: 500;
         font-weight: 500;
         color: var(--bs-emphasis-color) !important;
         color: var(--bs-emphasis-color) !important;
     }
     }

+ 1 - 1
components/cwg-popup.vue

@@ -1,5 +1,5 @@
 <template>
 <template>
-    <uni-popup ref="popupRef" type="center" @change="handlePopupChange" class="crm-popup">
+    <uni-popup ref="popupRef" type="center" @change="handlePopupChange" class="crm-popup" @maskClick="closeDialog">
         <view class="cwg-dialog" :style="{ width: width }">
         <view class="cwg-dialog" :style="{ width: width }">
             <!-- 弹窗头部 -->
             <!-- 弹窗头部 -->
             <view class="dialog-header" v-if="title">
             <view class="dialog-header" v-if="title">

+ 8 - 1
locale/cn.json

@@ -15,7 +15,14 @@
     "item13": "更多打开方式",
     "item13": "更多打开方式",
     "item14": "当前选择账户为 ( 美分账户 Cent) ",
     "item14": "当前选择账户为 ( 美分账户 Cent) ",
     "item15": "余额单位为 Cent(1 USD = 100 Cent)。",
     "item15": "余额单位为 Cent(1 USD = 100 Cent)。",
-    "item16": "请确认您输入的转账金额单位是否正确,以避免因单位差异导致转账失败。"
+    "item16": "请确认您输入的转账金额单位是否正确,以避免因单位差异导致转账失败。",
+    "follow": {
+      "enum1": "每周",
+      "enum2": "每两周",
+      "enum3": "每月",
+      "v1": "请输入大于0的数字"
+    }
+
   },
   },
   "common": {
   "common": {
     "confirm": "确认",
     "confirm": "确认",

+ 7 - 1
locale/en.json

@@ -15,7 +15,13 @@
     "item13": "More opening methods",
     "item13": "More opening methods",
     "item14": "The current selected account is a (Cent Account).",
     "item14": "The current selected account is a (Cent Account).",
     "item15": "The balance unit is Cent (1 USD = 100 Cent).",
     "item15": "The balance unit is Cent (1 USD = 100 Cent).",
-    "item16": "Please confirm that the transfer amount you entered is in the correct unit to avoid transfer failures caused by unit discrepancies."
+    "item16": "Please confirm that the transfer amount you entered is in the correct unit to avoid transfer failures caused by unit discrepancies.",
+    "follow": {
+      "enum1": "Weekly",
+      "enum2": "Every two weeks",
+      "enum3": "Monthly",
+      "v1": "Please enter a number greater than 0."
+    }
   },
   },
   "common": {
   "common": {
     "confirm": "Confirm",
     "confirm": "Confirm",

+ 1 - 1
pages/activities/index.vue

@@ -151,7 +151,7 @@
                                     <view class="card-body px-3 py-2">
                                     <view class="card-body px-3 py-2">
                                         <h4> <text class="text-dark crm-one-font" v-t="'surplusList.item1'"></text>
                                         <h4> <text class="text-dark crm-one-font" v-t="'surplusList.item1'"></text>
                                         </h4>
                                         </h4>
-                                        <p class="crm-one-font" v-t="'surplusList.item2'"></p>
+                                        <p class="crm-one-font lh-sm" v-t="'surplusList.item2'"></p>
                                         <view class="d-flex flex-wrap gap-2">
                                         <view class="d-flex flex-wrap gap-2">
                                             <view
                                             <view
                                                 :class="['btn btn-dark waves-effect waves-light', surplusGive ? 'btn-danger' : 'disabled']"
                                                 :class="['btn btn-dark waves-effect waves-light', surplusGive ? 'btn-danger' : 'disabled']"

+ 2 - 2
pages/common/download.vue

@@ -29,7 +29,7 @@
                                     <view class="row">
                                     <view class="row">
                                         <view class="col-12">
                                         <view class="col-12">
                                             <h3 class="mb-3 fw-bold" v-t="'Downloadpage.item2'" />
                                             <h3 class="mb-3 fw-bold" v-t="'Downloadpage.item2'" />
-                                            <p class="mb-5" v-t="'Downloadpage.item3'" />
+                                            <p class="mb-5 lh-sm" v-t="'Downloadpage.item3'" />
                                         </view>
                                         </view>
                                         <view class="col-lg-4 mb-5">
                                         <view class="col-lg-4 mb-5">
                                             <view class="card card-action action-elevate action-border-primary">
                                             <view class="card card-action action-elevate action-border-primary">
@@ -246,7 +246,7 @@
                                     <view class="row">
                                     <view class="row">
                                         <view class="col-12">
                                         <view class="col-12">
                                             <h3 class="mb-3 fw-bold" v-t="'Downloadpage.item11'" />
                                             <h3 class="mb-3 fw-bold" v-t="'Downloadpage.item11'" />
-                                            <p class="mb-5" v-t="'Downloadpage.item3'" />
+                                            <p class="mb-5 lh-sm" v-t="'Downloadpage.item3'" />
                                         </view>
                                         </view>
                                         <view class="col-lg-4 mb-5">
                                         <view class="col-lg-4 mb-5">
                                             <view class="card card-action action-elevate action-border-primary">
                                             <view class="card card-action action-elevate action-border-primary">

+ 1 - 0
pages/customer/components/CheckPopup.vue

@@ -135,6 +135,7 @@ const CopyShareLink = (link) => {
       button {
       button {
         width: 100%;
         width: 100%;
         height: 44px;
         height: 44px;
+        line-height: 1;
         border-radius: 6px;
         border-radius: 6px;
         font-size: 16px;
         font-size: 16px;
       }
       }

+ 2 - 2
pages/customer/components/TerminalChangePasswordDialog.vue

@@ -1,6 +1,6 @@
 <template>
 <template>
     <cwg-popup :title="pwdTitle" :visible="props.visible" :showFooters="false"
     <cwg-popup :title="pwdTitle" :visible="props.visible" :showFooters="false"
-        @update:visible="$emit('update:visible', $event)">
+        @update:visible="$emit('update:visible', $event)" >
         <view class="popup-content">
         <view class="popup-content">
             <text class="account-number">{{ accountLabel }} {{ account.login }}</text>
             <text class="account-number">{{ accountLabel }} {{ account.login }}</text>
 
 
@@ -188,7 +188,7 @@ const resetPwd = async () => {
             emit('update:visible', false);
             emit('update:visible', false);
         }
         }
     } catch (error) {
     } catch (error) {
-        showToast(error.msg);
+      error.msg&&showToast(error.msg);
         emit('update:visible', false);
         emit('update:visible', false);
     } finally {
     } finally {
         flag.value = false;
         flag.value = false;

+ 1 - 0
pages/customer/components/TerminalDialog.vue

@@ -266,6 +266,7 @@ onMounted(() => {
     font-size: px2rpx(14);
     font-size: px2rpx(14);
     font-weight: 600;
     font-weight: 600;
     line-height: 1.4;
     line-height: 1.4;
+    text-align: center;
     color: var(--bs-emphasis-color);
     color: var(--bs-emphasis-color);
 }
 }
 
 

+ 3 - 5
pages/customer/create-account.vue

@@ -10,8 +10,6 @@
             </view>
             </view>
             <view class="row">
             <view class="row">
                 <view class="col-lg-8">
                 <view class="col-lg-8">
-
-
                     <view class="card">
                     <view class="card">
                         <view class="border-0 card-header">
                         <view class="border-0 card-header">
                             <uni-forms ref="formRef" :model="formData" :rules="rules" label-width="200"
                             <uni-forms ref="formRef" :model="formData" :rules="rules" label-width="200"
@@ -44,7 +42,7 @@
                                         <h5 class="mb-3" v-t="'Custom.NewAccount.Lever'"></h5>
                                         <h5 class="mb-3" v-t="'Custom.NewAccount.Lever'"></h5>
                                         <uni-forms-item name="leverage">
                                         <uni-forms-item name="leverage">
                                             <cwg-combox :clearable="false" v-model:value="formData.leverage"
                                             <cwg-combox :clearable="false" v-model:value="formData.leverage"
-                                                :options="leverageColumns" :placeholder="t('placeholder.choose')" />
+                                                :options="leverageColumns" :placeholder="t('placeholder.choose')" :disabled="formData.platform == 'MT4'"/>
                                         </uni-forms-item>
                                         </uni-forms-item>
                                     </view>
                                     </view>
                                     <view class="col-lg-6">
                                     <view class="col-lg-6">
@@ -414,12 +412,12 @@ const showAccountLimitDialog = (platform) => {
 const getMustData = async (type, isDome) => {
 const getMustData = async (type, isDome) => {
     console.log(type, isDome, locale)
     console.log(type, isDome, locale)
     const api = isDome ? customApi.AccountApplyDataDome : customApi.AccountApplyData;
     const api = isDome ? customApi.AccountApplyDataDome : customApi.AccountApplyData;
-    console.log(api, 121212);
+    // console.log(api, 121212);
 
 
     const res = await api({
     const res = await api({
         type: type
         type: type
     });
     });
-    console.log(res, 121212);
+    // console.log(res, 121212);
     if (res.code === 200) {
     if (res.code === 200) {
         showData.value = res.data;
         showData.value = res.data;
     } else {
     } else {

+ 2 - 1
pages/customer/withdrawal.vue

@@ -1074,7 +1074,8 @@ const bankOptions = computed(() => {
 const digitalOptions = computed(() => {
 const digitalOptions = computed(() => {
   return ruleForm.bankBlockchain.map((item, index) => ({
   return ruleForm.bankBlockchain.map((item, index) => ({
     text: `${item.addressName}-${item.address}`,
     text: `${item.addressName}-${item.address}`,
-    value: item.id
+    value: item.id,
+    disable: item.authStatus == 0
   }))
   }))
 })
 })
 
 

+ 4 - 2
pages/follow/components/applySignalDialog.vue

@@ -1,5 +1,5 @@
 <template>
 <template>
-  <cwg-popup :title="t('Documentary.TundManagement.item41')" :visible="visible" @close="closeDia" @confirm="confirmDia">
+  <cwg-popup :title="t('Documentary.TundManagement.item41')" :visible="visible" @close="closeDia" @confirm="confirmDia" width="700px">
     <uni-forms ref="formRef" :model="formData" :rules="rules" labelWidth="200" label-position="top" class="crm-form">
     <uni-forms ref="formRef" :model="formData" :rules="rules" labelWidth="200" label-position="top" class="crm-form">
       <view class="dia-content">
       <view class="dia-content">
         <!-- 名片信息 -->
         <!-- 名片信息 -->
@@ -140,7 +140,7 @@
             <view class="form-item">
             <view class="form-item">
               <uni-forms-item :label="t('Documentary.tradingCenter.item32')" name="settlementCycle">
               <uni-forms-item :label="t('Documentary.tradingCenter.item32')" name="settlementCycle">
                 <cwg-combox v-model:value="formData.settlementCycle"
                 <cwg-combox v-model:value="formData.settlementCycle"
-                  :options="[{ text: '7', value: '7' }, { text: '15', value: '15' }, { text: '30', value: '30' }]"
+                  :options="optList1"
                   :placeholder="t('placeholder.choose')" />
                   :placeholder="t('placeholder.choose')" />
               </uni-forms-item>
               </uni-forms-item>
             </view>
             </view>
@@ -180,6 +180,7 @@ import { ref, computed, watch } from 'vue'
 import { useI18n } from 'vue-i18n'
 import { useI18n } from 'vue-i18n'
 import Config from '@/config/index'
 import Config from '@/config/index'
 import { documentaryApi } from '@/service/documentary'
 import { documentaryApi } from '@/service/documentary'
+import {useFollowEnum} from '@/pages/follow/const/enum'
 
 
 const props = defineProps({
 const props = defineProps({
   visible: { type: Boolean, default: false },
   visible: { type: Boolean, default: false },
@@ -189,6 +190,7 @@ const props = defineProps({
 const emit = defineEmits(['close', 'confirm'])
 const emit = defineEmits(['close', 'confirm'])
 const { t, locale } = useI18n()
 const { t, locale } = useI18n()
 const { Code } = Config
 const { Code } = Config
+const {optList1} = useFollowEnum()
 
 
 const formRef = ref(null)
 const formRef = ref(null)
 const formData = ref({
 const formData = ref({

+ 17 - 0
pages/follow/const/enum.ts

@@ -0,0 +1,17 @@
+import { useI18n } from 'vue-i18n'
+import { computed } from 'vue'
+
+export const useFollowEnum = () => {
+  const { t } = useI18n()
+
+
+  const optList1 = computed(() => [{ text: t('vu.follow.enum1'), value: '7' }, { text: t('vu.follow.enum2'), value: '15' }, { text: t('vu.follow.enum3'), value: '30' }])
+  const optObj = computed(() => ({
+    7:t('vu.follow.enum1'),
+    15:t('vu.follow.enum2'),
+    30:t('vu.follow.enum3'),
+  }))
+
+
+  return {optList1,optObj}
+}

+ 9 - 2
pages/follow/record.vue

@@ -31,6 +31,9 @@ const userInfo = computed(() => userStore.userInfo);
 import { useAccountOptions } from '@/composables/useAccountOptions'
 import { useAccountOptions } from '@/composables/useAccountOptions'
 const { loginOptions, isLoaded, isSuccess } = useAccountOptions()
 const { loginOptions, isLoaded, isSuccess } = useAccountOptions()
 import { useFilters } from '@/composables/useFilters'
 import { useFilters } from '@/composables/useFilters'
+import {useFollowEnum} from '@/pages/follow/const/enum'
+
+const {optObj} = useFollowEnum()
 const { numberFormat, numberDesensitization, numberDecimal } = useFilters()
 const { numberFormat, numberDesensitization, numberDecimal } = useFilters()
 const search = reactive({
 const search = reactive({
     type: 1,
     type: 1,
@@ -104,7 +107,9 @@ const getColumnsByType = (type: number) => {
                     label: t('Documentary.TundManagement.item55'),
                     label: t('Documentary.TundManagement.item55'),
                     align: 'center',
                     align: 'center',
                     headerAlign: 'center',
                     headerAlign: 'center',
-                    formatter: ({ row }) => row.settlementCycle || '--'
+                    formatter: ({ row }) => {
+                      return optObj.value[row.settlementCycle] || '--'
+                    }
                 },
                 },
                 {
                 {
                     prop: 'approveTime',
                     prop: 'approveTime',
@@ -185,7 +190,9 @@ const getColumnsByType = (type: number) => {
                     label: t('Documentary.TundManagement.item55'),
                     label: t('Documentary.TundManagement.item55'),
                     align: 'center',
                     align: 'center',
                     headerAlign: 'center',
                     headerAlign: 'center',
-                    formatter: ({ row }) => row.settlementCycle || '--'
+                    formatter: ({ row }) => {
+                      return optObj.value[row.settlementCycle] || '--'
+                    }
                 },
                 },
                 {
                 {
                     prop: 'timeRange',
                     prop: 'timeRange',

+ 15 - 2
pages/follow/trading-center.vue

@@ -98,7 +98,7 @@
           </view>
           </view>
           <view class="fllow-content">
           <view class="fllow-content">
             <text class="tit">{{ t('Documentary.tradingCenter.item32') }}</text>
             <text class="tit">{{ t('Documentary.tradingCenter.item32') }}</text>
-            <text class="con">{{ dialogFllowData1.settlementCycle || '--' }}</text>
+            <text class="con">{{ optObj[dialogFllowData1.settlementCycle] || '--' }}</text>
           </view>
           </view>
         </view>
         </view>
 
 
@@ -185,10 +185,12 @@ import { computed, ref, nextTick, onMounted, onUnmounted } from 'vue'
 import { useI18n } from 'vue-i18n'
 import { useI18n } from 'vue-i18n'
 import { documentaryApi } from '@/service/documentary'
 import { documentaryApi } from '@/service/documentary'
 import useUserStore from '@/stores/use-user-store'
 import useUserStore from '@/stores/use-user-store'
+import {useFollowEnum} from '@/pages/follow/const/enum'
 
 
 const { t, locale } = useI18n()
 const { t, locale } = useI18n()
 const userStore = useUserStore()
 const userStore = useUserStore()
 const userInfo = computed(() => userStore.userInfo)
 const userInfo = computed(() => userStore.userInfo)
+const {optObj} = useFollowEnum()
 
 
 // --- Time fetching ---
 // --- Time fetching ---
 const time = ref('')
 const time = ref('')
@@ -453,7 +455,18 @@ const formRef = ref<any>(null)
 const rules = {
 const rules = {
   protectAmount: { rules: [{ required: true, errorMessage: t('vaildate.input.empty') }] },
   protectAmount: { rules: [{ required: true, errorMessage: t('vaildate.input.empty') }] },
   protectRatio: { rules: [{ required: true, errorMessage: t('vaildate.input.empty') }] },
   protectRatio: { rules: [{ required: true, errorMessage: t('vaildate.input.empty') }] },
-  volume: { rules: [{ required: true, errorMessage: t('vaildate.input.empty') }] },
+  volume: { rules: [{ required: true, errorMessage: t('vaildate.input.empty') },{
+      validateFunction: (rule, value,data, callback) => {
+      if (value) {
+        const num = Number(value)
+        if (isNaN(num) || num <= 0) {
+          callback(t('vu.follow.v1'))
+        }else {
+          callback()
+        }
+      }
+    }
+    }] },
   ratio: { rules: [{ required: true, errorMessage: t('vaildate.input.empty') }] },
   ratio: { rules: [{ required: true, errorMessage: t('vaildate.input.empty') }] },
   followLogin: { rules: [{ required: true, errorMessage: t('vaildate.select.empty') }] },
   followLogin: { rules: [{ required: true, errorMessage: t('vaildate.select.empty') }] },
   followType: { rules: [{ required: true, errorMessage: t('vaildate.select.empty') }] },
   followType: { rules: [{ required: true, errorMessage: t('vaildate.select.empty') }] },

+ 4 - 1
pages/follow/trading-management.vue

@@ -67,7 +67,7 @@
                             </view>
                             </view>
                             <view class="account-grid-item">
                             <view class="account-grid-item">
                                 <view class="sub" v-t="'Documentary.TundManagement.item14'"></view>
                                 <view class="sub" v-t="'Documentary.TundManagement.item14'"></view>
-                                <view class="num">{{ item.settlementCycle || "--" }}</view>
+                                <view class="num">{{ optObj[item.settlementCycle] || "--" }}</view>
                             </view>
                             </view>
                             <view class="account-grid-item">
                             <view class="account-grid-item">
                                 <view class="sub" v-t="'Documentary.TundManagement.item15'"></view>
                                 <view class="sub" v-t="'Documentary.TundManagement.item15'"></view>
@@ -536,6 +536,9 @@ const userStore = useUserStore();
 const userInfo = computed(() => userStore.userInfo);
 const userInfo = computed(() => userStore.userInfo);
 import { useFilters } from '@/composables/useFilters'
 import { useFilters } from '@/composables/useFilters'
 const { numberFormat, numberDecimal } = useFilters()
 const { numberFormat, numberDecimal } = useFilters()
+import {useFollowEnum} from '@/pages/follow/const/enum'
+const {optObj} = useFollowEnum()
+
 const isZh = computed(() => ['cn', 'zh', 'zhHant'].includes(locale.value));
 const isZh = computed(() => ['cn', 'zh', 'zhHant'].includes(locale.value));
 
 
 const formRef = ref(null)
 const formRef = ref(null)

+ 1 - 1
uni_modules/uni-card/components/uni-card/uni-card.vue

@@ -139,7 +139,7 @@ $uni-card-content-color: $uni-base-color;
 	margin: $uni-card-spacing;
 	margin: $uni-card-spacing;
 	padding: 0 $uni-spacing-sm;
 	padding: 0 $uni-spacing-sm;
 	border-radius: 4px;
 	border-radius: 4px;
-	overflow: hidden;
+	//overflow: hidden;
 	font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, SimSun, sans-serif;
 	font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, SimSun, sans-serif;
 	background-color: rgba(var(--bs-body-bg-rgb), var(--bs-bg-opacity)) !important;
 	background-color: rgba(var(--bs-body-bg-rgb), var(--bs-bg-opacity)) !important;
 	flex: 1;
 	flex: 1;

+ 6 - 0
uni_modules/uni-data-select/components/uni-data-select/uni-data-select.vue

@@ -704,6 +704,8 @@ $uni-info: #909399 !default;
 	box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
 	box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
 	z-index: 1111;
 	z-index: 1111;
 	padding: 4px 0;
 	padding: 4px 0;
+	white-space: nowrap;
+	overflow: visible;
 }
 }
 
 
 .uni-select__selector-scroll {
 .uni-select__selector-scroll {
@@ -735,6 +737,10 @@ $uni-info: #909399 !default;
 	/* border-bottom: solid 1px $uni-border-3; */
 	/* border-bottom: solid 1px $uni-border-3; */
 	padding: 0px 10px;
 	padding: 0px 10px;
 	color: var(--bs-heading-color);
 	color: var(--bs-heading-color);
+  white-space: nowrap;
+}
+.uni-select__selector-item uni-text{
+  white-space: nowrap;
 }
 }
 
 
 .uni-select__selector-item--actived {
 .uni-select__selector-item--actived {