作者 lihongjuan

1

@@ -573,8 +573,8 @@ @@ -573,8 +573,8 @@
573 } 573 }
574 574
575 .searchitem { 575 .searchitem {
576 - width: 212rpx;  
577 - padding: 14rpx 70rpx; 576 + /* width: 212rpx; */
  577 + padding: 14rpx 20rpx;
578 box-sizing: border-box; 578 box-sizing: border-box;
579 background: #F7F8F8; 579 background: #F7F8F8;
580 margin-top: 24rpx; 580 margin-top: 24rpx;
@@ -129,7 +129,7 @@ @@ -129,7 +129,7 @@
129 border:2rpx solid rgba(239,227,205,1); 129 border:2rpx solid rgba(239,227,205,1);
130 } 130 }
131 .miaojinnei{ 131 .miaojinnei{
132 - width:60%; 132 + /* width:60%; */
133 height:20rpx; 133 height:20rpx;
134 background: #FEBE73; 134 background: #FEBE73;
135 border-radius:18rpx; 135 border-radius:18rpx;
@@ -13,7 +13,8 @@ @@ -13,7 +13,8 @@
13 <image src="../../static/search.png" mode=""></image> 13 <image src="../../static/search.png" mode=""></image>
14 </view> 14 </view>
15 <view class="middleenter"> 15 <view class="middleenter">
16 - <input type="text" placeholder="请输入商品,店铺搜索" placeholder-class="enterk" /> 16 + 请输入商品,店铺搜索
  17 + <!-- <input type="text" placeholder="请输入商品,店铺搜索" placeholder-class="enterk" /> -->
17 </view> 18 </view>
18 </view> 19 </view>
19 <view class="navright" @click="cartlist"> 20 <view class="navright" @click="cartlist">
@@ -390,16 +391,19 @@ @@ -390,16 +391,19 @@
390 391
391 <style> 392 <style>
392 @import url('../../base/homepage'); 393 @import url('../../base/homepage');
  394 + .middleenter{
  395 + color:#BDC4CE;
  396 + font-size: 24rpx;
  397 + height:60rpx;
  398 + line-height: 60rpx;
  399 + }
393 400
394 .content { 401 .content {
395 padding-top: calc(var(--status-bar-height) + 88rpx); 402 padding-top: calc(var(--status-bar-height) + 88rpx);
396 } 403 }
397 -  
398 .status_bar { 404 .status_bar {
399 background: ; 405 background: ;
400 } 406 }
401 -  
402 -  
403 .lianxu { 407 .lianxu {
404 color: #3D444C; 408 color: #3D444C;
405 font-size: 28rpx; 409 font-size: 28rpx;
@@ -45,13 +45,10 @@ @@ -45,13 +45,10 @@
45 45
46 <view class="miaojindu flextwo"> 46 <view class="miaojindu flextwo">
47 <view class="miaojinduleft"> 47 <view class="miaojinduleft">
48 - <view class="miaojinnei"></view> 48 + <view class="miaojinnei" :style="{width:item.percentage+'%'}"></view>
49 </view> 49 </view>
50 - <view class="miaojinduright">已抢60%</view> 50 + <view class="miaojinduright">已抢{{item.percentage}}%</view>
51 </view> 51 </view>
52 -  
53 -  
54 -  
55 </view> 52 </view>
56 </view> 53 </view>
57 54
@@ -6,481 +6,146 @@ @@ -6,481 +6,146 @@
6 <view class="yourow"> 6 <view class="yourow">
7 <image src="../../static/zuorow.png" mode=""></image> 7 <image src="../../static/zuorow.png" mode=""></image>
8 </view> 8 </view>
9 -  
10 </view> 9 </view>
11 <view class="navmiddle flexone"> 10 <view class="navmiddle flexone">
12 <view class="middleleft"> 11 <view class="middleleft">
13 <image src="../../static/search.png" mode=""></image> 12 <image src="../../static/search.png" mode=""></image>
14 </view> 13 </view>
15 <view class="middleenter"> 14 <view class="middleenter">
16 - <input type="text" placeholder="请输入商品,店铺搜索" placeholder-class="enterk" /> 15 + <input type="text" placeholder="请输入商品,店铺搜索" placeholder-class="enterk" focus="false" @input="enterword" />
17 </view> 16 </view>
18 </view> 17 </view>
19 - <view class="souyou"> 18 + <view class="souyou" @click="search">
20 搜索 19 搜索
21 </view> 20 </view>
22 </view> 21 </view>
23 -  
24 -  
25 - <view class="searchbox"> 22 + <view class="searchbox searchbigbox">
26 <!-- 历史搜索 --> 23 <!-- 历史搜索 -->
27 <view class="commnonpadding" v-if="history"> 24 <view class="commnonpadding" v-if="history">
28 <view class="zuijin flextwo"> 25 <view class="zuijin flextwo">
29 <view class="zuititle">最近搜索</view> 26 <view class="zuititle">最近搜索</view>
30 - <view class="zuiyou">清除历史搜索</view> 27 + <view class="zuiyou" @click="clearhistory">清除历史搜索</view>
31 </view> 28 </view>
32 - <view class="searchbox flexone">  
33 - <view class="searchitem">龙须面</view>  
34 - <view class="searchitem">龙须面</view>  
35 - <view class="searchitem">龙须面</view>  
36 - <view class="searchitem">龙须面</view>  
37 - 29 + <view class="nodata" v-if="historylist.length==0">暂无数据</view>
  30 + <view class="searchbox flexone" v-else>
  31 + <view class="searchitem" v-for="(item,index) in historylist" :key="index" @click="historywordk" :data-word="item.keyword">{{item.keyword}}</view>
  32 + <!-- <view class="searchitem" >sdsdf</view> -->
38 </view> 33 </view>
39 -  
40 <view class="zuijin flextwo"> 34 <view class="zuijin flextwo">
41 <view class="zuititle">热门搜索</view> 35 <view class="zuititle">热门搜索</view>
42 -  
43 </view> 36 </view>
44 - <view class="searchbox flexone">  
45 - <view class="searchitem">龙须面</view>  
46 - <view class="searchitem">龙须面</view>  
47 - <view class="searchitem">龙须面</view>  
48 - <view class="searchitem">龙须面</view>  
49 - 37 + <view class="nodata" v-if="hotlist.length==0">暂无数据</view>
  38 + <view class="searchbox flexone" v-else>
  39 + <view class="searchitem" v-for="(item,index) in hotlist" :key="index" @click="hotsearchk" :data-word="item.keyword">{{item.keyword}}</view>
50 </view> 40 </view>
51 </view> 41 </view>
52 42
53 - <!-- 搜索店铺 --> 43 + <!--关键字店铺 -->
54 <view class="commnonpadding" v-if="shopshow"> 44 <view class="commnonpadding" v-if="shopshow">
55 - <view class="searchshopitem flexone"> 45 + <view class="searchshopitem flexone" @click="shopsearch">
56 <view class="searchitemimg"> 46 <view class="searchitemimg">
57 <image src="../../static/searchshop.png" mode=""></image> 47 <image src="../../static/searchshop.png" mode=""></image>
58 </view> 48 </view>
59 - <view class="searchname">“南阳面”店铺</view> 49 + <view class="searchname">“{{keyword}}”店铺</view>
60 </view> 50 </view>
61 - <view class="searchshopitem">  
62 - <view class="searchname">南阳面粉糕</view> 51 + <view>
63 </view> 52 </view>
64 - <view class="searchshopitem">  
65 - <view class="searchname">南阳面粉糕</view> 53 + <view class="searchshopitem" v-for='(item,index) in goodlist' :key="index" @click="searchgoodkl(item)">
  54 + <view class="searchname">{{item.name}}</view>
66 </view> 55 </view>
67 </view> 56 </view>
68 57
69 <!-- 搜索商品 --> 58 <!-- 搜索商品 -->
70 <view class="searchgood commnonpadding" v-if="searchgood"> 59 <view class="searchgood commnonpadding" v-if="searchgood">
71 - <view class="searchgooditem flexone boxsizing">  
72 - <view class="gooditemleft">  
73 - <image src="../../static/goopic.png" mode=""></image>  
74 - </view>  
75 - <view class="gooditemright ">  
76 - <view class="goodsouname morehidden">商品名称商品名称商品名称商品名称商品名称商品名称商品名称商品名称</view>  
77 - <view class="saleprice">¥288</view>  
78 - <view class="hui flextwo">  
79 - <view class="huiyuanprice">会员价:¥200</view>  
80 - <view class="yisale">已售76件</view> 60 +
  61 + <view class="nodata" v-if="goodlist.length==0">暂无数据</view>
  62 + <view v-else>
  63 + <view class="searchgooditem flexone boxsizing" v-for="(item,index) in goodlist" :key="index" @click="goodtail" :data-id="item.id">
  64 + <view class="gooditemleft">
  65 + <image :src="item.image" mode=""></image>
81 </view> 66 </view>
82 - <view class="goodaddress flextwo">  
83 - <view class="goodaddressleft flexone">  
84 - <view class='addressimg'>  
85 - <image src="../../static/goodshop.png" mode=""></image>  
86 - </view>  
87 - <view class="addressname">湖北省南阳市南阳面粉厂</view> 67 + <view class="gooditemright ">
  68 + <view class="goodsouname morehidden">{{item.name}}</view>
  69 +
  70 + <view class="hui flextwo">
  71 + <view class="saleprice">¥{{item.price}}</view>
  72 + <view class="yisale">已售{{item.sales}}件</view>
88 </view> 73 </view>
89 - <view class="goodaddressright">  
90 - 265km  
91 - </view>  
92 -  
93 - </view>  
94 -  
95 - </view>  
96 - </view>  
97 -  
98 - <view class="searchgooditem flexone boxsizing">  
99 - <view class="gooditemleft">  
100 - <image src="../../static/goopic.png" mode=""></image>  
101 - </view>  
102 - <view class="gooditemright ">  
103 - <view class="goodsouname morehidden">商品名称商品名称商品名称商品名称商品名称商品名称商品名称商品名称</view>  
104 - <view class="saleprice">¥288</view>  
105 - <view class="hui flextwo">  
106 - <view class="huiyuanprice">会员价:¥200</view>  
107 - <view class="yisale">已售76件</view>  
108 - </view>  
109 - <view class="goodaddress flextwo">  
110 - <view class="goodaddressleft flexone">  
111 - <view class='addressimg'>  
112 - <image src="../../static/goodshop.png" mode=""></image> 74 + <view class="goodaddress flextwo">
  75 + <view class="goodaddressleft flexone">
  76 + <view class='addressimg'>
  77 + <image src="../../static/goodshop.png" mode=""></image>
  78 + </view>
  79 + <view class="addressname">{{item.store_name}}</view>
113 </view> 80 </view>
114 - <view class="addressname">湖北省南阳市南阳面粉厂</view>  
115 - </view>  
116 - <view class="goodaddressright">  
117 - 265km  
118 - </view>  
119 -  
120 - </view>  
121 -  
122 - </view>  
123 - </view>  
124 -  
125 - <view class="searchgooditem flexone boxsizing">  
126 - <view class="gooditemleft">  
127 - <image src="../../static/goopic.png" mode=""></image>  
128 - </view>  
129 - <view class="gooditemright ">  
130 - <view class="goodsouname morehidden">商品名称商品名称商品名称商品名称商品名称商品名称商品名称商品名称</view>  
131 - <view class="saleprice">¥288</view>  
132 - <view class="hui flextwo">  
133 - <view class="huiyuanprice">会员价:¥200</view>  
134 - <view class="yisale">已售76件</view>  
135 - </view>  
136 - <view class="goodaddress flextwo">  
137 - <view class="goodaddressleft flexone">  
138 - <view class='addressimg'>  
139 - <image src="../../static/goodshop.png" mode=""></image> 81 + <view class="goodaddressright">
  82 + {{item.distance}}km
140 </view> 83 </view>
141 - <view class="addressname">湖北省南阳市南阳面粉厂</view>  
142 - </view>  
143 - <view class="goodaddressright">  
144 - 265km 84 +
145 </view> 85 </view>
146 - 86 +
147 </view> 87 </view>
148 -  
149 </view> 88 </view>
150 </view> 89 </view>
151 -  
152 - 90 +
153 91
154 </view> 92 </view>
155 93
156 94
157 <!-- 搜索店铺 --> 95 <!-- 搜索店铺 -->
158 - <view class="searchshop commnonpadding">  
159 - <view class="searchgooditem flex boxsizing">  
160 - <view class="shopleftimg">  
161 - <image src="../../static/shop.png" mode=""></image>  
162 - </view>  
163 - <view class="shopright">  
164 - <view class="shopname">湖北省南阳市南阳面粉厂</view>  
165 - <view class="shopmiddle flexone">  
166 - <view class="shopmiddleleft">  
167 - 8.2  
168 - </view>  
169 - <view class="shopmiddleright">  
170 - <view class="star flex">  
171 - <view class="starimg">  
172 - <image src="../../static/shixing.png" mode=""></image>  
173 - </view>  
174 - <view class="starimg">  
175 - <image src="../../static/shixing.png" mode=""></image>  
176 - </view>  
177 - <view class="starimg">  
178 - <image src="../../static/shixing.png" mode=""></image>  
179 - </view>  
180 - <view class="starimg">  
181 - <image src="../../static/shixing.png" mode=""></image>  
182 - </view>  
183 - <view class="starimg">  
184 - <image src="../../static/kongxing.png" mode=""></image>  
185 - </view>  
186 - </view>  
187 - <view class="haoping">好评率96%</view>  
188 - </view>  
189 - </view>  
190 - <view class="shopdizhi flexone">  
191 - <view class="shopdiimg">  
192 - <image src="../../static/shopaddress.png" mode=""></image>  
193 - </view>  
194 - <view class='shopli'>距离256km</view> 96 + <view class="searchshop commnonpadding" v-if="searchgoodk">
  97 + <view class="nodata" v-if="shoplist.length==0">暂无数据</view>
  98 + <view v-else>
  99 + <view class="searchgooditem flex boxsizing" v-for="(item,index) in shoplist" :key="index" @click="shopdetail" :data-id="item.id">
  100 + <view class="shopleftimg">
  101 + <image :src="item.image" mode=""></image>
195 </view> 102 </view>
196 - </view>  
197 - </view>  
198 -  
199 -  
200 - <view class="searchgooditem flex boxsizing">  
201 - <view class="shopleftimg">  
202 - <image src="../../static/shop.png" mode=""></image>  
203 - </view>  
204 - <view class="shopright">  
205 - <view class="shopname">湖北省南阳市南阳面粉厂</view>  
206 - <view class="shopmiddle flexone">  
207 - <view class="shopmiddleleft">  
208 - 8.2  
209 - </view>  
210 - <view class="shopmiddleright">  
211 - <view class="star flex">  
212 - <view class="starimg">  
213 - <image src="../../static/shixing.png" mode=""></image>  
214 - </view>  
215 - <view class="starimg">  
216 - <image src="../../static/shixing.png" mode=""></image>  
217 - </view>  
218 - <view class="starimg">  
219 - <image src="../../static/shixing.png" mode=""></image>  
220 - </view>  
221 - <view class="starimg">  
222 - <image src="../../static/shixing.png" mode=""></image>  
223 - </view>  
224 - <view class="starimg">  
225 - <image src="../../static/kongxing.png" mode=""></image>  
226 - </view> 103 + <view class="shopright">
  104 + <view class="shopname">{{item.name}}</view>
  105 + <view class="shopmiddle flexone">
  106 + <view class="shopmiddleleft">
  107 + {{item.score}}
227 </view> 108 </view>
228 - <view class="haoping">好评率96%</view>  
229 - </view>  
230 - </view>  
231 - <view class="shopdizhi flexone">  
232 - <view class="shopdiimg">  
233 - <image src="../../static/shopaddress.png" mode=""></image>  
234 - </view>  
235 - <view class='shopli'>距离256km</view>  
236 - </view>  
237 - </view>  
238 - </view>  
239 - <view class="searchgooditem flex boxsizing">  
240 - <view class="shopleftimg">  
241 - <image src="../../static/shop.png" mode=""></image>  
242 - </view>  
243 - <view class="shopright">  
244 - <view class="shopname">湖北省南阳市南阳面粉厂</view>  
245 - <view class="shopmiddle flexone">  
246 - <view class="shopmiddleleft">  
247 - 8.2  
248 - </view>  
249 - <view class="shopmiddleright">  
250 - <view class="star flex">  
251 - <view class="starimg">  
252 - <image src="../../static/shixing.png" mode=""></image>  
253 - </view>  
254 - <view class="starimg">  
255 - <image src="../../static/shixing.png" mode=""></image>  
256 - </view>  
257 - <view class="starimg">  
258 - <image src="../../static/shixing.png" mode=""></image>  
259 - </view>  
260 - <view class="starimg">  
261 - <image src="../../static/shixing.png" mode=""></image>  
262 - </view>  
263 - <view class="starimg">  
264 - <image src="../../static/kongxing.png" mode=""></image>  
265 - </view> 109 + <view class="shopmiddleright">
  110 + <view class="star flex">
  111 + <view class="starimg">
  112 + <image src="../../static/shixing.png" mode="" v-if="item.star>=2"></image>
  113 + <image src="../../static/kongxing.png" mode="" v-else></image>
  114 + </view>
  115 + <view class="starimg">
  116 + <image src="../../static/shixing.png" mode="" v-if="item.star>=4"></image>
  117 + <image src="../../static/kongxing.png" mode="" v-else></image>
  118 + </view>
  119 + <view class="starimg">
  120 + <image src="../../static/shixing.png" mode="" v-if="item.star>=6"></image>
  121 + <image src="../../static/kongxing.png" mode="" v-else></image>
  122 + </view>
  123 + <view class="starimg">
  124 + <image src="../../static/shixing.png" mode="" v-if="item.star>=8"></image>
  125 + <image src="../../static/kongxing.png" mode="" v-else></image>
  126 + </view>
  127 + <view class="starimg">
  128 + <image src="../../static/shixing.png" mode="" v-if="item.star>=10"></image>
  129 + <image src="../../static/kongxing.png" mode="" v-else></image>
  130 + </view>
  131 + </view>
  132 + <view class="haoping">好评率{{item.probability}}</view>
266 </view> 133 </view>
267 - <view class="haoping">好评率96%</view>  
268 - </view>  
269 - </view>  
270 - <view class="shopdizhi flexone">  
271 - <view class="shopdiimg">  
272 - <image src="../../static/shopaddress.png" mode=""></image>  
273 - </view>  
274 - <view class='shopli'>距离256km</view>  
275 - </view>  
276 - </view>  
277 - </view>  
278 -  
279 - <view class="searchgooditem flex boxsizing">  
280 - <view class="shopleftimg">  
281 - <image src="../../static/shop.png" mode=""></image>  
282 - </view>  
283 - <view class="shopright">  
284 - <view class="shopname">湖北省南阳市南阳面粉厂</view>  
285 - <view class="shopmiddle flexone">  
286 - <view class="shopmiddleleft">  
287 - 8.2  
288 </view> 134 </view>
289 - <view class="shopmiddleright">  
290 - <view class="star flex">  
291 - <view class="starimg">  
292 - <image src="../../static/shixing.png" mode=""></image>  
293 - </view>  
294 - <view class="starimg">  
295 - <image src="../../static/shixing.png" mode=""></image>  
296 - </view>  
297 - <view class="starimg">  
298 - <image src="../../static/shixing.png" mode=""></image>  
299 - </view>  
300 - <view class="starimg">  
301 - <image src="../../static/shixing.png" mode=""></image>  
302 - </view>  
303 - <view class="starimg">  
304 - <image src="../../static/kongxing.png" mode=""></image>  
305 - </view> 135 + <view class="shopdizhi flexone">
  136 + <view class="shopdiimg">
  137 + <image src="../../static/shopaddress.png" mode=""></image>
306 </view> 138 </view>
307 - <view class="haoping">好评率96%</view>  
308 - </view>  
309 - </view>  
310 - <view class="shopdizhi flexone">  
311 - <view class="shopdiimg">  
312 - <image src="../../static/shopaddress.png" mode=""></image> 139 + <view class='shopli'>距离{{item.distance}}km</view>
313 </view> 140 </view>
314 - <view class='shopli'>距离256km</view>  
315 - </view>  
316 - </view>  
317 - </view>  
318 -  
319 - <view class="searchgooditem flex boxsizing">  
320 - <view class="shopleftimg">  
321 - <image src="../../static/shop.png" mode=""></image>  
322 - </view>  
323 - <view class="shopright">  
324 - <view class="shopname">湖北省南阳市南阳面粉厂</view>  
325 - <view class="shopmiddle flexone">  
326 - <view class="shopmiddleleft">  
327 - 8.2  
328 - </view>  
329 - <view class="shopmiddleright">  
330 - <view class="star flex">  
331 - <view class="starimg">  
332 - <image src="../../static/shixing.png" mode=""></image>  
333 - </view>  
334 - <view class="starimg">  
335 - <image src="../../static/shixing.png" mode=""></image>  
336 - </view>  
337 - <view class="starimg">  
338 - <image src="../../static/shixing.png" mode=""></image>  
339 - </view>  
340 - <view class="starimg">  
341 - <image src="../../static/shixing.png" mode=""></image>  
342 - </view>  
343 - <view class="starimg">  
344 - <image src="../../static/kongxing.png" mode=""></image>  
345 - </view>  
346 - </view>  
347 - <view class="haoping">好评率96%</view>  
348 - </view>  
349 - </view>  
350 - <view class="shopdizhi flexone">  
351 - <view class="shopdiimg">  
352 - <image src="../../static/shopaddress.png" mode=""></image>  
353 - </view>  
354 - <view class='shopli'>距离256km</view>  
355 - </view>  
356 - </view>  
357 - </view>  
358 - <view class="searchgooditem flex boxsizing">  
359 - <view class="shopleftimg">  
360 - <image src="../../static/shop.png" mode=""></image>  
361 - </view>  
362 - <view class="shopright">  
363 - <view class="shopname">湖北省南阳市南阳面粉厂</view>  
364 - <view class="shopmiddle flexone">  
365 - <view class="shopmiddleleft">  
366 - 8.2  
367 - </view>  
368 - <view class="shopmiddleright">  
369 - <view class="star flex">  
370 - <view class="starimg">  
371 - <image src="../../static/shixing.png" mode=""></image>  
372 - </view>  
373 - <view class="starimg">  
374 - <image src="../../static/shixing.png" mode=""></image>  
375 - </view>  
376 - <view class="starimg">  
377 - <image src="../../static/shixing.png" mode=""></image>  
378 - </view>  
379 - <view class="starimg">  
380 - <image src="../../static/shixing.png" mode=""></image>  
381 - </view>  
382 - <view class="starimg">  
383 - <image src="../../static/kongxing.png" mode=""></image>  
384 - </view>  
385 - </view>  
386 - <view class="haoping">好评率96%</view>  
387 - </view>  
388 - </view>  
389 - <view class="shopdizhi flexone">  
390 - <view class="shopdiimg">  
391 - <image src="../../static/shopaddress.png" mode=""></image>  
392 - </view>  
393 - <view class='shopli'>距离256km</view>  
394 - </view>  
395 - </view>  
396 - </view>  
397 -  
398 - <view class="searchgooditem flex boxsizing">  
399 - <view class="shopleftimg">  
400 - <image src="../../static/shop.png" mode=""></image>  
401 - </view>  
402 - <view class="shopright">  
403 - <view class="shopname">湖北省南阳市南阳面粉厂</view>  
404 - <view class="shopmiddle flexone">  
405 - <view class="shopmiddleleft">  
406 - 8.2  
407 - </view>  
408 - <view class="shopmiddleright">  
409 - <view class="star flex">  
410 - <view class="starimg">  
411 - <image src="../../static/shixing.png" mode=""></image>  
412 - </view>  
413 - <view class="starimg">  
414 - <image src="../../static/shixing.png" mode=""></image>  
415 - </view>  
416 - <view class="starimg">  
417 - <image src="../../static/shixing.png" mode=""></image>  
418 - </view>  
419 - <view class="starimg">  
420 - <image src="../../static/shixing.png" mode=""></image>  
421 - </view>  
422 - <view class="starimg">  
423 - <image src="../../static/kongxing.png" mode=""></image>  
424 - </view>  
425 - </view>  
426 - <view class="haoping">好评率96%</view>  
427 - </view>  
428 - </view>  
429 - <view class="shopdizhi flexone">  
430 - <view class="shopdiimg">  
431 - <image src="../../static/shopaddress.png" mode=""></image>  
432 - </view>  
433 - <view class='shopli'>距离256km</view>  
434 - </view>  
435 - </view>  
436 - </view>  
437 -  
438 - <view class="searchgooditem flex boxsizing">  
439 - <view class="shopleftimg">  
440 - <image src="../../static/shop.png" mode=""></image>  
441 - </view>  
442 - <view class="shopright">  
443 - <view class="shopname">湖北省南阳市南阳面粉厂</view>  
444 - <view class="shopmiddle flexone">  
445 - <view class="shopmiddleleft">  
446 - 8.2  
447 - </view>  
448 - <view class="shopmiddleright">  
449 - <view class="star flex">  
450 - <view class="starimg">  
451 - <image src="../../static/shixing.png" mode=""></image>  
452 - </view>  
453 - <view class="starimg">  
454 - <image src="../../static/shixing.png" mode=""></image>  
455 - </view>  
456 - <view class="starimg">  
457 - <image src="../../static/shixing.png" mode=""></image>  
458 - </view>  
459 - <view class="starimg">  
460 - <image src="../../static/shixing.png" mode=""></image>  
461 - </view>  
462 - <view class="starimg">  
463 - <image src="../../static/kongxing.png" mode=""></image>  
464 - </view>  
465 - </view>  
466 - <view class="haoping">好评率96%</view>  
467 - </view>  
468 - </view>  
469 - <view class="shopdizhi flexone">  
470 - <view class="shopdiimg">  
471 - <image src="../../static/shopaddress.png" mode=""></image>  
472 - </view>  
473 - <view class='shopli'>距离256km</view>  
474 </view> 141 </view>
475 </view> 142 </view>
476 </view> 143 </view>
  144 +
477 145
478 </view> 146 </view>
479 147
480 -  
481 </view> 148 </view>
482 -  
483 -  
484 </view> 149 </view>
485 </template> 150 </template>
486 151
@@ -489,14 +154,22 @@ @@ -489,14 +154,22 @@
489 export default { 154 export default {
490 data() { 155 data() {
491 return { 156 return {
492 - history: false, 157 + history: true,
493 shopshow: false, 158 shopshow: false,
494 - searchgood: false 159 + searchgood: false,
  160 + keyword: '',
  161 + searchgoodk: false,
  162 + pages: 1,
  163 + pagek: 1,
  164 + shoplist: [],
  165 + goodlist: [],
  166 + historylist: [],
  167 + hotlist: []
495 } 168 }
496 }, 169 },
497 onLoad() { 170 onLoad() {
498 -  
499 - 171 + // 获取搜索记录
  172 + this.gethistory()
500 173
501 }, 174 },
502 methods: { 175 methods: {
@@ -505,10 +178,195 @@ @@ -505,10 +178,195 @@
505 checked: true 178 checked: true
506 }) 179 })
507 }, 180 },
  181 + // 焦点事件
  182 + // enterfocus(){
  183 +
  184 +
  185 + // },
508 onNavigationBarButtonTap(e) { 186 onNavigationBarButtonTap(e) {
509 console.log(e) 187 console.log(e)
510 console.log("success") 188 console.log("success")
511 }, 189 },
  190 + // 最近搜索
  191 + historywordk(e){
  192 + this.keyword=e.currentTarget.dataset.word;
  193 + this.history = false;
  194 + this.shopshow = true;
  195 + this.searchgood = false;
  196 + this.searchgoodk = false;
  197 + this.pages=1;
  198 + this.goodlist=[];
  199 + this.serarchgoodlist();
  200 + },
  201 + // 历史搜索
  202 + hotsearchk(e){
  203 + this.keyword=e.currentTarget.dataset.word;
  204 + this.history = false;
  205 + this.shopshow = true;
  206 + this.searchgood = false;
  207 + this.searchgoodk = false;
  208 + this.pages=1;
  209 + this.goodlist=[];
  210 + this.serarchgoodlist();
  211 + },
  212 + // 输入关键字搜索
  213 + enterword(e) {
  214 + this.keyword = e.detail.value;
  215 + console.log(3348439090);
  216 + console.log(this.keyword)
  217 +
  218 + if(this.keyword!=""){
  219 + this.history = false;
  220 + this.shopshow = true;
  221 + this.searchgood = false;
  222 + this.searchgoodk = false;
  223 + this.pages=1;
  224 + this.goodlist=[]
  225 + this.serarchgoodlist();
  226 +
  227 + }
  228 +
  229 + },
  230 + // 获取搜索记录
  231 + gethistory() {
  232 + let that = this;
  233 + var url = 'store/store_search_log';
  234 + var params = {
  235 +
  236 + }
  237 + app.post(url, params).then((res) => {
  238 + console.log(res);
  239 + that.historylist = res.data.data;
  240 + console.log(that.historylist)
  241 +
  242 +
  243 + }).catch((err) => {
  244 +
  245 + })
  246 + },
  247 + // 点击店铺名称去搜索
  248 + shopsearch() {
  249 +
  250 + if(this.keyword!==''){
  251 + this.history = false;
  252 + this.shopshow = false;
  253 + this.searchgood = false;
  254 + this.searchgoodk = true;
  255 + this.serachshop();
  256 + }
  257 +
  258 + },
  259 +
  260 + // 清空历史记录
  261 + clearhistory() {
  262 + let that = this;
  263 + uni.showModal({
  264 + title: '提示',
  265 + content: '是否删除历史记录',
  266 + success: function(res) {
  267 + if (res.confirm) {
  268 + var url = 'store/clear_search_log';
  269 + var params = {
  270 +
  271 + }
  272 + app.post(url, params).then((res) => {
  273 + console.log(res);
  274 + uni.showToast({
  275 + title: "删除历史记录成功",
  276 + icon: "none"
  277 + })
  278 + that.gethistory()
  279 +
  280 +
  281 + }).catch((err) => {
  282 +
  283 + })
  284 + } else if (res.cancel) {
  285 + console.log('用户点击取消');
  286 + }
  287 + }
  288 + });
  289 +
  290 + },
  291 + // 点商品名去搜索
  292 + searchgoodkl(item){
  293 + this.keyword=item.name;
  294 + this.history = false;
  295 + this.shopshow = false;
  296 + this.searchgood = true;
  297 + this.searchgoodk = false;
  298 + this.pagek=1;
  299 + this.goodlist=[]
  300 + this.serarchgoodlist()
  301 +
  302 + },
  303 + // 获取热门搜索
  304 + gethotlist() {
  305 + let that = this;
  306 + var url = 'store/hot_search_log';
  307 + var params = {}
  308 + app.post(url, params).then((res) => {
  309 + console.log(res);
  310 + that.hotlist = res.data.data;
  311 + }).catch((err) => {
  312 +
  313 + })
  314 + },
  315 + // 搜索店铺
  316 + serachshop() {
  317 + let that = this;
  318 + var url = 'store/get_store_list';
  319 + var params = {
  320 + keyword: that.keyword,
  321 + page: that.pages,
  322 + pageNum: 10
  323 +
  324 + }
  325 + app.post(url, params).then((res) => {
  326 + console.log(res);
  327 + that.shoplist = that.shoplist.concat(res.data.data);
  328 + }).catch((err) => {
  329 +
  330 + })
  331 + },
  332 + // 进入店铺详情
  333 + shopdetail(e){
  334 + let id=e.currentTarget.dataset.id;
  335 + uni.navigateTo({
  336 + url:'/pages/nearshop/shopdetail?shopid='+id
  337 + })
  338 + },
  339 + // 搜索商品
  340 + serarchgoodlist() {
  341 + console.log(3334)
  342 + let that = this;
  343 + var url = 'store_goods/get_store_goods';
  344 + var params = {
  345 + keyword: that.keyword,
  346 + page: that.pagek,
  347 + pageNum: 10
  348 + }
  349 + console.log(params)
  350 + app.post(url, params).then((res) => {
  351 + console.log(res);
  352 + that.goodlist = that.goodlist.concat(res.data.data);
  353 + }).catch((err) => {
  354 + console.log(err)
  355 +
  356 + })
  357 + },
  358 + // 进入商品详情页
  359 + goodtail(e) {
  360 + let id = e.currentTarget.dataset.id;
  361 + // type 1 面访商品 2积分商城商品
  362 + uni.navigateTo({
  363 + url: '/pages/nearshop/goodtail?id=' + id + '&type=' + 3
  364 + })
  365 + },
  366 + // 搜索
  367 + search(e) {
  368 + this.keyword = e.detail.value;
  369 + },
512 } 370 }
513 371
514 } 372 }
@@ -516,14 +374,49 @@ @@ -516,14 +374,49 @@
516 374
517 <style> 375 <style>
518 @import url('../../base/homepage'); 376 @import url('../../base/homepage');
  377 +
  378 + /* .status_bar {
  379 + height: var(--status-bar-height);
  380 + width: 100%;
  381 + background: #fff;
  382 + position: fixed;
  383 + top: 0;
  384 + left: 0;
  385 + z-index: 3;
  386 + } */
  387 +
  388 + .searchbigbox {
  389 + margin-top: 150rpx !important;
  390 + }
  391 +
  392 + .searchshoptop {
  393 + padding: 40rpx 0;
  394 + box-sizing: border-box;
  395 + border-bottom: 1rpx solid #f5f5f5;
  396 +
  397 + }
  398 +
  399 + .searchshopimg {
  400 + widht: 32rpx;
  401 + height: 32rpx;
  402 + font-size: 0;
  403 + }
  404 +
  405 + .searchkshopname {
  406 + color: #232323;
  407 + font-size: 28rpx;
  408 + margin-left: 4rpx;
  409 + }
  410 +
