|
| 1 | +@page "/NuoChe" |
| 2 | +@using HashidsNet |
| 3 | +@inject IOptions<SiteOption> SiteOption |
| 4 | +@layout EmptyLayout |
| 5 | + |
| 6 | +@code { |
| 7 | + [SupplyParameterFromQuery] |
| 8 | + public string? P { get; set; } |
| 9 | + |
| 10 | + private long? _decodePhone; |
| 11 | + |
| 12 | + protected override void OnInitialized() |
| 13 | + { |
| 14 | + base.OnInitialized(); |
| 15 | + if (!string.IsNullOrWhiteSpace(P)) |
| 16 | + { |
| 17 | + _decodePhone = new Hashids("codewf").DecodeLong(P)[0]; |
| 18 | + } |
| 19 | + } |
| 20 | + |
| 21 | +} |
| 22 | + |
| 23 | +<PageTitle>免费挪车码</PageTitle> |
| 24 | + |
| 25 | +<div class="nuoche-container"> |
| 26 | + @if (string.IsNullOrWhiteSpace(P)) |
| 27 | + { |
| 28 | + <div class="generator-container"> |
| 29 | + <h1 class="generator-title">挪车码在线生成器</h1> |
| 30 | + <p class="generator-subtitle">开发中</p> |
| 31 | + </div> |
| 32 | + } |
| 33 | + else |
| 34 | + { |
| 35 | + <div class="card"> |
| 36 | + <div class="card-header"> |
| 37 | + <i class="fas fa-car"></i> |
| 38 | + <h1 class="title">临时停靠,请多关照</h1> |
| 39 | + </div> |
| 40 | + <div class="card-body"> |
| 41 | + <p class="description">如果我的车阻碍了您的车辆通行,点击下方按钮通知我,给您带来不便敬请谅解。</p> |
| 42 | + <a class="phone-button" href="tel:@_decodePhone"> |
| 43 | + <i class="fas fa-phone-alt"></i> 拨打车主电话 |
| 44 | + </a> |
| 45 | + <a class="generate-link" href="/nuoche">去生成一个挪车码</a> |
| 46 | + </div> |
| 47 | + </div> |
| 48 | + } |
| 49 | +</div> |
| 50 | + |
| 51 | +<style> |
| 52 | + /* 全局样式 */ |
| 53 | + .nuoche-container { |
| 54 | + padding: 20px; |
| 55 | + max-width: 100%; |
| 56 | + min-height: 100vh; |
| 57 | + display: flex; |
| 58 | + flex-direction: column; |
| 59 | + justify-content: center; |
| 60 | + align-items: center; |
| 61 | + background-color: #f5f7fa; |
| 62 | + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; |
| 63 | + } |
| 64 | +
|
| 65 | + /* 生成器页面样式 */ |
| 66 | + .generator-container { |
| 67 | + text-align: center; |
| 68 | + padding: 30px 20px; |
| 69 | + background-color: white; |
| 70 | + border-radius: 12px; |
| 71 | + box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); |
| 72 | + width: 90%; |
| 73 | + max-width: 400px; |
| 74 | + } |
| 75 | +
|
| 76 | + .generator-title { |
| 77 | + font-size: 1.5rem; |
| 78 | + color: #333; |
| 79 | + margin-bottom: 15px; |
| 80 | + font-weight: 600; |
| 81 | + } |
| 82 | +
|
| 83 | + .generator-subtitle { |
| 84 | + font-size: 1rem; |
| 85 | + color: #666; |
| 86 | + } |
| 87 | +
|
| 88 | + /* 挪车码信息卡片样式 */ |
| 89 | + .card { |
| 90 | + width: 90%; |
| 91 | + max-width: 400px; |
| 92 | + background-color: white; |
| 93 | + border-radius: 12px; |
| 94 | + overflow: hidden; |
| 95 | + box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1); |
| 96 | + } |
| 97 | +
|
| 98 | + .card-header { |
| 99 | + background-color: #3385ff; |
| 100 | + color: white; |
| 101 | + padding: 20px; |
| 102 | + text-align: center; |
| 103 | + } |
| 104 | +
|
| 105 | + .card-header i { |
| 106 | + font-size: 2rem; |
| 107 | + margin-bottom: 10px; |
| 108 | + } |
| 109 | +
|
| 110 | + .title { |
| 111 | + font-size: 1.3rem; |
| 112 | + font-weight: 600; |
| 113 | + margin: 0; |
| 114 | + } |
| 115 | +
|
| 116 | + .card-body { |
| 117 | + padding: 24px 20px; |
| 118 | + display: flex; |
| 119 | + flex-direction: column; |
| 120 | + align-items: center; |
| 121 | + } |
| 122 | +
|
| 123 | + .description { |
| 124 | + text-align: center; |
| 125 | + color: #555; |
| 126 | + margin-bottom: 25px; |
| 127 | + line-height: 1.5; |
| 128 | + font-size: 1rem; |
| 129 | + } |
| 130 | +
|
| 131 | + .phone-button { |
| 132 | + width: 100%; |
| 133 | + background-color: #ff5722; |
| 134 | + color: white; |
| 135 | + padding: 14px 20px; |
| 136 | + border-radius: 50px; |
| 137 | + text-align: center; |
| 138 | + text-decoration: none; |
| 139 | + font-weight: 600; |
| 140 | + font-size: 1.1rem; |
| 141 | + margin-bottom: 15px; |
| 142 | + box-shadow: 0 4px 10px rgba(255, 87, 34, 0.3); |
| 143 | + transition: all 0.3s ease; |
| 144 | + display: flex; |
| 145 | + justify-content: center; |
| 146 | + align-items: center; |
| 147 | + } |
| 148 | +
|
| 149 | + .phone-button:hover, |
| 150 | + .phone-button:focus { |
| 151 | + background-color: #f4511e; |
| 152 | + box-shadow: 0 6px 12px rgba(255, 87, 34, 0.4); |
| 153 | + transform: translateY(-2px); |
| 154 | + } |
| 155 | +
|
| 156 | + .phone-button i { |
| 157 | + margin-right: 8px; |
| 158 | + } |
| 159 | +
|
| 160 | + .generate-link { |
| 161 | + color: #3385ff; |
| 162 | + text-decoration: none; |
| 163 | + font-size: 0.9rem; |
| 164 | + margin-top: 10px; |
| 165 | + padding: 5px; |
| 166 | + } |
| 167 | +
|
| 168 | + .generate-link:hover { |
| 169 | + text-decoration: underline; |
| 170 | + } |
| 171 | +
|
| 172 | +</style> |
| 173 | + |
| 174 | +<!-- 添加Font Awesome图标支持 --> |
| 175 | +<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css" rel="stylesheet"> |
0 commit comments