瀏覽代碼

```
refactor(config): 更新开发环境配置

更新了开发环境的API地址配置,将之前的IP地址配置注释掉,
启用HTTPS域名配置用于开发环境调试

feat(commonTab): 移动弹窗配置功能到主页面

将弹窗配置查询功能从子组件移动到主页面组件中,
优化了组件结构和功能分布

fix(commonTab): 移除未使用的弹窗配置代码

清理了commonTab子组件中的弹窗配置相关代码,
包括未使用的函数、变量和模板元素
```

zouzexu 17 小時之前
父節點
當前提交
ef8f49edb0
共有 3 個文件被更改,包括 24 次插入23 次删除
  1. 2 2
      src/config/index.ts
  2. 0 21
      src/subPack-xsb/commonTab/components/index.vue
  3. 22 0
      src/subPack-xsb/commonTab/index.vue

+ 2 - 2
src/config/index.ts

@@ -7,13 +7,13 @@ const mapEnvVersion = {
   // develop: 'http://192.168.0.157:8080',
   // develop: 'http://192.168.1.253:8080',
   // develop: 'http://192.168.0.19:8080',
-  develop: 'http://192.168.0.217:8080', // 黄
+  // develop: 'http://192.168.0.217:8080', // 黄
   // develop: 'http://192.168.0.11:8080', // 王
   // develop: 'http://192.168.1.89:8080', // 田
   // develop: 'http://74949mkfh190.vicp.fun', // 付
   // develop: 'http://47.109.84.152:8081',
   // develop: 'https://5ed0f7cc.r9.vip.cpolar.cn',
-  // develop: 'https://smqjh.api.zswlgz.com',
+  develop: 'https://smqjh.api.zswlgz.com',
   /**
    * 体验版
    */

+ 0 - 21
src/subPack-xsb/commonTab/components/index.vue

@@ -34,7 +34,6 @@ function handleScroll(e: UniHelper.ScrollViewOnScrollEvent) {
 }
 onMounted(() => {
   opcity.value = 0
-  queryPopupConfig()
 })
 
 function handleCommonClass(item: Api.xsbCategories) {
@@ -85,21 +84,6 @@ function handleChangeSwiper(e: UniHelper.SwiperOnChangeEvent) {
 
   currentIndex.value = newIndices
 }
-
-const curtainInfo = ref({
-  enabled: false,
-  imageUrl: '',
-})
-async function queryPopupConfig() {
-  try {
-    const res = await Apis.xsb.popupConfig({})
-    curtainInfo.value = res.data
-  }
-  catch (error) {
-    console.error('获取弹窗配置失败:', error)
-    curtainInfo.value = { enabled: false, imageUrl: '' }
-  }
-}
 </script>
 
 <template>
@@ -299,11 +283,6 @@ async function queryPopupConfig() {
       </view>
       <view class="h60rpx" />
     </scroll-view>
-    <wd-overlay :show="curtainInfo.enabled" @click="curtainInfo.enabled = false">
-      <view class="h-full flex items-center justify-center">
-        <image class="h-784rpx w-750rpx" :src="curtainInfo.imageUrl" />
-      </view>
-    </wd-overlay>
   </view>
 </template>
 

+ 22 - 0
src/subPack-xsb/commonTab/index.vue

@@ -91,6 +91,7 @@ onMounted(async () => {
   // reload()
   getCategories()
   loading.value = false
+  queryPopupConfig()
 })
 onShow(() => refresh())
 
@@ -134,6 +135,22 @@ function beforeleave() {
     })
   }
 }
+
+const curtainInfo = ref({
+  enabled: false,
+  imageUrl: '',
+})
+
+async function queryPopupConfig() {
+  try {
+    const res = await Apis.xsb.popupConfig({})
+    curtainInfo.value = res.data
+  }
+  catch (error) {
+    console.error('获取弹窗配置失败:', error)
+    curtainInfo.value = { enabled: false, imageUrl: '' }
+  }
+}
 </script>
 
 <template>
@@ -191,6 +208,11 @@ function beforeleave() {
         </view>
       </view>
     </wd-popup>
+    <wd-overlay :show="curtainInfo.enabled" @click="curtainInfo.enabled = false">
+      <view class="h-full flex items-center justify-center">
+        <image class="h-784rpx w-750rpx" :src="curtainInfo.imageUrl" />
+      </view>
+    </wd-overlay>
   </view>
 </template>