景徳镇旅游微信小程序
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.

197 lines
3.7 KiB

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