index.wxml
8.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
<!--index.wxml-->
<!-- bindtap='model' -->
<view wx:if="{{!authorization}}">
<view style="{{authorization == true?'position:fixed;top:0;width:100%;height:100%':''}}{{screenModel?'position:fixed;top:0;width:100%;height:100%':''}}">
<view class="sinceLoc">
<view class="btn">
<view class="animate" animation="{{animationData}}"></view>
<view class="left" style="{{!moudelOne?'color:#666666;':''}}" data-type='ziti' bindtap='animations' data-state='{{animation}}'>就近自提</view>
<view class="right" style="{{moudelOne?'color:#666666;':''}}" data-type='shitang' bindtap='animations' data-state='{{!animation}}'>到店堂食</view>
</view>
<view class="location" wx:if="{{!stateShop}}">
<!-- <text class="icon icon-hdxq_icon"></text> {{moudelOne&&!stateShop?nearest_spot.spot_name:nearest_store.store_name}} -->
<text class="icon icon-hdxq_icon"></text> {{nearest_spot.spot_name}}
</view>
<view class="location" wx:if="{{stateShop}}">
<text class="icon icon-hdxq_icon"></text> {{nearest_store.store_name}}
</view>
</view>
<view wx:if="{{moudelOne}}">
<!-- 筛选 -->
<view class="screenModel" bindtap='model' wx:if="{{screenModel}}">
<view class="screen" catchtap='cat'>
<view class="screenTitle">
<view class="screenLeft">选择自提点</view>
<view class="screenRight" catchtap='sisi'>没有门口的?点我试试!</view>
</view>
</view>
<view class="screenBj" catchtap='cat'>
<view class="swiper-tab">
<view class="swiper-tab-list {{currentTabT==index ? 'on' : ''}}" wx:for="{{sinceList.area}}" data-current="{{index}}" wx:key="" catchtap="swichNavT" data-area_id='{{item.area_id}}'>{{item.area_name}}</view>
</view>
<swiper class="swiper-box" duration="300" bindchange="bindChangeT">
<swiper-item>
<view class="List">
<view class="list" wx:for="{{sinceList.spot}}" catchtap='setLocation' data-spot_id='{{item.spot_id}}' data-spot_name='{{item.spot_name}}' data-distance_text="{{item.distance_text}}" wx:key="">
<view class="name">{{item.spot_name}}</view>
<view class="distance">
<view class="distanceLeft">
<text class="icon icon-hdxq_icon"></text>
<text style="font-size:26rpx;color:#999999;margin-left:9rpx;">距您{{item.distance_text}}</text>
</view>
<view class="distanceRight" catchtap='getGoodsDetails' data-spot_id='{{item.spot_id}}'>
取货点详情
</view>
</view>
</view>
</view>
</swiper-item>
</swiper>
</view>
</view>
<view>
<scroll-view scroll-x="true" class="tab-h" scroll-left="{{scrollLeft}}" wx:if='{{menu}}'>
<view class="tab-item new {{currentTab==-1?'active':''}}" data-current="-1" bindtap="swichNav">新品试吃</view>
<view class="tab-item {{currentTab==0?'active':''}}" data-current="0" bindtap="swichNav">全部分类</view>
<view wx:for="{{allData.type}}" wx:key="" data-t_id='{{item.t_id}}' class="tab-item {{currentTab==index+1?'active':''}}" data-current="{{index+1}}" bindtap="swichNav">{{item.type_name}}</view>
</scroll-view>
<swiper indicator-dots="{{indicatorDots}}" autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}" style="height:348rpx;">
<block wx:for="{{imgUrls}}" wx:key="" >
<swiper-item bindtap='detailsGoods' data-id="{{item.bind_goods_id}}">
<image src="{{item.slide_pic}}" class="slide-image" style="width:100%;height:348rpx;" />
</swiper-item>
</block>
</swiper>
<swiper class="tab-content" duration="300" bindchange="switchTab" style="height:{{248*allData.goods_list.length+90}}rpx">
<swiper-item>
<scroll-view scroll-x="true" class="scoll-h">
<block wx:for="{{allData.goods_list}}" wx:key="*this">
<view style="padding:0 34rpx;" bindtap='detailsGoods' data-id="{{item.goods_id}}">
<view class="item-ans">
<view class="avatar">
<image class="img" src="{{item.thumb}}"></image>
</view>
<view class="expertInfo">
<view class="name">{{item.goods_name}}</view>
<view class="tag">{{item.goods_description}}</view>
<view class="answerHistory">
<text style="color:#C90103;font-size:36rpx;">¥{{item.goods_price}}</text>
<text style="color:#999999;font-size:24rpx;margin-left:34rpx;">月销 {{item.month_sales}} 件</text>
</view>
</view>
<view class="askBtn">
<image catchtap='openShopCar' data-num='{{item.num}}' data-id="{{item.goods_id}}" data-index='{{index}}' wx:if="{{item.chacke == false}}" src="http://omega.wx.bronet.cn/public/static/images/37@2x.png"></image>
<view class="stepper" wx:if="{{item.chacke == true}}">
<!-- 减号 -->
<text class="{{minusStatus}}" catchtap="minusCount" data-id='{{item.goods_id}}' data-index="{{index}}" data-num='{{item.num}}' data-cart_id="{{item.cart_id}}">-</text>
<!-- 数值 -->
<text style="background:#fff;color:#333333;font-size:36rpx;border:0;line-height:44rpx;">{{item.num}}</text>
<!-- 加号 -->
<text class="normal" catchtap="addCount" data-id='{{item.goods_id}}' data-index="{{index}}" data-num='{{item.num}}'>+</text>
</view>
</view>
</view>
</view>
</block>
</scroll-view>
</swiper-item>
</swiper>
<view class='nodata' wx:if="{{allData.goods_list.length == 0}}">暂无相关数据</view>
</view>
</view>
<view wx:if="{{moudelOne == false}}" wx:for="{{hallListh}}" wx:key="" style="padding-left: 38rpx;padding-right: 40rpx;">
<view class="locationList" bindtap='arriveShop' data-data='{{item}}'>
<view class="left">
<view class="nameNum">
<view class="name">{{item.store_name}}</view>
<view class="num">距您{{item.distance_text}}</view>
</view>
<view class='time'>
<text class="icon icon-hdxq_icon1"></text>
<view class="times">营业时间:{{item.open_start}}-{{item.open_end}}</view>
</view>
<view class="time" style="margin-top:21rpx;">
<text class="icon icon-hdxq_icon"></text>
<view class="times">{{item.store_address}}</view>
</view>
</view>
<view class="right" catchtap='shopDetails' data-store_id='{{item.store_id}}' data-store_name='{{item.store_name}}' data-distance_text='{{item.distance_text}}' data-open_start='{{item.open_start}}' data-open_end='{{item.open_end}}' data-store_address='{{item.store_address}}'>
<text class="icon icon-icon-test3"></text>
</view>
</view>
</view>
<view class="tabBar">
<view class="barList" bindtap='tabBar' data-index='{{index}}' wx:for="{{tabBarIndex}}" wx:key="">
<image wx:if="{{item.state == false}}" src="{{item.img}}"></image>
<image wx:else src="{{item.selectImg}}"></image>
<view class="font" style="{{item.state == false?'':'color:#FEAD00'}}">{{item.name}}</view>
<view class="num" wx:if="{{item.num != null}}">{{item.num}}</view>
</view>
</view>
<view class="suspend" wx:if="{{diaoyan}}" bindtap='guidance'>
<image src="https://shipin.wx.broteam.cn/public/images/inquire.png"></image>
</view>
</view>
</view>
<view class="page" wx:if="{{authorization}}">
<view class="userAvatarUrl">
<open-data type="userAvatarUrl"></open-data>
</view>
<view class="userNickName">
<open-data type="userNickName"></open-data>
</view>
<view class="btn">
<button open-type="getUserInfo" lang="zh_CN" bindgetuserinfo="bindGetUserInfo">授权登录</button>
</view>
</view>
<!-- 优惠券 -->
<view class='card' wx:if="{{card}}">
<view class='card_box'>
<view class='card_container'>
<image src='/img/card_bg.png'></image>
<view class='card_info'>{{cardInfo.pledge_name}}X{{cardInfo.num}}</view>
<view class='get_btn' bindtap='getCard'>
<image src='/img/get_btn.png'></image>
</view>
<view class='close icon icon-close' bindtap='hideCard'></view>
</view>
</view>
</view>