123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121 |
- <template>
- <view class="p-30">
-
- <view class="header flex">
- <view class="cate-title">{{ item.title }}</view>
- </view>
-
- <view class="talents-item m-t-30">
- <view class="flex">
- <view class="">{{ item.author }}</view>
- <view class="m-l-20">{{timeFormat(item.created_at)}}</view>
- </view>
- </view>
-
- <view class="talents-item m-t-30 m-b-30">
- <view class="m-t-16 item-info">
- <rich-text :nodes="item.content"></rich-text>
- </view>
- </view>
- </view>
- </template>
- <script>
- import {
- mapActions,
- mapGetters
- } from 'vuex'
- import {
- policyDetail
- } from '@/api/app';
- import {
- timeFormat
- } from '@/utils/date';
- export default {
- data() {
- return {
- statusBarHeight: 0,
- id: 0,
- item: {},
-
-
-
-
-
-
- };
- },
- created() {
- uni.getSystemInfo({
- success: (res) => {
- this.statusBarHeight = res.statusBarHeight;
- }
- });
- },
- onLoad() {
-
- this.item = uni.getStorageSync('policyDetail');
- uni.removeStorageSync('policyDetail')
- if (!this.item) {
- this.id = this.$Route.query.id;
- this.getCategoryFun()
- }
- },
- onShow() {
-
- },
- methods: {
-
- makePhoneCall(tel) {
- if (tel) {
- uni.makePhoneCall({
- phoneNumber: tel
- });
- }
- },
- async getCategoryFun() {
- const {
- status,
- data
- } = await policyDetail({
- id: this.id
- });
- if (status == 1) {
- this.item = data
- }
- },
- timeFormat(time) {
- return timeFormat(time)
- },
- },
- computed: {
- ...mapGetters(['appConfig']),
- }
- };
- </script>
- <style lang="scss">
- page {
- background-color: #FFFFFF;
- }
- .header {
- .cate-title {
- font-size: 40rpx;
- font-family: PingFang SC-Medium, PingFang SC;
- font-weight: bold;
- color: #282C37;
- }
- }
- .talents-item {
- background: #FFFFFF;
- font-size: 28rpx;
- }
- </style>
|