519 .searchbox { 411 .searchbox {
520 - margin-top: 120rpx; 412 + /* margin-top: 120rpx; */
521 } 413 }
522 - .searchnav{ 414 +
  415 + .searchnav {
523 position: fixed; 416 position: fixed;
524 top: var(--status-bar-height); 417 top: var(--status-bar-height);
525 left: 0; 418 left: 0;
526 - z-index:999  
527 - /* top: var(--status-bar-height); */ 419 + z-index: 999
  420 + /* top: var(--status-bar-height); */
528 } 421 }
529 </style> 422 </style>
@@ -372,6 +372,7 @@ @@ -372,6 +372,7 @@
372 if (value.id == item.id) { 372 if (value.id == item.id) {
373 value.sel = !value.sel; 373 value.sel = !value.sel;
374 that.$forceUpdate() 374 that.$forceUpdate()
  375 +
375 if (value.sel == true) { 376 if (value.sel == true) {
376 that.arr.push(1) 377 that.arr.push(1)
377 that.total = that.total * 100 / 100 + value.score_goods.price * 100 / 100 * value.number; 378 that.total = that.total * 100 / 100 + value.score_goods.price * 100 / 100 * value.number;
@@ -733,7 +734,6 @@ @@ -733,7 +734,6 @@
733 734
734 }) 735 })
735 }, 736 },
736 -  
737 }, 737 },
738 } 738 }
739 </script> 739 </script>
@@ -557,6 +557,7 @@ @@ -557,6 +557,7 @@
557 this.arr.push(newspecarr[parindex].spec_value[childindex].spec_value_id); 557 this.arr.push(newspecarr[parindex].spec_value[childindex].spec_value_id);
558 // console.log(this.spec_sku_id) 558 // console.log(this.spec_sku_id)
559 this.specarr = newspecarr; 559 this.specarr = newspecarr;
  560 + this.$forceUpdate()
