| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160 |
- <template>
- <!-- #ifdef APP -->
- <scroll-view class="page-scroll">
- <!-- #endif -->
- <view class="page">
- <view class="hero-card">
- <text class="hero-title">导航信息</text>
- <text class="hero-desc">当前为 uni-app x 兼容版地图信息页。</text>
- </view>
- <view class="summary-strip">
- <view class="summary-pill">
- <text class="summary-pill-label">纬度</text>
- <text class="summary-pill-value">{{ latitudeText }}</text>
- </view>
- <view class="summary-pill">
- <text class="summary-pill-label">经度</text>
- <text class="summary-pill-value">{{ longitudeText }}</text>
- </view>
- </view>
- <view class="info-card">
- <text class="info-label">服务地址</text>
- <text class="info-value">{{ addressText }}</text>
- </view>
- <view class="info-card">
- <text class="info-label">坐标信息</text>
- <text class="info-value">纬度:{{ latitudeText }}</text>
- <text class="info-value">经度:{{ longitudeText }}</text>
- </view>
- <view class="action-button" @click="callContact">
- <text class="action-button-text">联系客户</text>
- </view>
- </view>
- <!-- #ifdef APP -->
- </scroll-view>
- <!-- #endif -->
- </template>
- <script setup lang="uts">
- import { ref } from 'vue'
- import { navigateToMobile } from '@/utils/api/tool.uts'
- const addressText = ref<string>('暂无地址信息')
- const latitudeText = ref<string>('0')
- const longitudeText = ref<string>('0')
- const phoneText = ref<string>('')
- const callContact = () : void => {
- if (phoneText.value.length == 0) {
- uni.showToast({ title: '暂无联系电话', icon: 'none' })
- return
- }
- navigateToMobile(phoneText.value)
- }
- onLoad((option : UTSJSONObject) => {
- addressText.value = (option['address'] as string | null) ?? '暂无地址信息'
- latitudeText.value = (option['latitude'] as string | null) ?? '0'
- longitudeText.value = (option['longitude'] as string | null) ?? '0'
- phoneText.value = (option['phone'] as string | null) ?? ''
- })
- </script>
- <style>
- .page-scroll {
- flex: 1;
- }
- .page {
- min-height: 1000rpx;
- padding: 24rpx;
- box-sizing: border-box;
- background-color: #edf1ea;
- flex-direction: column;
- }
- .hero-card {
- padding: 28rpx;
- border-radius: 24rpx;
- background-color: #cfe7c7;
- flex-direction: column;
- }
- .hero-title {
- font-size: 36rpx;
- font-weight: 700;
- color: #233121;
- }
- .hero-desc {
- margin-top: 10rpx;
- font-size: 24rpx;
- color: #4a5b48;
- }
- .summary-strip {
- margin-top: 18rpx;
- flex-direction: row;
- justify-content: space-between;
- }
- .summary-pill {
- width: 48%;
- padding: 20rpx;
- border-radius: 20rpx;
- background-color: #ffffff;
- flex-direction: column;
- }
- .summary-pill-label {
- font-size: 22rpx;
- color: #7c887a;
- }
- .summary-pill-value {
- margin-top: 8rpx;
- font-size: 28rpx;
- font-weight: 700;
- color: #233121;
- }
- .info-card {
- margin-top: 18rpx;
- padding: 24rpx;
- border-radius: 20rpx;
- background-color: #ffffff;
- flex-direction: column;
- }
- .info-label {
- font-size: 26rpx;
- color: #7c887a;
- }
- .info-value {
- margin-top: 12rpx;
- font-size: 28rpx;
- line-height: 40rpx;
- color: #233121;
- }
- .action-button {
- margin-top: 24rpx;
- height: 92rpx;
- border-radius: 24rpx;
- background-color: #233121;
- flex-direction: row;
- justify-content: center;
- align-items: center;
- }
- .action-button-text {
- font-size: 30rpx;
- font-weight: 700;
- color: #ffffff;
- }
- </style>
|