景徳镇旅游微信小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

173 lines
3.3 KiB

8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
  1. <template>
  2. <!-- 申遗历程 -->
  3. <view class="apply">
  4. <navbar title="申遗历程" leftClick @leftClick="$utils.navigateBack" />
  5. <view class="top-img">
  6. <image src="../static/applyRelic/jdz.png" mode="aspectFill" style="width: 100%; height: 100%;"></image>
  7. </view>
  8. <view class="middle-box">
  9. <view class="middle-img">
  10. <view>
  11. <image src="../static/applyRelic/2.png" mode="aspectFill" />
  12. </view>
  13. <view>
  14. <image src="../static/applyRelic/2.png" mode="aspectFill" />
  15. </view>
  16. <view>
  17. <image src="../static/applyRelic/2.png" mode="aspectFill" />
  18. </view>
  19. </view>
  20. <view class="middle-font">
  21. <view @click="selectMiddle(0)">
  22. 申遗历程
  23. </view>
  24. <view @click="selectMiddle(1)">
  25. 申遗缘由
  26. </view>
  27. <view @click="selectMiddle(2)">
  28. 遗产价值
  29. </view>
  30. </view>
  31. </view>
  32. <view class="apply-list">
  33. <uv-list @scrolltolower="scrolltolower">
  34. <uv-list-item
  35. :title="item.articleTitle"
  36. :note="$dayjs(item.createTime).format('YYYY-MM-DD')"
  37. :border="true"
  38. v-for="(item,index) in list"
  39. :key="index"
  40. :clickable="true"
  41. @click="toUrl(item)"
  42. >
  43. <template #footer>
  44. <uv-image :src="item.articleImage" radius="10rpx" width="240rpx"
  45. height="160rpx" />
  46. </template>
  47. </uv-list-item>
  48. </uv-list>
  49. </view>
  50. <tabber />
  51. </view>
  52. </template>
  53. <script>
  54. export default {
  55. data() {
  56. return {
  57. queryParams: {
  58. pageNo: 1,
  59. pageSize: 10,
  60. },
  61. total : 0,
  62. list : [],
  63. articleType : -1,
  64. }
  65. },
  66. onShow() {
  67. this.queryArticleListByType()
  68. },
  69. onReachBottom() {
  70. this.loadMoreData()
  71. },
  72. onPullDownRefresh(){
  73. this.queryArticleListByType()
  74. },
  75. methods: {
  76. queryArticleListByType(){
  77. let query = {
  78. ...this.queryParams,
  79. }
  80. if(this.articleType != -1){
  81. query.articleType = this.articleType
  82. }
  83. this.$api('queryArticleListByType', query, res => {
  84. uni.stopPullDownRefresh()
  85. if(res.code == 200){
  86. this.list = res.result.records
  87. this.total = res.result.total
  88. }
  89. })
  90. },
  91. loadMoreData(){
  92. if(this.queryParams.pageSize < this.total){
  93. this.queryParams.pageSize += 10
  94. this.queryArticleListByType()
  95. }
  96. },
  97. toUrl(item){
  98. console.log(item);
  99. this.$utils.navigateTo(`/pages_order/service/articleDetail?id=${item.id}&type=1`)
  100. },
  101. selectMiddle(e){
  102. console.log(e);
  103. if(this.articleType != e){
  104. this.articleType = e
  105. }else{
  106. this.articleType = -1
  107. }
  108. this.queryArticleListByType()
  109. },
  110. }
  111. }
  112. </script>
  113. <style scoped lang="scss">
  114. .apply {
  115. .top-img {
  116. height: 380rpx;
  117. }
  118. .middle-box {
  119. display: flex;
  120. position: relative;
  121. height: 220rpx;
  122. align-items: center;
  123. justify-content: space-around;
  124. background-color: #fff;
  125. .middle-img {
  126. display: flex;
  127. align-items: center;
  128. justify-content: space-around;
  129. width: 100%;
  130. view {
  131. width: 160rpx;
  132. height: 160rpx;
  133. image {
  134. width: 100%;
  135. height: 100%;
  136. }
  137. }
  138. }
  139. .middle-font {
  140. position: absolute;
  141. display: flex;
  142. width: 100%;
  143. justify-content: space-around;
  144. view {
  145. width: 60rpx;
  146. color: #FFFDF6;
  147. font-weight: 600;
  148. }
  149. }
  150. }
  151. .apply-list {
  152. width: 94%;
  153. margin-left: 3%;
  154. /deep/ .uv-list-item{
  155. background-color: #FFFDF6 !important;
  156. }
  157. }
  158. }
  159. </style>