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

192 lines
3.8 KiB

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