560 // console.log(this.specarr[parindex].spec_value[childindex].sel) 561 // console.log(this.specarr[parindex].spec_value[childindex].sel)
561 console.log(JSON.stringify(this.specarr)) 562 console.log(JSON.stringify(this.specarr))
562 563
@@ -737,20 +738,22 @@ @@ -737,20 +738,22 @@
737 obj.goods_id=that.goodtail.id; 738 obj.goods_id=that.goodtail.id;
738 obj.spec_sku_id=that.spec_sku_id.join("_"); 739 obj.spec_sku_id=that.spec_sku_id.join("_");
739 obj.number=that.cartnumber; 740 obj.number=that.cartnumber;
  741 + console.log(obj)
740 var data=[]; 742 var data=[];
741 data.push(obj) 743 data.push(obj)
742 - console.log('获取的参数', that.data) 744 + console.log('获取的参数', data)
743 var params = { 745 var params = {
744 data: JSON.stringify(data), 746 data: JSON.stringify(data),
745 } 747 }
  748 +
746 console.log(params) 749 console.log(params)
747 app.post(url, params, "post").then((res) => { 750 app.post(url, params, "post").then((res) => {
748 console.log(res); 751 console.log(res);
749 console.log(res.data.data); 752 console.log(res.data.data);
750 - let seldata = JSON.stringify(that.data) 753 + let seldata = JSON.stringify(data)
751 uni.setStorageSync("goodinfo", res.data.data); 754 uni.setStorageSync("goodinfo", res.data.data);
752 uni.navigateTo({ 755 uni.navigateTo({
753 - url: '/pages/nearshop/sureorder?seldata=' + seldata 756 + url: '/pages/nearshop/sureorder?seldata='+seldata
754 }) 757 })
755 }).catch((err) => { 758 }).catch((err) => {
756 console.log(err); 759 console.log(err);
@@ -758,11 +761,9 @@ @@ -758,11 +761,9 @@
758 title:err.msg, 761 title:err.msg,
759 icon:"none" 762 icon:"none"
760 }) 763 })
761 -  
762 }) 764 })
763 }, 765 },
764 } 766 }
765 -  
766 } 767 }
767 </script> 768 </script>
768 769
@@ -63,6 +63,8 @@ @@ -63,6 +63,8 @@
63 </view> 63 </view>
64 <view class="haoping">好评率{{item.probability}}</view> 64 <view class="haoping">好评率{{item.probability}}</view>
65 </view> 65 </view>
  66 +
  67 +
