ljc 1 mēnesi atpakaļ
vecāks
revīzija
d0d39bb97b
4 mainītis faili ar 120 papildinājumiem un 261 dzēšanām
  1. 2 2
      components/cwg-tabel.vue
  2. 100 259
      pages/ib/index.vue
  3. 18 0
      postcss.config.js
  4. BIN
      static/images/dollar.png

+ 2 - 2
components/cwg-tabel.vue

@@ -214,9 +214,9 @@ const props = defineProps({
     // 表头样式自定义
     headerBackground: { type: String, default: '#fff' },
     headerColor: { type: String, default: 'var(--color-slate-800)' },
-    headerFontSize: { type: [String, Number], default: '14rpx' },
+    headerFontSize: { type: [String, Number], default: '28rpx' },
     headerFontWeight: { type: [String, Number], default: 600 },
-    headerHeight: { type: [String, Number], default: '32rpx' },
+    headerHeight: { type: [String, Number], default: '64rpx' },
     headerClass: { type: [String, Array], default: '' },
     headerStyle: { type: Object, default: () => ({}) },
     stickyHeader: { type: Boolean, default: true },

+ 100 - 259
pages/ib/index.vue

@@ -4,84 +4,105 @@
     <uni-loading v-if="loading" />
     <uni-row v-else class="demo-uni-row uni-row1" :gutter="20">
 
+      <uni-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
+        <view class="border-0 card-header ">
+          <view class="d-flex flex-wrap gap-3 align-items-center justify-content-between mb-3" style="width: 100%;">
+            <view class="mb-0 h3">Welcome to IB Zone!</view>
+            <button type="button" class="btn  btn-secondary  btn-shadow waves-effect" @click="LinkActivity1">
+              <cwg-icon name="crm-share-nodes" :size="24" color="#fff" />{{t('Ib.Index.CreateLinkActivity')}}</button>
+          </view>
+        </view>
+      </uni-col>
       <uni-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="uni-col-left">
         <view class="dashboard-container">
-          <!-- 余额卡片 -->
-          <view class="card balance-card">
-            <view class="card-header">
-              <view class="header-left">
-                <cwg-icon name="qbye" :size="24" color="#000" />
-                <text class="header-title">{{ t('news_add_field.Label.Balance') }}</text>
-              </view>
-              <view class="header-right">
-                <cwg-dropdown :menu-list="menuList" @menuClick="handleMenuClick">
-                  <view class="pc-header-btn">
-                    <cwg-icon name="crm-ellipsis" :size="24" color="#000" />
-                  </view>
-                </cwg-dropdown>
-              </view>
-            </view>
-            <view class="balance-content">
-              <view class="balance-main">
-                <text class="balance-currency">$</text>
-                <text class="balance-amount">{{ balanceInt }}</text>
-                <text class="balance-decimal">.{{ balanceDecimal }}</text>
-              </view>
-              <view class="total-earnings">
-                <text class="total-label">{{ t('Ib.Index.TotalRevenue') }}</text>
-                <text class="total-value">${{ numberFormat(ibData.all || '0') }}</text>
+          <!-- 余额卡片  操作代码隐藏了,-->
+          <!--                <cwg-dropdown :menu-list="menuList" @menuClick="handleMenuClick">-->
+          <!--                  <view class="pc-header-btn">-->
+          <!--                    <cwg-icon name="crm-ellipsis" :size="24" color="#000" />-->
+          <!--                  </view>-->
+          <!--                </cwg-dropdown>-->
+          <view class="card position-relative">
+            <view class="card-body d-flex gap-3 align-items-center">
+              <view class="clearfix pe-2 text-warning"> <img src="/static/images/dollar.png" alt="dollar" class="img-fluid"> </view>
+              <view class="clearfix">
+                <view class="mb-1">{{ t('news_add_field.Label.Balance') }}</view>
+                <view class="mb-0 fw-bold">{{ balanceInt }}.{{ balanceDecimal }}<text class="badge bg-danger-subtle text-danger">{{ t('Ib.Index.TotalRevenue') }}: ${{numberFormat(ibData.all || '0')}}</text></view>
               </view>
             </view>
           </view>
+          
 
           <!-- 开户链接 -->
-          <view class="card partner-card">
-            <view class="card-header">
-              <view class="header-left">
-                <cwg-icon name="crm-share-nodes" :size="24" color="#000" />
-                <text class="header-title">{{ t('Ib.Index.Link') }}</text>
+<!--          <view class="card partner-card">-->
+<!--            <view class="card-header">-->
+<!--              <view class="header-left">-->
+<!--                <cwg-icon name="crm-share-nodes" :size="24" color="#000" />-->
+<!--                <text class="header-title">{{ t('Ib.Index.Link') }}</text>-->
+<!--              </view>-->
+<!--            </view>-->
+<!--            <view class="partner-content">-->
+<!--              <view class="link-area">-->
+<!--                <button class="link-btn" @click="LinkActivity1">-->
+<!--                  {{ t('Ib.Index.CreateLink') }}-->
+<!--                </button>-->
+<!--                &lt;!&ndash;                <button class="link-btn" @click="LinkActivity">&ndash;&gt;-->
+<!--                &lt;!&ndash;                  {{ t('Ib.Index.CreateLinkActivity') }}&ndash;&gt;-->
+<!--                &lt;!&ndash;                </button>&ndash;&gt;-->
+<!--              </view>-->
+<!--            </view>-->
+<!--          </view>-->
+
+          <view class="card position-relative">
+            <view class="card-body d-flex gap-3 align-items-center">
+              <view class="clearfix pe-2 text-warning">
+                <cwg-icon name="crm-user" :size="35" color="#FDBB1F" />
               </view>
-            </view>
-            <view class="partner-content">
-              <view class="link-area">
-                <button class="link-btn" @click="LinkActivity1">
-                  {{ t('Ib.Index.CreateLink') }}
-                </button>
-                <!--                <button class="link-btn" @click="LinkActivity">-->
-                <!--                  {{ t('Ib.Index.CreateLinkActivity') }}-->
-                <!--                </button>-->
+              <view class="clearfix" @click="toCustomManagement">
+                <view class="mb-1">{{ t('Ib.Index.NameCustom') }}-{{ t('Ib.Index.Custom') }}</view>
+                <view class="mb-0 fw-bold">{{ ibData.customAmount || '0' }}</view>
               </view>
             </view>
           </view>
-
-
-          <!-- 名下客户 -->
-          <view class="card custom-card">
-            <view class="card-header">
-              <view class="header-left">
-                <cwg-icon name="crm-custom" :size="24" color="#000" />
-                <text class="header-title">{{ t('Ib.Index.NameCustom') }}</text>
-              </view>
-            </view>
-            <view class="custom-content">
-              <view class="con" @click="toCustomManagement">
-                <view class="num">
-                  {{ ibData.customAmount || '0' }}
-                </view>
-                <view class="des">
-                  {{ t('Ib.Index.Custom') }}
-                </view>
+          <view class="card position-relative">
+            <view class="card-body d-flex gap-3 align-items-center">
+              <view class="clearfix pe-2 text-warning">
+                <cwg-icon name="crm-user" :size="35" color="#FDBB1F" />
               </view>
-              <view class="con" @click="toIbManagement">
-                <view class="num">
-                  {{ ibData.ibAmount || '0' }}
-                </view>
-                <view class="des">
-                  {{ t('Ib.Index.Agent') }}
-                </view>
+              <view class="clearfix" @click="toIbManagement">
+                <view class="mb-1">{{ t('Ib.Index.NameCustom') }}-{{ t('Ib.Index.Agent') }}</view>
+                <view class="mb-0 fw-bold">{{ ibData.ibAmount || '0' }}</view>
               </view>
             </view>
           </view>
+
+
+          <!-- 名下客户 -->
+<!--          <view class="card custom-card">-->
+<!--            <view class="card-header">-->
+<!--              <view class="header-left">-->
+<!--                <cwg-icon name="crm-custom" :size="24" color="#333" />-->
+<!--                <text class="header-title">{{ t('Ib.Index.NameCustom') }}</text>-->
+<!--              </view>-->
+<!--            </view>-->
+<!--            <view class="custom-content">-->
+<!--              <view class="con" @click="toCustomManagement">-->
+<!--                <view class="num">-->
+<!--                  {{ ibData.customAmount || '0' }}-->
+<!--                </view>-->
+<!--                <view class="des">-->
+<!--                  {{ t('Ib.Index.Custom') }}-->
+<!--                </view>-->
+<!--              </view>-->
+<!--              <view class="con" @click="toIbManagement">-->
+<!--                <view class="num">-->
+<!--                  {{ ibData.ibAmount || '0' }}-->
+<!--                </view>-->
+<!--                <view class="des">-->
+<!--                  {{ t('Ib.Index.Agent') }}-->
+<!--                </view>-->
+<!--              </view>-->
+<!--            </view>-->
+<!--          </view>-->
           <!-- 归属推荐码 -->
           <!--          <view class="card code-card">
                       <view class="card-header">
@@ -105,9 +126,9 @@
         </view>
       </uni-col>
       <uni-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24" class="uni-col-right">
-        <view class="dashboard-container">
-          <view class="card mam-card">
-            <view class="card-header">
+        <view class="card">
+          <view class="card-body">
+            <view class="d-flex flex-wrap gap-3 align-items-center justify-content-between mb-3 ">
               <view class="header-left">
                 <text class="header-title">{{ t('Ib.Index.MAMList') }}</text>
               </view>
@@ -184,120 +205,6 @@
         </view>
       </uni-col>
     </uni-row>
-
-    <!-- 二维码弹窗 -->
-    <cwg-popup ref="linkPopup" type="center" :title="t('Ib.Index.CreateLink')" :showFooters="false" showFooterLine>
-      <view class="dia-content">
-        <view class="content" style="font-size: 14px; text-align: left">
-          <view class="label">{{ t('Ib.Index.Spread5') }} :</view>
-          <cwg-combox v-model="excludeShowLoginTypes" :multiple="true" :options="excludeList"
-            :placeholder="t('placeholder.choose')" @change="handleChange" />
-
-          <view class="label">{{ t('Ib.Index.Spread4') }} :</view>
-          <cwg-combox v-model:value="selectedSpreadId" :options="spreadList.map(item => ({
-            value: item.id,
-            text: t('Ib.Index.Commission') + ':' + item.comPoint +
-              (levelNum === 1 ? '-' + t('Ib.Index.Hide') + ':' + item.hide :
-                (fixedHide === 1 ? '' : '-' + t('Ib.Index.Hide') + ':' + item.hide))
-          }))" :placeholder="t('placeholder.choose')" />
-
-          <view class="label">{{ t('Ib.Index.IbInvalid') }}</view>
-          <cwg-combox v-model:value="ibInvalid" :options="[
-            { value: 'B0', text: t('Ib.Custom.Allow') },
-            { value: 'B1', text: t('Ib.Custom.NotAllow') }
-          ]" :placeholder="t('placeholder.choose')" />
-
-          <view>
-            <text style="line-height: 1.5">{{ t('ApplicationDialog.item1') }}</text>
-          </view>
-
-          <view>
-            <text style="line-height: 1.5">{{ t('ApplicationDialog.item2') }}</text>
-            <a :href="country == 'NG' || country == 'TH' || country == 'LA'
-              ? `pdf/pdf6/all/Account Type Allocation Table - ${lang}.pdf`
-              : `pdf/pdf6/no/Account Type Allocation Table-${lang}.pdf`" target="_blank">
-              {{ t('ApplicationDialog.item3') }}
-            </a>
-          </view>
-
-          <view class="btn">
-            <button class="crm-cursor" @click="CreateLink">{{ t('Ib.Index.CreateLink') }}
-            </button>
-          </view>
-
-          <view class="link qrCode" v-if="link">
-            <QrCode ref="qrCode" :text="link" :width="200" :height="200" />
-            <view class="btn">
-              <button class="crm-cursor" style="height: 16px" @click="downloadQrCode()">{{ t('Btn.item9') }}
-              </button>
-            </view>
-          </view>
-
-          <view class="link">
-            <uni-easyinput disabled v-model="link" />
-            <button class="btn" @click="CopyShareLink(link)">
-              {{ t('Ib.Index.Copy') }}
-            </button>
-          </view>
-        </view>
-      </view>
-    </cwg-popup>
-    <!-- 活动链接弹窗 -->
-    <cwg-popup ref="linkActivityPopup" type="center" :title="t('Ib.Index.CreateLinkActiv')" :showFooters="false"
-      showFooterLine>
-      <view class="dia-content">
-        <view class="content" style="font-size: 14px; text-align: left">
-          <view class="label">{{ t('Ib.Index.ChooseActiv') }}</view>
-          <cwg-combox v-model:value="activityLing"
-            :options="agentLinkList.map(item => ({ value: item.link, text: item.name }))"
-            :placeholder="t('Ib.Index.ChooseActiv')" />
-
-          <view class="label">{{ t('Ib.Index.Spread5') }} :</view>
-          <cwg-combox v-model:value="excludeShowLoginTypes" :multiple="true" :options="excludeList"
-            :placeholder="t('placeholder.choose')" @change="handleChange" />
-
-          <view class="label">{{ t('Ib.Index.Spread4') }} :</view>
-          <cwg-combox v-model:value="selectedSpreadId" :options="spreadList.map(item => ({
-            value: item.id,
-            text: t('Ib.Index.Commission') + ':' + item.comPoint +
-              (levelNum === 1 ? '-' + t('Ib.Index.Hide') + ':' + item.hide :
-                (fixedHide === 1 ? '' : '-' + t('Ib.Index.Hide') + ':' + item.hide))
-          }))" :placeholder="t('placeholder.choose')" />
-
-          <view class="label">{{ t('Ib.Index.IbInvalid') }}</view>
-          <cwg-combox v-model:value="ibInvalid" :options="[
-            { value: 'B0', text: t('Ib.Custom.Allow') },
-            { value: 'B1', text: t('Ib.Custom.NotAllow') }
-          ]" :placeholder="t('placeholder.choose')" />
-
-          <view>
-            <text style="line-height: 1.5">{{ t('ApplicationDialog.item1') }}</text>
-          </view>
-
-          <view>
-            <text style="line-height: 1.5">{{ t('ApplicationDialog.item2') }}</text>
-            <a :href="country == 'NG' || country == 'TH' || country == 'LA' || isAfterJuly7()
-              ? `pdf/pdf6/all/Account Type Allocation Table - ${lang}.pdf`
-              : `pdf/pdf6/no/Account Type Allocation Table-${lang}.pdf`" target="_blank">
-              {{ t('ApplicationDialog.item3') }}
-            </a>
-          </view>
-
-          <view class="btn">
-            <button class="crm-cursor" @click="CreateActivityLink">{{ t('Ib.Index.CreateLinkActivity') }}
-            </button>
-          </view>
-
-          <view class="link qrCode" v-if="linkActivity">
-            <QrCode ref="qrCode1" :text="linkActivity" :width="200" :height="200" />
-            <view class="btn">
-              <button class="crm-cursor" @click="downloadQrCode(1)">{{ t('Btn.item9') }}
-              </button>
-            </view>
-          </view>
-        </view>
-      </view>
-    </cwg-popup>
     <!-- 调整收益分成弹窗 -->
     <cwg-popup :visible="dialogPercent" :title="t('Ib.PammManager.percent')" @close="closeDialogPercent"
       @confirm="applyPercent">
