feiYiZhengCe.vue 6.8 KB

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