Explorar o código

feat:个人信息,导航组件。

ljc hai 2 meses
pai
achega
60be061c8e

+ 89 - 0
components/PrefectInfo.vue

@@ -0,0 +1,89 @@
+<template>
+  <view class="PerfectInfo" v-if="isPerfectInfo">
+    <!--    <i class="iconfont icondengpao"></i>-->
+    <uni-row>
+      <uni-col :xs="24" :sm="24" :md="16" :lg="16" :xl="16">
+        <view class="content">
+          <view class="icon">
+            <cwg-icon color="#333" icon="crm-user-pen" />
+          </view>
+          <view class="title">
+            {{ t('Home.msg.content') }}
+          </view>
+        </view>
+      </uni-col>
+      <uni-col :xs="24" :sm="24" :md="8" :lg="8" :xl="8">
+        <button
+          class="btn-improve"
+          @click="immediately"
+        >
+          {{ t('Home.msg.btn') }}
+        </button>
+      </uni-col>
+    </uni-row>
+  </view>
+</template>
+
+<script setup lang="ts">
+  import { computed, ref } from 'vue'
+  import { useI18n } from 'vue-i18n'
+  import useUserStore from '@/stores/use-user-store'
+  import useRouter from '@/hooks/useRouter'
+
+  const router = useRouter()
+  const { userInfo } = useUserStore()
+  const { t } = useI18n()
+  const customInfo = computed(() => {
+    return userInfo.customInfo
+  })
+
+  const isPerfectInfo = computed(() => {
+    const {status,applyRealStatus} = userInfo.customInfo
+    return status === 2 || applyRealStatus == 1|| applyRealStatus ==2
+  })
+
+  function immediately() {
+    console.log(customInfo.value)
+    router.push({
+      path:'/pages/mine/improveImmediately'
+    })
+  }
+
+</script>
+
+<style scoped lang="scss">
+  @import "@/uni.scss";
+
+  .PerfectInfo {
+    width: 100%;
+    padding: px2rpx(16);
+    background-color: #fff9eb;
+
+    .content {
+      width: 100%;
+      display: flex;
+      align-items: center;
+      height: px2rpx(40);
+      flex: 1;
+      .icon{
+        margin-right: 10px;
+      }
+      //justify-content: center;
+      .title {
+        font-weight: 400;
+        line-height: px2rpx(24);
+        font-size: px2rpx(16);
+        letter-spacing: 0px;
+      }
+    }
+
+    .btn-improve {
+      width: px2rpx(120);
+      height: px2rpx(40);
+      background-color: #ffde02;
+      line-height: px2rpx(40);
+      font-size: px2rpx(14);
+      margin: 0;
+    }
+  }
+</style>

+ 11 - 2
components/cwg-page-wrapper.vue

@@ -2,6 +2,8 @@
   <view :class="['page-wrapper', { dark: isDark }]">
     <cwg-match-media :max-width="991" v-if="!isLoginPage">
       <cwg-pc-header @open-right-drawer="openRightDrawer" @open-left-drawer="openLeftDrawer" class="header-box" />
+<!--      占位-->
+      <view style="height: 56px;"></view>
     </cwg-match-media>
     <LanguageDropdown style="width: 0;display: none;" />
     <cwg-progress />
@@ -13,8 +15,13 @@
         <view class="sidebar-mask" v-if="sidebarVisible" @click="openLeftDrawer" :style="{
           opacity: sidebarVisible ? 1 : 0,
           transition: 'opacity 281ms cubic-bezier(0.4, 0, 0.2, 1)'
-        }"></view>
+        }">
+
+        </view>
       </cwg-match-media>
+<!--      完善信息提示,-->
+      <PrefectInfo/>
+
       <view class="content-wrapper" :class="{ 'content-wrapper-padding': isContentPadding }">
         <!-- <cwg-header /> -->
         <slot />
@@ -38,6 +45,7 @@ import useUserStore from '@/stores/use-user-store'
 import { userApi } from '@/api/user'
 import useGlobalStore from '@/stores/use-global-store'
 import LanguageDropdown from './LanguageDropdown.vue'
