feat: 新增地图导览页面并集成到首页
添加新的地图导览页面,使用 WebView 承载外部地图应用。在首页增加地图导览入口卡片并更新描述,同时将测试中心按钮样式调整为轮廓样式以区分主要操作。
Showing
4 changed files
with
48 additions
and
3 deletions
| ... | @@ -22,7 +22,7 @@ | ... | @@ -22,7 +22,7 @@ |
| 22 | <view class="overview-grid"> | 22 | <view class="overview-grid"> |
| 23 | <view class="overview-card"> | 23 | <view class="overview-card"> |
| 24 | <text class="card-title">首页</text> | 24 | <text class="card-title">首页</text> |
| 25 | - <text class="card-desc">展示当前项目概览与测试入口。</text> | 25 | + <text class="card-desc">展示当前项目概览、地图导览与测试入口。</text> |
| 26 | </view> | 26 | </view> |
| 27 | <view class="overview-card"> | 27 | <view class="overview-card"> |
| 28 | <text class="card-title">消息</text> | 28 | <text class="card-title">消息</text> |
| ... | @@ -34,12 +34,20 @@ | ... | @@ -34,12 +34,20 @@ |
| 34 | </view> | 34 | </view> |
| 35 | </view> | 35 | </view> |
| 36 | 36 | ||
| 37 | + <view class="map-entry-card"> | ||
| 38 | + <text class="section-label">地图导览</text> | ||
| 39 | + <text class="map-entry-desc"> | ||
| 40 | + 当前通过小程序 WebView 承载地图项目,方便从首页直接进入步行导览页面。 | ||
| 41 | + </text> | ||
| 42 | + <button class="primary-btn" @tap="goToMapGuide">打开地图导览</button> | ||
| 43 | + </view> | ||
| 44 | + | ||
| 37 | <view class="test-entry-card"> | 45 | <view class="test-entry-card"> |
| 38 | <text class="section-label">测试入口</text> | 46 | <text class="section-label">测试入口</text> |
| 39 | <text class="test-entry-desc"> | 47 | <text class="test-entry-desc"> |
| 40 | 支付测试与 WebView 预览已移入测试中心,首页只保留统一入口。 | 48 | 支付测试与 WebView 预览已移入测试中心,首页只保留统一入口。 |
| 41 | </text> | 49 | </text> |
| 42 | - <button class="primary-btn" @tap="goToTestCenter">进入测试中心</button> | 50 | + <button class="outline-btn" @tap="goToTestCenter">进入测试中心</button> |
| 43 | </view> | 51 | </view> |
| 44 | </view> | 52 | </view> |
| 45 | 53 | ||
| ... | @@ -59,6 +67,12 @@ const refreshAuthStatus = () => { | ... | @@ -59,6 +67,12 @@ const refreshAuthStatus = () => { |
| 59 | isAuthed.value = hasAuth() | 67 | isAuthed.value = hasAuth() |
| 60 | } | 68 | } |
| 61 | 69 | ||
| 70 | +const goToMapGuide = () => { | ||
| 71 | + Taro.navigateTo({ | ||
| 72 | + url: '/pages/map-guide/index', | ||
| 73 | + }) | ||
| 74 | +} | ||
| 75 | + | ||
| 62 | const goToTestCenter = () => { | 76 | const goToTestCenter = () => { |
| 63 | Taro.navigateTo({ | 77 | Taro.navigateTo({ |
| 64 | url: '/pages/pay-test/index', | 78 | url: '/pages/pay-test/index', |
| ... | @@ -85,6 +99,7 @@ useDidShow(() => { | ... | @@ -85,6 +99,7 @@ useDidShow(() => { |
| 85 | .hero-card, | 99 | .hero-card, |
| 86 | .status-card, | 100 | .status-card, |
| 87 | .overview-card, | 101 | .overview-card, |
| 102 | + .map-entry-card, | ||
| 88 | .test-entry-card { | 103 | .test-entry-card { |
| 89 | background: rgba(255, 255, 255, 0.94); | 104 | background: rgba(255, 255, 255, 0.94); |
| 90 | border: 2rpx solid rgba(166, 121, 57, 0.08); | 105 | border: 2rpx solid rgba(166, 121, 57, 0.08); |
| ... | @@ -138,6 +153,7 @@ useDidShow(() => { | ... | @@ -138,6 +153,7 @@ useDidShow(() => { |
| 138 | 153 | ||
| 139 | .status-text, | 154 | .status-text, |
| 140 | .card-desc, | 155 | .card-desc, |
| 156 | + .map-entry-desc, | ||
| 141 | .test-entry-desc { | 157 | .test-entry-desc { |
| 142 | display: block; | 158 | display: block; |
| 143 | margin-top: 12rpx; | 159 | margin-top: 12rpx; |
| ... | @@ -183,18 +199,29 @@ useDidShow(() => { | ... | @@ -183,18 +199,29 @@ useDidShow(() => { |
| 183 | color: #111827; | 199 | color: #111827; |
| 184 | } | 200 | } |
| 185 | 201 | ||
| 202 | + .map-entry-card, | ||
| 186 | .test-entry-card { | 203 | .test-entry-card { |
| 187 | margin-top: 24rpx; | 204 | margin-top: 24rpx; |
| 188 | padding: 32rpx; | 205 | padding: 32rpx; |
| 189 | } | 206 | } |
| 190 | 207 | ||
| 191 | - .primary-btn { | 208 | + .primary-btn, |
| 209 | + .outline-btn { | ||
| 192 | margin-top: 24rpx; | 210 | margin-top: 24rpx; |
| 193 | border-radius: 999rpx; | 211 | border-radius: 999rpx; |
| 194 | font-size: 30rpx; | 212 | font-size: 30rpx; |
| 195 | line-height: 88rpx; | 213 | line-height: 88rpx; |
| 214 | + } | ||
| 215 | + | ||
| 216 | + .primary-btn { | ||
| 196 | color: #fff; | 217 | color: #fff; |
| 197 | background: linear-gradient(135deg, #a67939, #8f5e20); | 218 | background: linear-gradient(135deg, #a67939, #8f5e20); |
| 198 | } | 219 | } |
| 220 | + | ||
| 221 | + .outline-btn { | ||
| 222 | + color: #0f172a; | ||
| 223 | + background: #fff; | ||
| 224 | + border: 2rpx solid #d1d5db; | ||
| 225 | + } | ||
| 199 | } | 226 | } |
| 200 | </style> | 227 | </style> | ... | ... |
src/pages/map-guide/index.config.js
0 → 100644
src/pages/map-guide/index.vue
0 → 100644
| 1 | +<!-- | ||
| 2 | + * @Date: 2026-04-22 13:14:52 | ||
| 3 | + * @LastEditors: hookehuyr hookehuyr@gmail.com | ||
| 4 | + * @LastEditTime: 2026-04-22 13:20:49 | ||
| 5 | + * @FilePath: /jls_weapp/src/pages/map-guide/index.vue | ||
| 6 | + * @Description: 文件描述 | ||
| 7 | +--> | ||
| 8 | +<template> | ||
| 9 | + <web-view :src="map_guide_url" /> | ||
| 10 | +</template> | ||
| 11 | + | ||
| 12 | +<script setup> | ||
| 13 | +const map_guide_url = 'https://oa-dev.onwall.cn/f/map/#/checkin/?id=835368¤t_lng=121.52609¤t_lat=31.25956&openid=oAHBN14FGjUihI-ayF22_rCe0APM&discount_title=便民服务&activityId=835370&_t=1776834254361' | ||
| 14 | +</script> |
-
Please register or login to post a comment