@@ -344,6 +251,7 @@ import { useStorage } from '@/hooks/useStorage'
 import QrCode from '@/components/QrCode.vue'
 import { useFilters } from '@/composables/useFilters'
 import { isAfterJuly28 } from '@/utils/dateUtils'
+import useGlobalStore from '@/stores/use-global-store'
 
 const { t } = useI18n()
 const loading = ref(false)
@@ -351,12 +259,13 @@ const router = useRouter()
 const { Code } = config
 const { userInfo } = useUserStore()
 const { numberFormat } = useFilters()
+const globalStore = useGlobalStore()
 // 数据
 const totalEarnings = ref(0.00)
 const partnerLink = ref('https://one.exnessonelink.com/a/plokue4yj3')
 const partnerCode = ref('PLOKUE4YJ3')
 const activeTab = ref('link') // 'link' 或 'code'
-
+const isDark = computed(() => globalStore.theme === 'dark')
 const ibData = ref({
   customAmount: 0,
   ibAmount: 0,
@@ -599,80 +508,7 @@ const LinkActivity1 = async () => {
     url: '/pages/ib/linkList',
   })
 }
-// 生成活动分享链接
-const LinkActivity = async () => {
-  if (flag.value) {
-
-  } else {
-    flag.value = true
-  }
-  let res = await ibApi.marketAgentLinkList({})
-  if (res.code === Code.StatusOK) {
-    agentLinkList.value = res.data ?? []
-    loginTypeList()
-    getAgentAccountSetting()
-    activityLing.value = ''
-    linkActivity.value = ''
-    commission.value = 0
-    ibInvalid.value = 'B0'
-    linkActivityPopup.value.open()
-    flag.value = false
-  }
-}
 
