mentioned.vue 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. <template>
  2. <view :style="viewColor">
  3. <view class="container" :class="popup.show==true?'on':''">
  4. <view class="header">
  5. <text class="title">TA提到的宝贝</text>
  6. <text class="iconfont icon-guanbi5" @click="closePopup"></text>
  7. </view>
  8. <view class="main_count" :class="isHome ? 'mb90' : ''">
  9. <scroll-view scroll-y="true">
  10. <view v-for="(item, index) in list" :key="index" @click="goDetail(item.spu)" class="list">
  11. <view class="pro_list">
  12. <view class="picture">
  13. <image :src="item.spu && item.spu.image" class="image"></image>
  14. </view>
  15. <view class="info">
  16. <view class="name line2">{{item.spu && item.spu.store_name}}</view>
  17. <view class="price">¥<text>{{item.spu && item.spu.price}}</text></view>
  18. </view>
  19. </view>
  20. </view>
  21. </scroll-view>
  22. </view>
  23. </view>
  24. <view class='mask' catchtouchmove="true" :hidden='popup.show==false' @tap="closePopup"></view>
  25. </view>
  26. </template>
  27. <script>
  28. import { goShopDetail } from '@/libs/order.js'
  29. import { mapGetters } from "vuex";
  30. export default {
  31. computed:{
  32. ...mapGetters(['viewColor']),
  33. },
  34. props:{
  35. list: {
  36. type: Array,
  37. default: []
  38. },
  39. uid: {
  40. type: Number,
  41. },
  42. isHome: {
  43. type: Boolean,
  44. default: false
  45. }
  46. },
  47. data() {
  48. return {
  49. popup: {
  50. show: false
  51. },
  52. };
  53. },
  54. methods: {
  55. // 点击关闭按钮
  56. closePopup() {
  57. this.$set(this.popup, 'show', false);
  58. },
  59. showPopup() {
  60. this.$set(this.popup, 'show', true);
  61. },
  62. goDetail(item){
  63. if (item.product_type === 1) {
  64. uni.navigateTo({
  65. url: `/pages/activity/goods_seckill_details/index?id=${item.product_id}&time=${item.stop_time}&spid=${this.uid}`
  66. })
  67. } else if (item.product_type === 2) {
  68. uni.navigateTo({
  69. url: `/pages/activity/presell_details/index?id=${item.activity_id}&spid=${this.uid}`
  70. })
  71. } else if (item.product_type === 0) {
  72. uni.navigateTo({
  73. url: `/pages/goods_details/index?id=${item.product_id}&spid=${this.uid}`
  74. })
  75. }else if (item.product_type === 4) {
  76. uni.navigateTo({
  77. url: `/pages/activity/combination_details/index?id=${item.activity_id}&spid=${this.uid}`
  78. })
  79. }else if (item.product_type === 40) {
  80. uni.navigateTo({
  81. url: `/pages/activity/combination_status/index?id=${item.activity_id}&spid=${this.uid}`
  82. })
  83. }
  84. }
  85. }
  86. }
  87. </script>
  88. <style lang="scss" scoped>
  89. .container{
  90. position: fixed;
  91. bottom: 0;
  92. width: 100%;
  93. left: 0;
  94. background-color: #ffffff;
  95. z-index: 77;
  96. border-radius: 16rpx 16rpx 0 0;
  97. // padding-bottom: 20rpx;
  98. transform: translate3d(0, 100%, 0);
  99. transition: all .3s cubic-bezier(.25, .5, .5, .9);
  100. max-height: 1000rpx;
  101. &.on {
  102. transform: translate3d(0, 0, 0);
  103. }
  104. .header{
  105. position: relative;
  106. padding: 40rpx 30rpx;
  107. .title{
  108. color: #282828;
  109. font-size: 30rpx;
  110. }
  111. .iconfont{
  112. color: #8A8A8A;
  113. font-size: 28rpx;
  114. position: absolute;
  115. top: 0;
  116. right: 0;
  117. }
  118. .icon-guanbi5 {
  119. right: 20rpx;
  120. color: #8a8a8a;
  121. font-size: 30rpx;
  122. line-height: 30rpx;
  123. top: 20rpx;
  124. background-color: transparent;
  125. font-weight: normal;
  126. }
  127. }
  128. scroll-view{
  129. max-height: 800rpx;
  130. }
  131. .main_count{
  132. padding: 0 20rpx 30rpx;
  133. max-height: 800rpx;
  134. overflow-y: scroll;
  135. /* #ifndef MP */
  136. &.mb90{
  137. margin-bottom: 90rpx;
  138. }
  139. /* #endif */
  140. .list{
  141. margin-bottom: 40rpx;
  142. height: auto;
  143. &:last-child{
  144. margin-bottom: 0;
  145. }
  146. }
  147. .pro_list{
  148. display: flex;
  149. .picture,.image,uni-image{
  150. width: 200rpx;
  151. height: 200rpx;
  152. border-radius: 8rpx;
  153. }
  154. .info{
  155. margin-left: 30rpx;
  156. position: relative;
  157. .name{
  158. color: #282828;
  159. font-size: 30rpx;
  160. line-height: 45rpx;
  161. }
  162. .price{
  163. color: var(--view-priceColor);
  164. position: absolute;
  165. left: 0;
  166. bottom: 5rpx;
  167. font-size: 20rpx;
  168. font-weight: bold;
  169. text{
  170. font-size: 26rpx;
  171. }
  172. }
  173. }
  174. }
  175. }
  176. }
  177. </style>