+import PrefectInfo from '@/components/PrefectInfo.vue'
 const globalStore = useGlobalStore()
 const router = useRouter()
 const userStore = useUserStore()
@@ -63,7 +71,6 @@ const isDark = computed(() => globalStore.theme === 'dark')
 const isTabBarPage = ref(false)
 
 
-
 const rightDrawerRef = ref<any>(null)
 
 
@@ -117,6 +124,7 @@ onShow(() => {
 .page-content {
   width: 100%;
   display: flex;
+  flex-direction: column;
   position: relative;
   box-sizing: border-box;
 }
@@ -151,6 +159,7 @@ onShow(() => {
   max-width: px2rpx(1224);
   width: 100%;
   margin: 0 auto;
+  box-sizing: border-box;
   // border: 1px solid rgba(108, 133, 149, 0.12);
 }
 

+ 0 - 21
pages.json

@@ -246,27 +246,6 @@
         "navigationStyle": "custom"
       }
     },
-    {
-      "path": "pages/analytics/analystViews",
-      "style": {
-        "navigationBarTitleText": "",
-        "navigationStyle": "custom"
-      }
-    },
-    {
-      "path": "pages/analytics/news",
-      "style": {
-        "navigationBarTitleText": "",
-        "navigationStyle": "custom"
-      }
-    },
-    {
-      "path": "pages/analytics/detail",
-      "style": {
-        "navigationBarTitleText": "",
-        "navigationStyle": "custom"
-      }
-    },
     {
       "path": "pages/mine/notice",
       "style": {

+ 41 - 40
pages/mine/components/PersonalInfoTab.vue

@@ -2,37 +2,37 @@
     <view class="personal-info-tab">
         <view class="user-form">
             <uni-row class="demo-uni-row">
-                <uni-col :xs="24" :sm="24" :md="24" :lg="6" :xl="6">
-                    <view class="avatar-section">
-                        <cwg-input v-model:value="formData.idBackUrl" type="upload" fkey="idBackUrl"
-                            rulesKey="idBackUrl" :is-upload-d="true" accept="image/png, image/jpeg, image/jpg"
-                            :readonly="isReadonly" :disabled="isReadonly" @change="handleChange">
-                            <view class="cwg-upload">
-                            </view>
-                        </cwg-input>
-                        <view class="text name">{{ formData.firstName }} {{ formData.lastName }}</view>
-                        <view class="text cid">CID:{{ formData.cId }}</view>
-                        <view class="btn-primary" @click="handleEditProfile">
-                            <cwg-icon name="crm-photo-film" :size="16" color="#fff" />
-                            上传头像
-                        </view>
-                    </view>
-                </uni-col>
-                <uni-col :xs="24" :sm="24" :md="24" :lg="18" :xl="18">
+<!--                <uni-col :xs="24" :sm="24" :md="24" :lg="6" :xl="6">-->
+<!--                    <view class="avatar-section">-->
+<!--                        <cwg-input v-model:value="formData.idBackUrl" type="upload" fkey="idBackUrl"-->
+<!--                            rulesKey="idBackUrl" :is-upload-d="true" accept="image/png, image/jpeg, image/jpg"-->
+<!--                            :readonly="isReadonly" :disabled="isReadonly" @change="handleChange">-->
+<!--                            <view class="cwg-upload">-->
+<!--                            </view>-->
+<!--                        </cwg-input>-->
+<!--                        <view class="text name">{{ formData.firstName }} {{ formData.lastName }}</view>-->
+<!--                        <view class="text cid">CID:{{ formData.cId }}</view>-->
+<!--                        <view class="btn-primary" @click="handleEditProfile">-->
+<!--                            <cwg-icon name="crm-photo-film" :size="16" color="#fff" />-->
+<!--                            上传头像-->
+<!--                        </view>-->
+<!--                    </view>-->
+<!--                </uni-col>-->
+                <uni-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
                     <uni-forms ref="baseForm" :model="formData" labelWidth="200" label-position="top" :rules="rules"
                         class="base-info-form">
                         <uni-row class="demo-uni-row uni-row1">
                             <!-- 客户类型 -->
                             <uni-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
                                 <uni-forms-item :label="t('ImproveImmediately.Label.CustomerType')">
-                                    <cwg-combox :clearable="false" v-model:value="formData.customType"
+                                    <cwg-combox :disabled="isInfo" :clearable="false" v-model:value="formData.customType"
                                         :options="customTypeOptions" :placeholder="t('placeholder.choose')" />
                                 </uni-forms-item>
                             </uni-col>
                             <!-- 公司名称 -->
                             <uni-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8" v-if="formData.companyName">
                                 <uni-forms-item :label="t('ImproveImmediately.Label.CompanyName')">
-                                    <uni-easyinput :clearable="false" v-model="formData.companyName"
+                                    <uni-easyinput :disabled="isInfo" :clearable="false" v-model="formData.companyName"
                                         :placeholder="t('placeholder.input')" />
                                 </uni-forms-item>
                             </uni-col>
@@ -42,7 +42,7 @@
                                 <uni-forms-item :label="formData.customType == 2
                                     ? t('ImproveImmediately.Label.CorporationLastName')
                                     : t('ImproveImmediately.Label.LastName')">
-                                    <uni-easyinput :clearable="false" v-model="formData.lastName"
+                                    <uni-easyinput :disabled="isInfo" :clearable="false" v-model="formData.lastName"
                                         :placeholder="t('placeholder.input')" />
                                 </uni-forms-item>
                             </uni-col>
@@ -51,7 +51,7 @@
                                 <uni-forms-item :label="formData.customType == 2
                                     ? t('ImproveImmediately.Label.CorporationName')
                                     : t('ImproveImmediately.Label.Name')">
-                                    <uni-easyinput :clearable="false" v-model="formData.firstName"
+                                    <uni-easyinput :disabled="isInfo" :clearable="false" v-model="formData.firstName"
                                         :placeholder="t('placeholder.input')" />
                                 </uni-forms-item>
                             </uni-col>
@@ -60,7 +60,7 @@
                                 <uni-forms-item :label="formData.customType == 2
                                     ? t('ImproveImmediately.Label.CorporationMName')
                                     : t('placeholder.middle')">
-                                    <uni-easyinput :clearable="false" v-model="formData.middle"
+                                    <uni-easyinput :disabled="isInfo" :clearable="false" v-model="formData.middle"
                                         :placeholder="t('placeholder.input')" />
                                 </uni-forms-item>
                             </uni-col>
@@ -68,7 +68,7 @@
                             <!-- 国家 -->
                             <uni-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8" v-if="countryOptions.length">
                                 <uni-forms-item :label="t('ImproveImmediately.Label.Nationality')">
-                                    <cwg-combox :clearable="false" :filterable="true"
+                                    <cwg-combox :disabled="isInfo" :clearable="false" :filterable="true"
                                         v-model:value="formData.nationality" :options="countryOptions"
                                         :placeholder="t('placeholder.choose')" @change="changeCountry" />
                                 </uni-forms-item>
@@ -76,35 +76,35 @@
                             <!-- 证件类型 -->
                             <uni-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
                                 <uni-forms-item :label="t('ImproveImmediately.Label.CardType')">
-                                    <cwg-combox :clearable="false" v-model:value="formData.customType"
+                                    <cwg-combox :disabled="isInfo" :clearable="false" v-model:value="formData.customType"
                                         :options="idTypeOptions" :placeholder="t('placeholder.choose')" />
                                 </uni-forms-item>
                             </uni-col>
                             <!-- 证件号 -->
                             <uni-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
                                 <uni-forms-item :label="t('ImproveImmediately.Label.IdentityID')">
-                                    <uni-easyinput :clearable="false" v-model="formData.identity"
+                                    <uni-easyinput :disabled="isInfo" :clearable="false" v-model="formData.identity"
                                         :placeholder="t('placeholder.input')" />
                                 </uni-forms-item>
                             </uni-col>
                             <!-- 拼音 -->
                             <uni-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8" v-if="isZh">
                                 <uni-forms-item :label="t('ImproveImmediately.Label.NamePinYin')">
-                                    <uni-easyinput :clearable="false" v-model="formData.nameEn"
+                                    <uni-easyinput :disabled="isInfo" :clearable="false" v-model="formData.nameEn"
                                         :placeholder="t('placeholder.input')" />
                                 </uni-forms-item>
                             </uni-col>
                             <!-- 性别 -->
                             <uni-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
                                 <uni-forms-item :label="t('ImproveImmediately.Label.Gender')">
-                                    <cwg-combox :clearable="false" v-model:value="formData.gender" :options="sexOptions"
+                                    <cwg-combox :disabled="isInfo" :clearable="false" v-model:value="formData.gender" :options="sexOptions"
                                         :placeholder="t('placeholder.choose')" />
                                 </uni-forms-item>
                             </uni-col>
                             <!-- 生日 -->
                             <uni-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
                                 <uni-forms-item :label="t('ImproveImmediately.Label.Birthday')">
-                                    <uni-datetime-picker :clear-icon="false" type="datetime" return-type="timestamp"
+                                    <uni-datetime-picker :disabled="isInfo" :clear-icon="false" type="date" return-type="timestamp"
                                         v-model="formData.birth" :placeholder="t('placeholder.choose')" />
                                 </uni-forms-item>
                             </uni-col>
@@ -112,7 +112,7 @@
                             <!-- 国家/地区 -->
                             <uni-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8" v-if="countryOptions.length">
                                 <uni-forms-item :label="t('ImproveImmediately.Label.CountryRegionOfResidence')">
-                                    <cwg-combox :clearable="false" :filterable="true" v-model:value="formData.country"
+                                    <cwg-combox :disabled="isInfo" :clearable="false" :filterable="true" v-model:value="formData.country"
                                         :options="countryOptions" :placeholder="t('placeholder.choose')" />
                                 </uni-forms-item>
                             </uni-col>
@@ -120,7 +120,7 @@
                             <uni-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8"
                                 v-if="stateOptions.length && isCountryCN">
                                 <uni-forms-item :label="t('ImproveImmediately.Label.ProvinceRegion')">
-                                    <cwg-combox :clearable="false" :filterable="true" v-model:value="formData.state"
+                                    <cwg-combox :disabled="isInfo" :clearable="false" :filterable="true" v-model:value="formData.state"
                                         :options="stateOptions" :placeholder="t('placeholder.choose')"
                                         @change="onStateChange" />
                                 </uni-forms-item>
@@ -128,7 +128,7 @@
                             <!-- 国外省份/州 -->
                             <uni-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8" v-if="!isCountryCN">
                                 <uni-forms-item :label="t('ImproveImmediately.Label.ProvinceRegion')">
-                                    <uni-easyinput :clearable="false" v-model="formData.state"
+                                    <uni-easyinput :disabled="isInfo" :clearable="false" v-model="formData.state"
                                         :placeholder="t('placeholder.input')" />
                                 </uni-forms-item>
                             </uni-col>
@@ -136,32 +136,32 @@
                             <uni-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8"
                                 v-if="cityOptions.length && isCountryCN">
                                 <uni-forms-item :label="t('ImproveImmediately.Label.City')">
-                                    <cwg-combox :clearable="false" :filterable="true" v-model:value="formData.city"
+                                    <cwg-combox :disabled="isInfo" :clearable="false" :filterable="true" v-model:value="formData.city"
                                         :options="cityOptions" :placeholder="t('placeholder.choose')" />
                                 </uni-forms-item>
                             </uni-col>
                             <!-- 国外城市 -->
                             <uni-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8" v-if="!isCountryCN">
                                 <uni-forms-item :label="t('ImproveImmediately.Label.City')">
-                                    <uni-easyinput :clearable="false" v-model="formData.city"
+                                    <uni-easyinput :disabled="isInfo" :clearable="false" v-model="formData.city"
                                         :placeholder="t('placeholder.input')" />
                                 </uni-forms-item>
                             </uni-col>
                             <uni-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
                                 <uni-forms-item :label="t('ImproveImmediately.Label.DetailedAddress')">
-                                    <uni-easyinput :clearable="false" v-model="formData.addressLines1"
+                                    <uni-easyinput :disabled="isInfo" :clearable="false" v-model="formData.addressLines1"
                                         :placeholder="t('placeholder.input')" />
                                 </uni-forms-item>
                             </uni-col>
                             <uni-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
                                 <uni-forms-item :label="t('ImproveImmediately.Label.ZipCode')">
-                                    <uni-easyinput :clearable="false" v-model="formData.zipCode"
+                                    <uni-easyinput :disabled="isInfo" :clearable="false" v-model="formData.zipCode"
                                         :placeholder="t('placeholder.input')" />
                                 </uni-forms-item>
                             </uni-col>
                             <uni-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
                                 <uni-forms-item :label="t('ImproveImmediately.Label.DetailedAddressStandby')">
-                                    <uni-easyinput :clearable="false" v-model="formData.addressLines2"
+                                    <uni-easyinput :disabled="isInfo" :clearable="false" v-model="formData.addressLines2"
                                         :placeholder="t('placeholder.input')" />
                                 </uni-forms-item>
                             </uni-col>
@@ -171,10 +171,10 @@
                 </uni-col>
             </uni-row>
         </view>
-        <view class="btns">
-            <view class="btn-primary" @click="handleCancel">{{ t('Btn.Cancel') }}</view>
-            <view class="btn-primary" @click="handleNext">{{ t('Btn.Next') }}</view>
-        </view>
+<!--        <view class="btns">-->
+<!--            <view class="btn-primary" @click="handleCancel">{{ t('Btn.Cancel') }}</view>-->
+<!--            <view class="btn-primary" @click="handleNext">{{ t('Btn.Next') }}</view>-->
+<!--        </view>-->
     </view>
 </template>
 
@@ -360,6 +360,7 @@ const countryList = ref<Array<any>>([]);
 const stateList = ref<Array<any>>([]);
 const cityList = ref<Array<any>>([]);
 const phoneCodes = ref<Array<{ text: string; value: string }>>([]);
+const isInfo = ref<boolean>(true);
 
 const isZh = computed(() => ['cn', 'zh', 'zhHant'].includes(locale.value));
 const isCountryCN = computed(() => ['CN', 'CNX', 'CNA', 'CNT'].includes(formData.value.country || ''));

+ 15 - 3
pages/mine/improveImmediately.vue

@@ -720,7 +720,7 @@
   const currentStep = ref<number>(3)
   const formRef = ref()
   const lang = ref('cn')
-  const dialogCheck = ref(false)
+  const dialogCheck = ref(null)
   const dialogCheck1 = ref(false)
   const text1 = ref('')
   const qrCodeStatus = ref(false)
@@ -902,6 +902,18 @@
   })
 
   function goStep(step: number) {
+    if ( step == 4){
+      if (currentUploadCard.value == 1){
+        if (!formData.value.cardType){
+          uni.showToast(t('vaildate.CardType.empty'))
+          return
+        }
+        if (!fileListID1.value.path || !fileListID1.value.path){
+          uni.showToast(t('vaildate.IDPhoto.empty'))
+          return
+        }
+      }
+    }
     currentStep.value = step
   }
 
@@ -1165,11 +1177,11 @@
   }
 
   function closeDia() {
-    dialogCheck.value = false
+    dialogCheck.value.close()
   }
 
   function toHome() {
-    dialogCheck.value = false
+    dialogCheck.value.close()
     router.push({ path: '/customer/index' })
   }
 