-const CreateActivityLink = async () => {
-  if (!activityLing.value) {
-    uni.showToast({ title: t('Ib.Index.ChooseActiv'), icon: 'error' })
-    return
-  }
-  const linkValue = await getLink1()
-  if (!linkValue) return
-  if (activityLing.value.indexOf('http') > -1) {
-    if (activityLing.value.indexOf('?') > -1) {
-      linkActivity.value =
-        activityLing.value +
-        '&mmdi=' +
-        getInfoId.value +
-        '&mmF=' +
-        linkValue +
-        '&mmB=' +
-        ibInvalid.value
-    } else {
-      linkActivity.value =
-        activityLing.value +
-        '?mmdi=' +
-        getInfoId.value +
-        '&mmF=' +
-        linkValue +
-        '&mmB=' +
-        ibInvalid.value
-    }
-  } else {
-    if (activityLing.value.indexOf('?') > -1) {
-      linkActivity.value =
-        Host80 +
-        '/' +
-        activityLing.value +
-        '&mmdi=' +
-        getInfoId.value +
-        '&mmF=' +
-        linkValue +
-        '&mmB=' +
-        ibInvalid.value
-    } else {
-      linkActivity.value =
-        Host80 +
-        '/' +
-        activityLing.value +
-        '?mmdi=' +
-        getInfoId.value +
-        '&mmF=' +
-        linkValue +
-        '&mmB=' +
-        ibInvalid.value
-    }
-  }
-}
 const handleMenuClick = ({ value }) => {
   console.log(value.type)
   if (value.type === 1) {
@@ -940,13 +776,13 @@ onMounted(async () => {
 
   /* 卡片通用样式 */
   .card {
-    background: var(--bs-body-bg);
-    color: var(--bs-emphasis-color);
-    padding: px2rpx(12) px2rpx(16);
-    border-radius: 4rpx;
+    //background: var(--bs-body-bg);
+    //color: var(--bs-emphasis-color);
+    //padding: px2rpx(12) px2rpx(16);
+    //border-radius: 4rpx;
     flex: 1;
     margin: 0 px2rpx(5) px2rpx(10);
-    box-shadow: 0 px2rpx(4) px2rpx(12) rgba(0, 0, 0, 0.2);
+    //box-shadow: 0 px2rpx(4) px2rpx(12) rgba(0, 0, 0, 0.2);
   }
 
 .custom-dialog-content {
@@ -964,6 +800,11 @@ onMounted(async () => {
   justify-content: space-between;
   align-items: center;
   margin-bottom: px2rpx(12);
+  .btn{
+    margin: 0;
+    display: flex;
+    align-items: center;
+  }
 }
 
 .header-left {

+ 18 - 0
postcss.config.js

@@ -0,0 +1,18 @@
+module.exports = {
+  plugins: {
+    'postcss-px-to-viewport': {
+      viewportWidth: 750,
+      unitPrecision: 2,
+      propList: ['*'],
+      viewportUnit: 'rpx',
+      fontViewportUnit: 'rpx',
+      selectorBlackList: [],
+      minPixelValue: 1,
+      mediaQuery: false,
+      replace: true,
+      exclude: [/node_modules/],
+      landscape: false,
+      unitToConvert: 'px'
+    }
+  }
+}

BIN
static/images/dollar.png