feiYiBaiKe.vue 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328
  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">
  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">
  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:500rpx">
  75. <LeftNav></LeftNav>
  76. </u-popup>
  77. </view>
  78. </template>
  79. <script>
  80. let that;
  81. export default {
  82. data() {
  83. return {
  84. indexTab: 0,
  85. show: false,
  86. detailsShow: false,
  87. list: [],
  88. list1: [],
  89. detail: []
  90. };
  91. },
  92. onLoad() {
  93. that = this;
  94. this.getZhuanyezhishi();
  95. this.getgongzhuozhinan();
  96. },
  97. methods: {
  98. tabBtn(index) {
  99. this.indexTab = index;
  100. },
  101. // 法规详情
  102. detailsBtn(index) {
  103. console.log(index, 'index');
  104. that.getfeiyidetail(index);
  105. this.detailsShow = true;
  106. },
  107. navBtn() {
  108. this.show = true;
  109. },
  110. close() {
  111. this.show = false;
  112. // console.log('close');
  113. },
  114. //获取专业知识列表
  115. async getZhuanyezhishi() {
  116. let res = await this.$api.getfeiyibaike({
  117. model: '7',
  118. channel: '70',
  119. apikey: '649264'
  120. });
  121. console.log(res, '专业知识列表');
  122. that.list = res.data.pageList.data;
  123. console.log(that.list, '列表');
  124. },
  125. //获取工作指南列表
  126. async getgongzhuozhinan() {
  127. let res = await this.$api.getfeiyibaike({
  128. model: '7',
  129. channel: '74',
  130. apikey: '649264'
  131. });
  132. console.log(res, '工作指南');
  133. that.list1 = res.data.pageList.data;
  134. console.log(that.list, '指南列表');
  135. },
  136. //详情
  137. async getfeiyidetail(id) {
  138. let res = await this.$api.getfeiyidetail({
  139. id: id,
  140. apikey: '649264'
  141. });
  142. console.log(res, '详情列表');
  143. that.detail = res.data.archivesInfo;
  144. console.log(that.detail, '详情');
  145. }
  146. }
  147. };
  148. </script>
  149. <style>
  150. .body {
  151. padding-top: 100rpx;
  152. height: 1825rpx;
  153. }
  154. .box1 {
  155. width: 2200rpx;
  156. height: 1200rpx;
  157. margin-left: 25%;
  158. margin-top: 100rpx;
  159. border: 3px solid #563530;
  160. }
  161. .box2 {
  162. overflow: scroll;
  163. width: 2180rpx;
  164. height: 1180rpx;
  165. margin: auto;
  166. margin-top: 10rpx;
  167. border: 1px solid #563530;
  168. }
  169. .active {
  170. -webkit-background-clip: text;
  171. -webkit-text-fill-color: transparent;
  172. background-image: linear-gradient(270deg, rgba(188, 95, 41, 1) 0, rgba(91, 60, 41, 1) 100%);
  173. border: 1px solid #563530;
  174. }
  175. .header {
  176. margin-left: 10%;
  177. width: 960rpx;
  178. height: 96rpx;
  179. align-items: center;
  180. display: flex;
  181. }
  182. .tit {
  183. background-image: linear-gradient(270deg, rgba(188, 95, 41, 1) 0, rgba(91, 60, 41, 1) 100%);
  184. /* width: 500rpx; */
  185. height: 96rpx;
  186. font-size: 48rpx;
  187. letter-spacing: 0.3em;
  188. font-weight: NaN;
  189. text-align: left;
  190. white-space: nowrap;
  191. line-height: 100rpx;
  192. -webkit-background-clip: text;
  193. -webkit-text-fill-color: transparent;
  194. }
  195. .thumbnail_1 {
  196. width: 16rpx;
  197. height: 60rpx;
  198. }
  199. .fybk_tit {
  200. width: 200rpx;
  201. height: 530rpx;
  202. text-align: center;
  203. }
  204. .fybk_tab {
  205. display: flex;
  206. flex-direction: column;
  207. justify-content: center;
  208. width: 220rpx;
  209. margin-top: 70%;
  210. padding-left: 20rpx;
  211. border-left: 1px solid #563530;
  212. }
  213. .fybk_zc {
  214. left: 9%;
  215. top: 220rpx;
  216. display: flex;
  217. position: absolute;
  218. }
  219. .tab {
  220. color: #563530;
  221. font-size: 36rpx;
  222. letter-spacing: 0.3em;
  223. display: flex;
  224. align-items: center;
  225. margin-bottom: 20rpx;
  226. margin-top: 20rpx;
  227. height: 80rpx;
  228. font-weight: NaN;
  229. padding-left: 26rpx;
  230. white-space: nowrap;
  231. letter-spacing: 0.2em;
  232. }
  233. .txt2 {
  234. width: 1200rpx;
  235. display: flex;
  236. font-size: 36rpx;
  237. align-items: center;
  238. color: #563530;
  239. letter-spacing: 0.1em;
  240. }
  241. .txt3 {
  242. color: #563530;
  243. letter-spacing: 0.1em;
  244. font-size: 24rpx;
  245. }
  246. .txtVal {
  247. width: 2000rpx;
  248. display: flex;
  249. justify-content: space-between;
  250. height: 180rpx;
  251. margin: auto;
  252. align-items: center;
  253. cursor: pointer;
  254. border-bottom: 1px solid #ded1c5;
  255. }
  256. .caidan {
  257. margin-left: 10%;
  258. margin-top: 0;
  259. display: flex;
  260. width: 180rpx;
  261. cursor: pointer;
  262. align-items: center;
  263. }
  264. .img {
  265. width: 80rpx;
  266. height: 80rpx;
  267. }
  268. .dh {
  269. margin-left: 10rpx;
  270. font-size: 36rpx;
  271. color: #563530;
  272. }
  273. .details_box {
  274. position: absolute;
  275. top: 10%;
  276. width: 2000rpx;
  277. height: 1200rpx;
  278. margin-left: 28%;
  279. margin-top: 100rpx;
  280. border: 3px solid #563530;
  281. background-color: #f8efe1;
  282. }
  283. .details_box2 {
  284. overflow: scroll;
  285. width: 1980rpx;
  286. height: 1180rpx;
  287. margin: auto;
  288. margin-top: 10rpx;
  289. padding: 0 60rpx 0 60rpx;
  290. border: 1px solid #563530;
  291. box-sizing: border-box;
  292. }
  293. .details_tit_box {
  294. position: sticky;
  295. top: 0;
  296. z-index: 2;
  297. background-color: #f8efe1;
  298. width: 100%;
  299. height: 200rpx;
  300. border-bottom: 1px solid #ddd7d6;
  301. display: flex;
  302. align-items: center;
  303. }
  304. .back {
  305. width: 100rpx;
  306. height: 100rpx;
  307. }
  308. .details_tit {
  309. margin-left: 60rpx;
  310. font-size: 50rpx;
  311. color: #563530;
  312. letter-spacing: 0.2em;
  313. }
  314. .muLv {
  315. width: 100%;
  316. height: 160rpx;
  317. /* display: flex; */
  318. justify-content: space-between;
  319. align-items: center;
  320. }
  321. </style>