| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- <template>
- <view class="app-page">
- <view class="app-page">
- <text class="name">{{mData.name}}</text>
- <text class="create_at">发布时间:{{mData.create_at}}</text>
- <u-line color="#E9E9E9" length="calc(100%)" customStyle="margin-top:20rpx;"></u-line>
- <view class="content">
- <u-parse :content="mData.content"></u-parse>
- </view>
- </view>
- </view>
- </template>
- <script>
- import {
- getNews
- } from "@/common/api/common.js";
- export default {
- data() {
- return {
- code: null,
- mData: {}
- }
- },
- onLoad(options) {
- uni.hideShareMenu({
- })
- if (options.code) {
- this.code = options.code;
- this.getNews()
- }
- },
- methods: {
- getNews() {
- uni.showLoading({
- })
- const data = {
- code: this.code,
- }
- getNews(data)
- .then((res) => {
- uni.hideLoading();
- console.log("getNews==>", res.data)
- if (res.data) {
- this.mData = res.data.list[0]
- }
- })
- .catch(() => {
- uni.hideLoading();
- });
- },
- }
- }
- </script>
- <style lang="scss" scoped>
- .app-page {
- width: 100%;
- display: flex;
- min-height: 100vh;
- background: white;
- align-items: center;
- flex-direction: column;
- }
- .name {
- font-size: 32rpx;
- font-family: PingFang SC-Bold, PingFang SC;
- font-weight: bold;
- color: #1D161F;
- margin-top: 40rpx;
- }
- .create_at {
- font-size: 26rpx;
- margin-left: 25rpx;
- font-family: PingFang SC-Medium, PingFang SC;
- font-weight: 500;
- color: #BDBDBD;
- margin-top: 20rpx;
- }
- .content{
- margin: 20rpx;
- }
- </style>
|