From c2cea8feefe01483f75cec197ce71c27cb1d991d Mon Sep 17 00:00:00 2001 From: sunlizhou <296190577@qq.com> Date: Mon, 21 Aug 2023 18:03:08 +0800 Subject: [PATCH] =?UTF-8?q?=E7=96=BE=E7=97=85=E6=96=87=E7=AB=A0=E8=AF=A6?= =?UTF-8?q?=E6=83=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app.config.ts | 1 + .../preview/illness/article/article.config.ts | 4 ++ .../illness/article/article.module.scss | 34 ++++++++++++ src/pages/preview/illness/article/article.tsx | 51 ++++++++++++++++++ src/static/img/doubleDown.png | Bin 0 -> 1143 bytes 5 files changed, 90 insertions(+) create mode 100644 src/pages/preview/illness/article/article.config.ts create mode 100644 src/pages/preview/illness/article/article.module.scss create mode 100644 src/pages/preview/illness/article/article.tsx create mode 100644 src/static/img/doubleDown.png diff --git a/src/app.config.ts b/src/app.config.ts index 8a383d5..4435b93 100644 --- a/src/app.config.ts +++ b/src/app.config.ts @@ -86,6 +86,7 @@ export default defineAppConfig({ 'profession/profession', 'health/health', // 健康 'videoFull/videoFull', // 资源id 视频全屏 + 'illness/article/article' ] }, ], diff --git a/src/pages/preview/illness/article/article.config.ts b/src/pages/preview/illness/article/article.config.ts new file mode 100644 index 0000000..2a0a86b --- /dev/null +++ b/src/pages/preview/illness/article/article.config.ts @@ -0,0 +1,4 @@ +export default definePageConfig({ + navigationBarTitleText: '', + onReachBottomDistance: 30 +}) diff --git a/src/pages/preview/illness/article/article.module.scss b/src/pages/preview/illness/article/article.module.scss new file mode 100644 index 0000000..da98846 --- /dev/null +++ b/src/pages/preview/illness/article/article.module.scss @@ -0,0 +1,34 @@ +.fixedBox{ + position: absolute; + width: 100vw; + height: 100vh; + background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1), rgba(255, 255, 255, 1)); + &-inner{ + position: absolute; + width: 100vw; + top:45vh; + display: flex; + flex-direction: column; + align-items: center; + &-icon{ + image{ + width: 32rpx; + height: 32rpx; + } + } + &-box{ + margin-top: 24rpx; + width: 680rpx; + left:35rpx; + height: 76rpx; + background-color: #45D4A8; + color:#fff; + line-height: 76rpx; + text-align: center; + font-size: 32rpx; + font-weight: 500; + border-radius: 8rpx 8rpx 8rpx 8rpx; + } + + } +} diff --git a/src/pages/preview/illness/article/article.tsx b/src/pages/preview/illness/article/article.tsx new file mode 100644 index 0000000..476807c --- /dev/null +++ b/src/pages/preview/illness/article/article.tsx @@ -0,0 +1,51 @@ +import {FC, useEffect, useState} from "react"; +import {Image, Text, View} from "@tarojs/components"; +import Taro, {useRouter} from "@tarojs/taro"; +import {ArticleRecord, brandApi} from "@/api"; +import styles from './article.module.scss' +import down from '@/static/img/doubleDown.png' +import {Profile} from "@/store"; + + +const article:FC = () => { + const {token} = Profile.useContainer() + const {id} = useRouter().params as unknown as { id: number} + const [articleInfo,setArticleInfo] = useState() + useEffect(() => { + getData() + }, [id]) + + const getData = async () => { + Taro.setNavigationBarTitle({title:'疾病文章详情'}) + try { + const data = await brandApi.articleInfo(id) + Taro.setNavigationBarTitle({title:data.title}) + setArticleInfo(data) + } catch (e) { + } + } + function helloWorld() { + const html = articleInfo?.content; + return ( + <> + + { + !token && + + + + + + + 登录查看更多内容 + + + + } + + + ) + } + return helloWorld() +} +export default article diff --git a/src/static/img/doubleDown.png b/src/static/img/doubleDown.png new file mode 100644 index 0000000000000000000000000000000000000000..ac02334fad07b1278ef02c1e290a8e848a72edf1 GIT binary patch literal 1143 zcmYjP3rtgI6uzacIxLTcl}tp~(qIb9U}B<GKh5&OXVzP&BjjgkpgCgBk$I0UwHTS>h6@A<#;-S2$o{JH;$ zT(v4JG$s^5kg%L=r3UtQ_;-~MqVngTY_JIqYgF5jP9k<3@T1&ac{_ppFYur!3VUyF zFGP;xyk4)(X2URyrs=`KL5ITu3<-~qbUK|Lj|UqXA_(F>eEx$5V52ApO%JdG7{?KA zH^#E0n3p-8l1vZ*vC-r9y#+KG|ruGiA<-)~Fon2j*ySuMky>|V^joY{T`t2A- zkQD9W+#b*1(4W4Mk-tVq#~%CrPsYdpemXHZIXyiy^X&QT?A(ig=U*-?EH1@u?J0t* zY0Ob>%X@o``R<8=2U^5FL#DX1PKJAaP>!LxUr%?)RV$qz&Q(jUH|6TXRnD|*`_!W4 z;Z)h|!Lp~{DvDATd#im@WAdh3FMYE~l6Si_0}*#?k_GF^n)@CmkF+Z`*DN)iD`EGI zpaqrUnzq!0#0a7PvApkqI4h~S*e<6^$4{*&zNOKk-wRaI!<5c>;QmBw$jy8$YO$u9 zF6`K}YcjtM)ta_tMNMDPA2+8WPhp4xOwki2I=?^E|TNGq>}SR;C`F3BobnQA!d zNVBZopB6cc{>Xh*TWpMNsH=*0=%u1N<@(DD36$~DmZ3wLRr>bIcp=%6xYxPcRBb4Y zPDh51NXM$f6b0y(XXV24;?&Tzn)(KVwOah-y?muMzM|^R8EorniSZ-zaqAa7dw)|S z_q<2%Sz9G$W>sU8z;3XWthK*s{{2|YL=0Z)@9$5>2mEZteAveG7kB)!XqkuGgyig0 KD?7Ir*ZmLS2f4`r literal 0 HcmV?d00001