暂存代码

This commit is contained in:
何江明
2025-05-23 18:03:45 +08:00
parent 8217069b9a
commit a2c87e47bf
313 changed files with 6157 additions and 1102 deletions
@@ -0,0 +1,73 @@
"use strict";
const api_news = require("../../api/news.js");
const utils_index = require("../../utils/index.js");
const common_vendor = require("../../common/vendor.js");
const Header = () => "../../components/header.js";
const _sfc_main = {
components: { Header },
data() {
return {
id: 0,
newsDetail: {}
};
},
onLoad(option) {
const id = option.id;
if (id && id !== "null") {
this.id = id;
this.fetchData();
}
},
methods: {
formatDate: utils_index.formatDate,
async fetchData() {
const id = this.id;
const params = {
id
};
const resp = await api_news.getNewsDetail(params);
if (resp && resp.bizcode === 100) {
this.newsDetail = resp.data || {};
}
}
}
};
if (!Array) {
const _component_Header = common_vendor.resolveComponent("Header");
const _easycom_up_image2 = common_vendor.resolveComponent("up-image");
(_component_Header + _easycom_up_image2)();
}
const _easycom_up_image = () => "../../uni_modules/uview-plus/components/u-image/u-image.js";
if (!Math) {
_easycom_up_image();
}
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
a: common_vendor.p({
leftTitle: "",
["left-path-type"]: "navigateTo",
["left-path"]: "/pages/news/news"
}),
b: common_vendor.t($data.newsDetail.title),
c: common_vendor.p({
src: $data.newsDetail.avatar_url,
width: "40",
height: "40",
bgColor: "#f1f6ff00",
shape: "circle"
}),
d: common_vendor.t($data.newsDetail.name),
e: common_vendor.t($options.formatDate($data.newsDetail.ctdate)),
f: common_vendor.p({
src: "/static/login/show.png",
width: "20",
height: "20",
bgColor: "#f1f6ff00"
}),
g: common_vendor.t($data.newsDetail.browses),
h: $data.newsDetail.content
};
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-5b602ca5"]]);
wx.createPage(MiniProgramPage);
//# sourceMappingURL=../../../.sourcemap/mp-weixin/pages/news_info/news_info.js.map
@@ -0,0 +1,7 @@
{
"navigationBarTitleText": "",
"usingComponents": {
"header": "../../components/header",
"up-image": "../../uni_modules/uview-plus/components/u-image/u-image"
}
}
@@ -0,0 +1 @@
<view class="news_info_warp data-v-5b602ca5"><header wx:if="{{a}}" class="data-v-5b602ca5" style="background-color:#FFFFFF" u-i="5b602ca5-0" bind:__l="__l" u-p="{{a}}"/><view class="news_info_header_warp data-v-5b602ca5"><view class="title_ data-v-5b602ca5">{{b}}</view><view class="avatar_ data-v-5b602ca5"><view class="data-v-5b602ca5"><up-image wx:if="{{c}}" class="data-v-5b602ca5" u-i="5b602ca5-1" bind:__l="__l" u-p="{{c}}"></up-image></view><view class="data-v-5b602ca5" style="margin-left:12rpx">{{d}}</view></view><view class="time_ data-v-5b602ca5"><view class="data-v-5b602ca5">{{e}}</view><view class="browses_ data-v-5b602ca5"><view class="data-v-5b602ca5"><up-image wx:if="{{f}}" class="data-v-5b602ca5" u-i="5b602ca5-2" bind:__l="__l" u-p="{{f}}"></up-image></view><view class="data-v-5b602ca5" style="margin-left:8rpx">{{g}}</view></view></view></view><view class="news_info_fg_warp data-v-5b602ca5"></view><view class="news_info_content_warp data-v-5b602ca5"><rich-text class="data-v-5b602ca5" nodes="{{h}}"/></view></view>
@@ -0,0 +1,63 @@
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量
* 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/* uni.scss */
/**
* 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
.news_info_warp.data-v-5b602ca5 {
overflow: hidden;
}
.news_info_header_warp.data-v-5b602ca5 {
padding: 30rpx;
}
.news_info_header_warp .title_.data-v-5b602ca5 {
font-weight: bold;
font-size: 32rpx;
color: #333333;
}
.news_info_header_warp .avatar_.data-v-5b602ca5 {
display: flex;
align-items: center;
margin-top: 20rpx;
}
.news_info_header_warp .time_.data-v-5b602ca5 {
display: flex;
justify-content: space-between;
font-weight: 500;
font-size: 28rpx;
color: #666666;
margin-top: 10rpx;
}
.news_info_header_warp .time_ .browses_.data-v-5b602ca5 {
display: flex;
}
.news_info_fg_warp.data-v-5b602ca5 {
height: 10rpx;
background-color: #F5F5F5FF;
width: 100%;
}
.news_info_content_warp.data-v-5b602ca5 {
padding: 30rpx;
height: calc(100vh - 524rpx);
overflow: auto;
font-size: 28rpx;
color: #333333;
}