+ 22 - 22
pages/mine/info.vue

@@ -3,20 +3,20 @@
         <view class="info-card">
             <view class="content-title" v-if="current != 3 && current != 4">
                 <view>{{ tabs[current - 1].name }}</view>
-                <view class="content-title-btns">
-                    <view v-if="current == 3 && !isSHowIdentity" class="btn-primary" @click="infoSubmit()">
-                        <cwg-icon icon="crm-plus" :size="16" color="#fff" />
-                        <text v-t="'PersonalManagement.Title.ProofOfIdentity'"></text>
-                    </view>
-                    <view v-if="current == 3 && !isSHowAddress" class="btn-primary" @click="cancle()">
-                        <cwg-icon icon="crm-plus" :size="16" color="#fff" />
-                        <text v-t="'PersonalManagement.Title.ProofOfAddress'"></text>
-                    </view>
-                    <view v-if="current == 3" class="btn-primary" @click="cancle()">
-                        <cwg-icon icon="crm-plus" :size="16" color="#fff" />
-                        <text v-t="'PersonalManagement.Title.AttachedFile'"></text>
-                    </view>
-                </view>
+<!--                <view class="content-title-btns">-->
+<!--                    <view v-if="current == 3 && !isSHowIdentity" class="btn-primary" @click="infoSubmit()">-->
+<!--                        <cwg-icon icon="crm-plus" :size="16" color="#fff" />-->
+<!--                        <text v-t="'PersonalManagement.Title.ProofOfIdentity'"></text>-->
+<!--                    </view>-->
+<!--                    <view v-if="current == 3 && !isSHowAddress" class="btn-primary" @click="cancle()">-->
+<!--                        <cwg-icon icon="crm-plus" :size="16" color="#fff" />-->
+<!--                        <text v-t="'PersonalManagement.Title.ProofOfAddress'"></text>-->
+<!--                    </view>-->
+<!--                    <view v-if="current == 3" class="btn-primary" @click="cancle()">-->
+<!--                        <cwg-icon icon="crm-plus" :size="16" color="#fff" />-->
+<!--                        <text v-t="'PersonalManagement.Title.AttachedFile'"></text>-->
+<!--                    </view>-->
+<!--                </view>-->
             </view>
             <view v-if="current == 1">
                 <personal-info-tab v-model="PersonalInformation" :is-readonly="isReadonly" @cancel="cancle"
