feiYiBaiKe.vue 7.5 KB

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