ljc 2 месяцев назад
Родитель
Сommit
90bca79123
4 измененных файлов с 536 добавлено и 148 удалено
  1. 362 0
      components/IbInfo.vue
  2. 17 1
      components/PrefectInfo.vue
  3. 153 146
      components/cwg-page-wrapper.vue
  4. 4 1
      components/cwg-popup.vue

+ 362 - 0
components/IbInfo.vue

@@ -0,0 +1,362 @@
+<template>
+  <view class="IbInfo">
+    <cwg-popup ref="dialogApplyIb" type="center" :title="t('Home.msg.ibTitle')" showFooterLine
+               :cancelText="t('Btn.Cancel')" :confirmText="confirmText" @close="closeIb" @confirm="confirmIb">
+      <view class="dia-content" v-if="ibStatus.status == 0">
+        <view
+          class="content"
+          style="height: 400px; line-height: 1.5; text-align: left"
+          id="Agreement"
+        >
+          <view class="title">{{ t('CWGMarketsLtdPARTNERSAgreement.title1') }}</view>
+          <view class="tit">{{ t('CWGMarketsLtdPARTNERSAgreement.item0') }}</view>
+          <view class="p">{{ t('CWGMarketsLtdPARTNERSAgreement.item01') }}</view>
+          <view class="tit">{{ t('CWGMarketsLtdPARTNERSAgreement.item02') }}</view>
+          <view class="ul">
+            <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item03') }}</view>
+            <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item04') }}</view>
+            <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item05') }}</view>
+          </view>
+          <view class="tit">{{ t('CWGMarketsLtdPARTNERSAgreement.item1') }}</view>
+          <view class="ul">
+            <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item11') }}</view>
+          </view>
+          <view class="tit">{{ t('CWGMarketsLtdPARTNERSAgreement.item2') }}</view>
+          <view class="ul">
+            <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item21') }}</view>
+            <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item22') }}</view>
+            <view class='ul-li'>
+              <view class="ul">
+                <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item221') }}</view>
+                <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item222') }}</view>
+                <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item223') }}</view>
+                <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item224') }}</view>
+                <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item225') }}</view>
+                <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item226') }}</view>
+                <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item227') }}</view>
+                <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item228') }}</view>
+                <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item229') }}</view>
+              </view>
+            </view>
+            <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item23') }}</view>
+            <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item24') }}</view>
+            <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item25') }}</view>
+            <view class='ul-li'>
+              <view class="ul">
+                <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item251') }}</view>
+                <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item252') }}</view>
+              </view>
+            </view>
+            <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item26') }}</view>
+          </view>
+          <view class="tit">{{ t('CWGMarketsLtdPARTNERSAgreement.item3') }}</view>
+          <view class="ul">
+            <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item31') }}</view>
+            <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item32') }}</view>
+            <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item33') }}</view>
+            <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item34') }}</view>
+            <view class='ul-li'>
+              <view class="ul">
+                <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item341') }}</view>
+                <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item342') }}</view>
+                <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item343') }}</view>
+                <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item344') }}</view>
+              </view>
+            </view>
+            <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item35') }}</view>
+            <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item36') }}</view>
+            <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item37') }}</view>
+            <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item38') }}</view>
+          </view>
+          <view class="tit">{{ t('CWGMarketsLtdPARTNERSAgreement.item4') }}</view>
+          <view class="ul">
+            <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item41') }}</view>
+            <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item42') }}</view>
+          </view>
+          <view class="tit">{{ t('CWGMarketsLtdPARTNERSAgreement.item5') }}</view>
+          <view class="ul">
+            <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item51') }}</view>
+            <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item52') }}</view>
+            <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item53') }}</view>
+          </view>
+          <view class="tit">{{ t('CWGMarketsLtdPARTNERSAgreement.item6') }}</view>
+          <view class="ul">
+            <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item61') }}</view>
+            <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item62') }}</view>
+          </view>
+          <view class="tit">{{ t('CWGMarketsLtdPARTNERSAgreement.item7') }}</view>
+          <view class="ul">
+            <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item71') }}</view>
+            <view class='ul-li'>
+              <view class="ul">
+                <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item711') }}</view>
+                <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item712') }}</view>
+                <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item713') }}</view>
+                <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item714') }}</view>
+                <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item715') }}</view>
+              </view>
+            </view>
+            <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item72') }}</view>
+            <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item73') }}</view>
+            <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item74') }}</view>
+          </view>
+          <view class="tit">{{ t('CWGMarketsLtdPARTNERSAgreement.item8') }}</view>
+          <view class="ul">
+            <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item81') }}</view>
+            <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item82') }}</view>
+            <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item83') }}</view>
+            <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item84') }}</view>
+            <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item85') }}</view>
+            <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item86') }}</view>
+            <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item87') }}</view>
+            <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item88') }}</view>
+            <view class='ul-li'>{{ t('CWGMarketsLtdPARTNERSAgreement.item89') }}</view>
+          </view>
+          <view class="tit">{{ t('CWGMarketsLtdPARTNERSAgreement.item9') }}</view>
+          <view class="p">{{ t('CWGMarketsLtdPARTNERSAgreement.item91') }}</view>
+          <view class="title">{{ t('CWGMarketsLtdPARTNERSAgreement.title2') }}</view>
+          <view class="p">{{ t('CWGMarketsLtdPARTNERSAgreement.item101') }}</view>
+          <view class="p">{{ t('CWGMarketsLtdPARTNERSAgreement.item102') }}</view>
+          <view class="p">{{ t('CWGMarketsLtdPARTNERSAgreement.item103') }}</view>
+          <view class="p">{{ t('CWGMarketsLtdPARTNERSAgreement.item104') }}</view>
+          <view class="p">{{ t('CWGMarketsLtdPARTNERSAgreement.item105') }}</view>
+          <view class="p">{{ t('CWGMarketsLtdPARTNERSAgreement.item106') }}</view>
+        </view>
+
+      </view>
+      <view class="dia-content" v-if="ibStatus.status == 1">
+        <view
+          class="content"
+          style="
+             display: flex;
+             justify-content: center;
+             align-content: center;
+             flex-wrap: wrap;
+             font-size: 20px;
+             height: 150px;
+           "
+        >
+          <view style="width: 100%; margin: 15px 0; font-size: 16px">
+            <i class="el-icon-loading" style="font-size: 32px"></i>
+          </view>
+          <view style="width: 100%; margin: 15px 0; font-size: 14px">
+            <span>{{ t('ApplicationDialog.ibStatus') }}</span>
+          </view>
+        </view>
+      </view>
+      <view class="dia-content" v-if="ibStatus.status == 3">
+        <view
+          class="content"
+          style="
+             display: flex;
+             justify-content: center;
+             align-content: center;
+             flex-wrap: wrap;
+             font-size: 14px;
+             height: 150px;
+           "
+        >
+          <view
+            style="width: 100%; margin: 15px 0; font-weight: bold"
+          >{{ t('ApplicationDialog.ibRefused') }}
+          </view>
+          <view style="width: 100%; margin: 15px 0; font-size: 14px">
+            <span>{{ t('ApplicationDialog.ibDes') }}</span>
+            <span v-if="reasons[ibStatus.approveDesc]">{{
+                lang == 'cn'
+                  ? reasons[ibStatus.approveDesc].content
+                  : reasons[ibStatus.approveDesc].enContent
+              }}</span>
+            <span v-else>{{ ibStatus.approveDesc || '--' }}</span>
+          </view>
+        </view>
+      </view>
+      <view class="agree" slot="footer">
+        <checkbox-group v-model="ibAgree">
+          <label class="checkbox">
+            <checkbox value="1" />
+            <text class="crm-cursor" style="text-decoration: underline;" @click="dialogCheckTip = true">{{
+                t('Home.msg.Agree1') }}</text>
+          </label>
+        </checkbox-group>
+      </view>
+    </cwg-popup>
+  </view>
+</template>
+
+<script setup lang="ts">
+  import { computed, ref, onMounted } from 'vue'
+  import { useI18n } from 'vue-i18n'
+  import useUserStore from '@/stores/use-user-store'
+  import useRouter from '@/hooks/useRouter'
+  import useRoute from '@/hooks/useRoute'
+  import { personalApi } from '@/service/personal'
+  import Config from '@/config'
+  import { customApi } from '@/service/custom'
+  import { useStorage } from '@vueuse/core'
+
+  const { Code } = Config
+  const router = useRouter()
+  const route = useRoute()
+  const { userInfo,saveUserInfo } = useUserStore()
+  const { t } = useI18n()
+  const dialogCheckStatus = ref('')
+  const dialogCheck = ref()
+  const dialogApplyIb = ref()
+  const ibStatus = ref({})
+  const lang = useStorage('lang')
+  const reasons = ref({})
+  const ibAgree = ref('')
+
+  const customInfo = computed(() => {
+    return userInfo.customInfo
+  })
+
+  const confirmText = computed(() => {
+    return ibStatus.value.status == 3 ? t('Btn.AgainApply') : t('Btn.Confirm')
+  })
+
+  const getLogin = async () => {
+    let res = await personalApi.CustomLoginInfo()
+    if (res.code == Code.StatusOK) {
+      dialogCheckStatus.value = res.data.customInfo.applyRealStatus
+      if (
+        res.data.customInfo.status == 2 &&
+        res.data.customInfo.applyRealStatus == 2
+      ) {
+        applyIbStatus()
+      } else {
+        applyIbStatus()
+        // dialogAuthCheck.value = false;
+        // dialogCheck.value.open()
+      }
+    } else {
+      uni.showToast({
+        title: t('M\'g.SystemError'),
+        icon: 'none',
+      })
+    }
+  }
+  //获取原因列表
+  const searchReasons = async () => {
+    let res = await customApi.reasonsRefusalList({ type: nviewl })
+    if (res.code == Code.StatusOK) {
+      if (res.data == nviewl) {
+        reasons.value = {}
+      } else {
+        reasons.value = res.data
+      }
+    } else {
+      uni.showToast({
+        title: res.msg,
+        icon: 'none',
+      })
+    }
+  }
+  const closeIb = async () => {
+    dialogApplyIb.value.close()
+  }
+  // 确认按钮
+  const confirmIb = async () => {
+    const status = ibStatus.value.status
+    if (status == 0) {
+      applyIb()
+    }else if (status == 1) {
+      dialogApplyIb.value.close()
+    }else if (status == 3) {
+      ibStatus.value.status = 0
+    }
+  }
+  const getLoginInfo = async () => {
+    let res = await customApi.CustomLoginInfo();
+    if (res.code == Code.StatusOK) {
+      saveUserInfo(res.data)
+    } else {
+      uni.showToast({title: t('Msg.SystemError'),
+icon: 'none'})
+    }
+  }
+  // 申请ib
+  const applyIb = async () => {
+    if (!ibAgree.value) {
+      uni.showToast({title: t("Msg.Read"),icon: 'none'})
+      return
+    }
+    let res = await customApi.customApplyIb()
+    if (res.code == Code.StatusOK) {
+      uni.showToast({title: t("Msg.Success"),icon: 'none'})
+      getLoginInfo();
+      reload();
+    }
+  }
+
+  //判断申请ib状态
+  const applyIbStatus = async () => {
+    let res = await customApi.customApplyIbStatus({})
+    if (res.code == Code.StatusOK) {
+      ibStatus.value = res.data
+      if (ibStatus.value.status == 0) {
+        dialogApplyIb.value.open()
+      } else if (ibStatus.value.status == 1) {
+        dialogApplyIb.value.open()
+      } else if (ibStatus.value.status == 2) {
+
+      } else if (this.ibStatus.status == 3) {
+        searchReasons()
+        dialogApplyIb.value.open()
+      }
+    } else {
+      uni.showToast({
+        title: res.msg,
+        icon: 'none',
+      })
+    }
+  }
+
+  onMounted(() => {
+    getLogin()
+    dialogApplyIb.value.open()
+  })
+
+
+</script>
+
+<style scoped lang="scss">
+  @import "@/uni.scss";
+
+  #Agreement {
+    p,
+    ul,
+    li {
+      line-height: 1.8;
+      font-size: 14px;
+      padding: 2px 0;
+      text-indent: 25px;
+    }
+    ul ul {
+      box-sizing: border-box;
+      padding-left: 25px;
+    }
+    .title {
+      text-align: center;
+      font-size: 16px;
+      font-weight: bold;
+      text-indent: 0;
+      color: #EB3F57;
+    }
+    .p,.ul-li,.ul{
+      line-height: 1.8;
+      font-size: 14px;
+      padding: 2px 0;
+      text-indent: 25px;
+    }
+    .ul .ul{
+      box-sizing: border-box;
+      padding-left: 25px;
+    }
+    .tit {
+      font-weight: bold;
+      text-indent: 0;
+    }
+  }
+</style>

