2.6提交
This commit is contained in:
+34
-18
@@ -1,6 +1,18 @@
|
||||
<template>
|
||||
|
||||
<navBar title="肝胆新闻" />
|
||||
<view class="navbox">
|
||||
<view class="status_bar"></view>
|
||||
<uni-nav-bar
|
||||
left-icon="left"
|
||||
title="肝胆新闻"
|
||||
@clickLeft="goBack"
|
||||
color="#8B2316"
|
||||
:border="false"
|
||||
backgroundColor="#eeeeee"
|
||||
>
|
||||
|
||||
</uni-nav-bar>
|
||||
</view>
|
||||
<view class="news-page">
|
||||
<!-- Fixed Banner Swiper -->
|
||||
<view class="banner-container">
|
||||
@@ -45,7 +57,7 @@
|
||||
<!-- 肝胆新闻 -->
|
||||
<view class="news-item" @click="goToNews('news')">
|
||||
<view class="news-icon blue">
|
||||
<uni-icons type="paperplane" size="24" color="#fff"></uni-icons>
|
||||
<image :src="newImg" width="94rpx" height="94rpx" ></image>
|
||||
</view>
|
||||
<view class="news-content">
|
||||
<view class="news-title">肝胆新闻</view>
|
||||
@@ -101,7 +113,7 @@
|
||||
<!-- 肝胆会议 -->
|
||||
<view class="news-item" @click="goToCourse('hepatoBiliaryConference')">
|
||||
<view class="news-icon yellow">
|
||||
<uni-icons type="staff" size="24" color="#fff"></uni-icons>
|
||||
<image :src="meetingImg" width="94rpx" height="94rpx" ></image>
|
||||
</view>
|
||||
<view class="news-content">
|
||||
<view class="news-title">肝胆会议</view>
|
||||
@@ -136,6 +148,9 @@
|
||||
import docUrl from "@/utils/docUrl.js";
|
||||
import navTo from '../../utils/navTo';
|
||||
import navBar from '@/components/navBar/navBar.vue';
|
||||
import newImg from '@/static/gandanxinwen.png';
|
||||
import meetingImg from '@/static/gandanhuiyi.png';
|
||||
import {onBackPress} from '@dcloudio/uni-app';
|
||||
|
||||
onMounted(() => {
|
||||
loadNewsBanner();
|
||||
@@ -145,6 +160,10 @@
|
||||
loadNewsBanner();
|
||||
});
|
||||
|
||||
onBackPress(() => {
|
||||
plus.runtime.quit();
|
||||
return true;
|
||||
});
|
||||
// 加载新闻轮播数据
|
||||
const loadNewsBanner = async () => {
|
||||
try {
|
||||
@@ -170,16 +189,6 @@
|
||||
// Banner相关数据
|
||||
const bannerList = ref([]);
|
||||
const currentBannerIndex = ref(0);
|
||||
// 返回
|
||||
const goBack = () => {
|
||||
uni.navigateBack({
|
||||
fail() {
|
||||
uni.redirectTo({
|
||||
url: '/pages/index/index'
|
||||
});
|
||||
}
|
||||
});
|
||||
};
|
||||
// Banner相关方法
|
||||
const getMockBannerData = () => {
|
||||
return [
|
||||
@@ -212,11 +221,14 @@
|
||||
};
|
||||
|
||||
const playBannerVideo = (banner) => {
|
||||
uni.navigateTo({
|
||||
url: `/pages/videoDetail/videoDetail?id=${banner.id}`
|
||||
});
|
||||
const encoded = encodeURIComponent(docUrl+banner.path);
|
||||
navTo({
|
||||
url: `/pages_app/webview/webview?url=${encoded}&type=news&share=1&sharetitle=${banner.title}`
|
||||
});
|
||||
};
|
||||
const goBack = () => {
|
||||
plus.runtime.quit();
|
||||
};
|
||||
|
||||
// 新闻相关方法
|
||||
const goToNews = (type) => {
|
||||
if(type=="news"){
|
||||
@@ -228,7 +240,7 @@
|
||||
|
||||
const goToCourse = (type) => {
|
||||
navTo({
|
||||
url:'/pages/live/live'
|
||||
url:'/pages/live/live?from=news'
|
||||
})
|
||||
};
|
||||
</script>
|
||||
@@ -332,6 +344,10 @@
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-right: 30rpx;
|
||||
image{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
&.blue {
|
||||
background-color: $blue-color;
|
||||
|
||||
Reference in New Issue
Block a user