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

196 lines
3.7 KiB

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