+ 17 - 1
components/PrefectInfo.vue

@@ -25,7 +25,7 @@
 </template>
 
 <script setup lang="ts">
-  import { computed, ref } from 'vue'
+  import { computed, ref,onMounted } from 'vue'
   import { useI18n } from 'vue-i18n'
   import useUserStore from '@/stores/use-user-store'
   import useRouter from '@/hooks/useRouter'
@@ -36,6 +36,8 @@
   const route = useRoute()
   const { userInfo } = useUserStore()
   const { t } = useI18n()
+  // 认证弹窗,
+  const dialogCheck = ref(null)
   const customInfo = computed(() => {
     return userInfo.customInfo
   })
@@ -45,6 +47,9 @@
     console.log(route)
     return !(status == 2 || applyRealStatus == 1|| applyRealStatus ==2) && route.path != '/pages/mine/improveImmediately'
   })
+  const info = computed(() => {
+    return userInfo.customInfo
+  })
 
   function immediately() {
     console.log(customInfo.value)
@@ -52,6 +57,17 @@
       path:'/pages/mine/improveImmediately'
     })
   }
+  function initStatus() {
+    dialogCheck.value.close()
+  }
+
+  onMounted(() => {
+    if (info.value.status == 2|| [1,2].includes(info.value.applyRealStatus)) {
+      // dialogCheck.value.open()
+    }else{
+      // dialogCheck.value.close()
+    }
+  })
 
 </script>
 

