favorites.vue 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. <template>
  2. <view>
  3. <view class="product_list" >
  4. <!-- Vue3 项目部分小程序端事件延迟或调用失败 在执行事件的元素上添加 data-eventsync="true" 属性以解决此问题 -->
  5. <view data-eventsync="true" class="product_item" v-for="(item,index) in 10" :key="index">
  6. <view class="product_left">
  7. <image class="product_image" src="" mode=""></image>
  8. </view>
  9. <view class="product_right">
  10. <view class="product_title">
  11. <view class="product_text">
  12. <text>少儿直播学习课堂,今日限购</text>
  13. </view>
  14. <view class="time">
  15. <text>距今日结束08:02:56</text>
  16. </view>
  17. </view>
  18. <view class="stock_price">
  19. <view class="product_price" >
  20. <span style="font-size: 26rpx;">¥</span><text >100 </text>
  21. </view>
  22. <view class="cancel_but" @click="cancelPopup()">
  23. 取消收藏
  24. </view>
  25. <view class="product_order_but">
  26. 立即购买
  27. </view>
  28. </view>
  29. </view>
  30. </view>
  31. </view>
  32. <uni-popup ref="cancelPopup">
  33. <view class="cancel_layout">
  34. <view class="cancel_title">
  35. 取消收藏
  36. </view>
  37. <view class="cancel_text">
  38. 是否确认取消收藏?取消后可能找不回来咯
  39. </view>
  40. <view class="cancel_btn">
  41. <view class="btn_1">
  42. 在想想
  43. </view>
  44. <view class="btn_2">
  45. 确认
  46. </view>
  47. </view>
  48. </view>
  49. </uni-popup>
  50. <view class="to_bottom" > -----到底啦-----</view>
  51. </view>
  52. </template>
  53. <script>
  54. export default {
  55. data() {
  56. return {
  57. }
  58. },
  59. methods: {
  60. cancelPopup(){
  61. this.$refs.cancelPopup.open("center");
  62. }
  63. }
  64. }
  65. </script>
  66. <style lang="less">
  67. .product_list{
  68. width: 690rpx;
  69. display: block;
  70. overflow: hidden;
  71. margin: 0rpx auto;
  72. .product_item{
  73. width: 690rpx;
  74. display: block;
  75. overflow: hidden;
  76. margin: 20rpx 0rpx;
  77. background-color: #FFFFFF;
  78. border-radius: 20rpx;
  79. .product_left{
  80. float: left;
  81. .product_image{
  82. margin: 20rpx 20rpx;
  83. width: 224rpx;
  84. height: 200rpx;
  85. border-radius: 20rpx;
  86. background-color: aqua;
  87. }
  88. }
  89. .product_right{
  90. float: left;
  91. width: 380rpx;
  92. margin: 20rpx 20rpx;
  93. .product_title{
  94. line-height: 1.5;
  95. .product_text{
  96. font-size: 30rpx;
  97. font-weight: 600;
  98. }
  99. .time{
  100. font-size: 24rpx;
  101. }
  102. }
  103. .stock_price{
  104. color: #dddddd;
  105. height: 100rpx;
  106. font-size: 20rpx;
  107. line-height: 30rpx;
  108. padding: 0rpx 10rpx;
  109. margin-top: 40rpx;
  110. display: flex;
  111. align-items: center;
  112. justify-content: space-between;
  113. .product_price{
  114. color: red;
  115. font-size: 50rpx;
  116. font-weight: 600;
  117. line-height: 100rpx;
  118. }
  119. .cancel_but{
  120. display: inline-flex;
  121. width: 150rpx;
  122. height: 64rpx;
  123. align-items: center;
  124. justify-content: center;
  125. margin: 0rpx 10rpx;
  126. border-radius: 40rpx;
  127. border: 2rpx solid #1fbe7e;
  128. color: #000000;
  129. }
  130. .product_order_but{
  131. display: inline-flex;
  132. width: 150rpx;
  133. height: 64rpx;
  134. font-size: 24rpx;
  135. background-color: #1fbe7e;
  136. border-radius: 40rpx;
  137. color: #FFFFFF;
  138. align-items: center;
  139. justify-content: center;
  140. }
  141. }
  142. }
  143. }
  144. .product_item:nth-child(even){
  145. margin-right: 0rpx;
  146. }
  147. }
  148. .cancel_layout{
  149. background-color: #FFFFFF;
  150. width: 690rpx;
  151. height: 30vh;
  152. border-radius: 40rpx;
  153. display: flex;
  154. flex-direction: column;
  155. overflow: hidden;
  156. .cancel_title{
  157. display: inline-flex;
  158. justify-content: center;
  159. align-items: center;
  160. padding: 10rpx;
  161. margin: 30rpx;
  162. font-size: 40rpx;
  163. font-weight: bold;
  164. color: #000000;
  165. }
  166. .cancel_text{
  167. display: inline-flex;
  168. justify-content: center;
  169. align-items: center;
  170. margin: 30rpx auto;
  171. width: 576rpx;
  172. height: 50rpx;
  173. padding:30rpx;
  174. }
  175. .cancel_btn{
  176. border-top: 2rpx solid #d3d3d3;
  177. display: flex;
  178. justify-content: space-between;
  179. padding-top: 10rpx;
  180. height: 130rpx;
  181. .btn_1{
  182. display: inline-flex;
  183. justify-content: center;
  184. align-items: center;
  185. height: 100rpx;
  186. flex: 1;
  187. font-size: 30rpx;
  188. color: #51bf81;
  189. }
  190. .btn_2{
  191. display: inline-flex;
  192. justify-content: center;
  193. align-items: center;
  194. flex: 1;
  195. height: 100rpx;
  196. font-size: 30rpx;
  197. }
  198. }
  199. }
  200. </style>