mentioned.vue 5.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  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="bottom">
  18. <view class="price">¥<text>{{item.spu && item.spu.price}}</text></view>
  19. <view class="buy-btn">立即购买</view>
  20. </view>
  21. </view>
  22. </view>
  23. </view>
  24. </scroll-view>
  25. </view>
  26. </view>
  27. <view class='mask' catchtouchmove="true" :hidden='popup.show==false' @tap="closePopup"></view>
  28. </view>
  29. </template>
  30. <script>
  31. // +----------------------------------------------------------------------
  32. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  33. // +----------------------------------------------------------------------
  34. // | Copyright (c) 2016~2024 https://www.crmeb.com All rights reserved.
  35. // +----------------------------------------------------------------------
  36. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  37. // +----------------------------------------------------------------------
  38. // | Author: CRMEB Team <admin@crmeb.com>
  39. // +----------------------------------------------------------------------
  40. import { goShopDetail } from '@/libs/order.js'
  41. import { mapGetters } from "vuex";
  42. export default {
  43. computed:{
  44. ...mapGetters(['viewColor']),
  45. },
  46. props:{
  47. list: {
  48. type: Array,
  49. default: []
  50. },
  51. uid: {
  52. type: Number,
  53. },
  54. isHome: {
  55. type: Boolean,
  56. default: false
  57. }
  58. },
  59. data() {
  60. return {
  61. popup: {
  62. show: false
  63. },
  64. };
  65. },
  66. methods: {
  67. // 点击关闭按钮
  68. closePopup() {
  69. this.$set(this.popup, 'show', false);
  70. },
  71. showPopup() {
  72. this.$set(this.popup, 'show', true);
  73. },
  74. goDetail(item){
  75. if (item.product_type === 1) {
  76. uni.navigateTo({
  77. url: `/pages/activity/goods_seckill_details/index?id=${item.product_id}&time=${item.stop_time}&spid=${this.uid}`
  78. })
  79. } else if (item.product_type === 2) {
  80. uni.navigateTo({
  81. url: `/pages/activity/presell_details/index?id=${item.activity_id}&spid=${this.uid}`
  82. })
  83. } else if (item.product_type === 0) {
  84. uni.navigateTo({
  85. url: `/pages/goods_details/index?id=${item.product_id}&spid=${this.uid}`
  86. })
  87. }else if (item.product_type === 4) {
  88. uni.navigateTo({
  89. url: `/pages/activity/combination_details/index?id=${item.activity_id}&spid=${this.uid}`
  90. })
  91. }else if (item.product_type === 40) {
  92. uni.navigateTo({
  93. url: `/pages/activity/combination_status/index?id=${item.activity_id}&spid=${this.uid}`
  94. })
  95. }
  96. }
  97. }
  98. }
  99. </script>
  100. <style lang="scss" scoped>
  101. .container{
  102. position: fixed;
  103. bottom: 0;
  104. width: 100%;
  105. left: 0;
  106. background-color: #ffffff;
  107. z-index: 77;
  108. border-radius: 16rpx 16rpx 0 0;
  109. transform: translate3d(0, 100%, 0);
  110. transition: all .3s cubic-bezier(.25, .5, .5, .9);
  111. max-height: 1000rpx;
  112. &.on {
  113. transform: translate3d(0, 0, 0);
  114. }
  115. .header{
  116. position: relative;
  117. padding: 40rpx 30rpx;
  118. .title{
  119. color: #282828;
  120. font-size: 30rpx;
  121. }
  122. .iconfont{
  123. color: #8A8A8A;
  124. font-size: 28rpx;
  125. position: absolute;
  126. top: 0;
  127. right: 0;
  128. }
  129. .icon-guanbi5 {
  130. right: 20rpx;
  131. color: #8a8a8a;
  132. font-size: 30rpx;
  133. line-height: 30rpx;
  134. top: 20rpx;
  135. background-color: transparent;
  136. font-weight: normal;
  137. }
  138. }
  139. scroll-view{
  140. max-height: 800rpx;
  141. }
  142. .main_count{
  143. padding: 0 30rpx 30rpx;
  144. max-height: 800rpx;
  145. overflow-y: scroll;
  146. /* #ifndef MP */
  147. &.mb90{
  148. margin-bottom: 90rpx;
  149. }
  150. /* #endif */
  151. .list{
  152. margin-bottom: 40rpx;
  153. height: auto;
  154. flex-direction: row;
  155. &:last-child{
  156. margin-bottom: 0;
  157. }
  158. }
  159. .pro_list{
  160. display: flex;
  161. flex-direction: row;
  162. .picture,.image,uni-image{
  163. width: 200rpx;
  164. height: 200rpx;
  165. border-radius: 16rpx;
  166. }
  167. .info{
  168. margin-left: 30rpx;
  169. position: relative;
  170. .bottom{
  171. display: flex;
  172. justify-content: space-between;
  173. align-items: center;
  174. width: 460rpx;
  175. position: absolute;
  176. left: 0;
  177. bottom: 10rpx;
  178. flex-direction: row;
  179. }
  180. .name{
  181. color: #282828;
  182. font-size: 30rpx;
  183. line-height: 45rpx;
  184. display: -webkit-box;
  185. width: 460rpx;
  186. }
  187. .price{
  188. color: var(--view-priceColor);
  189. font-size: 26rpx;
  190. font-weight: bold;
  191. flex-direction: row;
  192. align-items: flex-end;
  193. text{
  194. font-size: 34rpx;
  195. }
  196. }
  197. .buy-btn{
  198. color: #fff;
  199. background: var(--view-theme);
  200. border-radius: 26rpx;
  201. width: 140rpx;
  202. height: 48rpx;
  203. display: flex;
  204. align-items: center;
  205. justify-content: center;
  206. font-size: 22rpx;
  207. }
  208. }
  209. }
  210. }
  211. }
  212. </style>