details.vue 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273
  1. <template>
  2. <view class="main">
  3. <view class="img-banner">
  4. <image mode="aspectFill" src="https://mn.wenlvti.net/app_static/xiangan/banner_dig_1.jpg"></image>
  5. </view>
  6. <view class="level-info">
  7. <view>
  8. <view class="label">已认领:</view>
  9. <view class="value">{{ querys.name }}
  10. <text class="em">Lv.{{ querys.level }}</text>
  11. </view>
  12. </view>
  13. <view>
  14. <view class="label">文化积分:</view>
  15. <view class="value">{{ querys.points }}</view>
  16. </view>
  17. </view>
  18. <view class="task-list">
  19. <view v-if="canCollect('village')" class="item">
  20. <text class="iconfont icon-task-summary"></text>
  21. <view class="info">
  22. <view class="title">村落概况</view>
  23. <view class="desc">探索村落的历史渊源与发生轨迹</view>
  24. </view>
  25. <view class="btn" @click="navTo('task/summary', nextPageData)">去完成</view>
  26. </view>
  27. <view v-if="canCollect('cultural')" class="item">
  28. <text class="iconfont icon-task-history"></text>
  29. <view class="info">
  30. <view class="title">历史文化</view>
  31. <view class="desc">传承百年文化遗产和精神财富</view>
  32. </view>
  33. <view class="btn" @click="navTo('task/history', nextPageData)">
  34. 去完成
  35. </view>
  36. </view>
  37. <view v-if="canCollect('ich')" class="item">
  38. <text class="iconfont icon-task-custom-1"></text>
  39. <view class="info">
  40. <view class="title">非物质文化遗产项目</view>
  41. <view class="desc">维护文化多样性</view>
  42. </view>
  43. <view class="btn" @click="goForm('ich', 0, '非物质文化遗产项目')">
  44. 去完成
  45. </view>
  46. </view>
  47. <view v-if="canCollect('building')" class="item">
  48. <text class="iconfont icon-task-environment"></text>
  49. <view class="info">
  50. <view class="title">环境格局</view>
  51. <view class="desc">感受自然人文环境之美</view>
  52. </view>
  53. <view class="btn" @click="navTo('task/environment', nextPageData)">
  54. 去完成
  55. </view>
  56. </view>
  57. <view v-if="canCollect('building')" class="item">
  58. <text class="iconfont icon-task-building"></text>
  59. <view class="info">
  60. <view class="title">传统建筑</view>
  61. <view class="desc">领略古建筑的独特魅力</view>
  62. </view>
  63. <view class="btn" @click="navTo('task/building', nextPageData)">
  64. 去完成
  65. </view>
  66. </view>
  67. <view v-if="canCollect('folk_culture')" class="item">
  68. <text class="iconfont icon-task-custom"></text>
  69. <view class="info">
  70. <view class="title">民俗文化</view>
  71. <view class="desc">体验民间传统习俗与节庆</view>
  72. </view>
  73. <view class="btn" @click="navTo('task/custom', nextPageData)">
  74. 去完成
  75. </view>
  76. </view>
  77. <view v-if="canCollect('food_product')" class="item">
  78. <text class="iconfont icon-task-food"></text>
  79. <view class="info">
  80. <view class="title">地道美食</view>
  81. <view class="desc">正宗、传统地方特色美食</view>
  82. </view>
  83. <view class="btn" @click="navTo('task/food', nextPageData)">
  84. 去完成
  85. </view>
  86. </view>
  87. <view v-if="canCollect('food_product')" class="item">
  88. <text class="iconfont icon-task-mine"></text>
  89. <view class="info">
  90. <view class="title">物产资源</view>
  91. <view class="desc">特定地域的植物、矿物或手工艺</view>
  92. </view>
  93. <view class="btn" @click="navTo('task/mine', nextPageData)">
  94. 去完成
  95. </view>
  96. </view>
  97. <view v-if="canCollect('route')" class="item">
  98. <text class="iconfont icon-task-trip"></text>
  99. <view class="info">
  100. <view class="title">旅游路线</view>
  101. <view class="desc">体验独特的文化魅力</view>
  102. </view>
  103. <view class="btn" @click="navTo('task/trip', nextPageData)">
  104. 去完成
  105. </view>
  106. </view>
  107. <div v-if="!authStore.isAdmin && isEmpty" class="item">
  108. <i class="iconfont icon-task-summary"></i>
  109. <div class="info">
  110. <div class="title">您当前没有可完成的任务</div>
  111. <div class="desc">请联系管理员认领可采编栏目</div>
  112. </div>
  113. </div>
  114. <view class="item">
  115. <text class="iconfont icon-task-other"></text>
  116. <view class="info">
  117. <view class="title">其他</view>
  118. <view class="desc">更多文化传承相关信息</view>
  119. </view>
  120. <view class="btn active">
  121. 待开放
  122. </view>
  123. </view>
  124. </view>
  125. </view>
  126. </template>
  127. <script setup lang="ts">
  128. import { useLoadQuerys } from '@/common/composeabe/LoadQuerys';
  129. import { computed } from 'vue';
  130. import { useAuthStore } from '@/store/auth';
  131. import { useCollectStore } from '@/store/collect';
  132. import { navTo } from '@/components/utils/PageAction';
  133. const { querys } = useLoadQuerys({
  134. id: 0,
  135. name: '',
  136. points: 0,
  137. level: 0,
  138. villageVolunteerId: 0,
  139. });
  140. const authStore = useAuthStore();
  141. const { canCollect, isEmpty } = useCollectStore();
  142. const nextPageData = computed(() => ({
  143. villageId: querys.value.id,
  144. villageVolunteerId: querys.value.villageVolunteerId,
  145. }));
  146. function goForm(subType: string, subId: number, title: string) {
  147. navTo('/pages/dig/forms/list', {
  148. villageId: querys.value.id,
  149. villageVolunteerId: querys.value.villageVolunteerId,
  150. subType,
  151. subId,
  152. subTitle: title,
  153. })
  154. }
  155. </script>
  156. <style lang="scss" scoped>
  157. .img-banner {
  158. height: 246rpx;
  159. width: 100%;
  160. image {
  161. height: 100%;
  162. width: 100%;
  163. }
  164. }
  165. .level-info {
  166. padding: 48rpx 36rpx 36rpx;
  167. background: #FFF2E6;
  168. border-radius: 20rpx;
  169. position: relative;
  170. margin-top: 42rpx;
  171. margin-bottom: 37rpx;
  172. > view:first-child {
  173. margin-bottom: 44rpx;
  174. }
  175. .label {
  176. font-size: 28rpx;
  177. color: #111111;
  178. display: inline-block;
  179. }
  180. .value {
  181. font-weight: bold;
  182. font-size: 28rpx;
  183. display: inline-block;
  184. color: #333333;
  185. .em {
  186. font-family: Rockwell;
  187. font-weight: 600;
  188. font-size: 30rpx;
  189. color: #FF8719;
  190. display: inline-block;
  191. margin-left: 35rpx;
  192. }
  193. }
  194. .btn {
  195. position: absolute;
  196. top: 30rpx;
  197. right: 30rpx;
  198. border-radius: 10rpx;
  199. border: 1px solid #FF8719;
  200. padding: 15rpx 20rpx;
  201. display: flex;
  202. align-items: center;
  203. font-weight: 400;
  204. font-size: 28rpx;
  205. color: #FF8719;
  206. text.iconfont {
  207. display: inline-block;
  208. margin-right: 15rpx;
  209. font-size: 40rpx;
  210. }
  211. }
  212. }
  213. .task-list{
  214. .item{
  215. display: flex;
  216. align-items: center;
  217. background: #fff;
  218. margin-bottom: 36rpx;
  219. padding:39rpx 27rpx 38rpx;
  220. text.iconfont{
  221. width: 91rpx;
  222. height: 91rpx;
  223. border-radius: 50%;
  224. border: 1px solid #25515E;
  225. text-align: center;
  226. color: #25515E;
  227. font-size: 60rpx;
  228. line-height: 91rpx;
  229. display: inline-block;
  230. margin-right: 17rpx;
  231. }
  232. .btn{
  233. background: #FF8719;
  234. border-radius: 28rpx;
  235. color:#fff;
  236. font-size: 28rpx;
  237. padding:14rpx 24rpx;
  238. &.active{
  239. background: #EFEFEF;
  240. color:#999999;
  241. }
  242. }
  243. .info{
  244. flex:1;
  245. .title{
  246. font-weight: 600;
  247. font-size: 30rpx;
  248. color: #333333;
  249. margin-bottom: 22rpx;
  250. }
  251. .desc{
  252. font-weight: 400;
  253. font-size: 24rpx;
  254. color: #999999;
  255. }
  256. }
  257. }
  258. }
  259. </style>