goodscard.vue 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  1. <template>
  2. <view class="tui-product-box">
  3. <view class="tui-block__box" :style="diyitem.base.bgstyle">
  4. <view v-if="diyitem.title.title.show" class="group-name-box">
  5. <view class="tui-group-name">
  6. <view class="tui-seckill__box">
  7. <text>{{ diyitem.title.title.txt }}</text>
  8. </view>
  9. <view v-if="diyitem.title.more.show" class="tui-more__box" @tap="seckill">
  10. <text>{{ diyitem.title.more.txt }}</text>
  11. <tui-icon name="arrowright" :size="36" unit="rpx" color="#999"></tui-icon>
  12. </view>
  13. </view>
  14. </view>
  15. <view v-if="diyitem.list.length > 0" class="tui-group-list">
  16. <view class="diy-goods">
  17. <view :class="'goods-list display__' + diyitem.base.display + ' column__' + diyitem.base.column">
  18. <scroll-view :scroll-x="diyitem.base.display === 'slide' ? true : false">
  19. <block v-for="(dataItem, index) in diyitem.list" :key="index">
  20. <view class="goods-item">
  21. <navigator hover-class="none"
  22. :url="'/pages/goodsDetail/goodsDetail?id=' + dataItem.id">
  23. <view class="goods-image">
  24. <image :style="diyitem.base.widthheight ? diyitem.base.widthheight : ''"
  25. :src="dataItem.image"></image>
  26. </view>
  27. <view class="detail">
  28. <view v-if="diyitem.base.text.show > 0"
  29. class="goods-name twolist-hidden f-28">
  30. {{ dataItem.goods_name }}
  31. </view>
  32. <view v-if="diyitem.base.sjg" class="goods-price col-m">
  33. <text v-if="dataItem.is_points_goods == 1">{{lang.points}}:{{
  34. dataItem.pay_points }}</text>
  35. <text v-if="dataItem.is_points_goods != 1"><text class="f-24">¥</text>{{
  36. dataItem.price }}
  37. <block v-if="dataItem.ptype==2 && dataItem.quantity_unit">
  38. <text v-if="dataItem.time_amount > 0"
  39. class="f-24">/{{dataItem.time_amount}}{{dataItem.quantity_unit}}</text>
  40. <text v-else class="f-24"><text
  41. v-if="dataItem.is_times && dataItem.timesmum">/{{dataItem.timesmum}}</text>{{dataItem.quantity_unit}}</text>
  42. </block>
  43. </text>
  44. <text v-if="dataItem.minimum > 1"
  45. style="color:#999;font-size:24rpx;">起售量
  46. {{ dataItem.minimum }}</text>
  47. </view>
  48. </view>
  49. </navigator>
  50. </view>
  51. </block>
  52. </scroll-view>
  53. </view>
  54. </view>
  55. </view>
  56. </view>
  57. </view>
  58. </template>
  59. <script>
  60. export default {
  61. name: 'miaosha',
  62. props: {
  63. diyitem: {
  64. type: Object,
  65. default () {
  66. return {};
  67. }
  68. },
  69. pagestyleconfig: {
  70. type: Object,
  71. default () {
  72. return {};
  73. }
  74. }
  75. },
  76. computed: {
  77. },
  78. data() {
  79. return {
  80. lang: {}
  81. };
  82. },
  83. mounted() {
  84. let _this = this
  85. _this.$request.get('Lang.getlang').then(res => {
  86. if (res.errno == 0) {
  87. _this.lang = res.data;
  88. }
  89. });
  90. },
  91. methods: {
  92. navigateTo: function(e) {
  93. this.sam.diynavigateTo(e)
  94. },
  95. seckill() {
  96. let url = '/pages/seckillList/seckillList';
  97. this.tui.href(url);
  98. },
  99. }
  100. };
  101. </script>
  102. <style>
  103. @import './diyapge.css';
  104. .tui-product-box {
  105. margin-top: 20rpx;
  106. padding: 0 25rpx;
  107. box-sizing: border-box;
  108. }
  109. .tui-block__box {
  110. width: 100%;
  111. box-sizing: border-box;
  112. background-color: #ffffff;
  113. border-radius: 20rpx;
  114. overflow: hidden;
  115. }
  116. .group-name-box {
  117. padding-left: 25rpx;
  118. padding-right: 25rpx;
  119. }
  120. .tui-seckill__box {
  121. display: flex;
  122. align-items: center;
  123. }
  124. .tui-seckill__img {
  125. width: 40rpx;
  126. }
  127. .tui-countdown__box {
  128. width: 228rpx;
  129. display: flex;
  130. align-items: center;
  131. color: #fff;
  132. background-color: #fff;
  133. font-weight: 400;
  134. height: 40rpx;
  135. border-radius: 30px;
  136. overflow: hidden;
  137. margin-left: 25rpx;
  138. }
  139. .tui-countdown__title {
  140. width: 100rpx;
  141. height: 100%;
  142. display: flex;
  143. align-items: center;
  144. justify-content: center;
  145. flex-shrink: 0;
  146. font-size: 24rpx;
  147. line-height: 24rpx;
  148. }
  149. .tui-countdown__title {
  150. width: 100rpx;
  151. height: 100%;
  152. display: flex;
  153. align-items: center;
  154. justify-content: center;
  155. flex-shrink: 0;
  156. font-size: 24rpx;
  157. line-height: 24rpx;
  158. }
  159. .tui-flex__center {
  160. flex: 1;
  161. display: flex;
  162. align-items: center;
  163. justify-content: center;
  164. }
  165. .tui-more__box {
  166. display: flex;
  167. align-items: center;
  168. font-weight: 400;
  169. color: #999;
  170. }
  171. .tui-more__box text {
  172. font-size: 24rpx;
  173. line-height: 24rpx;
  174. }
  175. .tui-group-list {
  176. padding-left: 10rpx;
  177. padding-right: 10rpx;
  178. justify-content: space-between;
  179. box-sizing: border-box;
  180. /* padding-top: 20rpx; */
  181. }
  182. </style>