四端上传

This commit is contained in:
tianmo committed 2026-09-29 15:25:40 +08:00
1 parent 25bbb5f9c8
commit c6e2cb4d5b
276 files changed
+17812 -3

No files matched your search

@@ -0,0 +1,39 @@
// pages/WebPageDetails/WebPageDetails.js
const api = require('../../utils/api');
const format = require('../../utils/format');
Page({
data: {
htmlcontent: ' ',
author: '',
title: '',
date: '',
},
onLoad(options) {
const id = options.id;
if (!id) return;
api
.getArticle(id)
.then((article) => {
if (!article) return;
this.setData({
htmlcontent: article.content || ' ',
author: article.publisher || '',
title: article.title || '',
date: format.toDateString(article.publishedAt),
});
})
.catch((err) => console.error('[WebPageDetails] 加载失败', err));
},
onShareAppMessage() {
return { title: '叶雷讲数学', path: '/pages/index/index' };
},
onShareTimeline() {
return { title: '叶雷讲数学' };
},
});
@@ -0,0 +1,5 @@
{
"usingComponents": {
"Parser":"/Parser/index"
}
}
@@ -0,0 +1,12 @@
<scroll-view class="scrollarea" scroll-y type="list">
<text class="pagetitle">{{title}}</text>
<view class="pageauthoranddate">
<text class="pageauthor">{{author}}</text>
<text class="pagedate">{{date}}</text>
</view>
<Parser html="{{htmlcontent}}" />
</scroll-view>
@@ -0,0 +1,63 @@
/**index.wxss**/
page {
height: 100vh;
display: flex;
flex-direction: column;
}
.scrollarea {
flex: 1;
overflow-y: hidden;
}
.pagetitle {
display: block;
font-size: 40rpx;
text-align: center;
}
.pagecontent {
display: block;
font-size: 30rpx;
text-align: left;
text-indent: 0rem;
margin-bottom: 30rpx;
padding: 0 10rpx;
}
.pagecontent:first-child {
margin-top: 30rpx;
}
.pageimg {
width: 100%;
}
.pagevideo {
width: 750rpx;
height: 421rpx;
}
.pageauthor {
color: rgb(165, 165, 165);
font-size: 30rpx;
}
.pagedate {
color: rgb(151, 151, 151);
padding-left: 60rpx;
font-size: 30rpx;
}
.pageauthoranddate {
height: 80rpx;
display: flex;
align-items: center;
justify-content: center;
}
.sharebtn[plain] {
display: inline;
color: cadetblue;
border:none;
font-size: 30rpx;
margin:0 rpx;
margin-left: 20rpx;
margin-right: 0rpx;
padding:0 ;
width: 120rpx;
}
.content123 {
margin: 0;
}