index.wxml 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457
  1. <navbar parameter='{{parameter}}' logoUrl="{{logoUrl}}"></navbar>
  2. <view class="indexs">
  3. <view class="indexTip" style="top:{{navH+13}}rpx" hidden="{{iShiddenTip}}">
  4. <view class="tip acea-row row-between-wrapper">
  5. <view class="text">点击“<image src="/images/spot.png"></image>”添加到我的小程序, 微信首页下拉即可访问美天旺。</view>
  6. <view class="iconfont icon-guanbi1" bindtap="closeTip"></view>
  7. </view>
  8. </view>
  9. <Tabs color="#fff" active="{{activeTabIndex}}" bind:click="onTapCategoryTabItem">
  10. <Tab title="主场">
  11. <view class="wrapper">
  12. <!-- banner 图 -->
  13. <view class="slider-banner banner">
  14. <swiper indicator-dots="true" autoplay="{{autoplay}}" circular="{{circular}}" interval="3000" duration="500" indicator-color="rgba(0,0,0,0.2)" indicator-active-color="#ff3366">
  15. <swiper-item wx:for="{{banner}}" wx:key='index'>
  16. <navigator url="{{item.url ? item.url : ''}}" class="pictrue acea-row row-middle" hover-class='none'>
  17. <image src="{{item.pic}}" class="slide-image"></image>
  18. </navigator>
  19. </swiper-item>
  20. </swiper>
  21. </view>
  22. <!-- 菜单按钮 -->
  23. <view class="nav acea-row">
  24. <block wx:for="{{menus}}" wx:key='index'>
  25. <navigator url="{{item.url ? item.url : ''}}" wx:if="{{item.show == '1'}}" class="item" open-type='switchTab' hover-class='none'>
  26. <view class="pictrue">
  27. <image src="{{item.pic}}"></image>
  28. </view>
  29. <view>{{ item.name }}</view>
  30. </navigator>
  31. <navigator url="{{item.url ? item.url : ''}}" wx:else class="item" hover-class='none'>
  32. <view class="pictrue">
  33. <image src="{{item.pic}}"></image>
  34. </view>
  35. <view>{{ item.name }}</view>
  36. </navigator>
  37. </block>
  38. </view>
  39. <!-- 新闻/跑马灯 -->
  40. <view class='news acea-row row-between-wrapper' wx:if="{{itemNew.length}}">
  41. <view class='pictrue'>
  42. <image src='/images/news.png'></image>
  43. </view>
  44. <view class='swiperTxt'>
  45. <swiper indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" interval="2500" duration="{{duration}}" vertical="true" circular="true">
  46. <block wx:for="{{itemNew}}" wx:key='index'>
  47. <swiper-item catchtouchmove='catchTouchMove'>
  48. <navigator wx:if="{{item.show == '1'}}" url='{{item.url}}' open-type='switchTab' class='acea-row row-between-wrapper' hover-class='none'>
  49. <view class='text acea-row row-between-wrapper'>
  50. <view class='label border2' wx:if="{{item.id < 5 }}">最新</view>
  51. <view class='newsTitle line1'>{{item.info}}</view>
  52. </view>
  53. <!-- <view class='iconfont icon-xiangyou'></view> -->
  54. </navigator>
  55. <navigator wx:else open-type='navigate' url='{{item.url}}' class='acea-row row-between-wrapper' hover-class='none'>
  56. <view class='text acea-row row-between-wrapper'>
  57. <view class='label border2' wx:if="{{item.id%2 == 0}}">最新</view>
  58. <view class='newsTitle line1'>{{item.info}}</view>
  59. </view>
  60. <!-- <view class='iconfont icon-xiangyou'></view> -->
  61. </navigator>
  62. </swiper-item>
  63. </block>
  64. </swiper>
  65. </view>
  66. </view>
  67. <!-- 优惠券领取
  68. <view class="scroll-coupon" wx:if="{{getCouponList.length}}">
  69. <scroll-view class="scroll-view_x" enable-flex scroll-x style="width:auto;overflow:hidden;">
  70. <view class="item {{item.is_use ? 'on' : ''}}"
  71. data-index="{{index}}"
  72. bindtap="receiveCoupon"
  73. wx:for="{{getCouponList}}"
  74. wx:key='index'>
  75. <image src="/images/label01.png" class="lable" wx:if='{{item.is_use === true}}'></image>
  76. <image src="/images/label02.png" class="lable" wx:elif='{{item.is_use === 2}}'></image>
  77. <view class="coupon-slide acea-row row-center-wrapper">
  78. <view class="money">
  79. ¥<text class="num">{{ item.coupon_price }}</text>
  80. </view>
  81. <view>
  82. <view class="minPrice">
  83. 满¥<text class="num">{{ item.use_min_price }}</text>可用
  84. </view>
  85. <view class="time">
  86. {{ item.start_time ? item.start_time + "-" : ""}}{{ item.end_time }}
  87. </view>
  88. </view>
  89. </view>
  90. </view>
  91. <view class="more"><navigator url="/pages/user_get_coupon/index" hover-class="none">领取更多</navigator></view>
  92. </scroll-view>
  93. </view>
  94. -->
  95. <!-- 活动区域图片
  96. <view class="activity" wx:if="{{activity.length}}">
  97. <view class="title"><image src="/images/title.png"></image></view>
  98. <view class="activityCon acea-row row-between-wrapper">
  99. <navigator url="{{item.link ? item.link : ''}}" class="left"
  100. style="{{'background-image: url(' + item.pic + ');'}}"
  101. hover-class="none" wx:for="{{activity}}" wx:if="{{index == 1}}" wx:key='index'>
  102. <view class="name">{{ item.title }}</view>
  103. <view class="info">{{ item.info }}</view>
  104. <view class='timeCon'>
  105. <text class='num'>{{countDownHour}}</text> :
  106. <text class='num'>{{countDownMinute}}</text> :
  107. <text class='num'>{{countDownSecond}}</text>
  108. </view>
  109. </navigator >
  110. <view class="right acea-row row-column-between">
  111. <navigator url="{{item.link ? item.link : ''}}"
  112. class="item" style="background-image: url('{{item.pic}}')"
  113. wx:for="{{activity}}" wx:key='index' hover-class="none" wx:if="{{index == 0 || index == 2}}">
  114. <view class="name">{{ item.title }}</view>
  115. <view class="info">{{ item.info }}</view>
  116. </navigator >
  117. </view>
  118. </view>
  119. </view>
  120. -->
  121. <!-- 直播列表 -->
  122. <view class="liveBroadcast" wx:if='{{liveList.length || liveInfo.roomid}}'>
  123. <view class="publicTitle acea-row row-center-wrapper">
  124. <image src="/images/tv.png"></image>
  125. <navigator hover-class="none" url='/pages/first-new-product/index?type=3' class="more">更多 >
  126. </navigator>
  127. </view>
  128. <navigator wx:if='{{liveInfo.roomid}}' hover-class="none" url="plugin-private://wx2b03c6e691cd7370/pages/live-player-plugin?room_id={{liveInfo.roomid}}" class="broadcast time">
  129. <view class="pictrue">
  130. <image src="{{liveInfo.share_img}}"></image>
  131. <view class="label" wx:if='{{liveInfo.live_status == 101}}'><text class="iconfont icon-zhibo"></text>直播中</view>
  132. <view class="label" wx:if='{{liveInfo.live_status == 103}}'><text class="iconfont icon-zhibojieshux"></text>已结束</view>
  133. <view class="label" wx:if='{{liveInfo.live_status == 102}}'><text class="iconfont icon-shijian"></text>直播时间 {{liveInfo._start_time}}</view>
  134. </view>
  135. <view class="text line1">{{liveInfo.name}}</view>
  136. </navigator>
  137. <view class="list" wx:if="{{liveList.length}}">
  138. <scroll-view class="scroll-view_x" scroll-x style="width:auto;overflow:hidden;">
  139. <navigator hover-class="none" wx:for='{{liveList}}' wx:key='index' url="plugin-private://wx2b03c6e691cd7370/pages/live-player-plugin?room_id={{item.roomid}}" class="item">
  140. <view class="pictrue">
  141. <image src="{{item.share_img}}"></image>
  142. <view class="label" wx:if='{{item.live_status == 101}}'><text class="iconfont icon-zhibo"></text>直播中</view>
  143. <view class="label" wx:if='{{item.live_status == 103}}'><text class="iconfont icon-zhibojieshux"></text>已结束</view>
  144. <view class="label" wx:if='{{item.live_status == 102}}'><text class="iconfont icon-shijian"></text>直播时间 {{item._start_time}}</view>
  145. </view>
  146. <view class="text line1">{{item.name}}</view>
  147. </navigator>
  148. </scroll-view>
  149. </view>
  150. </view>
  151. <!-- 秒杀,屏蔽
  152. <view class="flashSale" wx:if="{{seckillCont}}">
  153. <view class="title acea-row row-between row-bottom">
  154. <view class="left acea-row row-middle">
  155. <view class="pictrue">
  156. <image src="/images/buyTitle.png"></image>
  157. </view>
  158. <view class="text">
  159. <view>top sellers</view>
  160. <view class="chinese">拼手速抢惊喜 每日更新</view>
  161. </view>
  162. </view>
  163. <view class="right acea-row row-middle">
  164. <view class="item">
  165. <text class="iconfont icon-xuanzhong"></text>限时低价
  166. </view>
  167. <view class="item">
  168. <text class="iconfont icon-xuanzhong"></text>正品保证
  169. </view>
  170. </view>
  171. </view>
  172. <view class="pictrueBg"><image src="/images/timeBg.png"></image></view>
  173. <view class="timeItem">
  174. <scroll-view class="scroll-view_x" scroll-x scroll-with-animation scroll-left="{{scrollLeft}}">
  175. <view class="timeLen item {{killIndex==index?'on':''}}" data-index="{{index}}" bindtap="setTime" wx:for="{{timeList}}" wx:key='index'>
  176. <view class="time">{{ item.time }}</view>
  177. <view class="stateCon acea-row row-center-wrapper">
  178. <view class="state acea-row row-center-wrapper">
  179. {{ item.state }}
  180. </view>
  181. </view>
  182. </view>
  183. </scroll-view>
  184. </view>
  185. <view class="list">
  186. <scroll-view class="scroll-view_x acea-row" scroll-x style="width:auto;overflow:hidden;">
  187. <view class="item" wx:for="{{seckillList}}" wx:for-item="itemSeckill" wx:key='index'>
  188. <view class="pictrue" bindtap="goDetail" data-id="{{itemSeckill.id}}">
  189. <image src="{{itemSeckill.image}}"></image>
  190. <view class="bar">
  191. <view class="pos">
  192. <view class="num acea-row row-center-wrapper" style="width:{{itemSeckill.percent}}%;"></view>
  193. <view class="stock">已抢{{itemSeckill.percent}}%</view>
  194. </view>
  195. </view>
  196. </view>
  197. <view class="text">
  198. <view class="name line1">{{ itemSeckill.title }}</view>
  199. <view class="ot-money">
  200. ¥{{ itemSeckill.ot_price }}
  201. </view>
  202. <view class="money font-color">
  203. ¥<text class="num">{{ itemSeckill.price }}</text>
  204. </view>
  205. </view>
  206. </view>
  207. </scroll-view>
  208. </view>
  209. </view>
  210. -->
  211. <!-- 首发新品推荐图片
  212. <navigator
  213. url="{{lovely[0].link ? lovely[0].link : ''}}"
  214. class="advert"
  215. hover-class="none"
  216. wx:if="{{lovely.length}}">
  217. <image src="{{lovely[0].img}}"></image>
  218. </navigator>
  219. -->
  220. <!-- 不使用后台的首发新品图片
  221. <view class='advert' wx:if="{{newGoodsBananr}}">
  222. <block>
  223. <image src='{{newGoodsBananr}}'></image>
  224. </block>
  225. </view>
  226. -->
  227. <view class="newProducts" wx:if="{{info.firstList.length > 0}}">
  228. <!-- 首发新品 banner 固定图片 -->
  229. <view class="publicTitle acea-row row-center-wrapper">
  230. <image src="/images/newsTitle.png"></image>
  231. <navigator hover-class="none" url='/pages/first-new-product/index?type=3' class="more">更多 >
  232. </navigator>
  233. </view>
  234. <!-- 首发新品轮播图 -->
  235. <view class="newSwiper">
  236. <swiper autoplay="{{autoplay}}" circular="{{circular}}" interval="{{intervalNew}}" duration="{{durationNew}}" previous-margin="110px" next-margin="110px" bindchange="bindchange">
  237. <swiper-item wx:for="{{info.firstList}}" wx:key='index'>
  238. <view bindtap="goDetailType" data-items='{{item}}' class="item {{avtiveIndex===index?'active':'quiet'}}">
  239. <image src="{{item.image}}" mode="widthFix"></image>
  240. <text class="pictrue_log_medium pictrue_log_class" wx:if="{{item.activity && item.activity.type ==='1'}}">秒杀</text>
  241. <text class="pictrue_log_medium pictrue_log_class" wx:if="{{item.activity && item.activity.type === '2'}}">砍价</text>
  242. <text class="pictrue_log_medium pictrue_log_class" wx:if="{{item.activity && item.activity.type === '3'}}">拼团</text>
  243. </view>
  244. </swiper-item>
  245. </swiper>
  246. <view class="text" wx:for="{{info.firstList}}" wx:key='index'>
  247. <view wx:if="{{index === avtiveIndex}}">
  248. <view class="name line1">{{ item.store_name }}</view>
  249. <view class="money font-color">
  250. ¥<text class="num">{{ item.price }}</text>
  251. </view>
  252. </view>
  253. </view>
  254. </view>
  255. </view>
  256. <view class="recommend" wx:if="{{info.bastList.length || info.bastBanner.length}}">
  257. <!-- 精品推荐 banner 客户端固定 -->
  258. <view class="publicTitle acea-row row-center-wrapper">
  259. <image src="/images/boutiqueTitle.png"></image>
  260. <navigator hover-class="none" url='/pages/first-new-product/index?type=1' class="more">更多 >
  261. </navigator>
  262. </view>
  263. <!-- 精品推荐配图轮播 -->
  264. <view class="slider-banner recommendSwiper" wx:if="{{info.bastBanner.length}}">
  265. <swiper autoplay="true" indicator-dots="true" circular="{{circular}}" interval="3000" duration="500" indicator-color="rgba(0,0,0,0.2)" indicator-active-color="#ff3366">
  266. <swiper-item wx:for="{{info.bastBanner}}" wx:key='index'>
  267. <navigator url="{{item.url ? item.url : ''}}" class="pictrue acea-row row-middle" hover-class="none">
  268. <image src="{{item.img}}"></image>
  269. </navigator>
  270. </swiper-item>
  271. </swiper>
  272. </view>
  273. <!-- 精品推荐 产品列表 -->
  274. <view class="publicList acea-row row-between-wrapper">
  275. <view bindtap="goDetailType" data-items='{{item}}' class="item" wx:for="{{info.bastList}}" wx:key='index'>
  276. <view class="pictrue">
  277. <image src="{{item.image}}"></image>
  278. <text class="pictrue_log_medium pictrue_log_class" wx:if="{{item.activity && item.activity.type ==='1'}}">秒杀</text>
  279. <text class="pictrue_log_medium pictrue_log_class" wx:if="{{item.activity && item.activity.type === '2'}}">砍价</text>
  280. <text class="pictrue_log_medium pictrue_log_class" wx:if="{{item.activity && item.activity.type === '3'}}">拼团</text>
  281. </view>
  282. <view class="text">
  283. <view class="name line1">{{ item.store_name }}</view>
  284. <view class="acea-row row-between-wrapper">
  285. <view>
  286. <view class="money font-color">
  287. ¥<text class="num">{{ item.price }}</text>
  288. </view>
  289. <!-- <view class="ot-money">¥{{ item.ot_price }}</view> -->
  290. </view>
  291. <view class="cart acea-row row-center-wrapper">
  292. <text class="iconfont icon-mzshopping"></text>
  293. </view>
  294. </view>
  295. </view>
  296. </view>
  297. </view>
  298. </view> <!-- 精品推荐 -->
  299. <view class="hotList" wx:if="{{likeInfo.length}}">
  300. <!-- 热门榜单 banner 客户端固定 -->
  301. <view class="publicTitle acea-row row-center-wrapper">
  302. <image src="/images/hotTitle.png"></image>
  303. <navigator url="/pages/first-new-product/index?type=2" class="more" hover-class="none">更多 >
  304. </navigator>
  305. </view>
  306. <view class="list acea-row">
  307. <navigator url="/pages/goods_details/index?id={{item.id}}" class="item" wx:for="{{likeInfo}}" wx:key='index'>
  308. <view class="pictrue">
  309. <image src="{{item.image}}"></image>
  310. <image src="/images/one01.png" class="icon" wx:if='{{index === 0}}'></image>
  311. <image src="/images/two02.png" class="icon" wx:if='{{index === 1}}'></image>
  312. <image src="/images/three03.png" class="icon" wx:if='{{index === 2}}'></image>
  313. </view>
  314. <view class="text">
  315. <view class="name line1">{{ item.store_name }}</view>
  316. <view class="money font-color">
  317. ¥<text class="num">{{ item.price }}</text>
  318. <!-- <text class="ot-money">¥{{ item.ot_price }}</text> -->
  319. </view>
  320. </view>
  321. </navigator>
  322. </view>
  323. </view>
  324. <view class="promotion" wx:if="{{benefit.length}}">
  325. <!-- 促销单品 banner -->
  326. <view class="publicTitle acea-row row-center-wrapper">
  327. <image src="/images/promotionTitle.png"></image>
  328. <navigator url="/pages/promotional-items/index" class="more" hover-class="none">更多 ></navigator>
  329. </view>
  330. <view class="publicList acea-row row-between-wrapper">
  331. <view bindtap="goDetailType" data-items='{{item}}' class="item" wx:for="{{benefit}}" wx:key='index'>
  332. <view class="pictrue">
  333. <image src="{{item.image}}"></image>
  334. <text class="pictrue_log_medium pictrue_log_class" wx:if="{{item.activity && item.activity.type ==='1'}}">秒杀</text>
  335. <text class="pictrue_log_medium pictrue_log_class" wx:if="{{item.activity && item.activity.type === '2'}}">砍价</text>
  336. <text class="pictrue_log_medium pictrue_log_class" wx:if="{{item.activity && item.activity.type === '3'}}">拼团</text>
  337. </view>
  338. <view class="text">
  339. <view class="name line1">{{ item.store_name }}</view>
  340. <view class="acea-row row-between-wrapper">
  341. <view>
  342. <view class="money font-color">
  343. ¥<text class="num">{{ item.price }}</text><text class="label bg-color">疯抢</text>
  344. </view>
  345. <view class="ot-money">¥{{ item.ot_price }}</view>
  346. </view>
  347. <view class="cart acea-row row-center-wrapper">
  348. <text class="iconfont icon-mzshopping"></text>
  349. </view>
  350. </view>
  351. </view>
  352. </view>
  353. </view>
  354. </view>
  355. <view class="recommendList" wx:if='{{hotProducts.length > 0}}'>
  356. <!-- 海量精品 为您推荐 banner -->
  357. <view class="title">
  358. <image src="/images/becommendTitle.png"></image>
  359. </view>
  360. <view class="publicList acea-row row-between-wrapper">
  361. <view bindtap="goDetailType" data-items='{{item}}' wx:for="{{hotProducts}}" wx:key='index' class="item">
  362. <view class="pictrue">
  363. <image src="{{item.image}}"></image>
  364. <text class="pictrue_log_medium pictrue_log_class" wx:if="{{item.activity && item.activity.type ==='1'}}">秒杀</text>
  365. <text class="pictrue_log_medium pictrue_log_class" wx:if="{{item.activity && item.activity.type === '2'}}">砍价</text>
  366. <text class="pictrue_log_medium pictrue_log_class" wx:if="{{item.activity && item.activity.type === '3'}}">拼团</text>
  367. </view>
  368. <view class="text">
  369. <view class="name line1">{{ item.store_name }}</view>
  370. <view class="acea-row row-between-wrapper">
  371. <view>
  372. <view class="money font-color">
  373. ¥<text class="num">{{ item.price }}</text>
  374. </view>
  375. </view>
  376. <view class="cart acea-row row-center-wrapper">
  377. <text class="iconfont icon-mzshopping"></text>
  378. </view>
  379. </view>
  380. </view>
  381. </view>
  382. <view class='loadingicon acea-row row-center-wrapper' wx:if='{{hotProducts.length > 0}}'>
  383. <text class='loading iconfont icon-jiazai' hidden='{{recommend.loading==false}}'></text>
  384. {{recommend.loadTitle}}
  385. </view>
  386. </view>
  387. </view>
  388. </view>
  389. </Tab>
  390. <Tab wx:for="{{prodCates.children}}" title="{{item.cate_name}}" wx:key='index'>
  391. <!--黑洞星球活动-->
  392. <view wx:if="{{item.id === CATE_BLACKHOLE_ID}}">
  393. <Mine bind:onNeedLogin="onNeedLogin" id="mine"></Mine>
  394. </view>
  395. <!-- 其他活动 -->
  396. <view wx:else class="wrapper">
  397. <!-- 活动商品列表 -->
  398. <view class="classifyList acea-row row-between-wrapper">
  399. <view style="height: {{item.aboveShowRowIndex * rowHeight}}rpx;"></view>
  400. <view bindtap="goDetailType" data-items='{{productItem}}' class="item" wx:for="{{item.products}}" wx:for-item="productItem" wx:key='index' wx:if="{{productItem.isShow}}">
  401. <view class="pictrue">
  402. <image src="{{productItem.image}}"></image>
  403. <text class="pictrue_log_medium pictrue_log_class" wx:if="{{productItem.activity && productItem.activity.type ==='1'}}">秒杀</text>
  404. <text class="pictrue_log_medium pictrue_log_class" wx:if="{{productItem.activity && productItem.activity.type === '2'}}">砍价</text>
  405. <text class="pictrue_log_medium pictrue_log_class" wx:if="{{productItem.activity && productItem.activity.type === '3'}}">拼团</text>
  406. </view>
  407. <view class="text">
  408. <view class="name line1">{{ productItem.store_name }}</view>
  409. <view class="money font-color">
  410. ¥<span class="num">{{ productItem.price }}</span>
  411. </view>
  412. <view class="acea-row row-between-wrapper">
  413. <!--view class="vipMoney" wx:if="{{productItem.vip_price && productItem.vip_price > 0}}">
  414. ¥{{ productItem.vip_price }}
  415. <image src="/images/vip.png"></image>
  416. </view-->
  417. <view class="sales">已售{{ productItem.sales }}件</view>
  418. </view>
  419. </view>
  420. </view>
  421. <view style="height: {{item.belowShowRowNum * rowHeight}}rpx;"></view>
  422. <view class='loadingicon acea-row row-center-wrapper'>
  423. <text class='loading iconfont icon-jiazai' hidden='{{item.loading==false}}'></text>
  424. {{item.loadTitle}}
  425. </view>
  426. </view>
  427. <!-- 推荐产品展示 -->
  428. <view class='noCommodity' wx:if="{{productList.length==0 && where.page > 1}}">
  429. <view class='pictrue'>
  430. <image src='/images/noShopper.png'></image>
  431. </view>
  432. <recommend host_product="{{hotProducts}}"></recommend>
  433. </view>
  434. </view>
  435. </Tab>
  436. </Tabs>
  437. </view>
  438. <!-- coupon-window window='{{window}}' couponList="{{couponList}}" bind:onClose="onClose"></coupon-window -->
  439. <authorize wx:if="{{ !isShowMine }}" bind:onLoadFun='onLoadFun' isGoIndex='{{isGoIndex}}' iShidden="{{iShidden}}" isAuto="{{isAuto}}"></authorize>