detail.vue 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <template>
  2. <view class="container">
  3. <!-- 公告详情 -->
  4. <view class="title">{{ noticeDetail.title }}</view>
  5. <view class="time" v-if="noticeDetail">
  6. <span>
  7. <span>作者:{{noticeDetail.author || '数智云商城'}}</span>
  8. </span>
  9. <span :style="{'margin-left':'20rpx'}">
  10. 时间: {{ $day(noticeDetail.add_time * 1000).format("YYYY-MM-DD HH:mm:ss") }}
  11. </span></view
  12. >
  13. <jyf-parser :html="noticeDetail.content" class="mar_t50"></jyf-parser>
  14. <!-- 公告详情-end -->
  15. </view>
  16. </template>
  17. <script>
  18. let app = getApp();
  19. // let reqApi = new ReqApi();
  20. var appEv = app.$vm.$options;
  21. import { post } from "@/request/api.js";
  22. import jyfParser from "@/components/jyf-parser/jyf-parser.vue";
  23. // import { ReqApi } from "@/utils/reqTools.js";
  24. export default {
  25. data() {
  26. return {
  27. content: "",
  28. noticeDetail: undefined,
  29. };
  30. },
  31. onLoad(option) {
  32. this.noticeDetail = JSON.parse(decodeURIComponent(option.detail));
  33. console.log(this.noticeDetail, "qqqq");
  34. // this.loadData()
  35. },
  36. methods: {
  37. loadData() {
  38. let data = {
  39. type: 2,
  40. };
  41. post("/my/article", data).then((res) => {
  42. if (res.code == 0) {
  43. this.content = res.data.data.content;
  44. console.log(this.content);
  45. // this.BannerImg = res.list;
  46. }
  47. });
  48. },
  49. },
  50. components: {
  51. jyfParser,
  52. },
  53. };
  54. </script>
  55. <style lang="scss" scoped>
  56. // 用户须知
  57. .container {
  58. border-top: 20rpx solid #f5f5f5;
  59. padding: 0 20rpx;
  60. box-sizing: border-box;
  61. .title {
  62. margin-top: 20rpx;
  63. font-size: 48rpx;
  64. font-weight: bold;
  65. }
  66. .time {
  67. margin-top: 10rpx;
  68. font-size: 20rpx;
  69. color: #666363;
  70. }
  71. }
  72. // 用户须知-end
  73. </style>