Commit fd732dd59370e3a5ac029374fe915a1756679b1e
1 parent
a1c03949
1. 券的样式
2. 门店的排序
Showing
3 changed files
with
14 additions
and
6 deletions
packageA/pages/quan_list/filter.wxs
@@ -11,13 +11,16 @@ function get_guige(color,spece){ | @@ -11,13 +11,16 @@ function get_guige(color,spece){ | ||
11 | return ""; | 11 | return ""; |
12 | } | 12 | } |
13 | 13 | ||
14 | -function get_color(index){ | ||
15 | - var i=index%3; | 14 | +function get_color(index,list){ |
15 | + var i=index+1; | ||
16 | + var count=list.length; | ||
17 | + var str="purple"; | ||
18 | + i=index%count; | ||
16 | switch(i){ | 19 | switch(i){ |
17 | - case 0: return "red"; | ||
18 | - case 1: return "blue"; | ||
19 | - case 2: return "purple"; | 20 | + case 1: str="red"; |
21 | + case 2: str="blue"; | ||
20 | } | 22 | } |
23 | + return str; | ||
21 | } | 24 | } |
22 | 25 | ||
23 | module.exports = { | 26 | module.exports = { |
packageA/pages/quan_list/quan_list.wxml
@@ -10,7 +10,7 @@ | @@ -10,7 +10,7 @@ | ||
10 | <view class="content"> | 10 | <view class="content"> |
11 | <view bindtap="go_detail" data-ind="{{index}}" class="quan_item flex fs30" wx:for="{{dataList}}"> | 11 | <view bindtap="go_detail" data-ind="{{index}}" class="quan_item flex fs30" wx:for="{{dataList}}"> |
12 | <!-- 左边 --> | 12 | <!-- 左边 --> |
13 | - <view class="left {{tool.get_color(index)}} flex ai-center jc-center co-w"> | 13 | + <view class="left {{tool.get_color(index,dataList)}} flex ai-center jc-center co-w"> |
14 | <view class="t-c"> | 14 | <view class="t-c"> |
15 | <view class="fs40"><text class="fs24">¥</text>{{filters.toFix(item.money,2)}}</view> | 15 | <view class="fs40"><text class="fs24">¥</text>{{filters.toFix(item.money,2)}}</view> |
16 | <view>满{{filters.toFix(item.condition,2)}}可用</view> | 16 | <view>满{{filters.toFix(item.condition,2)}}可用</view> |
pages/store/index.js
@@ -81,6 +81,11 @@ Page({ | @@ -81,6 +81,11 @@ Page({ | ||
81 | if(th.data.cat_id){ | 81 | if(th.data.cat_id){ |
82 | dd.category_id=th.data.cat_id; | 82 | dd.category_id=th.data.cat_id; |
83 | } | 83 | } |
84 | + if(th.data.lat){ | ||
85 | + dd.lat=th.data.lat; | ||
86 | + dd.lon=th.data.lon; | ||
87 | + } | ||
88 | + | ||
84 | 89 | ||
85 | wx.showLoading(); | 90 | wx.showLoading(); |
86 | //----------获取门店--------- | 91 | //----------获取门店--------- |