@@ -146,7 +146,7 @@ const PersonalInformation = ref({
 });
 
 const isUpdate = ref(false);
-const isAuthInfo = ref(false);
+const isAuthInfo = ref(true);
 
 const dialogCheck = ref(false);
 const dialogCheck1 = ref(false);
@@ -242,13 +242,13 @@ async function getUserSingle() {
                 isUpdate.value = true;
             }
 
-            if (res.data.approveStatus == 2 || res.data.kycStatus == 2) {
-                isAuthInfo.value = true;
-            }
-
-            if (res.data.approveStatus == 3) {
-                isAuthInfo.value = false;
-            }
+            // if (res.data.approveStatus == 2 || res.data.kycStatus == 2) {
+            //     isAuthInfo.value = true;
+            // }
+            //
+            // if (res.data.approveStatus == 3) {
+            //     isAuthInfo.value = false;
+            // }
         }
         getCountry()
     } catch (error: any) {

+ 1 - 8
windows/left-window.vue

@@ -63,14 +63,7 @@ const menu = ref<MenuItem[]>(
                 { path: '/pages/ib/recording', label: 'Home.page_ib.item7', icon: 'icon-application' }
             ]
         },
-        {
-            path: '/pages/analytics/analystViews', isOpenMenu: false, label: 'News.News', icon: 'crm-chart-area',
-            children: [
-                { path: '/pages/analytics/analystViews', label: 'News.Announcement', icon: 'icon-application' },
-                { path: '/pages/analytics/news', label: 'News.NewsInformation', icon: 'icon-application' },
-                { path: `https://www.${Config.host}.com/${locale.value}/economic-calendar`, label: 'News.FinancialCalendar', icon: 'icon-application', isExternal: true },
-            ]
-        },
+
         {
             path: '/pages/customer/withdrawal', isOpenMenu: false, label: 'Downloadpage.item1', icon: 'crm-download',
             children: []