66 </view> 68 </view>
67 <view class="shopdizhi flexone"> 69 <view class="shopdizhi flexone">
68 <view class="shopdiimg"> 70 <view class="shopdiimg">
@@ -260,7 +260,7 @@ @@ -260,7 +260,7 @@
260 260
261 <!-- 购买弹层 --> 261 <!-- 购买弹层 -->
262 <view class="register" @click="hidebuy" v-if="buyshow"> 262 <view class="register" @click="hidebuy" v-if="buyshow">
263 - <view class="buywrap boxsizing"> 263 + <view class="buywrap boxsizing" @click.stop="stopclickwrap">
264 <view class="buyname">订单总额</view> 264 <view class="buyname">订单总额</view>
265 <view class="buymoney">{{goodinfo.total}}</view> 265 <view class="buymoney">{{goodinfo.total}}</view>
266 <view class='buybox'> 266 <view class='buybox'>
@@ -399,7 +399,8 @@ @@ -399,7 +399,8 @@
399 } 399 }
400 }, 400 },
401 onLoad(options) { 401 onLoad(options) {
402 - console.log(38349403) 402 + console.log(38349403,options)
  403 +
403 this.goodinfo=uni.getStorageSync("goodinfo"); 404 this.goodinfo=uni.getStorageSync("goodinfo");
404 405
405 this.seldata=JSON.parse(options.seldata) 406 this.seldata=JSON.parse(options.seldata)
@@ -414,6 +415,10 @@ @@ -414,6 +415,10 @@
414 }, 415 },
415 416
416 methods: { 417 methods: {
  418 + // 阻止购买弹层取消
  419 + stopclickwrap(){
  420 +
  421 + },
417 422
418 // 选择支付方式 423 // 选择支付方式
419 paytype(e){ 424 paytype(e){