details.vue 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  1. <template>
  2. <div class="details-p">
  3. <div class="tops">
  4. <h3>
  5. <van-icon class="word01" name="diy-word" />
  6. {{detailData.docName}}
  7. </h3>
  8. </div>
  9. <div class="middles">
  10. <h3>摘要</h3>
  11. <p>{{detailData.docSummary}}</p>
  12. <div class="continue">全文共18页,<span>继续阅读<van-icon name="arrow-down" size="18" /></span></div>
  13. </div>
  14. <div class="botts">
  15. <div class="cont-page">
  16. 优化招投标市场营商环境与国企采购人主体责任、采购与招标培训资料摘要摘要。优化招投标市场营商环境与国企采购人主体责任、采购与招标培训资料摘要摘要。优化招投标市场营商环境与国企采购人主体责任、采购与招标培训资料摘要摘要。优化招投标市场营商环境与国企采购人主体责任、采购与招标培训资料摘要摘要。优化招投标市场营商环境与国企采购人主体责任、采购与招标培训资料摘要摘要。优化招投标市场营商环境与国企采购人主体责任、采购与招标培训资料摘要摘要。
  17. </div>
  18. </div>
  19. <van-goods-action>
  20. <van-goods-action-icon class="no-icon">
  21. <template #default>
  22. <p class="p1">剑鱼币</p>
  23. <p class="p2">500</p>
  24. </template>
  25. </van-goods-action-icon>
  26. <van-goods-action-icon icon="diy-jubao" text="投诉举报" @click="jubaod" />
  27. <van-goods-action-icon :icon="collectd?'diy-weiguanzhu':'diy-guanzhu'" text="收藏" @click="canged" />
  28. <van-goods-action-button text="下载文档" @click="uploaded" />
  29. </van-goods-action>
  30. <!-- 充值 -->
  31. <recharge ref="charge"></recharge>
  32. <!-- 购买 -->
  33. <purchase ref="buys"></purchase>
  34. </div>
  35. </template>
  36. <script lang="ts">
  37. import { Component, Vue } from 'vue-property-decorator'
  38. import { mapActions } from 'vuex'
  39. import { Icon, Toast, GoodsAction, GoodsActionIcon, GoodsActionButton } from 'vant'
  40. import Recharge from '@/components/Recharge.vue'
  41. import Purchase from '@/components/RechargeHave.vue'
  42. @Component({
  43. name: 'details-p',
  44. components: {
  45. [Icon.name]: Icon,
  46. [GoodsAction.name]: GoodsAction,
  47. [GoodsActionIcon.name]: GoodsActionIcon,
  48. [GoodsActionButton.name]: GoodsActionButton,
  49. Recharge,
  50. Purchase
  51. },
  52. methods: {
  53. ...mapActions({
  54. getDetails: 'main/getDetails'
  55. })
  56. }
  57. })
  58. export default class extends Vue {
  59. getDetails: any
  60. detailData: any = []
  61. collectd = true
  62. nums = 1
  63. created () {
  64. this.onList()
  65. }
  66. onList () {
  67. this.getDetails({ docId: '111' }).then((res: any) => {
  68. console.log(res.data)
  69. this.detailData = res.data.detail
  70. })
  71. }
  72. jubaod () {
  73. Toast({
  74. duration: 3500,
  75. message: '如果您发现此内容有侵权行为,请联系客服400-108-6670进行投诉'
  76. })
  77. }
  78. canged () {
  79. this.collectd = !this.collectd
  80. }
  81. uploaded () {
  82. if (this.nums === 0) {
  83. ;(this.$refs.charge as any).show = true
  84. } else {
  85. ;(this.$refs.buys as any).show = true
  86. }
  87. }
  88. }
  89. </script>
  90. <style lang="scss" scoped>
  91. @include diy-icon('word', 24, 24);
  92. @include diy-icon('jubao', 20, 20);
  93. @include diy-icon('weiguanzhu', 20, 20);
  94. @include diy-icon('guanzhu', 20, 20);
  95. .details-p {
  96. display: flex;
  97. flex-direction: column;
  98. .tops {
  99. display: flex;
  100. background: #fff;
  101. padding: 24px 16px;
  102. h3 {
  103. display: flex;
  104. flex-direction: initial;
  105. color: #171826;
  106. font-weight: 500;
  107. font-size: 20px;
  108. line-height: 30px;
  109. .word01 {
  110. display: inline-table;
  111. width: 26px;
  112. height: 24px;
  113. margin-right: 8px;
  114. }
  115. }
  116. }
  117. .middles {
  118. padding: 16px;
  119. background: #fff;
  120. margin: 8px 0;
  121. h3 {
  122. font-size: 16px;
  123. line-height: 24px;
  124. font-weight: 500;
  125. color: #171826;
  126. }
  127. p {
  128. color: #5F5E64;
  129. font-size: 14px;
  130. line-height: 20px;
  131. margin-top: 8px;
  132. }
  133. .continue {
  134. color: #5F5E64;
  135. font-size: 14px;
  136. line-height: 20px;
  137. text-align: center;
  138. margin-top: 32px;
  139. span {
  140. display: inline-flex;
  141. align-items: center;
  142. color: #2ABED1;
  143. cursor: pointer;
  144. i {
  145. margin-left: 4px;
  146. }
  147. }
  148. }
  149. }
  150. .botts {
  151. padding: 16px 24px;
  152. background: #fff;
  153. .cont-page {
  154. height: 900px;
  155. }
  156. }
  157. .van-goods-action {
  158. // height: 56px;
  159. padding: 8px 16px;
  160. box-shadow: 0px -2px 8px 0px #eee;
  161. display: flex;
  162. justify-content: space-between;
  163. .no-icon {
  164. p {
  165. color:#2ABED1;
  166. }
  167. .p1 {
  168. font-size: 12px;
  169. line-height: 18px;
  170. }
  171. .p2 {
  172. font-size: 18px;
  173. line-height: 26px;
  174. }
  175. .van-icon {
  176. display: none!important;
  177. }
  178. }
  179. .van-goods-action-icon:not(.no-icon) {
  180. font-size: 10px;
  181. color: #5F5E64;
  182. }
  183. .van-goods-action-button--first {
  184. margin-left: 0;
  185. }
  186. .van-goods-action-button--last {
  187. margin-right: 0;
  188. }
  189. .van-goods-action-button {
  190. flex: none;
  191. }
  192. .van-button--large {
  193. width: 165px;
  194. height: 40px;
  195. }
  196. ::v-deep .van-button--default {
  197. background-color: #2ABED1;
  198. .van-button__content {
  199. .van-button__text {
  200. color: #fff;
  201. font-size: 16px;
  202. }
  203. }
  204. }
  205. }
  206. }
  207. </style>