Преглед изворни кода

feat:完善信息弹窗提示,多选select

ljc пре 2 месеци
родитељ
комит
aa954bd952
4 измењених фајлова са 46 додато и 11 уклоњено
  1. 1 1
      components/PrefectInfo.vue
  2. 5 1
      components/cwg-combox.vue
  3. 37 6
      pages/ib/index.vue
  4. 3 3
      pages/mine/improveImmediately.vue

+ 1 - 1
components/PrefectInfo.vue

@@ -43,7 +43,7 @@
   const isPerfectInfo = computed(() => {
     const {status,applyRealStatus} = userInfo.customInfo
     console.log(route)
-    return (status === 2 || applyRealStatus == 1|| applyRealStatus ==2) && route.path != '/pages/mine/improveImmediately'
+    return !(status == 2 || applyRealStatus == 1|| applyRealStatus ==2) && route.path != '/pages/mine/improveImmediately'
   })
 
   function immediately() {

+ 5 - 1
components/cwg-combox.vue

@@ -12,7 +12,7 @@
 
             <!-- 普通下拉模式 -->
             <uni-data-select v-else v-model="innerValue" :localdata="options" :clear="clearable"
-                :placeholder="placeholder" :disabled="disabled" @change="handleSelectChange" />
+                :placeholder="placeholder" :multiple="multiple" :disabled="disabled" @change="handleSelectChange" />
         </template>
 
     </view>
@@ -36,6 +36,10 @@ const props = defineProps({
         type: Boolean,
         default: true
     },
+    multiple: {
+        type: Boolean,
+        default: false
+    },
     disabled: Boolean
 })
 

+ 37 - 6
pages/ib/index.vue

@@ -105,16 +105,15 @@
     </uni-row>
 
     <!-- 二维码弹窗 -->
-    <uni-popup ref="linkPopup" type="center" :mask-click="false">
+    <uni-popup ref="linkPopup" type="center" :title="t('Ib.Index.CreateLink')" :mask-click="false" background-color="#fff">
       <view class="dia-content">
         <view class="content" style="font-size: 14px; text-align: left">
           <view class="label">{{ t("Ib.Index.Spread5") }} :</view>
-          <uni-data-select
+          <cwg-combox
             v-model="excludeShowLoginTypes"
             :multiple="true"
-            :localdata="excludeList"
+            :options="excludeList"
             :placeholder="t('placeholder.choose')"
-            style="width: 100%"
           />
 
           <view class="label">{{ t("Ib.Index.Spread4") }} :</view>
@@ -206,10 +205,12 @@
   import useRouter from '@/hooks/useRouter'
   import {ibApi} from '@/service/ib'
   import config from '@/config/index'
+  import  useUserStore from '@/stores/use-user-store'
 
   const { t } = useI18n()
   const router = useRouter()
   const {Code } = config
+  const { userInfo } = useUserStore()
   // 数据
   const balanceInt = ref(0)
   const balanceDecimal = ref('00')
@@ -223,13 +224,21 @@
       ibAmount: "",
     }
   )
+  const selectedSpreadId = ref('')
   const spreadList = ref([])
-  const excludeShowLoginTypes = ref()
+  const excludeShowLoginTypes = ref([])
   const pammManagerValid = ref()
   const menuList = ref([
     {label: t('Custom.Index.Withdrawals'),type: 1},
     {label: t('Custom.Index.Transfer'),type: 2},
   ])
+  const excludeList = ref([])
+  const excludeLists = ref([
+    {text: t('AccountType.SeniorAccount'),value: '2'},
+    // {text: t('AccountType.SeniorAccount'),value: '3'},
+    {text: t('AccountType.StandardAccount'),value: '7'},
+    {text: t('AccountType.CentAccount'),value: '8'},
+  ])
 
   // 开户链接
   const linkPopup = ref(null)
@@ -287,8 +296,30 @@
       uni.showToast(res.msg)
     }
   }
+  const getAgentAccountSetting = async () => {
+    console.log(userInfo)
+    const {agentAccountSetting = ''} = userInfo.ibInfo ?? {}
+    if (agentAccountSetting === 0) {
+      const excludeValues = userInfo.customInfo.excludeShowLoginTypes;
+      try{
+        excludeList.value = excludeLists.value.filter(
+          (item) => !excludeValues.includes(item.value)
+        )
+        excludeShowLoginTypes.value = []
+      }catch(e){
+        excludeShowLoginTypes.value = []
+        excludeList.value = excludeLists.value
+      }
+    }else {
+      excludeShowLoginTypes.value = []
+      excludeList.value = excludeLists.value
+    }
+  }
   // 生成开户链接
-  const LinkActivity1 = () => {
+  const LinkActivity1 = async () => {
+    // await loginTypeList()
+    await getAgentAccountSetting()
+    selectedSpreadId.value = ''
     linkPopup.value.open()
   }
   // 生成活动分享链接

+ 3 - 3
pages/mine/improveImmediately.vue

@@ -1173,7 +1173,7 @@
       dialogCheck.value.open()
       dialogCheck1.value = true
     } else {
-      router.push({ path: '/customer/index' })
+      router.push({ path: '/pages/customer/index' })
     }
   }
 
@@ -1183,7 +1183,7 @@
 
   function toHome() {
     dialogCheck.value.close()
-    router.push({ path: '/customer/index' })
+    router.push({ path: '/pages/customer/index' })
   }
 
   async function save() {
@@ -1240,7 +1240,7 @@
       if (res.code == Config.Code.StatusOK) {
         if (save) {
           dialogCheck.value = false
-          router.push({ path: '/customer/index' })
+          router.push({ path: '/pages/customer/index' })
         }
       } else {
         uni.showToast({ title: res.msg, icon: 'none' })