HuoHuaLiYong.vue 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363
  1. <template>
  2. <view class="box">
  3. <u-navbar :autoBack="true" title="活化利用" bgColor="rgba(255,255,255,0)" :placeholder="true" titleStyle="font-weight:bold;color:#000000"></u-navbar>
  4. <!--成果 -->
  5. <view>
  6. <view class="tit_box" @click="$common.navigateTo('/index_fenbao/HuoHuaLiYong/chanPin/gengDuoChengGuo')">
  7. <view class="tit">成果展示</view>
  8. <view class="tit2">查看更多</view>
  9. </view>
  10. <view class="rw_box" style="">
  11. <view
  12. @click="$common.navigateTo('/index_fenbao/HuoHuaLiYong/chanPin/chengGuo?id=' + item.id)"
  13. class="zj_box"
  14. v-for="item in achievement"
  15. :key="item.id"
  16. style="position: relative"
  17. >
  18. <view class="tx_box">
  19. <image
  20. style="border-radius: 15rpx; width: 300rpx; height: 185rpx"
  21. mode="aspectFill"
  22. :src="item.image || 'https://huli-app.wenlvti.net/app_static/WenWuGuanJia/image/zwtp.png'"
  23. ></image>
  24. </view>
  25. <view class="" style="width: 280rpx; white-space: nowrap; overflow: hidden; text-overflow: ellipsis">
  26. {{ item.title }}
  27. </view>
  28. </view>
  29. </view>
  30. <!-- -->
  31. <view class="tit_box" @click="$common.navigateTo('/index_fenbao/HuoHuaLiYong/YanXue/YanXue')">
  32. <view class="tit">{{ research.type_text }}</view>
  33. <view class="tit2">查看更多</view>
  34. </view>
  35. <view class="yx_box" @click="researchBtn(research.id)">
  36. <view style="position: absolute; left: 6rpx; top: 6rpx"><image style="width: 160rpx; height: 240rpx" :src="research.image"></image></view>
  37. <view style="margin-left: 200rpx">
  38. <view class="wwd">{{ research.title }}</view>
  39. <view class="time">活动时间:{{ (research.start_time && research.start_time.split(' ')[0]) || '' }}</view>
  40. </view>
  41. <view class="baoming">
  42. <text>查看</text>
  43. <image style="margin-left: 10rpx; width: 32rpx; height: 32rpx" src="/static/img/more.png"></image>
  44. </view>
  45. </view>
  46. </view>
  47. <!--产品 -->
  48. <view>
  49. <view class="tit_box" @click="$common.navigateTo('/index_fenbao/HuoHuaLiYong/chanPin/chanPin')">
  50. <view class="tit">文创产品</view>
  51. <view class="tit2">查看更多</view>
  52. </view>
  53. <view class="rw_box" style="">
  54. <view
  55. @click="$common.navigateTo('/index_fenbao/HuoHuaLiYong/chanPin/chanPinXQ?id=' + item.id)"
  56. class="zj_box"
  57. v-for="item in product"
  58. :key="item.id"
  59. style="position: relative"
  60. >
  61. <view class="tx_box">
  62. <image style="border-radius: 15rpx; width: 300rpx; height: 185rpx" mode="aspectFill" :src="item.image"></image>
  63. </view>
  64. <view class="" style="width: 280rpx; white-space: nowrap; overflow: hidden; text-overflow: ellipsis">
  65. {{ item.title }}
  66. </view>
  67. </view>
  68. </view>
  69. <!-- <view v-for="item in product" :key="item.id" @click="$common.navigateTo('/index_fenbao/HuoHuaLiYong/chanPin/chanPinXQ?id=' + item.id)" class="yx_box">
  70. <view style="position: absolute; left: 6rpx; top: 6rpx"><image style="width: 160rpx; height: 240rpx" :src="item.thumbnail"></image></view>
  71. <view style="margin-left: 200rpx">
  72. <view class="wwd">{{ item.title }}</view>
  73. </view>
  74. <view class="baoming">
  75. <text>查看</text>
  76. <image style="margin-left: 10rpx; width: 32rpx; height: 32rpx" src="/static/img/more.png"></image>
  77. </view>
  78. </view> -->
  79. </view>
  80. <!--挖掘 -->
  81. <view>
  82. <view class="tit_box" @click="$common.navigateTo('/index_fenbao/HuoHuaLiYong/waJue/gengDuo')">
  83. <view class="tit">价值挖掘</view>
  84. <view class="tit2">查看更多</view>
  85. </view>
  86. <view class="gg_box">
  87. <view @click="$common.navigateTo('/index_fenbao/HuoHuaLiYong/waJue/waJue?id=' + item.id)" class="gg_item" v-for="item in excavateList" :key="item.id">
  88. <view class="" style="display: flex; align-items: center">
  89. <image :src="item.image" style="border-radius: 10rpx; margin-right: 30rpx; width: 128rpx; height: 128rpx"></image>
  90. <view class="">
  91. <view>
  92. <view class="rw_tit1">{{ item.title }}</view>
  93. <!-- <view class="rw_tit2">精彩瞬间</view> -->
  94. <view class="rw_tit2">精彩投稿</view>
  95. </view>
  96. </view>
  97. </view>
  98. <view class="">
  99. <image style="width: 40rpx; height: 40rpx" src="/static/img/more.png"></image>
  100. </view>
  101. </view>
  102. </view>
  103. <!-- <view class="yx_box">
  104. <view style="position: absolute; left: 6rpx; top: 6rpx">
  105. <image style="width: 160rpx; height: 240rpx" :src="excavateList.image"></image>
  106. </view>
  107. <view style="margin-left: 200rpx">
  108. <view class="wwd">{{ excavateList.title }}</view>
  109. </view>
  110. <view class="baoming">
  111. <text>查看</text>
  112. <image style="margin-left: 10rpx; width: 32rpx; height: 32rpx" src="/static/img/more.png"></image>
  113. </view>
  114. </view> -->
  115. </view>
  116. <!--游径 -->
  117. <view>
  118. <view class="tit_box" @click="$common.navigateTo('/index_fenbao/HuoHuaLiYong/YouJin/gengDuo')">
  119. <view class="tit">文物主题游径</view>
  120. <view class="tit2">查看更多</view>
  121. </view>
  122. <view class="yx_box" @click="$common.navigateTo('/index_fenbao/HuoHuaLiYong/YouJin/YouJin?id=' + youJingList.id)">
  123. <view style="position: absolute; left: 6rpx; top: 6rpx">
  124. <image style="width: 164rpx; height: 240rpx" :src="youJingList.image"></image>
  125. </view>
  126. <view style="margin-left: 200rpx">
  127. <view class="wwd">{{ youJingList.title }}</view>
  128. <!-- <view class="time">文物路线一览表</view> -->
  129. </view>
  130. <view class="baoming">
  131. <text>查看</text>
  132. <image style="margin-left: 10rpx; width: 32rpx; height: 32rpx" src="/static/img/more.png"></image>
  133. </view>
  134. </view>
  135. </view>
  136. </view>
  137. </template>
  138. <script>
  139. let that;
  140. export default {
  141. data() {
  142. return {
  143. achievement: [] /* 成果 */,
  144. research: {} /* 研学 */,
  145. product: [] /* 产品 */,
  146. travelPathList: {} /* 游径 */,
  147. excavateList: [] /* 价值挖掘 */,
  148. youJingList: {} /* 游径 */
  149. };
  150. },
  151. onLoad() {
  152. that = this;
  153. this.activityLists();
  154. this.getContentList();
  155. this.travelPath();
  156. this.youJing();
  157. this.loadGlobalFont();
  158. this.excavateGetContentList();
  159. },
  160. methods: {
  161. // 文物研学
  162. activityLists() {
  163. this.$api.activityLists({ main_body_id: 1, type: 1 }, function (res) {
  164. // console.log(res, '活动');
  165. if (res.code == 1) {
  166. that.research = res.data[0];
  167. }
  168. });
  169. },
  170. // 产品
  171. getContentList() {
  172. this.$api.getContentList({ main_body_id: 1, model_id: 9, page: 1, pageSize: 4 }, function (res) {
  173. // console.log(res, '产品');
  174. if (res.code == 1) {
  175. that.product = res.data;
  176. }
  177. });
  178. },
  179. // 成果
  180. travelPath() {
  181. this.$api.getMainBodyColumnContentList({ main_body_id: 1, model_id: 11 }, function (res) {
  182. res.data.forEach((item) => {
  183. if (item.name == '活化利用成果') {
  184. that.achievement = item.content_list;
  185. // console.log(that.achievement, '活化利用成果');
  186. }
  187. });
  188. });
  189. },
  190. // 游径
  191. youJing() {
  192. this.$api.activityLists({ main_body_id: 1, type: 2 }, function (res) {
  193. if (res.code == 1) {
  194. that.youJingList = res.data[0];
  195. // console.log(that.youJingList, '游径');
  196. }
  197. });
  198. },
  199. // 价值挖掘
  200. excavateGetContentList() {
  201. this.$api.getContentList({ main_body_id: 1, model_id: 11, main_body_column_id: 72, page: 1, pageSize: 4 }, function (res) {
  202. // console.log(res, '价值挖掘');
  203. if (res.code == 1) {
  204. that.excavateList = res.data;
  205. }
  206. });
  207. },
  208. /* 研学详情 */
  209. researchBtn(id) {
  210. uni.navigateTo({
  211. url: '/index_fenbao/HuoHuaLiYong/YanXue/XiangQing?id=' + id
  212. });
  213. },
  214. // 加载字体
  215. loadGlobalFont() {
  216. try {
  217. uni.loadFontFace({
  218. family: 'MyGlobalFont', // 自定义字体名
  219. source: 'url("https://huli-app.wenlvti.net/app_static/WenWuGuanJia/image/songTi.ttf")',
  220. success() {
  221. console.log('全局字体加载成功');
  222. }
  223. });
  224. } catch (error) {
  225. console.error('全局字体加载异常', error);
  226. }
  227. }
  228. }
  229. };
  230. </script>
  231. <style>
  232. .box {
  233. width: 100%;
  234. padding-bottom: 50rpx;
  235. background-image: url('https://huli-app.wenlvti.net/app_static/WenWuGuanJia/image/xy_bgt.png');
  236. background-size: 100% 100%;
  237. background-attachment: fixed;
  238. background-repeat: repeat-y;
  239. min-height: 100%;
  240. height: auto;
  241. /* background-color: #fff9e9; */
  242. }
  243. .yx_box {
  244. position: relative;
  245. width: 92%;
  246. height: 252rpx;
  247. display: flex;
  248. justify-content: space-around;
  249. align-items: center;
  250. margin: auto;
  251. margin-top: 34rpx;
  252. background-image: url('https://huli-app.wenlvti.net/app_static/WenWuGuanJia/image/hh_item_bg.png');
  253. background-size: 100% 100%;
  254. }
  255. .gg_box {
  256. width: 92%;
  257. margin: auto;
  258. margin-top: 20rpx;
  259. padding: 20rpx;
  260. border: 2rpx solid #ebc9a9;
  261. background-color: #ffffff;
  262. border-radius: 10rpx;
  263. }
  264. .gg_item {
  265. display: flex;
  266. align-items: center;
  267. justify-content: space-between;
  268. margin-top: 25rpx;
  269. width: 630rpx;
  270. /* height: 80rpx; */
  271. }
  272. .rw_tit1 {
  273. font-size: 30rpx;
  274. color: #444444;
  275. line-height: 44rpx;
  276. }
  277. .rw_tit2 {
  278. font-size: 26rpx;
  279. color: rgba(68, 68, 68, 0.4);
  280. line-height: 40rpx;
  281. }
  282. .rw_box {
  283. width: 92%;
  284. margin: auto;
  285. margin-top: 30rpx;
  286. display: flex;
  287. flex-wrap: wrap;
  288. padding: 0 20rpx 20rpx 20rpx;
  289. justify-content: space-between;
  290. border-radius: 10rpx;
  291. border: 2rpx solid #ebc9a9;
  292. background-color: #ffffff;
  293. }
  294. .zj_box {
  295. margin-top: 30rpx;
  296. }
  297. .left_m {
  298. margin-left: 50rpx !important;
  299. }
  300. .wwd {
  301. width: 300rpx;
  302. font-size: 36rpx;
  303. font-weight: 400;
  304. color: #444444;
  305. line-height: 52rpx;
  306. }
  307. .time {
  308. width: 300rpx;
  309. font-size: 28rpx;
  310. color: rgba(68, 68, 68, 0.6);
  311. line-height: 44rpx;
  312. margin-top: 12rpx;
  313. }
  314. .baoming {
  315. display: flex;
  316. /* width: 116rpx; */
  317. height: 56rpx;
  318. line-height: 56rpx;
  319. justify-content: center;
  320. align-items: center;
  321. margin-left: 32rpx;
  322. font-size: 28rpx;
  323. color: #eba869;
  324. border: 2rpx solid #eba869;
  325. }
  326. .map_tit {
  327. display: flex;
  328. align-items: center;
  329. margin-left: 90rpx;
  330. margin-top: 40rpx;
  331. font-size: 40rpx;
  332. font-family: 'MyGlobalFont';
  333. font-weight: 900;
  334. line-height: 52rpx;
  335. color: #444444;
  336. }
  337. .tit_box {
  338. width: 90%;
  339. margin: auto;
  340. margin-top: 40rpx;
  341. display: flex;
  342. align-items: center;
  343. justify-content: space-between;
  344. font-family: 'MyGlobalFont';
  345. }
  346. .tit {
  347. font-size: 32rpx;
  348. color: #444444;
  349. font-weight: 600;
  350. }
  351. .tit2 {
  352. font-size: 28rpx;
  353. color: rgba(68, 68, 68, 0.6);
  354. }
  355. </style>