Compare commits
3 Commits
99151bca58
...
bce3e5912f
| Author | SHA1 | Date | |
|---|---|---|---|
| bce3e5912f | |||
| 39c4e75de5 | |||
|
|
487caf9dbe |
@@ -1,15 +1,16 @@
|
||||
<template>
|
||||
<view class="shared-work-page">
|
||||
<view class="shared-work-nav">
|
||||
<TopNavBar title="旅行作品" background="transparent" title-color="#173a5f" back-icon-color="#173a5f"
|
||||
:align-with-menu-button="true" :z-index="3" @back="handleBack" />
|
||||
<TopNavBar :title="shareDetail.templateName || '旅行作品'" background="#fff" title-color="#173a5f"
|
||||
back-icon-color="#173a5f" :align-with-menu-button="true" :z-index="3" @back="handleBack" />
|
||||
</view>
|
||||
|
||||
<view class="shared-work-scroll" scroll-y>
|
||||
<view class="shared-work-scroll">
|
||||
<template v-if="shareDetail">
|
||||
<video v-if="isVideo" class="shared-work-media is-video" :src="shareDetail.videoUrl"
|
||||
:poster="shareDetail.imageUrl" controls object-fit="cover" />
|
||||
<image v-else-if="shareDetail.imageUrl" class="shared-work-media" :src="shareDetail.imageUrl" mode="widthFix" />
|
||||
<image v-else-if="shareDetail.imageUrl" class="shared-work-media" :src="shareDetail.imageUrl"
|
||||
mode="aspectFill" />
|
||||
|
||||
<view class="shared-work-meta">
|
||||
<text class="shared-work-title">{{ shareDetail.templateName || "旅行作品" }}</text>
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
height: 100vh;
|
||||
overflow: hidden;
|
||||
color: #173a5f;
|
||||
background: #c5e5f8;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
@@ -32,21 +31,19 @@
|
||||
flex: 1 1 0;
|
||||
width: 100%;
|
||||
height: 0;
|
||||
min-height: 0;
|
||||
padding-top: 10px;
|
||||
padding-bottom: 104px;
|
||||
background-color: #fff;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.shared-work-media {
|
||||
width: 100%;
|
||||
height: 500px;
|
||||
display: block;
|
||||
background: #b8dced;
|
||||
}
|
||||
|
||||
.shared-work-media.is-video {
|
||||
height: min(500px, 66vh);
|
||||
}
|
||||
|
||||
.shared-work-meta {
|
||||
padding: 18px 18px 118px;
|
||||
}
|
||||
@@ -88,7 +85,6 @@
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
padding: 18px 16px calc(14px + env(safe-area-inset-bottom));
|
||||
background: linear-gradient(180deg, rgba(197, 229, 248, 0) 0%, #c5e5f8 34%);
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
@@ -98,9 +94,9 @@
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
border-radius: 8px;
|
||||
border-radius: 999px;
|
||||
background: #20c99a;
|
||||
color: #173a5f;
|
||||
color: #ffffff;
|
||||
font-size: 16px;
|
||||
line-height: 54px;
|
||||
font-weight: 900;
|
||||
|
||||
@@ -15,7 +15,15 @@ export function navigateTo(url, args) {
|
||||
}
|
||||
}
|
||||
console.log("Navigating to URL:", targetUrl);
|
||||
if (url.startsWith("http://") || url.startsWith("https://")) {
|
||||
// 如果是外部链接,使用webview打开
|
||||
uni.navigateTo({
|
||||
url: "/pages/webview/index?url=" + encodeURIComponent(targetUrl),
|
||||
});
|
||||
} else {
|
||||
// 否则,直接跳转到内部页面
|
||||
uni.navigateTo({
|
||||
url: targetUrl,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user