Files
Mycontent/miniprogram/pages/link-preview/link-preview.wxml
卡若 76965adb23 chore: 清理敏感与开发文档,仅同步代码
- 永久忽略并从仓库移除 开发文档/
- 移除并忽略 .env 与小程序私有配置
- 同步小程序/管理端/API与脚本改动

Made-with: Cursor
2026-03-17 17:50:12 +08:00

35 lines
1.2 KiB
Plaintext

<view class="page">
<!-- 简单自定义导航栏 -->
<view class="nav-bar" style="padding-top: {{statusBarHeight}}px;">
<view class="nav-content" style="height: {{navBarHeight - statusBarHeight}}px;">
<view class="nav-back" bindtap="goBack">
<text class="back-arrow">←</text>
</view>
<view class="nav-title">
<text class="nav-title-text">{{title}}</text>
</view>
<view class="nav-actions">
<view class="copy-btn" bindtap="copyLink">
<text class="copy-text">复制链接</text>
</view>
</view>
</view>
</view>
<view class="nav-placeholder" style="height: {{navBarHeight}}px;"></view>
<!-- 链接预览区域 -->
<view class="webview-wrap" wx:if="{{url && !loadError}}">
<web-view src="{{url}}" binderror="onWebViewError"></web-view>
</view>
<view class="error-wrap" wx:elif="{{loadError}}">
<text class="error-text">该链接无法在小程序内预览</text>
<view class="error-btn" bindtap="copyLink">
<text class="error-btn-text">复制链接到浏览器打开</text>
</view>
</view>
<view class="empty-wrap" wx:else>
<text class="empty-text">暂无链接地址</text>
</view>
</view>