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

228 lines
3.9 KiB

1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year 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(r) {
  123. if(!r.confirm){
  124. return
  125. }
  126. console.log(r);
  127. self.$api('deleteCollection', {
  128. collectionId : item.id
  129. }, res => {
  130. self.getData()
  131. })
  132. }
  133. })
  134. },
  135. }
  136. }
  137. </script>
  138. <style scoped lang="scss">
  139. .card {
  140. display: flex;
  141. width: 710rpx;
  142. margin: 40rpx 20rpx;
  143. align-items: center;
  144. position: relative;
  145. .iconx{
  146. position: absolute;
  147. top: 0rpx;
  148. right: 20rpx;
  149. }
  150. .card-img {
  151. height: 270rpx;
  152. width: 240rpx;
  153. flex-shrink: 0;
  154. image {
  155. height: 100%;
  156. width: 100%;
  157. border-radius: 20rpx;
  158. }
  159. }
  160. .card-content {
  161. margin-left: 3%;
  162. font-size: 28rpx;
  163. display: flex;
  164. flex-direction: column;
  165. justify-content: space-around;
  166. width: 97%;
  167. .title{
  168. max-width: 260rpx;
  169. }
  170. .card-content-img {
  171. display: flex;
  172. margin-left: 10rpx;
  173. width: 130rpx;
  174. height: 50rpx;
  175. }
  176. .card-content-tag {
  177. display: inline-block;
  178. font-size: 24rpx;
  179. padding: 2rpx 20rpx;
  180. border: 2rpx solid #FBA21E;
  181. background-color: #FFF1D2;
  182. color: #FBAF35;
  183. border-radius: 20rpx;
  184. width: fit-content;
  185. }
  186. .tips{
  187. font-size: 24rpx;
  188. color: #999;
  189. }
  190. .card-content-bottom {
  191. display: flex;
  192. justify-content: space-between;
  193. align-items: center;
  194. .card-content-bottom-one {
  195. display: inline-block;
  196. color: #FFFDF6;
  197. background-color: #C83741;
  198. margin-right: 4%;
  199. padding: 12rpx 30rpx;
  200. border-radius: 40rpx;
  201. font-size: 24rpx;
  202. }
  203. }
  204. view {
  205. margin-top: 10rpx;
  206. }
  207. }
  208. }
  209. </style>