text_detail.html 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. {extend name="public/container"}
  2. {block name="title"}图文详情{/block}
  3. {block name="head_top"}
  4. <style>
  5. .page {
  6. position: absolute;
  7. top: 0;
  8. right: 0;
  9. bottom: 0;
  10. left: 0;
  11. display: -webkit-box;
  12. display: -webkit-flex;
  13. display: flex;
  14. -webkit-box-orient: vertical;
  15. -webkit-box-direction: normal;
  16. -ms-flex-direction: column;
  17. flex-direction: column;
  18. overflow: hidden;
  19. }
  20. .head {
  21. display: -webkit-box;
  22. display: -webkit-flex;
  23. display: flex;
  24. -webkit-box-align: center;
  25. align-items: center;
  26. padding: 0.2rem 0.3rem;
  27. border-bottom: 1px solid #eee;
  28. }
  29. .head .title {
  30. -webkit-box-flex: 1;
  31. flex: 1;
  32. min-width: 0;
  33. margin-left: 0.3rem;
  34. overflow: hidden;
  35. display: -webkit-box;
  36. -webkit-box-orient: vertical;
  37. -webkit-line-clamp: 2;
  38. }
  39. .head .browse {
  40. margin-left: 0.3rem;
  41. font-size: 0.24rem;
  42. color: #999;
  43. }
  44. .head .knowledge {
  45. -webkit-transform: rotate(180deg);
  46. transform: rotate(180deg);
  47. font-size: 0.3rem;
  48. }
  49. .content {
  50. -webkit-box-flex: 1;
  51. flex: 1;
  52. padding: 0.3rem;
  53. overflow-y: auto;
  54. -webkit-overflow-scrolling: touch;
  55. }
  56. .content p {
  57. font-size: 0.3rem;
  58. line-height: 1.6;
  59. }
  60. .content img {
  61. width: 100%;
  62. }
  63. </style>
  64. {/block} {block name="content"}
  65. <div v-cloak id="app">
  66. <div class="page">
  67. <div class="head">
  68. <a class="knowledge iconxiangyou" href="javascript:" @click="goBack"></a>
  69. <div class="title">{{ taskInfo.title }}</div>
  70. <div class="browse">已浏览 {{ taskInfo.play_count }}</div>
  71. </div>
  72. <div class="content" v-html="taskInfo.content"></div>
  73. </div>
  74. <shortcut></shortcut>
  75. </div>
  76. {/block} {block name="foot"}
  77. <script>
  78. var taskInfo = {$taskInfo},uid={$userInfo['uid'] ? $userInfo['uid']:0};
  79. require(['vue', '{__WAP_PATH}zsff/js/shortcut.js'], function (Vue) {
  80. var vm = new Vue({
  81. el: '#app',
  82. data: {
  83. taskInfo: taskInfo
  84. },
  85. mounted: function () {
  86. var that=this;
  87. mapleWx($jssdk(), function () {
  88. this.onMenuShareAll({
  89. title: that.taskInfo.title,
  90. desc: that.taskInfo.title,
  91. imgUrl: that.taskInfo.image,
  92. link: location.href.indexOf('?') == -1 ? location.href + '?spread_uid=' + uid : location.href + '&spread_uid=' + uid,
  93. });
  94. });
  95. },
  96. methods: {
  97. goBack: function () {
  98. history.back();
  99. }
  100. }
  101. });
  102. });
  103. </script>
  104. {/block}