zhb hai 1 mes
pai
achega
bddc099ede

+ 1 - 3
components/cwg-complex-search.vue

@@ -202,8 +202,6 @@ const initFormData = () => {
         }
         // 4. select 类型字段特殊处理:如果没有默认值,默认选择第一个选项
         else if (field.type === 'select' && field.options && field.options.length > 0) {
-            console.log(23, field.options, field, 111);
-
             initial[field.key] = field.options[0].value
         }
         // 5. 其他字段默认为空字符串
@@ -275,7 +273,7 @@ watch(() => props.modelValue, (newVal) => {
     if (isEqual(next, formData.value)) return
     formData.value = next
     tempFormData.value = clonePlain(next)
-}, { deep: true, immediate: false })
+}, { deep: true, immediate: true })
 
 // 监听内部 formData 变化,同步到外部
 watch(formData, (newVal) => {

+ 15 - 1
components/cwg-tabel.vue

@@ -17,6 +17,7 @@
                     </uni-th>
                 </uni-tr>
 
+
                 <!-- 表格主体 -->
                 <template v-for="(row, rowIndex) in tableData" :key="rowIndex">
                     <uni-tr>
@@ -92,8 +93,11 @@
                 </uni-tr>
             </uni-table>
         </view>
+        <view class="table-loading-mask">
+            <uni-loading v-if="loading" />
+        </view>
         <!-- 空状态 -->
-        <view v-if="tableData.length === 0">
+        <view v-if="!loading && tableData.length === 0">
             <cwg-empty-state />
         </view>
         <!-- 分页 -->
@@ -480,6 +484,7 @@ const setDetailVisible = (visible) => {
 
 // ========== 数据加载 ==========
 const loadData = async () => {
+    tableData.value = []
     if (loading.value) return
     loading.value = true
     try {
@@ -668,6 +673,15 @@ defineExpose({
     max-height: calc(100vh - 209px);
     color: var(--color-slate-800);
 
+    .table-loading-mask {
+        width: 100%;
+        height: 100%;
+        // margin: 0 auto;
+        display: flex;
+        align-items: center;
+        justify-content: center;
+    }
+
     :deep(.uni-table-scroll) {
         width: 100%;
         max-height: calc(100vh - 375px);

+ 3 - 1
manifest.json

@@ -185,7 +185,7 @@
         "template" : "template.h5.html",
         "router" : {
             "mode" : "hash",
-            "base" : "/web4/"
+            "base" : "/web/"
         },
         "sdkConfigs" : {
             "maps" : {
@@ -195,6 +195,8 @@
             }
         },
         "async" : {
+            "delay": 10000,
+            "loading": "",
             "timeout" : 20000
         },
         "uniStatistics" : {

+ 3 - 7
pages/activities/index.vue

@@ -12,15 +12,11 @@
                         refresher-enabled :refresher-triggered="refreshing" @refresherrefresh="onRefresh">
 
                         <!-- 加载状态 -->
-                        <view v-if="pictLoading" class="loading-mask">
-                            <view class="loading-content">
-                                <uni-icons type="spinner-cycle" size="30" color="#007aff" class="spin"></uni-icons>
-                                <text class="loading-text">{{ t('common.loading') }}</text>
-                            </view>
+                        <view class="table-loading-mask">
+                            <uni-loading v-if="pictLoading" />
                         </view>
-                        <view class="activity-list">
+                        <view class="activity-list" v-if="!pictLoading">
                             <uni-row class="demo-uni-row uni-row1">
-
                                 <!-- 遍历静态活动配置 -->
                                 <ActivityCard v-for="activity in visibleStaticActivities" :key="activity.id"
                                     :config="activity" :state="activityState" :lang="locale"

+ 5 - 0
pages/analytics/components/List.vue

@@ -17,10 +17,14 @@
       </view>
     </view>
 
+
     <!-- 空状态 -->
     <view v-else-if="!loading && finished" class="empty">
       <cwg-empty-state />
     </view>
+    <view class="table-loading-mask">
+      <uni-loading v-if="loading" />
+    </view>
 
     <!-- 加载更多状态 -->
     <view v-if="loadingMore" class="load-more">
@@ -58,6 +62,7 @@ const formatDate = (dateStr) => {
 }
 
 const load = async () => {
+  list.value = []
   if (loading.value) return
   loading.value = true
   finished.value = false

+ 5 - 1
pages/customer/components/AccountCardMobile.vue

@@ -16,7 +16,8 @@
                     </template>
                 </view>
             </view>
-            <cwg-dropdown @open="onOpen" @close="onClose" :menu-list="customMenuList" @menuClick="handleCustomClick">
+            <cwg-dropdown ref="dropdownRef" @open="onOpen" @close="onClose" :menu-list="customMenuList"
+                @menuClick="handleCustomClick">
                 <view class="more-icon more-btn">
                     <cwg-icon name="crm-ellipsis-vertical" :size="20" color="#6c8595" />
                 </view>
@@ -151,8 +152,11 @@ const handleAction1 = (item) => {
     }
     handleAction(item.action, item)
 }
+const dropdownRef = ref(null)
+
 // 处理按钮操作
 const handleAction = (type: string) => {
+    dropdownRef.value.close()
     switch (type) {
         case 'trade':
             terminalDialogVisible.value = true

+ 7 - 3
pages/customer/components/AccountList.vue

@@ -29,7 +29,10 @@
                 :is-grid-layout="isGridLayout" @action="handleAction" @copy="handleCopy"
                 @change-password="handleChangePassword" />
         </view>
-        <cwg-empty-state v-else />
+        <view class="table-loading-mask">
+            <uni-loading v-if="loading" />
+        </view>
+        <cwg-empty-state v-if="!loading && accounts.length == 0" />
         <DeleteAccountDialogs ref="deleteAccountDialogRef" v-model:visible="deleteAccountDialogVisible" />
     </view>
 </template>
@@ -172,7 +175,7 @@ watch(cativeIndex, (newVal) => {
     // search.value.platform = tabs.value[newVal].id
     getAccountList()
 })
-
+const loading = ref(false)
 // 获取客户登录信息
 async function getCustomLoginInfo() {
     try {
@@ -195,7 +198,7 @@ async function getCustomLoginInfo() {
 const AccountList = ref([])
 const getAccountList = async () => {
     AccountList.value = []
-
+    loading.value = true
     const api = cativeIndex.value == 1 ? customApi.demoList : customApi.AccountAllList
     const res = await api({
         page: {
@@ -206,6 +209,7 @@ const getAccountList = async () => {
     if (res.code === 200) {
         AccountList.value = res.data
     }
+    loading.value = false
 }
 // 格式化数值函数
 function formatMoney(value) {