feiYiZhengCe.vue 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324
  1. <template>
  2. <view class="body">
  3. <view class="header">
  4. <view class="tit">湖里文化遗产保护中心</view>
  5. <view class="thumbnail_1">
  6. <image style="width: 100%; height: 100%" src="/static/img/img_seal@2x.png"></image>
  7. </view>
  8. </view>
  9. <view style="position: relative">
  10. <view class="fybk_zc">
  11. <view class="fybk_tit">
  12. <image style="width: 120rpx; height: 860rpx" src="/static/img/img_zce.png"></image>
  13. </view>
  14. <view class="fy_xm">
  15. <view v-for="(item, index) in tabListName" :key="item.name" @click="tabBtn(item.id, index)" :class="{ active: tabIndex == index }">{{ item.name }}</view>
  16. </view>
  17. </view>
  18. </view>
  19. <view class="box1">
  20. <view class="box2">
  21. <view @click="detailsBtn(item.id)" v-for="item in lawsList" :key="item.id" class="box_item">{{ item.title }}</view>
  22. </view>
  23. </view>
  24. <!-- 法规详情容器 -->
  25. <view class="details_box" v-if="detailsShow">
  26. <view class="details_box2">
  27. <view class="details_tit_box">
  28. <view class="back" @click="detailsShow = false">
  29. <image style="width: 100%; height: 100%" src="../../../static/img/icon_back@2x.png"></image>
  30. </view>
  31. <view class="details_tit">{{ detail.title }}</view>
  32. </view>
  33. <view class="muLv">
  34. <!-- <view class="muLv1">{{ detail.content }}</view> -->
  35. <u-parse :content="detail.content"></u-parse>
  36. </view>
  37. </view>
  38. </view>
  39. <!-- 菜单按钮 -->
  40. <view class="caidan" @click="navBtn">
  41. <image class="img" src="../../../static/img/icon_menu@2x.png"></image>
  42. <view class="dh">导航</view>
  43. </view>
  44. <!-- 菜单弹层 -->
  45. <u-popup :show="show" @close="close" mode="left" bgColor="#f8efe1" customStyle="width:500rpx">
  46. <LeftNav></LeftNav>
  47. </u-popup>
  48. </view>
  49. </template>
  50. <script>
  51. let that;
  52. export default {
  53. data() {
  54. return {
  55. show: false,
  56. detailsShow: false,
  57. tabIndex: 0,
  58. tabListName: [
  59. {
  60. name: '国内法规',
  61. id: 76
  62. },
  63. {
  64. name: '部级',
  65. id: 77
  66. },
  67. {
  68. name: '地方',
  69. id: 78
  70. },
  71. {
  72. name: '其他',
  73. id: 79
  74. },
  75. {
  76. name: '联合国科教文组织',
  77. id: 80
  78. },
  79. {
  80. name: '重要论述',
  81. id: 81
  82. }
  83. ],
  84. lawsList: [],
  85. detail: []
  86. };
  87. },
  88. onLoad() {
  89. that = this;
  90. this.getguoneifagui();
  91. },
  92. methods: {
  93. tabBtn(id, index) {
  94. console.log(index, 88899);
  95. that.getguoneifagui(id);
  96. this.tabIndex = index;
  97. },
  98. navBtn() {
  99. this.show = true;
  100. },
  101. // 法规详情
  102. detailsBtn(index) {
  103. console.log(index, 'index');
  104. that.getfeiyidetail(index);
  105. this.detailsShow = true;
  106. },
  107. close() {
  108. this.show = false;
  109. // console.log('close');
  110. },
  111. //获取国内法规列表
  112. async getguoneifagui(id) {
  113. let res = await this.$api.getfeiyibaike({
  114. model: '7',
  115. channel: id ? id : '76',
  116. apikey: '649264'
  117. });
  118. console.log(res, '法规列表');
  119. that.lawsList = res.data.pageList.data;
  120. console.log(that.lawsList, '列表');
  121. },
  122. //详情
  123. async getfeiyidetail(id) {
  124. let res = await this.$api.getfeiyidetail({
  125. id: id,
  126. apikey: '649264'
  127. });
  128. console.log(res, '详情列表');
  129. that.detail = res.data.archivesInfo;
  130. console.log(that.detail, '详情');
  131. }
  132. }
  133. };
  134. </script>
  135. <style>
  136. .body {
  137. width: 100%;
  138. height: 1925rpx;
  139. padding-top: 100rpx;
  140. box-sizing: border-box;
  141. }
  142. .active {
  143. font-size: 54rpx;
  144. background: linear-gradient(270deg, #bc5f29 0%, #5b3c29 100%);
  145. -webkit-background-clip: text;
  146. -webkit-text-fill-color: transparent;
  147. }
  148. .header {
  149. margin-left: 10%;
  150. width: 960rpx;
  151. height: 96rpx;
  152. align-items: center;
  153. display: flex;
  154. }
  155. .tit {
  156. background-image: linear-gradient(270deg, rgba(188, 95, 41, 1) 0, rgba(91, 60, 41, 1) 100%);
  157. /* width: 500rpx; */
  158. height: 96rpx;
  159. font-size: 48rpx;
  160. letter-spacing: 0.3em;
  161. font-weight: NaN;
  162. text-align: left;
  163. white-space: nowrap;
  164. line-height: 100rpx;
  165. -webkit-background-clip: text;
  166. -webkit-text-fill-color: transparent;
  167. }
  168. .thumbnail_1 {
  169. width: 16rpx;
  170. height: 60rpx;
  171. }
  172. .fybk_zc {
  173. left: 9%;
  174. top: 220rpx;
  175. display: flex;
  176. position: absolute;
  177. }
  178. .fybk_tit {
  179. width: 200rpx;
  180. height: 530rpx;
  181. text-align: center;
  182. }
  183. .fy_xm {
  184. display: flex;
  185. flex-direction: column;
  186. justify-content: space-between;
  187. height: 640rpx;
  188. letter-spacing: 0.2em;
  189. color: #563530;
  190. padding-left: 30rpx;
  191. font-size: 40rpx;
  192. margin-top: 100rpx;
  193. border-left: 1px solid #563530;
  194. box-sizing: border-box;
  195. }
  196. .caidan {
  197. margin-left: 10%;
  198. display: flex;
  199. width: 180rpx;
  200. align-items: center;
  201. }
  202. .img {
  203. width: 80rpx;
  204. height: 80rpx;
  205. }
  206. .dh {
  207. margin-left: 10rpx;
  208. font-size: 36rpx;
  209. color: #563530;
  210. }
  211. .box1 {
  212. width: 2000rpx;
  213. height: 1200rpx;
  214. margin-left: 28%;
  215. margin-top: 100rpx;
  216. border: 3px solid #563530;
  217. }
  218. .box2 {
  219. overflow: scroll;
  220. width: 1980rpx;
  221. height: 1180rpx;
  222. margin: auto;
  223. margin-top: 10rpx;
  224. padding: 60rpx 60rpx 0 60rpx;
  225. border: 1px solid #563530;
  226. box-sizing: border-box;
  227. }
  228. .details_box {
  229. position: absolute;
  230. top: 10%;
  231. width: 2000rpx;
  232. height: 1200rpx;
  233. margin-left: 28%;
  234. margin-top: 100rpx;
  235. border: 3px solid #563530;
  236. background-color: #f8efe1;
  237. }
  238. .details_box2 {
  239. overflow: scroll;
  240. width: 1980rpx;
  241. height: 1180rpx;
  242. margin: auto;
  243. margin-top: 10rpx;
  244. padding: 0 60rpx 0 60rpx;
  245. border: 1px solid #563530;
  246. box-sizing: border-box;
  247. }
  248. .details_tit_box {
  249. position: sticky;
  250. top: 0;
  251. z-index: 2;
  252. background-color: #f8efe1;
  253. width: 100%;
  254. height: 200rpx;
  255. border-bottom: 1px solid #ddd7d6;
  256. display: flex;
  257. align-items: center;
  258. }
  259. .muLv {
  260. width: 100%;
  261. height: 160rpx;
  262. /* display: flex; */
  263. justify-content: space-between;
  264. align-items: center;
  265. }
  266. .muLv1 {
  267. font-size: 40rpx;
  268. color: #563530;
  269. }
  270. .muLv2 {
  271. font-size: 36rpx;
  272. color: #563530;
  273. }
  274. .zJie_box {
  275. width: 100%;
  276. height: 120rpx;
  277. display: flex;
  278. align-items: center;
  279. }
  280. .zJie_1 {
  281. display: flex;
  282. justify-content: space-between;
  283. align-items: center;
  284. }
  285. .zJie_2 {
  286. width: 150rpx;
  287. font-size: 40rpx;
  288. color: #563530;
  289. letter-spacing: 0.2em;
  290. }
  291. .zJie_3 {
  292. font-size: 40rpx;
  293. color: #563530;
  294. margin-left: 40rpx;
  295. letter-spacing: 0.2em;
  296. }
  297. .back {
  298. position: absolute;
  299. width: 100rpx;
  300. height: 100rpx;
  301. }
  302. .details_tit {
  303. margin-left: 140rpx;
  304. font-size: 50rpx;
  305. color: #563530;
  306. letter-spacing: 0.2em;
  307. }
  308. .box_item {
  309. height: 150rpx;
  310. display: flex;
  311. align-items: center;
  312. font-size: 40rpx;
  313. color: #563530;
  314. letter-spacing: 0.2em;
  315. border-bottom: 1px solid #ddd7d6;
  316. }
  317. </style>