1
This commit is contained in:
34
new-soul/miniprogram/pages/link-preview/link-preview.wxml
Normal file
34
new-soul/miniprogram/pages/link-preview/link-preview.wxml
Normal file
@@ -0,0 +1,34 @@
|
||||
<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>
|
||||
|
||||
Reference in New Issue
Block a user