index.wxml 4.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. <view wx:if="{{ tabbar.length }}" class="container">
  2. <!-- 商品分类tab -->
  3. <view class="sharp-tabs">
  4. <scroll-view scroll-x="{{ true }}" scroll-left="{{ true }}">
  5. <view class="sharp-tabs--container dis-flex">
  6. <view wx:for="{{ tabbar }}" wx:key="this" data-index="{{ index }}"
  7. class="tabs-item {{ curTabIndex == index ? 'active' : '' }} dis-flex flex-dir-column flex-x-center flex-y-center"
  8. catchtap="onToggleTab">
  9. <block wx:if="{{ item.status == StateEnum.ACTIVE_STATE_NOTICE.value }}">
  10. <view class="item-title">{{ item.status_text }}</view>
  11. </block>
  12. <block wx:else>
  13. <view class="item-time">{{ item.active_time }}</view>
  14. <view class="item-status">{{ item.status_text }}</view>
  15. </block>
  16. </view>
  17. </view>
  18. <view class="sharp-tabs--empty"></view>
  19. </scroll-view>
  20. </view>
  21. <!-- 秒杀活动 -->
  22. <view class="sharp-active dis-flex flex-dir-column flex-y-center">
  23. <!-- 活动状态 -->
  24. <view class="active-status">
  25. <text class="active-status--icon iconfont icon-artboard"></text>
  26. <text class="active-status--time"
  27. wx:if="{{ tabbar[curTabIndex].status != StateEnum.ACTIVE_STATE_NOTICE.value }}">{{ tabbar[curTabIndex].active_time }}</text>
  28. <text class="active-status--text">{{ tabbar[curTabIndex].status_text2 }}</text>
  29. </view>
  30. <!-- 倒计时 -->
  31. <view class="active--count-down dis-flex flex-y-center">
  32. <text class="m-r-10">{{ tabbar[curTabIndex].status == StateEnum.ACTIVE_STATE_BEGIN.value ? '距结束' : '距开始' }}</text>
  33. <countdown wx:if="{{ countDownTime }}" date="{{ countDownTime }}" style="custom" bind:finish="onCountDownEnd" />
  34. </view>
  35. </view>
  36. <!-- 内容区域 -->
  37. <view class="bargain-hall">
  38. <!-- 商品列表 -->
  39. <view class="goods-item" wx:for="{{ goodsList.data }}" wx:key="this">
  40. <form bindsubmit="onTargetActive">
  41. <button formType="submit" class="btn-normal" data-id="{{ item.sharp_goods_id }}">
  42. <view class="goods-item--container dis-flex">
  43. <!-- 商品图片 -->
  44. <view class="goods-image">
  45. <image src="{{ item.goods_image }}"></image>
  46. </view>
  47. <view class="goods-info">
  48. <!-- 商品名称 -->
  49. <view class="goods-name">
  50. <text class="twolist-hidden">{{ item.goods_name }}</text>
  51. </view>
  52. <!-- 秒杀进度条 -->
  53. <view class="sharp-progress dis-flex flex-y-center">
  54. <view class="yoo-progress">
  55. <view class="yoo-progress--portion" style="width: {{ item.progress }}%;">
  56. </view>
  57. <text class="yoo-progress--text">{{ item.progress }}%</text>
  58. </view>
  59. <view class="sharp-sales">已抢{{ item.sales_actual }}件</view>
  60. </view>
  61. <!-- 秒杀活动价格 -->
  62. <view class="sharp-price dis-flex flex-y-end">
  63. <view class="seckill-price">
  64. <text class="f-24">¥</text>
  65. <text class="money">{{ item.goods_sku.seckill_price }}</text>
  66. </view>
  67. <view class="original-price">
  68. <text class="f-24">¥</text>
  69. <text class="money">{{ item.goods_sku.original_price }}</text>
  70. </view>
  71. </view>
  72. <!-- 操作按钮 -->
  73. <view class="opt-touch">
  74. <view class="touch-btn">
  75. <text>{{ tabbar[curTabIndex].status == StateEnum.ACTIVE_STATE_BEGIN.value ? '马上抢' : '查看商品' }}</text>
  76. </view>
  77. </view>
  78. </view>
  79. </view>
  80. </button>
  81. </form>
  82. </view>
  83. <view wx:if="{{ noMore }}" class="no-more f-28">亲, 没有更多了</view>
  84. <!-- 无数据提供的页面 -->
  85. <view wx:if="{{ !isLoading && !goodsList.data.length }}">
  86. <view class="yoshop-notcont">
  87. <text class="iconfont icon-wushuju"></text>
  88. <text class="cont">亲,暂无秒杀商品哦</text>
  89. </view>
  90. </view>
  91. </view>
  92. </view>