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

166 lines
3.4 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
  1. <template>
  2. <view>
  3. <view class="card"
  4. @click="toUrl(type, item)"
  5. v-for="(item, index) in list" :key="index">
  6. <view class="card-img">
  7. <image src="../../static/applyRelic/jdz.png" mode="aspectFill"></image>
  8. </view>
  9. <view class="card-content">
  10. <view style="display: flex; align-items: center;">
  11. <view class="title text-ellipsis">{{ item.roleName }}</view>
  12. <image
  13. class="card-content-img"
  14. v-if="showRoleLevel"
  15. :src="`../../static/tell/goldMedal${item.roleLevel}.png`"></image>
  16. </view>
  17. <view class="card-content-tag"
  18. v-if="item.preTime">
  19. {{ item.preTime || '提前一周预约' }}
  20. </view>
  21. <view class="tips text-ellipsis-2"
  22. v-if="item.preInfo">
  23. {{ item.preInfo}}
  24. <!-- 御窑厂刘家弄观音阁观音阁观音阁观音阁陶瓷博物馆御窑博物馆...陶瓷博物馆御窑博物馆陶瓷博物馆御窑博物馆陶瓷博物馆御窑博物馆 -->
  25. </view>
  26. <view class="card-content-bottom">
  27. <view style="color: #FF280C;">
  28. {{ item.price }}
  29. </view>
  30. <view class="card-content-bottom-one">
  31. 线上预约
  32. </view>
  33. </view>
  34. </view>
  35. </view>
  36. </view>
  37. </template>
  38. <script>
  39. export default {
  40. props : {
  41. type : {
  42. default : 0
  43. },
  44. height : {
  45. default : 'auto'
  46. },
  47. showRoleLevel : {
  48. default : false,
  49. }
  50. },
  51. data() {
  52. return {
  53. queryParams: {
  54. pageNo: 1,
  55. pageSize: 10,
  56. },
  57. total : 0,
  58. list : [],
  59. }
  60. },
  61. methods: {
  62. // 1-遗产讲述,2-达人同游,3-我要跟拍
  63. getList(){
  64. this.queryParams.pageNo = 1
  65. this.$api('queryRoleInfoList', {
  66. ...this.queryParams,
  67. roleId : pin + 1,
  68. }, res => {
  69. uni.stopPullDownRefresh()
  70. if(res.code == 200){
  71. this.list = res.result.records
  72. this.total = res.result.total
  73. }
  74. })
  75. },
  76. loadMoreList(){
  77. if(this.queryParams.pageSize < this.total){
  78. this.queryParams.pageSize += 10
  79. this.getList()
  80. }
  81. },
  82. toUrl(type, item){
  83. console.log(item.id);
  84. let url = `/pages_order/service/reservationDetail?type=${type}&id=` + item.id
  85. this.$utils.navigateTo(url)
  86. },
  87. }
  88. }
  89. </script>
  90. <style scoped lang="scss">
  91. .card {
  92. display: flex;
  93. width: 94%;
  94. margin: 40rpx 0 0 3%;
  95. align-items: center;
  96. .card-img {
  97. height: 270rpx;
  98. width: 240rpx;
  99. flex-shrink: 0;
  100. image {
  101. height: 100%;
  102. width: 100%;
  103. border-radius: 20rpx;
  104. }
  105. }
  106. .card-content {
  107. margin-left: 3%;
  108. font-size: 28rpx;
  109. display: flex;
  110. flex-direction: column;
  111. justify-content: space-around;
  112. width: 97%;
  113. .title{
  114. max-width: 260rpx;
  115. }
  116. .card-content-img {
  117. display: flex;
  118. margin-left: 10rpx;
  119. width: 130rpx;
  120. height: 50rpx;
  121. }
  122. .card-content-tag {
  123. display: inline-block;
  124. font-size: 24rpx;
  125. padding: 2rpx 20rpx;
  126. border: 2rpx solid #FBA21E;
  127. background-color: #FFF1D2;
  128. color: #FBAF35;
  129. border-radius: 20rpx;
  130. width: fit-content;
  131. }
  132. .tips{
  133. font-size: 24rpx;
  134. color: #999;
  135. }
  136. .card-content-bottom {
  137. display: flex;
  138. justify-content: space-between;
  139. align-items: center;
  140. .card-content-bottom-one {
  141. display: inline-block;
  142. color: #FFFDF6;
  143. background-color: #C83741;
  144. margin-right: 4%;
  145. padding: 12rpx 30rpx;
  146. border-radius: 40rpx;
  147. font-size: 24rpx;
  148. }
  149. }
  150. view {
  151. margin-top: 10rpx;
  152. }
  153. }
  154. }
  155. </style>