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

172 lines
3.5 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
  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="item.roleHead" 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. @click.stop="toPayUrl(item)">
  32. 线上预约
  33. </view>
  34. </view>
  35. </view>
  36. </view>
  37. </view>
  38. </template>
  39. <script>
  40. export default {
  41. props : {
  42. type : {
  43. default : 0
  44. },
  45. height : {
  46. default : 'auto'
  47. },
  48. showRoleLevel : {
  49. default : false,
  50. },
  51. },
  52. data() {
  53. return {
  54. queryParams: {
  55. pageNo: 1,
  56. pageSize: 10,
  57. },
  58. total : 0,
  59. list : [],
  60. }
  61. },
  62. methods: {
  63. // 0-遗产讲述,1-达人同游,2-我要跟拍
  64. getList(){
  65. this.queryParams.pageNo = 1
  66. this.$api('queryRoleInfoList', {
  67. ...this.queryParams,
  68. roleId : this.type,
  69. }, res => {
  70. uni.stopPullDownRefresh()
  71. if(res.code == 200){
  72. this.list = res.result.records
  73. this.total = res.result.total
  74. }
  75. })
  76. },
  77. loadMoreList(){
  78. if(this.queryParams.pageSize < this.total){
  79. this.queryParams.pageSize += 10
  80. this.getList()
  81. }
  82. },
  83. toUrl(type, item){
  84. console.log(item.id);
  85. let url = `/pages_order/service/reservationDetail?type=${type}&id=` + item.id
  86. this.$utils.navigateTo(url)
  87. },
  88. toPayUrl(item){
  89. uni.navigateTo({
  90. url: `/pages_order/order/orderSubscribe?payType=${parseInt(this.type) + 1}&id=${item.id}`
  91. })
  92. },
  93. }
  94. }
  95. </script>
  96. <style scoped lang="scss">
  97. .card {
  98. display: flex;
  99. width: 94%;
  100. margin: 40rpx 0 0 3%;
  101. align-items: center;
  102. .card-img {
  103. height: 270rpx;
  104. width: 240rpx;
  105. flex-shrink: 0;
  106. image {
  107. height: 100%;
  108. width: 100%;
  109. border-radius: 20rpx;
  110. }
  111. }
  112. .card-content {
  113. margin-left: 3%;
  114. font-size: 28rpx;
  115. display: flex;
  116. flex-direction: column;
  117. justify-content: space-around;
  118. width: 97%;
  119. .title{
  120. max-width: 260rpx;
  121. }
  122. .card-content-img {
  123. display: flex;
  124. margin-left: 10rpx;
  125. width: 130rpx;
  126. height: 50rpx;
  127. }
  128. .card-content-tag {
  129. display: inline-block;
  130. font-size: 24rpx;
  131. padding: 2rpx 20rpx;
  132. border: 2rpx solid #FBA21E;
  133. background-color: #FFF1D2;
  134. color: #FBAF35;
  135. border-radius: 20rpx;
  136. width: fit-content;
  137. }
  138. .tips{
  139. font-size: 24rpx;
  140. color: #999;
  141. }
  142. .card-content-bottom {
  143. display: flex;
  144. justify-content: space-between;
  145. align-items: center;
  146. .card-content-bottom-one {
  147. display: inline-block;
  148. color: #FFFDF6;
  149. background-color: #C83741;
  150. margin-right: 4%;
  151. padding: 12rpx 30rpx;
  152. border-radius: 40rpx;
  153. font-size: 24rpx;
  154. }
  155. }
  156. view {
  157. margin-top: 10rpx;
  158. }
  159. }
  160. }
  161. </style>