zhb 2 months ago
parent
commit
4da449bafb

+ 1 - 238
components/cwg-confirm-popup.vue

@@ -54,17 +54,13 @@ watch(visible, (value) => {
 
 
 <style scoped lang="scss">
 <style scoped lang="scss">
 @import "@/uni.scss";
 @import "@/uni.scss";
-
-.confirm-popup {
+:deep(.cwg-dialog) {
     width: px2rpx(500);
     width: px2rpx(500);
     background-color: #fff;
     background-color: #fff;
     border-radius: px2rpx(16);
     border-radius: px2rpx(16);
-    padding: px2rpx(20) px2rpx(16);
     text-align: center;
     text-align: center;
     box-shadow: 0 px2rpx(10) px2rpx(20) rgba(0, 0, 0, 0.1);
     box-shadow: 0 px2rpx(10) px2rpx(20) rgba(0, 0, 0, 0.1);
-    animation: popup-in 0.3s ease-out;
 }
 }
-
 .confirm-title {
 .confirm-title {
     font-size: px2rpx(24);
     font-size: px2rpx(24);
     font-weight: 600;
     font-weight: 600;
@@ -80,237 +76,4 @@ watch(visible, (value) => {
     word-break: break-word;
     word-break: break-word;
 }
 }
 
 
-.confirm-buttons {
-    display: flex;
-    justify-content: center;
-    gap: px2rpx(24);
-}
-
-.confirm-btn {
-    // flex: 1;
-    min-width: px2rpx(120);
-    padding: 0 px2rpx(20);
-    margin: 0;
-    height: px2rpx(40);
-    line-height: px2rpx(40);
-    border-radius: px2rpx(20);
-    font-size: px2rpx(20);
-    border: none;
-    background-color: #f5f5f5;
-    color: #666;
-    font-weight: 500;
-    transition: all 0.2s ease;
-    -webkit-tap-highlight-color: transparent;
-}
-
-.confirm-btn:active {
-    transform: scale(0.98);
-    opacity: 0.9;
-}
-
-.confirm-btn.confirm {
-    background-color: #2979ff;
-    color: #fff;
-}
-
-.confirm-btn.confirm:active {
-    background-color: #1a66e5;
-}
-
-.confirm-btn.cancel {
-    background-color: #f5f5f5;
-    color: #666;
-}
-
-.confirm-btn.cancel:active {
-    background-color: #e6e6e6;
-}
-
-@keyframes popup-in {
-    from {
-        opacity: 0;
-        transform: scale(0.9);
-    }
-
-    to {
-        opacity: 1;
-        transform: scale(1);
-    }
-}
-
-/* 响应式调整 */
-@media screen and (max-width: 750px) {
-    .confirm-popup {
-        width: 85vw;
-        max-width: px2rpx(600);
-        padding: px2rpx(32) px2rpx(24);
-    }
-
-    .confirm-title {
-        font-size: px2rpx(24);
-        margin-bottom: px2rpx(16);
-    }
-
-    .confirm-content {
-        font-size: px2rpx(20);
-        margin-bottom: px2rpx(32);
-    }
-
-    .confirm-btn {
-        height: px2rpx(48);
-        line-height: px2rpx(48);
-        font-size: px2rpx(20);
-    }
-}
 </style>
 </style>
-
-
-
-
-
-<style lang="scss" scoped>
-.clause-popup {
-    width: 90%;
-    max-width: 800px;
-    max-height: 80vh;
-    overflow: hidden;
-
-    .clause-content {
-        padding: 20px;
-
-        scroll-view {
-            width: 100%;
-
-            h4 {
-                font-size: 16px;
-                font-weight: 600;
-                color: #303133;
-                margin-bottom: 12px;
-            }
-
-            ul {
-                margin-bottom: 20px;
-
-                li {
-                    margin-bottom: 8px;
-                    line-height: 1.5;
-                    color: #606266;
-                }
-            }
-
-            table {
-                margin: 16px 0;
-                width: 100%;
-                border-collapse: collapse;
-
-                th,
-                td {
-                    padding: 10px;
-                    text-align: center;
-                    border: 1px solid #dcdfe6;
-                    font-size: 14px;
-                }
-
-                th {
-                    background: #f5f7fa;
-                    font-weight: 600;
-                    color: #303133;
-                }
-
-                td {
-                    color: #606266;
-                }
-            }
-
-            // Handle v-html content
-            div {
-                line-height: 1.6;
-                color: #606266;
-
-                p {
-                    margin-bottom: 12px;
-                }
-
-                h1,
-                h2,
-                h3,
-                h4,
-                h5,
-                h6 {
-                    margin: 16px 0 8px 0;
-                    color: #303133;
-                }
-
-                ul,
-                ol {
-                    margin-left: 20px;
-                    margin-bottom: 12px;
-                }
-
-                li {
-                    margin-bottom: 4px;
-                }
-            }
-        }
-    }
-
-    .clause-footer {
-        padding: 16px 20px;
-        border-top: 1px solid #e4e7ed;
-        display: flex;
-        justify-content: center;
-
-        button {
-            min-width: 120px;
-            padding: 10px 20px;
-            border-radius: 4px;
-        }
-    }
-}
-
-// Responsive styles
-@media (max-width: 768px) {
-    .clause-popup {
-        width: 95%;
-        max-height: 85vh;
-
-        .clause-header {
-            padding: 12px 16px;
-
-            .clause-title {
-                font-size: 16px;
-            }
-        }
-
-        .clause-content {
-            padding: 16px;
-
-            scroll-view {
-                height: 50vh;
-
-                h4 {
-                    font-size: 14px;
-                }
-
-                table {
-
-                    th,
-                    td {
-                        padding: 8px;
-                        font-size: 12px;
-                    }
-                }
-            }
-        }
-
-        .clause-footer {
-            padding: 12px 16px;
-
-            button {
-                min-width: 100px;
-                padding: 8px 16px;
-            }
-        }
-    }
-}
-</style>

+ 2 - 0
components/cwg-notice.vue

@@ -9,6 +9,7 @@ import { ref, onMounted } from 'vue'
 import { useI18n } from 'vue-i18n'
 import { useI18n } from 'vue-i18n'
 const { t, locale } = useI18n()
 const { t, locale } = useI18n()
 import { newsApi } from '@/service/news'
 import { newsApi } from '@/service/news'
+import { userToken } from "@/composables/config";
 const isRed = ref(false)
 const isRed = ref(false)
 function openNotice() {
 function openNotice() {
     uni.$emit('open-notice-drawer')
     uni.$emit('open-notice-drawer')
@@ -24,6 +25,7 @@ const getData = async () => {
     }
     }
 }
 }
 onMounted(() => {
 onMounted(() => {
+    if (!userToken.value) return
     getData()
     getData()
 })
 })
 </script>
 </script>

+ 4 - 4
pages/customer/payment-history.vue

@@ -174,7 +174,7 @@ const time = computed(() => {
     return clock;
     return clock;
 })
 })
 // 表格列配置
 // 表格列配置
-const columns = ref([
+const columns = computed(() => [
     {
     {
         prop: 'serial',
         prop: 'serial',
         label: t('Custom.PaymentHistory.Serial'),
         label: t('Custom.PaymentHistory.Serial'),
@@ -230,14 +230,14 @@ const columns = ref([
     },
     },
 ])
 ])
 // 动态传入筛选字段配置
 // 动态传入筛选字段配置
-const filterFields = [
+const filterFields = computed(() => [   
     { key: 'type', type: 'select', label: t('Custom.PaymentHistory.payType'), placeholder: t('placeholder.choose'), options: typeMap.value, defaultValue: null },
     { key: 'type', type: 'select', label: t('Custom.PaymentHistory.payType'), placeholder: t('placeholder.choose'), options: typeMap.value, defaultValue: null },
     {
     {
         key: 'orderStatus', type: 'select', label: t('Custom.PaymentHistory.Status'), placeholder: t('placeholder.choose'), options: orderStatusMap.value, defaultValue: null
         key: 'orderStatus', type: 'select', label: t('Custom.PaymentHistory.Status'), placeholder: t('placeholder.choose'), options: orderStatusMap.value, defaultValue: null
     },
     },
     { key: 'login', type: 'input', label: t('Custom.PaymentHistory.TradingAccount'), placeholder: t('placeholder.login'), defaultValue: '' },
     { key: 'login', type: 'input', label: t('Custom.PaymentHistory.TradingAccount'), placeholder: t('placeholder.login'), defaultValue: '' },
     { key: 'date', label: t('placeholder.Start') + ' - ' + t('placeholder.End'), type: 'daterange' }
     { key: 'date', label: t('placeholder.Start') + ' - ' + t('placeholder.End'), type: 'daterange' }
-]
+])
 
 
 const searchParams = ref({})
 const searchParams = ref({})
 
 
@@ -254,7 +254,7 @@ const handleReset = (emptyParams) => {
         tableRef.value.refreshTable()
         tableRef.value.refreshTable()
     })
     })
 }
 }
