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

224 lines
3.9 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
  1. <template>
  2. <view>
  3. <navbar title="我的收藏" leftClick @leftClick="leftClick" />
  4. <view style="background-color: #fff;">
  5. <uv-tabs :list="tabs"
  6. lineColor="#B12026"
  7. lineHeight="8rpx"
  8. lineWidth="50rpx"
  9. @click="clickTabs"></uv-tabs>
  10. </view>
  11. <hList :list="list">
  12. <template
  13. v-slot="{item,index}"
  14. >
  15. <view class="card"
  16. @click="toUrl(item)"
  17. >
  18. <view class="card-img">
  19. <image :src="item.roleHead" mode="aspectFill"></image>
  20. </view>
  21. <view class="iconx">
  22. <uv-icon
  23. name="close-circle-fill"
  24. size="40rpx"
  25. @click="delModel(item)"
  26. color="#B12026"></uv-icon>
  27. </view>
  28. <view class="card-content">
  29. <view style="display: flex; align-items: center;">
  30. <view class="title text-ellipsis">{{ item.roleName }}</view>
  31. </view>
  32. <view class="card-content-tag"
  33. v-if="item.preTime">
  34. {{ item.preTime || '提前一周预约' }}
  35. </view>
  36. <view class="tips text-ellipsis-2"
  37. v-if="item.preInfo">
  38. {{ item.preInfo}}
  39. </view>
  40. <view class="card-content-bottom">
  41. <view style="color: #FF280C;">
  42. {{ item.price }}
  43. </view>
  44. <view class="card-content-bottom-one"
  45. @click.stop="toPayUrl(item)">
  46. 线上预约
  47. </view>
  48. </view>
  49. </view>
  50. </view>
  51. </template>
  52. </hList>
  53. </view>
  54. </template>
  55. <script>
  56. import mixinsList from '@/mixins/list.js'
  57. import hList from '@/components/list/h-list.vue'
  58. export default {
  59. components : {
  60. hList
  61. },
  62. mixins : [mixinsList],
  63. data() {
  64. return {
  65. tabs: [
  66. // {
  67. // name: '文化遗产'
  68. // },
  69. {
  70. name: '遗产讲述'
  71. },
  72. {
  73. name: '达人同游'
  74. },
  75. {
  76. name: '遗产路径'
  77. },
  78. {
  79. name: '我要跟拍'
  80. },
  81. {
  82. name: '非遗体验'
  83. },
  84. {
  85. name: '我要研学'
  86. },
  87. {
  88. name: '文创好物'
  89. },
  90. ],
  91. mixinsListApi : 'queryCollectionList',
  92. options: [
  93. {
  94. text: '删除',
  95. style: {
  96. backgroundColor: '#FA5A0A'
  97. }
  98. },
  99. ],
  100. }
  101. },
  102. onLoad() {
  103. this.queryParams.collectionType = 0
  104. },
  105. onShow() {
  106. this.getData()
  107. },
  108. methods: {
  109. leftClick(){
  110. uni.navigateBack(-1)
  111. },
  112. clickTabs({ index }){
  113. this.queryParams.collectionType = index
  114. this.getData()
  115. },
  116. toUrl(item){
  117. },
  118. delModel(item){
  119. let self = this
  120. uni.showModal({
  121. title: '确认删除吗?',
  122. success() {
  123. self.$api('deleteCollection', {
  124. collectionId : item.id
  125. }, res => {
  126. self.getData()
  127. })
  128. }
  129. })
  130. },
  131. }
  132. }
  133. </script>
  134. <style scoped lang="scss">
  135. .card {
  136. display: flex;
  137. width: 710rpx;
  138. margin: 40rpx 20rpx;
  139. align-items: center;
  140. position: relative;
  141. .iconx{
  142. position: absolute;
  143. top: 0rpx;
  144. right: 20rpx;
  145. }
  146. .card-img {
  147. height: 270rpx;
  148. width: 240rpx;
  149. flex-shrink: 0;
  150. image {
  151. height: 100%;
  152. width: 100%;
  153. border-radius: 20rpx;
  154. }
  155. }
  156. .card-content {
  157. margin-left: 3%;
  158. font-size: 28rpx;
  159. display: flex;
  160. flex-direction: column;
  161. justify-content: space-around;
  162. width: 97%;
  163. .title{
  164. max-width: 260rpx;
  165. }
  166. .card-content-img {
  167. display: flex;
  168. margin-left: 10rpx;
  169. width: 130rpx;
  170. height: 50rpx;
  171. }
  172. .card-content-tag {
  173. display: inline-block;
  174. font-size: 24rpx;
  175. padding: 2rpx 20rpx;
  176. border: 2rpx solid #FBA21E;
  177. background-color: #FFF1D2;
  178. color: #FBAF35;
  179. border-radius: 20rpx;
  180. width: fit-content;
  181. }
  182. .tips{
  183. font-size: 24rpx;
  184. color: #999;
  185. }
  186. .card-content-bottom {
  187. display: flex;
  188. justify-content: space-between;
  189. align-items: center;
  190. .card-content-bottom-one {
  191. display: inline-block;
  192. color: #FFFDF6;
  193. background-color: #C83741;
  194. margin-right: 4%;
  195. padding: 12rpx 30rpx;
  196. border-radius: 40rpx;
  197. font-size: 24rpx;
  198. }
  199. }
  200. view {
  201. margin-top: 10rpx;
  202. }
  203. }
  204. }
  205. </style>