+ 153 - 146
components/cwg-page-wrapper.vue

@@ -2,7 +2,7 @@
   <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"
-        :sidebarVisible="sidebarVisible" />
+                     :sidebarVisible="sidebarVisible" />
       <!--      占位-->
       <view class="fixed"></view>
     </cwg-match-media>
@@ -23,6 +23,8 @@
       <view class="content-info">
         <!--      完善信息提示,-->
         <PrefectInfo />
+        <!--      申请成为ib,-->
+        <IbInfo />
 
         <view class="content-wrapper" :class="{ 'content-wrapper-padding': isContentPadding }">
           <!-- <cwg-header /> -->
@@ -38,149 +40,154 @@
       <cwg-tab-bar v-model:isTabBarPage="isTabBarPage" />
     </cwg-match-media>
     <cwg-right-drawer v-if="!isLoginPage" ref="rightDrawerRef" @navigate="handleDrawerNavigate"
-      @logout="handleDrawerLogout" />
+                      @logout="handleDrawerLogout" />
     <cwg-notice-drawer v-if="!isLoginPage" ref="noticeDrawerRef" @navigate="handleDrawerNavigate"
-      @logout="handleDrawerLogout" />
+                       @logout="handleDrawerLogout" />
   </view>
 </template>
 
 <script setup lang="ts">
