index.wxml 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. <!--index.wxml-->
  2. <view class="container">
  3. <!-- 店铺信息 -->
  4. <view class="shop">
  5. <view class="title">
  6. <view class="c-202020" user-select="false" space="false" decode="false">附近门店
  7. </view>
  8. <navigator class="c-202020 f15" url="../shop/shop" hover-class="none" open-type="navigate">
  9. 查看全部
  10. <image class="" src="../../images/icons/right.png" style="width: 25rpx;height: 25rpx;">
  11. </image>
  12. </navigator>
  13. </view>
  14. <!-- 店铺 -->
  15. <view wx:if="{{locationFlag}}">
  16. <navigator url="../../pages/shopinfo/shopinfo?id={{storeInfo.id}}"
  17. hover-class="none">
  18. <view class="shop-info">
  19. <view class="shopimg">
  20. <image src="{{storeInfo.logo}}" mode="aspectFill" lazy-load="false" class="img">
  21. </image>
  22. </view>
  23. <view class="shopmsg">
  24. <view class="shopview">
  25. <view class="c-202020">
  26. {{storeInfo.storeName}}
  27. </view>
  28. <!-- <view class="c-202020 mark f12 {{item.new?'new':''}} {{item.discount?'discount':''}}" wx:if="{{item.mark}}">
  29. {{item.marktext}}
  30. </view> -->
  31. </view>
  32. <view class="shopview">
  33. <view>
  34. <mp-icon icon="star" color="#E15F3D" size="18" type="{{parseInt(storeInfo.storeScore)>0?'filled':'outline'}}"></mp-icon>
  35. <mp-icon icon="star" color="#E15F3D" size="18" type="{{parseInt(storeInfo.storeScore)>1?'filled':'outline'}}"></mp-icon>
  36. <mp-icon icon="star" color="#E15F3D" size="18" type="{{parseInt(storeInfo.storeScore)>2?'filled':'outline'}}"></mp-icon>
  37. <mp-icon icon="star" color="#E15F3D" size="18" type="{{parseInt(storeInfo.storeScore)>3?'filled':'outline'}}"></mp-icon>
  38. <mp-icon icon="star" color="#E15F3D" size="18" type="{{parseInt(storeInfo.storeScore)>4?'filled':'outline'}}"></mp-icon>
  39. </view>
  40. </view>
  41. <view class="shop-address shopview">
  42. <view class="c-707070 f12">
  43. <mp-icon icon="location" color="#707070" size="20" class="address-icon" ></mp-icon>
  44. {{storeInfo.address}}
  45. </view>
  46. <view class="c-707070 f12">
  47. {{storeInfo.distance}}
  48. </view>
  49. </view>
  50. </view>
  51. </view>
  52. </navigator>
  53. </view>
  54. <view class="user-location-btn" wx:if="{{!locationFlag}}" >
  55. <button class="location-btn" open-type="getLocation" catchtap="getLocation" >授权获取附近门店</button>
  56. </view>
  57. </view>
  58. <!-- 产品信息 -->
  59. <view class="product" >
  60. <!-- <mp-tabs tabs="{{tabs}}" activeTab="{{activeTab}}" swiperClass="weui-tabs-swiper" bindtabclick="onTabClick"
  61. bindchange="swiperChange" activeClass="tab-bar-title__selected" swiperHeight="{{(tabs[activeTab].list.length)*420}}">
  62. <block wx:for="{{tabs}}" wx:key="title">
  63. <view class="tab-content" data-set="{{item}}" slot="tab-content-{{index}}" bind:tap="handleClick">
  64. <view style="overflow-y: auto;height:{{productHeight}}rpx">
  65. <block wx:for="{{tabs[index].list}}" wx:key="id">
  66. <view class="productinfo">
  67. <view class="product-item" style="background-image: url({{item.imgurl}});">
  68. <view class="product-desc" style="height:390rpx">
  69. <view class="f17">{{item.title}}</view>
  70. <view class=".fw700">¥{{item.price}}/人</view>
  71. <view class="f13">{{item.desc}}</view>
  72. </view>
  73. <view class="order {{item.open?'':'gray'}}">
  74. <view >
  75. 立即预约
  76. </view>
  77. </view>
  78. </view>
  79. </view>
  80. </block>
  81. </view>
  82. </view>
  83. </block>
  84. </mp-tabs>
  85. -->
  86. <block wx:for="{{productList.list}}" wx:key="id" >
  87. <view class="productinfo">
  88. <view class="product-item" data-productid="{{item.id}}" bindtap = "showProduct" style="background-image: url({{item.productImg}});">
  89. <view class="product-desc" >
  90. <view class="f17">{{item.productName}}</view>
  91. <view class=".fw700">¥{{item.currentPrice}}/人</view>
  92. <view class="f13">{{item.productContent}}</view>
  93. </view>
  94. <view class="order {{item.status==1?'':'gray'}}">
  95. <view >
  96. 立即预约
  97. </view>
  98. </view>
  99. </view>
  100. </view>
  101. </block>
  102. </view>
  103. </view>