소스 검색

```
feat(components): 新增日历视图和选择器组件

新增 WdCalendarView 和 WdPicker 组件到全局组件声明中,
完善组件库功能支持。

config: 更新开发环境配置

将开发环境地址从本地IP切换到线上测试地址,
便于团队统一开发调试。

feat(attractions): 添加景区预订功能页面

新增景区预订信息页面,配置页面路由和导航标题,
实现景区预订业务流程。

fix(index): 修复首页导航列表布局问题

移除首页导航列表中的多余空行,优化界面显示效果。

feat(attractions): 实现景区详情页预订跳转功能

将预订按钮点击事件绑定到预订信息页面路由,
完成 DatePicker 组件的日期选择功能,
添加价格和库存状态显示。

refactor(date-picker): 优化日期选择器组件结构

调整日期选择器组件的模板结构,优化状态显示逻辑,
确保价格和状态信息正确展示。
```

zouzexu 9 시간 전
부모
커밋
93596f9fee

+ 2 - 0
src/components.d.ts

@@ -17,6 +17,7 @@ declare module 'vue' {
     WdActionSheet: typeof import('wot-design-uni/components/wd-action-sheet/wd-action-sheet.vue')['default']
     WdBadge: typeof import('wot-design-uni/components/wd-badge/wd-badge.vue')['default']
     WdButton: typeof import('wot-design-uni/components/wd-button/wd-button.vue')['default']
+    WdCalendarView: typeof import('wot-design-uni/components/wd-calendar-view/wd-calendar-view.vue')['default']
     WdCard: typeof import('wot-design-uni/components/wd-card/wd-card.vue')['default']
     WdCell: typeof import('wot-design-uni/components/wd-cell/wd-cell.vue')['default']
     WdCellGroup: typeof import('wot-design-uni/components/wd-cell-group/wd-cell-group.vue')['default']
@@ -36,6 +37,7 @@ declare module 'vue' {
     WdNoticeBar: typeof import('wot-design-uni/components/wd-notice-bar/wd-notice-bar.vue')['default']
     WdNotify: typeof import('wot-design-uni/components/wd-notify/wd-notify.vue')['default']
     WdOverlay: typeof import('wot-design-uni/components/wd-overlay/wd-overlay.vue')['default']
+    WdPicker: typeof import('wot-design-uni/components/wd-picker/wd-picker.vue')['default']
     WdPopup: typeof import('wot-design-uni/components/wd-popup/wd-popup.vue')['default']
     WdRadio: typeof import('wot-design-uni/components/wd-radio/wd-radio.vue')['default']
     WdRadioGroup: typeof import('wot-design-uni/components/wd-radio-group/wd-radio-group.vue')['default']

+ 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',
   /**
    * 体验版
    */

+ 8 - 0
src/pages.json

@@ -661,6 +661,14 @@
             "navigationStyle": "custom"
           }
         },
+        {
+          "path": "attractionsReservation/attractionsReservation",
+          "name": "attractions-reservation-info",
+          "islogin": true,
+          "style": {
+            "navigationBarTitleText": "预定信息"
+          }
+        },
         {
           "path": "commonTab/index",
           "name": "attractions-tabbar",

+ 0 - 1
src/pages/index/index.vue

@@ -61,7 +61,6 @@ const navList = computed(() => {
     { icon: `${StaticUrl}/smqjh-vip.png`, title: '视频权益', name: 'video-rights-tabbar', show: !isOnlineAudit.value },
     { icon: `${StaticUrl}/smqjh-djk.png`, title: '大健康', name: 'djk-homeTabbar', show: true },
     { icon: `${StaticUrl}/smqjh-jiayou.png`, title: '加油', name: 'refueling-tabbar', show: true }, // refueling-tabbar
-
     { icon: `${StaticUrl}/smqjh-attractions.png`, title: '景区', name: 'attractions-tabbar', show: true },
     { icon: `${StaticUrl}/smqjh-diancan.png`, title: '大牌点餐', name: '', show: !isOnlineAudit.value },
     { icon: `${StaticUrl}/smqjh-jiudian.png`, title: '酒店民宿', name: '', show: !isOnlineAudit.value },

+ 11 - 9
src/subPack-attractions/attractionsDetail/attractionsDetail.vue

@@ -84,7 +84,7 @@ function handleOrder() {
 }
 
 function handleBook() {
-  useGlobalToast().show('立即预定')
+  router.push({ name: 'attractions-reservation-info' })
 }
 
 // 处理日期选择
@@ -163,14 +163,16 @@ function handleMonthChange(e: { year: number, month: number }) {
       </view>
 
       <!-- 选择日期 -->
-      <DatePicker
-        v-model="selectedDate"
-        title="选择日期"
-        :day-data="currentMonthDays"
-        class="mt24rpx"
-        @select="handleDateSelect"
-        @month-change="handleMonthChange"
-      />
+      <view class="mt24rpx">
+        <DatePicker
+          v-model="selectedDate"
+          title="选择日期"
+          :day-data="currentMonthDays"
+          class="mt24rpx"
+          @select="handleDateSelect"
+          @month-change="handleMonthChange"
+        />
+      </view>
 
       <!-- 预定须知 -->
       <view class="mt24rpx pb40rpx">

+ 8 - 8
src/subPack-attractions/components/DatePicker.vue

@@ -205,6 +205,13 @@ watch(() => props.modelValue, (newVal) => {
             !item.isCurrentMonth ? 'opacity-30' : '',
           ]"
         >
+          <text
+            v-if="item.item?.status && item.isCurrentMonth"
+            class="mt4rpx text-20rpx"
+            :class="item.item.status === '充足' ? 'text-#52c41a' : 'text-#999'"
+          >
+            {{ item.item.status }}
+          </text>
           <text
             class="text-28rpx"
             :class="[
@@ -216,14 +223,7 @@ watch(() => props.modelValue, (newVal) => {
             {{ item.day }}
           </text>
           <text
-            v-if="item.item?.status && item.isCurrentMonth"
-            class="mt4rpx text-20rpx"
-            :class="item.item.status === '充足' ? 'text-#52c41a' : 'text-#999'"
-          >
-            {{ item.item.status }}
-          </text>
-          <text
-            v-else-if="item.item?.price && item.isCurrentMonth && item.item.status !== '售罄'"
+            v-if="item.item?.price && item.isCurrentMonth && item.item.status !== '售罄'"
             class="mt4rpx text-20rpx text-#FF4D3A"
           >
             ¥{{ item.item.price }}

+ 1 - 0
src/uni-pages.d.ts

@@ -64,6 +64,7 @@ interface NavigateToOptions {
        "/subPack-refueling/orderDetaile/index" |
        "/subPack-refueling/webView/index" |
        "/subPack-attractions/attractionsDetail/attractionsDetail" |
+       "/subPack-attractions/attractionsReservation/attractionsReservation" |
        "/subPack-attractions/commonTab/index";
 }
 interface RedirectToOptions extends NavigateToOptions {}