miaosha.vue 5.2 KB

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