-import { ref, computed } from "vue";
-import { onLoad, onShow } from '@dcloudio/uni-app'
-import { updateRoute } from '@/hooks/useRoute'
-import useRouter from '@/hooks/useRouter'
-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()
-
-const props = defineProps({
-  // 是否固定顶部导航栏
-  isHeaderFixed: {
-    type: Boolean,
-    default: false
-  },
-  // 是否登录页,登录页不显示侧边栏和顶部导航,注册忘记密码等页面
-  isLoginPage: {
-    type: Boolean,
-    default: false
-  },
-  // 是否含有padding 默认有
-  isContentPadding: {
-    type: Boolean,
-    default: true
-  },
-  // 主内容背景颜色
-  bgColor: {
-    type: String,
-    default: ''
+  import { ref, computed } from 'vue'
+  import { onLoad, onShow } from '@dcloudio/uni-app'
+  import useRoute, { updateRoute } from '@/hooks/useRoute'
+  import useRouter from '@/hooks/useRouter'
+  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'
+  import IbInfo from '@/components/IbInfo.vue'
+
+  const globalStore = useGlobalStore()
+  const router = useRouter()
+  const userStore = useUserStore()
+
+  const props = defineProps({
+    // 是否固定顶部导航栏
+    isHeaderFixed: {
+      type: Boolean,
+      default: false,
+    },
+    // 是否登录页,登录页不显示侧边栏和顶部导航,注册忘记密码等页面
+    isLoginPage: {
+      type: Boolean,
+      default: false,
+    },
+    // 是否含有padding 默认有
+    isContentPadding: {
+      type: Boolean,
+      default: true,
+    },
+    // 主内容背景颜色
+    bgColor: {
+      type: String,
+      default: '',
+    },
+  })
+  const isDark = computed(() => globalStore.theme === 'dark')
+  const isTabBarPage = ref(false)
+
+
+  const rightDrawerRef = ref<any>(null)
+  const noticeDrawerRef = ref<any>(null)
+  uni.$on('open-notice-drawer', (data) => {
+    console.log(121212)
+    noticeDrawerRef.value?.open()
+  })
+  uni.$on('open-right-drawer', (data) => {
+    openRightDrawer()
+  })
+
+  function openRightDrawer() {
+    rightDrawerRef.value?.open()
   }
-})
-const isDark = computed(() => globalStore.theme === 'dark')
-const isTabBarPage = ref(false)
-
-
-const rightDrawerRef = ref<any>(null)
-const noticeDrawerRef = ref<any>(null)
-uni.$on('open-notice-drawer', (data) => {
-  console.log(121212)
-  noticeDrawerRef.value?.open()
-})
-uni.$on('open-right-drawer', (data) => {
-  openRightDrawer()
-})
-function openRightDrawer() {
-  rightDrawerRef.value?.open()
-}
-const sidebarVisible = ref(false)
-function openLeftDrawer() {
-  sidebarVisible.value = !sidebarVisible.value;
-}
 
-function handleDrawerNavigate(path: string) {
-  router.push(path)
-}
+  const sidebarVisible = ref(false)
 
-async function handleDrawerLogout() {
-  try {
-    const res = await userApi.logout()
-    if (res.code === 200) {
+  function openLeftDrawer() {
+    sidebarVisible.value = !sidebarVisible.value
+  }
+
+  function handleDrawerNavigate(path: string) {
+    router.push(path)
+  }
+
+  async function handleDrawerLogout() {
+    try {
+      const res = await userApi.logout()
+      if (res.code === 200) {
+        userStore.clearUserInfo()
+        router.push('/pages/login/index')
+      }
+    } catch (error) {
       userStore.clearUserInfo()
       router.push('/pages/login/index')
     }
-  } catch (error) {
-    userStore.clearUserInfo()
-    router.push('/pages/login/index')
   }
-}
 
-onLoad(() => {
-  updateRoute()
-})
+  onLoad(() => {
+    updateRoute()
+  })
 
-onShow(() => {
-  updateRoute()
-})
+  onShow(() => {
+    updateRoute()
+  })
 
 </script>
 
 <style lang="scss" scoped>
-@import "@/uni.scss";
+  @import "@/uni.scss";
 
-.page-wrapper {
-  height: calc(100vh - 56px);
-}
-
-.header-box {
-  width: 100%;
-  height: 56px;
-}
+  .page-wrapper {
+    height: calc(100vh - 56px);
+  }
 
-.page-content {
-  width: 100%;
-  height: calc(100vh - 56px);
-  overflow: hidden;
-  display: flex;
-  flex-direction: column;
-  position: relative;
-  box-sizing: border-box;
+  .header-box {
+    width: 100%;
+    height: 56px;
+  }
 
-  .content-info {
+  .page-content {
+    width: 100%;
     height: calc(100vh - 56px);
-    overflow: auto;
-  }
+    overflow: hidden;
+    display: flex;
+    flex-direction: column;
+    position: relative;
+    box-sizing: border-box;
+
+    .content-info {
+      height: calc(100vh - 56px);
+      overflow: auto;
+    }
 
-}
+  }
 
-.left-sidebar {
-  width: 0;
-  overflow: hidden;
-  position: absolute;
-  left: 0;
-  top: 0;
-  z-index: 1000;
-  background-color: #fff;
-  transition: width 281ms cubic-bezier(0.4, 0, 0.2, 1);
+  .left-sidebar {
+    width: 0;
+    overflow: hidden;
+    position: absolute;
+    left: 0;
+    top: 0;
+    z-index: 1000;
+    background-color: #fff;
+    transition: width 281ms cubic-bezier(0.4, 0, 0.2, 1);
 
-}
+  }
 
-.sidebar-mask {
-  position: absolute;
-  left: 0;
-  top: 0;
-  width: 100vw;
-  height: calc(100vh - 56px);
-  background-color: rgba(0, 0, 0, 0.2);
-  z-index: 999;
-}
+  .sidebar-mask {
+    position: absolute;
+    left: 0;
+    top: 0;
+    width: 100vw;
+    height: calc(100vh - 56px);
+    background-color: rgba(0, 0, 0, 0.2);
+    z-index: 999;
+  }
 
-.sidebar-visible {
-  width: px2rpx(280);
-}
+  .sidebar-visible {
+    width: px2rpx(280);
+  }
 
 .content-wrapper {
   max-width: px2rpx(1224);
@@ -194,40 +201,40 @@ onShow(() => {
   // border: 1px solid rgba(108, 133, 149, 0.12);
 }
 
-.fixed {
-  // position: fixed;
-  // top: 0;
-  // left: 0;
-  width: 100%;
-  height: 56px;
-  background-color: var(--color-white);
-  z-index: 9;
-}
+  .fixed {
+    // position: fixed;
+    // top: 0;
+    // left: 0;
+    width: 100%;
+    height: 56px;
+    background-color: var(--color-white);
+    z-index: 9;
+  }
 
-@media screen and (max-width: 1504px) {
-  .content-wrapper-padding {
-    padding: px2rpx(20);
+  @media screen and (max-width: 1504px) {
+    .content-wrapper-padding {
+      padding: px2rpx(20);
+    }
   }
-}
 
-@media screen and (max-width: 991px) {
-  .page-wrapper {
-    height: 100vh;
+  @media screen and (max-width: 991px) {
+    .page-wrapper {
+      height: 100vh;
+    }
   }
-}
 
-.mobile-menu-btn {
-  width: px2rpx(64);
-  height: px2rpx(64);
-  display: flex;
-  align-items: center;
-  justify-content: center;
-}
+  .mobile-menu-btn {
+    width: px2rpx(64);
+    height: px2rpx(64);
+    display: flex;
+    align-items: center;
+    justify-content: center;
+  }
 
-// 针对不同屏幕尺寸的响应式调整
-@media screen and (max-width: 767px) {
-  .content-wrapper-padding {
-    padding: px2rpx(0) !important;
+  // 针对不同屏幕尺寸的响应式调整
+  @media screen and (max-width: 767px) {
+    .content-wrapper-padding {
+      padding: px2rpx(0) !important;
+    }
   }
-}
 </style>

+ 4 - 1
components/cwg-popup.vue

@@ -46,7 +46,7 @@
 </template>
 
 <script setup>
-import { ref, watch, computed } from 'vue'
+import { ref, watch, computed,useSlots } from 'vue'
 import { useI18n } from 'vue-i18n'
 
 const { t } = useI18n()
@@ -124,9 +124,12 @@ const emit = defineEmits(['update:visible', 'confirm', 'close', 'single-click'])
 
 // 弹窗引用
 const popupRef = ref(null)
+const slots = useSlots()
 
 // 监听 visible 变化
 watch(() => props.visible, (val) => {
+
+  console.log(slots)
     if (val) {
         popupRef.value?.open()
     } else {