-const mobilePrimaryFields = ref([
+const mobilePrimaryFields = computed(() => [
     {
     {
         prop: 'serial',
         prop: 'serial',
         label: t('Custom.PaymentHistory.Serial'),
         label: t('Custom.PaymentHistory.Serial'),

+ 2 - 2
pages/customer/recording-history.vue

@@ -240,11 +240,11 @@ const getColumnsByType = (type: number) => {
     }
     }
 }
 }
 // 动态传入筛选字段配置
 // 动态传入筛选字段配置
-const filterFields = [
+const filterFields = computed(() => [   
     { key: 'type', type: 'select', label: t('Custom.PaymentHistory.payType'), placeholder: t('placeholder.choose'), options: typeMap.value, defaultValue: 1 },
     { key: 'type', type: 'select', label: t('Custom.PaymentHistory.payType'), placeholder: t('placeholder.choose'), options: typeMap.value, defaultValue: 1 },
     { key: 'login', type: 'input', label: t('Custom.PaymentHistory.TradingAccount'), placeholder: t('placeholder.login'), defaultValue: '' },
     { key: 'login', type: 'input', label: t('Custom.PaymentHistory.TradingAccount'), placeholder: t('placeholder.login'), defaultValue: '' },
     { key: 'date', label: t('placeholder.Start') + ' - ' + t('placeholder.End'), type: 'daterange' }
     { key: 'date', label: t('placeholder.Start') + ' - ' + t('placeholder.End'), type: 'daterange' }
-]
+])
 const searchParams = ref({})
 const searchParams = ref({})
 const tableRef = ref(null)
 const tableRef = ref(null)
 const handleSearch = (params) => {
 const handleSearch = (params) => {

+ 5 - 4
pages/customer/trade-history.vue

@@ -76,7 +76,7 @@ const orderStatusMap = computed(() => ([
 ]));
 ]));
 
 
 // 表格列配置
 // 表格列配置
-const columns = ref([
+const columns = computed(() => [
     {
     {
         prop: 'symbol',
         prop: 'symbol',
         label: t('Label.Varieties'),      // 交易品种
         label: t('Label.Varieties'),      // 交易品种
@@ -138,7 +138,7 @@ const columns = ref([
     },
     },
 ])
 ])
 
 
-const mobilePrimaryFields = ref([
+const mobilePrimaryFields = computed(() => [
     {
     {
         prop: 'symbol',
         prop: 'symbol',
         label: t('Label.Varieties'),      // 交易品种
         label: t('Label.Varieties'),      // 交易品种
@@ -160,14 +160,15 @@ const mobilePrimaryFields = ref([
 ])
 ])
 
 
 // 动态传入筛选字段配置
 // 动态传入筛选字段配置
-const filterFields = [
+const filterFields = computed(() => [   
+        
     { key: 'type', type: 'select', label: t('Custom.PaymentHistory.payType'), placeholder: t('placeholder.choose'), options: typeMap.value, defaultValue: 1 },
     { key: 'type', type: 'select', label: t('Custom.PaymentHistory.payType'), placeholder: t('placeholder.choose'), options: typeMap.value, defaultValue: 1 },
     { key: 'login', type: 'input', label: t('Custom.PaymentHistory.TradingAccount'), placeholder: t('placeholder.login'), defaultValue: '' },
     { key: 'login', type: 'input', label: t('Custom.PaymentHistory.TradingAccount'), placeholder: t('placeholder.login'), defaultValue: '' },
     {
     {
         key: 'orderStatus', type: 'select', label: t('Custom.PaymentHistory.Status'), placeholder: t('placeholder.choose'), options: orderStatusMap.value, defaultValue: null
         key: 'orderStatus', type: 'select', label: t('Custom.PaymentHistory.Status'), placeholder: t('placeholder.choose'), options: orderStatusMap.value, defaultValue: null
     },
     },
     { key: 'date', label: t('placeholder.Start') + ' - ' + t('placeholder.End'), type: 'daterange' }
     { key: 'date', label: t('placeholder.Start') + ' - ' + t('placeholder.End'), type: 'daterange' }
-]
+])
 const searchParams = ref({})
 const searchParams = ref({})
 const tableRef = ref(null)
 const tableRef = ref(null)
 const handleSearch = (params) => {
 const handleSearch = (params) => {

+ 5 - 4
pages/customer/trade-position.vue

@@ -81,7 +81,7 @@ const orderStatusMap = computed(() => ([
 ]));
 ]));
 
 
 // 表格列配置
 // 表格列配置
-const columns = ref([
+const columns = computed(() => [
     {
     {
         prop: 'symbol',
         prop: 'symbol',
         label: t('Label.Varieties'),      // 交易品种
         label: t('Label.Varieties'),      // 交易品种
@@ -138,7 +138,7 @@ const columns = ref([
     },
     },
 ])
 ])
 
 
-const mobilePrimaryFields = ref([
+const mobilePrimaryFields = computed(() => [
     {
     {
         prop: 'symbol',
         prop: 'symbol',
         label: t('Label.Varieties'),      // 交易品种
         label: t('Label.Varieties'),      // 交易品种
@@ -160,14 +160,15 @@ const mobilePrimaryFields = ref([
 ])
 ])
 
 
 // 动态传入筛选字段配置
 // 动态传入筛选字段配置
-const filterFields = [
+const filterFields = computed(() => [   
+        
     { key: 'type', type: 'select', label: t('Custom.PaymentHistory.payType'), placeholder: t('placeholder.choose'), options: typeMap.value, defaultValue: 1 },
     { key: 'type', type: 'select', label: t('Custom.PaymentHistory.payType'), placeholder: t('placeholder.choose'), options: typeMap.value, defaultValue: 1 },
     { key: 'login', type: 'input', label: t('Custom.PaymentHistory.TradingAccount'), placeholder: t('placeholder.login'), defaultValue: '' },
     { key: 'login', type: 'input', label: t('Custom.PaymentHistory.TradingAccount'), placeholder: t('placeholder.login'), defaultValue: '' },
     {
     {
         key: 'orderStatus', type: 'select', label: t('Custom.PaymentHistory.Status'), placeholder: t('placeholder.choose'), options: orderStatusMap.value, defaultValue: null
         key: 'orderStatus', type: 'select', label: t('Custom.PaymentHistory.Status'), placeholder: t('placeholder.choose'), options: orderStatusMap.value, defaultValue: null
     },
     },
     { key: 'date', label: t('placeholder.Start') + ' - ' + t('placeholder.End'), type: 'daterange' }
     { key: 'date', label: t('placeholder.Start') + ' - ' + t('placeholder.End'), type: 'daterange' }
-]
+])
 const searchParams = ref({})
 const searchParams = ref({})
 const tableRef = ref(null)
 const tableRef = ref(null)
 const handleSearch = (params) => {
 const handleSearch = (params) => {