作者 cuiyuan

苏杭

1 { 1 {
2 "pages": [ 2 "pages": [
3 - "pages/homeindex/result/result",  
4 - "pages/homeindex/search/search",  
5 "pages/index/index", 3 "pages/index/index",
  4 + "pages/homeindex/homeindex",
6 "pages/kind/kind", 5 "pages/kind/kind",
  6 +
  7 + "pages/homeindex/result/result",
  8 + "pages/homeindex/search/search",
  9 +
  10 +
7 "pages/mine/mine", 11 "pages/mine/mine",
8 - "pages/homeindex/homeindex",  
9 "pages/kind/detail_1/detail_1", 12 "pages/kind/detail_1/detail_1",
10 "pages/kind/firm_order2/firm_order2", 13 "pages/kind/firm_order2/firm_order2",
11 "pages/kind/firm_order1/firm_order1", 14 "pages/kind/firm_order1/firm_order1",
@@ -22,7 +25,7 @@ @@ -22,7 +25,7 @@
22 "window": { 25 "window": {
23 "backgroundTextStyle": "light", 26 "backgroundTextStyle": "light",
24 "navigationBarBackgroundColor": "#fff", 27 "navigationBarBackgroundColor": "#fff",
25 - "navigationBarTitleText": "WeChat", 28 + "navigationBarTitleText": "团购商城",
26 "navigationBarTextStyle": "black" 29 "navigationBarTextStyle": "black"
27 }, 30 },
28 "tabBar": { 31 "tabBar": {
1 // pages/homeindex/homeindex.js 1 // pages/homeindex/homeindex.js
2 -const app=getApp() 2 +const app = getApp()
3 Page({ 3 Page({
4 4
5 /** 5 /**
6 * 页面的初始数据 6 * 页面的初始数据
7 */ 7 */
8 data: { 8 data: {
9 - url:'' 9 + banner: [],
  10 + shop_class: [],
  11 + middle:'',
  12 + shop:[]
10 }, 13 },
  14 + // 跳转页面
  15 + btn_name() {
  16 + wx.navigateTo({
  17 + url: '/pages/homeindex/search/search',
  18 + })
  19 + },
  20 + get_info() {
  21 + let that = this
  22 + let url = app.interface.index;
  23 + let header = {
  24 + 'XX-Device-Type': 'wxapp',
  25 + 'XX-Token': wx.getStorageSync('token')
  26 + }
  27 +
  28 + app.post(url, {}, header).then((res) => {
  29 + console.log(res)
  30 + that.setData({
  31 + banner: res.data.banner,
  32 + shop_class: res.data.shop_class,
  33 + middle: res.data.middle,
  34 + shop:res.data.shop
  35 + })
  36 +
  37 + }).catch((errMsg) => {})
11 38
  39 + },
12 /** 40 /**
13 * 生命周期函数--监听页面加载 41 * 生命周期函数--监听页面加载
14 */ 42 */
15 - onLoad: function (options) {  
16 - this.setData({  
17 - url: app.globalData.baseUrl  
18 - })  
19 -  
20 - console.log(this.data.url) 43 + onLoad: function(options) {
  44 + let that = this
  45 + that.get_info()
21 }, 46 },
22 47
23 /** 48 /**
24 * 生命周期函数--监听页面初次渲染完成 49 * 生命周期函数--监听页面初次渲染完成
25 */ 50 */
26 - onReady: function () { 51 + onReady: function() {
27 52
28 }, 53 },
29 54
30 /** 55 /**
31 * 生命周期函数--监听页面显示 56 * 生命周期函数--监听页面显示
32 */ 57 */
33 - onShow: function () { 58 + onShow: function() {
34 59
35 }, 60 },
36 61
37 /** 62 /**
38 * 生命周期函数--监听页面隐藏 63 * 生命周期函数--监听页面隐藏
39 */ 64 */
40 - onHide: function () { 65 + onHide: function() {
41 66
42 }, 67 },
43 68
44 /** 69 /**
45 * 生命周期函数--监听页面卸载 70 * 生命周期函数--监听页面卸载
46 */ 71 */
47 - onUnload: function () { 72 + onUnload: function() {
48 73
49 }, 74 },
50 75
51 /** 76 /**
52 * 页面相关事件处理函数--监听用户下拉动作 77 * 页面相关事件处理函数--监听用户下拉动作
53 */ 78 */
54 - onPullDownRefresh: function () { 79 + onPullDownRefresh: function() {
55 80
56 }, 81 },
57 82
58 /** 83 /**
59 * 页面上拉触底事件的处理函数 84 * 页面上拉触底事件的处理函数
60 */ 85 */
61 - onReachBottom: function () { 86 + onReachBottom: function() {
62 87
63 }, 88 },
64 89
65 /** 90 /**
66 * 用户点击右上角分享 91 * 用户点击右上角分享
67 */ 92 */
68 - onShareAppMessage: function () { 93 + onShareAppMessage: function() {
69 94
70 } 95 }
71 }) 96 })
@@ -2,42 +2,42 @@ @@ -2,42 +2,42 @@
2 <!-- <text>pages/homeindex/homeindex.wxml</text> --> 2 <!-- <text>pages/homeindex/homeindex.wxml</text> -->
3 3
4 <view class='search'> 4 <view class='search'>
5 - <view class='search_inp'>  
6 - <input type='text' placeholder='请输入商品名称'></input>  
7 - <image src='../../img/search.png'></image>  
8 - </view>  
9 - <view class='search_txt'>  
10 - 搜索  
11 - </view> 5 + <view class='search_inp' bindtap="btn_name">
  6 + <!-- <input type='text' bindtap="btn_name" placeholder='请输入商品名称'></input> -->
  7 + 请输入商品名称
  8 + <image src='../../img/search.png'></image>
  9 + </view>
  10 + <view class='search_txt' bindtap="btn_name">
  11 + 搜索
  12 + </view>
12 </view> 13 </view>
13 <view class='banner'> 14 <view class='banner'>
14 - <swiper indicator-dots="true" indicator-active-color="#fff" style="width:100%;height:100%;">  
15 - <swiper-item>  
16 - <image style="width: 688px; height: 336px; " mode='widthFix' src='../../img/蒙版组 33@2x.png'></image>  
17 - </swiper-item>  
18 - <swiper-item>  
19 - <image style="width: 688px; height: 336px; " src='../../img/蒙版组 33@2x.png'></image>  
20 - </swiper-item>  
21 - </swiper>  
22 - <view class='banner_Mask'></view> 15 + <swiper indicator-dots="true" indicator-active-color="#fff" style="width:100%;height:100%;">
  16 + <swiper-item wx:for='{{banner}}' wx:key="index">
  17 + <image style="width: 688rpx;" mode='widthFix' src='{{item.img}}' />
  18 + </swiper-item>
  19 + </swiper>
  20 + <view class='banner_Mask'></view>
23 </view> 21 </view>
24 <view class='commodity'> 22 <view class='commodity'>
25 - <view class='jujia'>  
26 - <image src='../../img/jujia@3x.png'></image>  
27 - <text>居家用品</text>  
28 - </view>  
29 - <view class='riyong'> 23 + <!-- <navigator url=''>
  24 + </navigator> -->
  25 + <view class='jujia' wx:for='{{shop_class}}' wx:key="index">
  26 + <image src='{{item.img}}'></image>
  27 + <text>{{item.class_name}}</text>
  28 + </view>
  29 + <!-- <view class='riyong'>
30 <image src='../../img/riyongsahngpin@3x.png'></image> 30 <image src='../../img/riyongsahngpin@3x.png'></image>
31 <text>日用商品</text> 31 <text>日用商品</text>
32 </view> 32 </view>
33 <view class='shuam'> 33 <view class='shuam'>
34 <image src='../../img/shuma@3x.png'></image> 34 <image src='../../img/shuma@3x.png'></image>
35 <text>数码商品</text> 35 <text>数码商品</text>
36 - </view>  
37 - <view class='fenlei'>  
38 - <image src='../../img/fenlei@3x.png'></image>  
39 - <text>全部分类</text>  
40 - </view> 36 + </view> -->
  37 + <view class='fenlei'>
  38 + <image src='../../img/fenlei@3x.png'></image>
  39 + <text>全部分类</text>
  40 + </view>
41 </view> 41 </view>
42 <view class='introduce'> 42 <view class='introduce'>
43 <view class='introduce_list'> 43 <view class='introduce_list'>
@@ -54,162 +54,48 @@ @@ -54,162 +54,48 @@
54 <text>赔付保障</text> 54 <text>赔付保障</text>
55 </view> 55 </view>
56 </view> 56 </view>
57 - <image src='../../img/20190311140242.png'></image> 57 + <image src='{{middle}}'></image>
58 </view> 58 </view>
59 <view class='container'> 59 <view class='container'>
60 <view class='mid'> 60 <view class='mid'>
61 - <view class='mid_item'>  
62 - <!-- 顶部 -->  
63 - <view class='mid_item_top'>  
64 - <!-- 左边 -->  
65 - <view class='mid_item_top_left'>  
66 - <view class='top_left_pic'>  
67 - <image src='../../../img/goods_1.png'></image>  
68 - </view>  
69 - <view class='top_left_text'>  
70 - 距结束23时59分距结束23时59分 61 + <view class='ware_box' wx:for='{{shop}}' wx:key="index">
  62 + <view class='ware_top'>
  63 + <view class='ware_1'>
  64 + <image src='{{item.thumb}}'></image>
  65 + <view class='ware_1_time'>
  66 + 据结束2时22分
71 </view> 67 </view>
72 </view> 68 </view>
73 - <!-- 右边 -->  
74 - <view class='mid_item_top_right'>  
75 - <!-- 右上 -->  
76 - <view class='right_top'>  
77 - <view class='right_top_lef'>  
78 - 纯进口有机菜花  
79 - </view>  
80 - <view class='right_top_rig'>  
81 - 产地:智利  
82 - </view> 69 + <view class='ware_text'>
  70 + <view class='ware_2'>
  71 + <text class='ware_2Txt1'>{{item.name}}</text>
  72 + <text class='ware_2Txt2'>{{item.origin}}</text>
83 </view> 73 </view>
84 - <!-- 右中1 -->  
85 - <view class='right_mid'>  
86 - <view class='right_mid_lef'>  
87 - <view class='right_mid_lef_color'></view>  
88 - </view>  
89 - <view class='right_mid_rig'>  
90 - 42%  
91 - </view> 74 + <view class='ware_3'>
  75 + <progress percent="42" show-info color="#B5DE96" border-radius="8" font-size="24rpx" stroke-width="16rpx" />
92 </view> 76 </view>
93 - <!-- 右中2 -->  
94 - <view class='right_text'>  
95 - 已拼300份,目标500份 77 + <view class='ware_4'>
  78 + <text>现有{{item.numb}}份,目标{{item.group}}份</text>
96 </view> 79 </view>
97 - <!-- 右下 -->  
98 - <view class='right_bottom'>  
99 - <!-- 右下左 -->  
100 - <view class='right_bottom_lef'>  
101 - <span class='RBM'>¥</span>  
102 - <span class='number'>52/</span>  
103 - <span class='text'>1磅1份1磅1份</span> 80 + <view class='ware_5'>
  81 + <view>
  82 + <text class='ware5_t1'>{{item.money_sale}}</text>
  83 + <text class='ware5_t2'>{{item.shop_type}}</text>
104 </view> 84 </view>
105 - <!-- 右下中 -->  
106 - <view class='right_bottom_mid'>  
107 - <view class='right_bottom_mid_t'>  
108 - 40mm-50m  
109 - </view>  
110 - <view class='right_bottom_mid_b'>  
111 - 番茄果径番茄果径番茄果径  
112 - </view> 85 + <view class='ware5_box'>
  86 + <view class='ware5_t3'>{{item.text_table}}</view>
  87 + <view class='ware5_t4'>{{item.text_content}}</view>
113 </view> 88 </view>
114 - <!-- 右下右 -->  
115 - <view class='right_bottom_rig'>  
116 - 立即参团 89 + <view class='ware_6'>
  90 + <view>立即参团</view>
117 </view> 91 </view>
118 </view> 92 </view>
119 </view> 93 </view>
120 -  
121 -  
122 </view> 94 </view>
123 - <view class='mid_item_bottom'>  
124 - <view class='mid_item_bottom_left'>  
125 - 经典推荐  
126 - </view>  
127 - <!-- 竖线 -->  
128 - <view class='mid_line'></view>  
129 - <!-- 底部文本 -->  
130 - <view class='mid_item_bottom_bot'>  
131 - 智利进口,绿色健康,硕大饱满  
132 - </view>  
133 - </view>  
134 - </view>  
135 -  
136 - <view class='mid_item'>  
137 - <!-- 顶部 -->  
138 - <view class='mid_item_top'>  
139 - <!-- 左边 -->  
140 - <view class='mid_item_top_left'>  
141 - <view class='top_left_pic'>  
142 - <image src='../../../img/goods_1.png'></image>  
143 - </view>  
144 - <view class='text_color'>  
145 - 距结束2时22分距结束2时22分  
146 - </view>  
147 - </view>  
148 - <!-- 右边 -->  
149 - <view class='mid_item_top_right'>  
150 - <!-- 右上 -->  
151 - <view class='right_top'>  
152 - <view class='right_top_lef'>  
153 - 纯进口有机菜花  
154 - </view>  
155 - <view class='right_top_rig'>  
156 - 产地:罗利  
157 - </view>  
158 - </view>  
159 - <!-- 右中1 -->  
160 - <view class='right_mid'>  
161 - <view class='right_mid_lef'>  
162 - <view class='right_mid_lef_color'></view>  
163 - </view>  
164 - <view class='right_mid_rig'>  
165 - 42%  
166 - </view>  
167 - </view>  
168 - <!-- 右中2 -->  
169 - <view class='right_text'>  
170 - 已拼300份,目标500份  
171 - </view>  
172 - <!-- 右下 -->  
173 - <view class='right_bottom'>  
174 - <!-- 右下左 -->  
175 - <view class='right_bottom_lef'>  
176 - <span class='RBM'>¥</span>  
177 - <span class='number'>52/</span>  
178 - <span class='text'>1磅1份1磅1份</span>  
179 -  
180 - </view>  
181 - <!-- 右下中 -->  
182 - <view class='right_bottom_mid'>  
183 - <view class='right_bottom_mid_t'>  
184 - 40mm-50m  
185 - </view>  
186 - <view class='right_bottom_mid_b'>  
187 - 番茄果径 番茄果径番茄果径  
188 - </view>  
189 - </view>  
190 - <!-- 右下右 -->  
191 - <view class='right_bottom_rig'>  
192 - 立即参团  
193 - </view>  
194 - </view>  
195 - </view>  
196 -  
197 -  
198 - </view>  
199 - <view class='mid_item_bottom'>  
200 - <view class='mid_item_bottom_left'>  
201 - 经典推荐  
202 - </view>  
203 - <!-- 竖线 -->  
204 - <view class='mid_line'></view>  
205 - <!-- 底部文本 -->  
206 - <view class='mid_item_bottom_bot'>  
207 - 智利进口,绿色健康,硕大饱满  
208 - </view> 95 + <view class='ware_bot'>
  96 + <view class='ware_bot_tit'>经典推荐</view>
  97 + <view class='ware_bot_txt'>{{item.recommend}}</view>
209 </view> 98 </view>
210 </view> 99 </view>
211 </view> 100 </view>
212 -</view>  
213 -  
214 -  
215 - 101 +</view>
@@ -28,6 +28,7 @@ @@ -28,6 +28,7 @@
28 .search_inp image{ 28 .search_inp image{
29 position: absolute; 29 position: absolute;
30 left: 32rpx; 30 left: 32rpx;
  31 + top: 17rpx;
31 width: 32rpx; 32 width: 32rpx;
32 height: 32rpx; 33 height: 32rpx;
33 } 34 }
@@ -121,7 +122,6 @@ @@ -121,7 +122,6 @@
121 margin: 0 auto; 122 margin: 0 auto;
122 } 123 }
123 .commodity image{ 124 .commodity image{
124 - display: flex;  
125 width: 112rpx; 125 width: 112rpx;
126 height: 112rpx; 126 height: 112rpx;
127 margin: 0 auto; 127 margin: 0 auto;
@@ -145,240 +145,208 @@ @@ -145,240 +145,208 @@
145 display: flex; 145 display: flex;
146 flex-flow: column; 146 flex-flow: column;
147 } 147 }
148 -.mid_item{  
149 - margin-top: 16rpx;  
150 - width:688rpx;  
151 - /* height:400rpx; */  
152 - background:rgba(249,250,252,1);  
153 - opacity:1;  
154 - border-radius:8rpx; 148 +.ware_box{
  149 + width:688rpx;
  150 + height:400rpx;
  151 + margin:32rpx auto;
  152 + background:#F9FAFC;
  153 +}
  154 +.ware_top{
  155 + overflow: hidden;
  156 + display: flex;
  157 + padding:32rpx 18rpx 0;
  158 +}
  159 +.ware_1{
  160 + width:312rpx;
  161 + height:208rpx;
  162 + position: relative;
  163 +}
  164 +.ware_1 image{
  165 + width:100%;
  166 + height:100%;
  167 +}
  168 +.ware_1_time{
  169 + position: absolute;
  170 + bottom:0;
  171 + width:208rpx;
  172 + height:48rpx;
  173 + color: white;
  174 + text-align: center;
  175 + line-height:48rpx;
  176 + font-size:24rpx;
  177 + background:#FAC8C8;
  178 + font-family:PingFang SC;
  179 +}
  180 +.ware_text{
  181 + margin-left:14rpx;
  182 + width:100%;
  183 +}
  184 +.ware_2{
155 display: flex; 185 display: flex;
156 - align-items: center;  
157 - flex-flow: column;  
158 - box-sizing: border-box;  
159 - padding: 52rpx 16rpx 48rpx;  
160 -}  
161 -.mid_item_top{  
162 - display: flex;  
163 - width: 100%;  
164 -}  
165 -.mid_item_top_left{  
166 - width:208rpx;  
167 - height:208rpx;  
168 - /* background:rgba(250,250,250,1); */  
169 - opacity:1;  
170 - display: flex;  
171 - flex-flow: column;  
172 -}  
173 -.top_left_pic{  
174 - width: 208rpx;  
175 - height: 160rpx;  
176 - display: flex;  
177 -}  
178 -.top_left_pic image{  
179 - width: 100%;  
180 - height: 100%;  
181 -}  
182 -.top_left_text{  
183 - width: 202rpx;  
184 - height:48rpx;  
185 - background:rgba(251,4,4,1);  
186 - opacity:0.2;  
187 - text-align: center;  
188 - font-size:24rpx;  
189 - font-family:PingFang SC;  
190 - font-weight:400;  
191 - line-height:48rpx;  
192 - color:rgba(255,255,255,1);  
193 -  
194 - overflow: hidden;  
195 - text-overflow: ellipsis;  
196 - white-space: nowrap;  
197 -}  
198 -.mid_item_top_right{  
199 - width: 100%;  
200 - margin-left: 14rpx;  
201 -}  
202 -.right_top{  
203 - display: flex;  
204 - align-items: center;  
205 justify-content: space-between; 186 justify-content: space-between;
206 - margin-top: 20rpx;  
207 -}  
208 -.right_top_lef{  
209 - width: 270rpx;  
210 - font-size:32rpx;  
211 - font-family:PingFang SC;  
212 - font-weight:600;  
213 - color:rgba(51,51,51,1);  
214 - opacity:1;  
215 - overflow: hidden;  
216 - text-overflow: ellipsis;  
217 - white-space: nowrap;  
218 -}  
219 -.right_top_rig{  
220 - font-size:22rpx;  
221 - font-family:PingFang SC;  
222 - font-weight:400;  
223 - line-height:32rpx;  
224 - color:rgba(204,204,204,1);  
225 - opacity:1;  
226 -}  
227 -.right_mid{  
228 - margin-top: 16rpx;  
229 - display: flex;  
230 - align-items: center;  
231 -}  
232 -.right_mid_lef{  
233 - width:288rpx;  
234 - height:16rpx;  
235 - background:rgba(236,236,236,1);  
236 - opacity:1;  
237 - border-radius:8rpx;  
238 -}  
239 -.right_mid_lef_color{  
240 - width:206rpx;  
241 - height:16rpx;  
242 - background:rgba(181,222,150,1);  
243 - opacity:1;  
244 - border-radius:8rpx;  
245 -}  
246 -.right_mid_rig{  
247 - margin-left: 16rpx; 187 + align-content: center;
  188 +}
  189 +.ware_2Txt1{
  190 + font-size:32rpx;
  191 + font-family:PingFang SC;
  192 + font-weight:600;
  193 + line-height:44rpx;
  194 + color:rgba(51,51,51,1);
  195 +}
  196 +.ware_2Txt2{
  197 + font-size:22rpx;
  198 + /* margin-left:98rpx; */
  199 + font-family:PingFang SC;
  200 + font-weight:400;
  201 + line-height:32rpx;
  202 + color:rgba(204,204,204,1);
  203 +}
  204 +.ware_3 progress{
  205 + width:370rpx;
  206 + color:#B5DE96;
  207 + margin-top:24rpx;
  208 +}
  209 +.ware_4 text,.ware5_t2{
  210 + font-size:22rpx;
  211 + font-family:PingFang SC;
  212 + font-weight:400;
  213 + line-height:32rpx;
  214 + color:rgba(204,204,204,1);
  215 +}
  216 +.ware_5{
  217 + display: flex;
  218 + display: -webkit-flex;
  219 + justify-content: space-between;
  220 +}
  221 +.ware5_t1{
  222 + font-size:30rpx;
  223 + font-family:DIN 1451 Std Mittelschrift;
  224 + font-weight:400;
  225 + color:rgba(255,0,0,1);
  226 +}
  227 +.ware5_t3{
  228 + font-size:22rpx;
  229 + font-family:PingFang SC;
  230 + font-weight:400;
  231 + line-height:30rpx;
  232 + color:rgba(51,51,51,1);
  233 +}
  234 +.ware5_t4{
  235 + font-size:18rpx;
  236 + font-family:PingFang SC;
  237 + font-weight:400;
  238 + color:rgba(153,153,153,1);
  239 +}
  240 +.ware_6{
  241 + width:144rpx;
  242 + height:48rpx;
  243 + background:rgba(249,150,20,1);
  244 + box-shadow:0px 2rpx 12rpx rgba(255,145,0,0.16);
  245 + border-radius:24rpx;
  246 +}
  247 +.ware_6 view{
  248 + font-size:26rpx;
  249 + font-family:PingFang SC;
  250 + font-weight:400;
  251 + text-align: center;
  252 + line-height:48rpx;
  253 + color:rgba(255,255,255,1);
  254 +}
  255 +.ware_bot{
  256 + width:670rpx;
  257 + height:80rpx;
  258 + margin: auto;
  259 + display: flex;
  260 + line-height:80rpx;
  261 + margin-top:32rpx;
  262 + background-color:#F1F7F1;
  263 +}
  264 +.ware_bot_tit{
  265 + font-size:30rpx;
  266 + font-weight:bold;
  267 + margin-left:32rpx;
  268 + color:rgba(110,172,61,1);
  269 +}
  270 +.ware_bot_tit:after{
  271 + content:"";
  272 + margin:0 38rpx;
  273 + border-right:1px solid #B5DE96;
  274 +}
  275 +.ware_bot_txt{
  276 + font-size:24rpx;
  277 + font-family:PingFang SC;
  278 + font-weight:400;
  279 + color:rgba(153,153,153,1);
  280 +}
  281 +/* 规格 */
  282 +.spec{
  283 + width:100%;
  284 + padding:0 32rpx;
  285 + line-height:80rpx;
  286 + display: flex;
  287 + height:80rpx;
  288 + margin-top:8rpx;
  289 + background:white;
  290 +}
  291 +.spec_txt{
  292 + font-size:32rpx;
  293 + font-family:PingFang SC;
  294 + font-weight:400;
  295 + color:rgba(51,51,51,1);
  296 +}
  297 +.spec_txt2{
248 font-size:24rpx; 298 font-size:24rpx;
249 font-family:PingFang SC; 299 font-family:PingFang SC;
250 font-weight:400; 300 font-weight:400;
251 - line-height:34rpx;  
252 - color:rgba(181,222,150,1);  
253 - opacity:1;  
254 -}  
255 -.right_text{  
256 - margin-top: 14rpx;  
257 - font-size:22rpx;  
258 - font-family:PingFang SC;  
259 - font-weight:400;  
260 - color:rgba(204,204,204,1);  
261 - opacity:1;  
262 -}  
263 -.right_bottom{  
264 - display: flex;  
265 - align-items: center;  
266 - justify-content: space-between;  
267 -}  
268 -.RBM{  
269 - font-size: 22rpx;  
270 - color: #ff0000;  
271 -}  
272 -.number{  
273 - font-size: 30rpx;  
274 - color: #ff0000;  
275 -}  
276 -.text{  
277 -  
278 - font-size:22rpx;  
279 - font-family:PingFang SC;  
280 - font-weight:400;  
281 - line-height:32rpx;  
282 - color:rgba(204,204,204,1);  
283 - opacity:1;  
284 -}  
285 -.right_bottom_mid{  
286 - width: 122rpx; 301 + margin-left:108rpx;
  302 + color:rgba(153,153,153,1);
287 } 303 }
288 -.right_bottom_mid_t{  
289 -  
290 - font-size:22rpx;  
291 - font-family:PingFang SC;  
292 - font-weight:400;  
293 - color:rgba(51,51,51,1);  
294 - opacity:1;  
295 -  
296 - overflow: hidden;  
297 - text-overflow: ellipsis;  
298 - white-space: nowrap;  
299 - 304 +/* 商品详情 */
  305 +.ware_detail{
  306 + width:100%;
  307 + margin-top:8rpx;
  308 + margin-bottom:96rpx;
  309 + padding-bottom:66rpx;
  310 + background: white;
  311 +}
  312 +.ware_detail_tit{
  313 + width:688rpx;
  314 + margin: auto;
  315 + display: flex;
  316 + padding:44rpx 0rpx 42rpx;
  317 + justify-content:space-around;
  318 + border-bottom:2rpx solid #F5F5F5;
  319 +}
  320 +.ware_detail .ware_active{
  321 + color:#6EAC3D;
  322 + font-weight:600;
  323 +}
  324 +.ware_active:after{
  325 + content: "";
  326 + width:16rpx;
  327 + height: 6rpx;
  328 + margin: auto;
  329 + display: block;
  330 + margin-top:6rpx;
  331 + border-radius:8rpx;
  332 + background:rgba(110,172,61,1);
  333 +}
  334 +.ware_detail_tit view{
  335 + font-size:28rpx;
  336 + font-family:PingFang SC;
  337 + font-weight:400;
  338 + color:rgba(153,153,153,1);
  339 +}
  340 +.ware_detailC{
  341 + width:688rpx;
  342 + margin:26rpx auto 0;
300 } 343 }
301 -.right_bottom_mid_b{  
302 - font-size:18rpx;  
303 - font-family:PingFang SC;  
304 - font-weight:400;  
305 - color:rgba(153,153,153,1);  
306 - opacity:1;  
307 -  
308 - overflow: hidden;  
309 - text-overflow: ellipsis;  
310 - white-space: nowrap;  
311 -}  
312 -.right_bottom_rig{  
313 - width:144rpx;  
314 - height:48rpx;  
315 - line-height: 48rpx;  
316 - background:rgba(249,150,20,1);  
317 - box-shadow:0rpx 2rpx 12rpx rgba(255,145,0,0.16);  
318 - opacity:1;  
319 - border-radius:24rpx;  
320 344
321 - text-align: center;  
322 - font-size:26rpx;  
323 - font-family:PingFang SC;  
324 - font-weight:400;  
325 - color:rgba(255,255,255,1);  
326 -}  
327 -.mid_item_bottom{  
328 - margin-top: 32rpx;  
329 - width:640rpx;  
330 - height:80rpx;  
331 - background:rgba(181,222,150,0.1);  
332 - border-radius:16rpx;  
333 - display: flex;  
334 - align-items: center;  
335 - box-sizing: border-box;  
336 - padding: 0 32rpx;  
337 -}  
338 -.mid_item_bottom_left{  
339 - font-size:30rpx;  
340 - font-family:汉真广标;  
341 - font-weight:400;  
342 - color:rgba(110,172,61,1);  
343 - opacity:1;  
344 -  
345 -}  
346 -.mid_line{  
347 - margin: 0 36rpx;  
348 - width:2rpx;  
349 - height:60rpx;  
350 - background:rgba(181,222,150,1);  
351 - opacity:1;  
352 - border-radius:4rpx; 345 +.ware_detailImg{
  346 + width:688rpx;
  347 + height:470rpx;
353 } 348 }
354 -.mid_item_bottom_bot{  
355 - font-size:24rpx;  
356 - font-family:PingFang SC;  
357 - font-weight:400;  
358 - color:rgba(153,153,153,1);  
359 - opacity:1;  
360 - overflow: hidden;  
361 - text-overflow: ellipsis;  
362 - white-space: nowrap;  
363 -}  
364 -.text_color{  
365 - width:202rpx;  
366 - height:48rpx;  
367 - line-height: 48rpx;  
368 - text-align: center;  
369 - background:rgba(204,204,204,0.7);  
370 - font-size:24rpx;  
371 - font-family:PingFang SC;  
372 - font-weight:400;  
373 - color:rgba(255,255,255,1);  
374 - opacity:1;  
375 - overflow: hidden;  
376 - text-overflow: ellipsis;  
377 - white-space: nowrap;  
378 -}  
379 -.right_bottom_lef{  
380 - width: 140rpx;  
381 - overflow: hidden;  
382 - text-overflow: ellipsis;  
383 - white-space: nowrap; 349 +.ware_detailImg image{
  350 + width:100%;
  351 + height:100%;
384 } 352 }
1 // pages/homeindex/search/search.js 1 // pages/homeindex/search/search.js
  2 +const app = getApp()
2 Page({ 3 Page({
3 4
4 /** 5 /**
5 * 页面的初始数据 6 * 页面的初始数据
6 */ 7 */
7 data: { 8 data: {
8 - 9 + recommend: [],
  10 + history: [],
  11 + keyword: ''
9 }, 12 },
10 13
11 /** 14 /**
12 * 生命周期函数--监听页面加载 15 * 生命周期函数--监听页面加载
13 */ 16 */
14 onLoad: function (options) { 17 onLoad: function (options) {
  18 + let that = this
  19 + that.get_info()
  20 + },
  21 + get_info() {
  22 + let that = this
  23 + // 接口地址
  24 + let url = app.interface.history
  25 + let header = {
  26 + 'XX-Device-Type': 'wxapp',
  27 + 'XX-Token': wx.getStorageSync('token')
  28 + }
  29 +
  30 + app.post(url, {},header).then((res) => {
  31 + console.log(res)
  32 + that.setData({
  33 + recommend: res.data.recommend,
  34 + history: res.data.history
  35 + })
  36 +
  37 + }).catch((errMsg) => {
  38 +
  39 + })
15 40
16 }, 41 },
17 42
  43 + // get_info() {
  44 + // let that = this
  45 + // let url = app.interface.index;
  46 + // let header = {
  47 + // 'XX-Device-Type': 'wxapp',
  48 + // 'XX-Token': wx.getStorageSync('token')
  49 + // }
  50 +
  51 + // app.post(url, {}, header).then((res) => {
  52 + // console.log(res)
  53 + // that.setData({
  54 + // banner: res.data.banner,
  55 + // shop_class: res.data.shop_class,
  56 + // middle: res.data.middle,
  57 + // shop: res.data.shop
  58 + // })
  59 +
  60 + // }).catch((errMsg) => { })
  61 +
  62 + // },
  63 +
  64 +
  65 +
  66 + info(){
  67 + let that = this
  68 + // 接口地址
  69 + let url = app.interface.shopPage
  70 +
  71 + app.post(url, {
  72 + page: 1,
  73 + keyword: that.data.keyword
  74 + }).then((res) => {
  75 + console.log(res)
  76 + that.setData({
  77 +
  78 + })
  79 +
  80 + }).catch((errMsg) => {
  81 +
  82 + })
  83 + },
18 /** 84 /**
19 * 生命周期函数--监听页面初次渲染完成 85 * 生命周期函数--监听页面初次渲染完成
20 */ 86 */
@@ -5,7 +5,7 @@ @@ -5,7 +5,7 @@
5 <input type='text' placeholder='请输入商品名称'></input> 5 <input type='text' placeholder='请输入商品名称'></input>
6 <image src='../../../img/search.png'></image> 6 <image src='../../../img/search.png'></image>
7 </view> 7 </view>
8 - <view class='search_txt'> 8 + <view class='search_txt' bindtap='info'>
9 搜索 9 搜索
10 </view> 10 </view>
11 </view> 11 </view>
@@ -14,29 +14,16 @@ @@ -14,29 +14,16 @@
14 <text>热门搜索</text> 14 <text>热门搜索</text>
15 <image src='../../../img/zuire@3x.png'></image> 15 <image src='../../../img/zuire@3x.png'></image>
16 </view> 16 </view>
17 - <view class='Popular_list'>  
18 - <view class='Popular_item'>  
19 - 有机菜花  
20 - </view>  
21 - <view class='Popular_item'>  
22 - 有机菜  
23 - </view>  
24 - <view class='Popular_item'>  
25 - 有机菜花  
26 - </view>  
27 - <view class='Popular_item'>  
28 - 有机菜花  
29 - </view>  
30 - <view class='Popular_item'>  
31 - 有机菜花 17 + <view class='Popular_list' >
  18 + <view class='Popular_item' wx:for='{{recommend}}' wx:key>
  19 + {{recommend[index]}}
32 </view> 20 </view>
  21 +
33 </view> 22 </view>
34 <view class='History'> 23 <view class='History'>
35 <view class='History_title'>历史搜索</view> 24 <view class='History_title'>历史搜索</view>
36 <view class='History_list'> 25 <view class='History_list'>
37 - <view class='History_item'>有机菜花</view>  
38 - <view class='History_item'>有机菜花</view>  
39 - <view class='History_item'>有机菜花</view> 26 + <view class='History_item' wx:for='{{history}}' wx:key>{{history[index]}}</view>
40 </view> 27 </view>
41 </view> 28 </view>
42 </view> 29 </view>
@@ -4,89 +4,66 @@ const app = getApp() @@ -4,89 +4,66 @@ const app = getApp()
4 4
5 Page({ 5 Page({
6 data: { 6 data: {
7 - motto: 'Hello World',  
8 - userInfo: {},  
9 - hasUserInfo: false,  
10 - canIUse: wx.canIUse('button.open-type.getUserInfo')  
11 - },  
12 - //事件处理函数  
13 - bindViewTap: function() {  
14 - wx.navigateTo({  
15 - url: '../logs/logs'  
16 - }) 7 + session_key:'',
  8 + openid:''
17 }, 9 },
18 10
  11 +
19 12
20 - start(e) { 13 + /**
  14 + * 生命周期函数--监听页面加载
  15 + */
  16 + onLoad: function (options) {
  17 + this.getLoginFun();
  18 + },
21 19
  20 + // 获取session_key
  21 + getLoginFun() {
22 let that = this; 22 let that = this;
23 - console.log(e)  
24 -  
25 - // app.globalData.userInfo = e.detail.userInfo  
26 wx.login({ 23 wx.login({
27 - success: (res) => {  
28 - console.log(res)  
29 -  
30 - wx.switchTab({  
31 - url: '../homeindex/homeindex',  
32 - })  
33 - // let url = '/api/portal/common/getToken ';  
34 - // let params = {  
35 - // code: res.code,  
36 - // user_nickname: e.detail.userInfo.nickName,  
37 - // avatar: e.detail.userInfo.avatarUrl  
38 - // // user_nickname: e.detail.userInfo.nickName,  
39 - // // avatar: e.detail.userInfo.avatarUrl //分享进入的需要此参数  
40 - // }  
41 - // app.post(url, params).then((res) => {  
42 - // console.log(res)  
43 - // wx.setStorageSync('token', res.token);  
44 -  
45 - // wx.navigateTo({  
46 - // url: '../mainindex/mainindex',  
47 - // })  
48 -  
49 - // }).catch((errMsg) => {  
50 - // // console.log(errMsg)  
51 - // }) 24 + success: function (s) {
  25 + console.log(s);
  26 +
  27 + let url = 'wxapp/public/getSessionKey';
  28 + if (s.code) {
  29 + var code = s.code;
  30 + var param = {
  31 + code: s.code
  32 + }
  33 + app.post(url, param).then((res) => {
  34 + console.log(res);
  35 + that.setData({
  36 + openid: res.data.openid,
  37 + session_key: res.data.session_key
  38 + })
  39 + // res.data = {}
52 40
  41 + }).catch((errMsg) => {
  42 + console.log(errMsg);
  43 + })
  44 + }
53 } 45 }
54 }); 46 });
55 }, 47 },
56 - onLoad: function () {  
57 - if (app.globalData.userInfo) {  
58 - this.setData({  
59 - userInfo: app.globalData.userInfo,  
60 - hasUserInfo: true  
61 - })  
62 - } else if (this.data.canIUse){  
63 - // 由于 getUserInfo 是网络请求,可能会在 Page.onLoad 之后才返回  
64 - // 所以此处加入 callback 以防止这种情况  
65 - app.userInfoReadyCallback = res => {  
66 - this.setData({  
67 - userInfo: res.userInfo,  
68 - hasUserInfo: true  
69 - })  
70 - }  
71 - } else {  
72 - // 在没有 open-type=getUserInfo 版本的兼容处理  
73 - wx.getUserInfo({  
74 - success: res => {  
75 - app.globalData.userInfo = res.userInfo  
76 - this.setData({  
77 - userInfo: res.userInfo,  
78 - hasUserInfo: true  
79 - })  
80 - }  
81 - }) 48 +
  49 + // 获取用户信息
  50 + getUserInfo(e) {
  51 + console.log(e);
  52 + let url = "wxapp/public/login";
  53 + let data = {
  54 + openid: this.data.openid,
  55 + session_key: this.data.session_key,
  56 + encrypted_data: e.detail.encryptedData,
  57 + iv: e.detail.iv,
82 } 58 }
83 - },  
84 - getUserInfo: function(e) {  
85 - console.log(e)  
86 - app.globalData.userInfo = e.detail.userInfo  
87 - this.setData({  
88 - userInfo: e.detail.userInfo,  
89 - hasUserInfo: true 59 + app.post(url, data).then((res) => {
  60 + console.log(res);
  61 + wx.setStorageSync("token", res.data.token);
  62 + wx.switchTab({
  63 + url: '../homeindex/homeindex',
  64 + })
  65 + }).catch((err) => {
  66 + console.log(err);
90 }) 67 })
91 - } 68 + },
92 }) 69 })
1 -<button open-type="getUserInfo" bindgetuserinfo='start' class="begin">启动小程序</button> 1 +<view class='box'>
  2 + <view class='cover'>
  3 + <image src="../../images/aicon_23@2x.png"></image>
  4 + asdlkjhnaisd
  5 + <view class='go'>
  6 + <button open-type='getUserInfo' bindgetuserinfo="getUserInfo">立即启动</button>
  7 + </view>
  8 + </view>
  9 +</view>
1 /**index.wxss**/ 1 /**index.wxss**/
2 -.userinfo {  
3 - display: flex;  
4 - flex-direction: column;  
5 - align-items: center; 2 +.cover{
  3 + position: relative;
  4 + height: 100vh;
  5 + overflow:hidden;
6 } 6 }
7 -  
8 -.userinfo-avatar {  
9 - width: 128rpx;  
10 - height: 128rpx;  
11 - margin: 20rpx;  
12 - border-radius: 50%; 7 +.cover image{
  8 + width:100%;
  9 + height:100%;
13 } 10 }
14 -  
15 -.userinfo-nickname {  
16 - color: #aaa; 11 +.go{
  12 + position: absolute;
  13 + bottom:26.41%;
  14 + left:0;
  15 + right: 0;
  16 + margin: auto;
  17 + width:400rpx;
  18 + height:80rpx;
  19 + border-radius:40rpx;
  20 + background: #6EAC3D;
  21 + /* border:1rpx solid #434343; */
17 } 22 }
18 -  
19 -.usermotto {  
20 - margin-top: 200px; 23 +.go button{
  24 + font-size:30rpx;
  25 + color:#fff;
  26 + text-align: center;
  27 + line-height:80rpx;
  28 + display: block;
  29 + background:none;
21 } 30 }
1 // pages/kind/kind.js 1 // pages/kind/kind.js
  2 +const app = getApp()
2 Page({ 3 Page({
3 4
4 /** 5 /**
5 * 页面的初始数据 6 * 页面的初始数据
6 */ 7 */
7 data: { 8 data: {
8 - navbar: [{  
9 - name: '居家用品'  
10 - },  
11 - {  
12 - name: '日用商品'  
13 - },  
14 - {  
15 - name: '数码商品'  
16 - },  
17 - {  
18 - name: '富硒生疏'  
19 - },  
20 - {  
21 - name: '野生海鲜'  
22 - },  
23 - {  
24 - name: '有机菜花'  
25 - },  
26 - ], 9 + shop_class:[],
  10 + shop:[],
27 currentTab: 0, 11 currentTab: 0,
  12 + class_id: ''
  13 +
28 }, 14 },
29 15
30 /** 16 /**
31 * 生命周期函数--监听页面加载 17 * 生命周期函数--监听页面加载
32 */ 18 */
33 onLoad: function (options) { 19 onLoad: function (options) {
  20 + let that = this
  21 + that.get_info()
  22 + },
  23 + get_info() {
  24 + let that = this
  25 + // 接口地址
  26 + let url = app.interface.shopClass
  27 + let header = {
  28 + 'XX-Device-Type': 'wxapp',
  29 + 'XX-Token': wx.getStorageSync('token')
  30 + }
  31 +
  32 + let params = {
  33 + class_id: that.data.class_id
  34 + }
  35 + app.post(url, params, header).then((res) => {
  36 + console.log(res)
  37 + that.setData({
  38 + shop_class: res.data.shop_class,
  39 + shop:res.data.shop
  40 + })
  41 +
  42 + }).catch((errMsg) => {
34 43
  44 + })
35 }, 45 },
36 navbarTap: function (e) { 46 navbarTap: function (e) {
37 - console.log(88) 47 + console.log(e)
38 let that = this; 48 let that = this;
39 this.setData({ 49 this.setData({
40 currentTab: e.currentTarget.dataset.idx, 50 currentTab: e.currentTarget.dataset.idx,
  51 + class_id: e.currentTarget.dataset.class_id
41 }) 52 })
  53 + this.get_info()
42 }, 54 },
43 /** 55 /**
44 * 生命周期函数--监听页面初次渲染完成 56 * 生命周期函数--监听页面初次渲染完成
@@ -2,159 +2,49 @@ @@ -2,159 +2,49 @@
2 <!-- <text>pages/kind/kind.wxml</text> --> 2 <!-- <text>pages/kind/kind.wxml</text> -->
3 <view class='container'> 3 <view class='container'>
4 <view class="nav mainindex_nav top"> 4 <view class="nav mainindex_nav top">
5 - <view wx:for="{{navbar}}" data-idx="{{index}}" class="nav_item {{currentTab==index ? 'active' : ''}}" wx:key="unique" bindtap="navbarTap" data-categoryid="{{item.id}}">{{item.name}} 5 + <view wx:for="{{shop_class}}" data-idx="{{index}}" class="nav_item {{currentTab==index ? 'active' : ''}}" wx:key="unique" bindtap="navbarTap" data-class_id="{{item.class_id}}">{{item.class_name}}
6 </view> 6 </view>
7 </view> 7 </view>
8 <view class='mid'> 8 <view class='mid'>
9 - <view class='mid_item'>  
10 - <!-- 顶部 -->  
11 - <view class='mid_item_top'>  
12 - <!-- 左边 -->  
13 - <view class='mid_item_top_left'>  
14 - <view class='top_left_pic'>  
15 - <image src='../../../img/goods_1.png'></image>  
16 - </view>  
17 - <view class='top_left_text'>  
18 - 距结束23时59分距结束23时59分 9 + <view class='ware_box' wx:for='{{shop}}' wx:key="index">
  10 + <view class='ware_top'>
  11 + <view class='ware_1' data-categoryid="{{item.shop_id}}">
  12 + <image src='{{item.thumb}}'></image>
  13 + <view class='ware_1_time'>
  14 + 据结束2时22分
19 </view> 15 </view>
20 </view> 16 </view>
21 - <!-- 右边 -->  
22 - <view class='mid_item_top_right'>  
23 - <!-- 右上 -->  
24 - <view class='right_top'>  
25 - <view class='right_top_lef'>  
26 - 纯进口有机菜花  
27 - </view>  
28 - <view class='right_top_rig'>  
29 - 产地:智利  
30 - </view> 17 + <view class='ware_text'>
  18 + <view class='ware_2'>
  19 + <text class='ware_2Txt1'>{{item.name}}</text>
  20 + <text class='ware_2Txt2'>{{item.origin}}</text>
31 </view> 21 </view>
32 - <!-- 右中1 -->  
33 - <view class='right_mid'>  
34 - <view class='right_mid_lef'>  
35 - <view class='right_mid_lef_color'></view>  
36 - </view>  
37 - <view class='right_mid_rig'>  
38 - 42%  
39 - </view> 22 + <view class='ware_3'>
  23 + <progress percent="42" show-info color="#B5DE96" border-radius="8" font-size="24rpx" stroke-width="16rpx" />
40 </view> 24 </view>
41 - <!-- 右中2 -->  
42 - <view class='right_text'>  
43 - 已拼300份,目标500份 25 + <view class='ware_4'>
  26 + <text>现有{{item.numb}}份,目标{{item.group}}份</text>
44 </view> 27 </view>
45 - <!-- 右下 -->  
46 - <view class='right_bottom'>  
47 - <!-- 右下左 -->  
48 - <view class='right_bottom_lef'>  
49 - <span class='RBM'>¥</span>  
50 - <span class='number'>52/</span>  
51 - <span class='text'>1磅1份1磅1份</span> 28 + <view class='ware_5'>
  29 + <view>
  30 + <text class='ware5_t1'>{{item.money_sale}}</text>
  31 + <text class='ware5_t2'>{{item.shop_type}}</text>
52 </view> 32 </view>
53 - <!-- 右下中 -->  
54 - <view class='right_bottom_mid'>  
55 - <view class='right_bottom_mid_t'>  
56 - 40mm-50m  
57 - </view>  
58 - <view class='right_bottom_mid_b'>  
59 - 番茄果径番茄果径番茄果径  
60 - </view> 33 + <view class='ware5_box'>
  34 + <view class='ware5_t3'>{{item.text_table}}</view>
  35 + <view class='ware5_t4'>{{item.text_content}}</view>
61 </view> 36 </view>
62 - <!-- 右下右 -->  
63 - <view class='right_bottom_rig'>  
64 - 立即参团 37 + <view class='ware_6'>
  38 + <view>立即参团</view>
65 </view> 39 </view>
66 </view> 40 </view>
67 </view> 41 </view>
68 -  
69 -  
70 - </view>  
71 - <view class='mid_item_bottom'>  
72 - <view class='mid_item_bottom_left'>  
73 - 经典推荐  
74 - </view>  
75 - <!-- 竖线 -->  
76 - <view class='mid_line'></view>  
77 - <!-- 底部文本 -->  
78 - <view class='mid_item_bottom_bot'>  
79 - 智利进口,绿色健康,硕大饱满  
80 - </view>  
81 </view> 42 </view>
82 - </view>  
83 -  
84 - <view class='mid_item'>  
85 - <!-- 顶部 -->  
86 - <view class='mid_item_top'>  
87 - <!-- 左边 -->  
88 - <view class='mid_item_top_left'>  
89 - <view class='top_left_pic'>  
90 - <image src='../../../img/goods_1.png'></image>  
91 - </view>  
92 - <view class='text_color'>  
93 - 距结束2时22分距结束2时22分  
94 - </view>  
95 - </view>  
96 - <!-- 右边 -->  
97 - <view class='mid_item_top_right'>  
98 - <!-- 右上 -->  
99 - <view class='right_top'>  
100 - <view class='right_top_lef'>  
101 - 纯进口有机菜花  
102 - </view>  
103 - <view class='right_top_rig'>  
104 - 产地:罗利  
105 - </view>  
106 - </view>  
107 - <!-- 右中1 -->  
108 - <view class='right_mid'>  
109 - <view class='right_mid_lef'>  
110 - <view class='right_mid_lef_color'></view>  
111 - </view>  
112 - <view class='right_mid_rig'>  
113 - 42%  
114 - </view>  
115 - </view>  
116 - <!-- 右中2 -->  
117 - <view class='right_text'>  
118 - 已拼300份,目标500份  
119 - </view>  
120 - <!-- 右下 -->  
121 - <view class='right_bottom'>  
122 - <!-- 右下左 -->  
123 - <view class='right_bottom_lef'>  
124 - <span class='RBM'>¥</span>  
125 - <span class='number'>52/</span>  
126 - <span class='text'>1磅1份1磅1份</span>  
127 -  
128 - </view>  
129 - <!-- 右下中 -->  
130 - <view class='right_bottom_mid'>  
131 - <view class='right_bottom_mid_t'>  
132 - 40mm-50m  
133 - </view>  
134 - <view class='right_bottom_mid_b'>  
135 - 番茄果径 番茄果径番茄果径  
136 - </view>  
137 - </view>  
138 - <!-- 右下右 -->  
139 - <view class='right_bottom_rig'>  
140 - 立即参团  
141 - </view>  
142 - </view>  
143 - </view>  
144 -  
145 -  
146 - </view>  
147 - <view class='mid_item_bottom'>  
148 - <view class='mid_item_bottom_left'>  
149 - 经典推荐  
150 - </view>  
151 - <!-- 竖线 -->  
152 - <view class='mid_line'></view>  
153 - <!-- 底部文本 -->  
154 - <view class='mid_item_bottom_bot'>  
155 - 智利进口,绿色健康,硕大饱满  
156 - </view> 43 + <view class='ware_bot'>
  44 + <view class='ware_bot_tit'>经典推荐</view>
  45 + <view class='ware_bot_txt'>{{item.recommend}}</view>
157 </view> 46 </view>
158 </view> 47 </view>
  48 +
159 </view> 49 </view>
160 </view> 50 </view>
@@ -14,6 +14,9 @@ @@ -14,6 +14,9 @@
14 overflow-x: scroll; 14 overflow-x: scroll;
15 flex-wrap: nowrap 15 flex-wrap: nowrap
16 } 16 }
  17 +::-webkit-scrollbar{
  18 + display: none;
  19 +}
17 .nav_item{ 20 .nav_item{
18 /* width: 200rpx; */ 21 /* width: 200rpx; */
19 padding: 0 38rpx; 22 padding: 0 38rpx;
@@ -33,7 +36,7 @@ @@ -33,7 +36,7 @@
33 position: absolute; 36 position: absolute;
34 left: 0; 37 left: 0;
35 right: 0; 38 right: 0;
36 - bottom: -15rpx; 39 + bottom: -20rpx;
37 margin: 0 auto; 40 margin: 0 auto;
38 } 41 }
39 .container{ 42 .container{
@@ -47,240 +50,208 @@ @@ -47,240 +50,208 @@
47 display: flex; 50 display: flex;
48 flex-flow: column; 51 flex-flow: column;
49 } 52 }
50 -.mid_item{  
51 - margin-top: 16rpx;  
52 - width:688rpx;  
53 - /* height:400rpx; */  
54 - background:rgba(249,250,252,1);  
55 - opacity:1;  
56 - border-radius:8rpx;  
57 - display: flex;  
58 - align-items: center;  
59 - flex-flow: column;  
60 - box-sizing: border-box;  
61 - padding: 52rpx 16rpx 48rpx;  
62 -}  
63 -.mid_item_top{  
64 - display: flex;  
65 - width: 100%;  
66 -}  
67 -.mid_item_top_left{  
68 - width:208rpx;  
69 - height:208rpx;  
70 - /* background:rgba(250,250,250,1); */  
71 - opacity:1;  
72 - display: flex;  
73 - flex-flow: column;  
74 -}  
75 -.top_left_pic{  
76 - width: 208rpx;  
77 - height: 160rpx;  
78 - display: flex;  
79 -}  
80 -.top_left_pic image{  
81 - width: 100%;  
82 - height: 100%;  
83 -}  
84 -.top_left_text{  
85 - width: 202rpx;  
86 - height:48rpx;  
87 - background:rgba(251,4,4,1);  
88 - opacity:0.2;  
89 - text-align: center;  
90 - font-size:24rpx;  
91 - font-family:PingFang SC;  
92 - font-weight:400;  
93 - line-height:48rpx;  
94 - color:rgba(255,255,255,1);  
95 -  
96 - overflow: hidden;  
97 - text-overflow: ellipsis;  
98 - white-space: nowrap;  
99 -}  
100 -.mid_item_top_right{  
101 - width: 100%;  
102 - margin-left: 14rpx;  
103 -}  
104 -.right_top{ 53 +.ware_box{
  54 + width:688rpx;
  55 + height:400rpx;
  56 + margin:32rpx auto;
  57 + background:#F9FAFC;
  58 +}
  59 +.ware_top{
  60 + overflow: hidden;
  61 + display: flex;
  62 + padding:32rpx 18rpx 0;
  63 +}
  64 +.ware_1{
  65 + width:312rpx;
  66 + height:208rpx;
  67 + position: relative;
  68 +}
  69 +.ware_1 image{
  70 + width:100%;
  71 + height:100%;
  72 +}
  73 +.ware_1_time{
  74 + position: absolute;
  75 + bottom:0;
  76 + width:208rpx;
  77 + height:48rpx;
  78 + color: white;
  79 + text-align: center;
  80 + line-height:48rpx;
  81 + font-size:24rpx;
  82 + background:#FAC8C8;
  83 + font-family:PingFang SC;
  84 +}
  85 +.ware_text{
  86 + margin-left:14rpx;
  87 + width:100%;
  88 +}
  89 +.ware_2{
105 display: flex; 90 display: flex;
106 - align-items: center;  
107 justify-content: space-between; 91 justify-content: space-between;
108 - margin-top: 20rpx;  
109 -}  
110 -.right_top_lef{  
111 - width: 270rpx;  
112 - font-size:32rpx;  
113 - font-family:PingFang SC;  
114 - font-weight:600;  
115 - color:rgba(51,51,51,1);  
116 - opacity:1;  
117 - overflow: hidden;  
118 - text-overflow: ellipsis;  
119 - white-space: nowrap;  
120 -}  
121 -.right_top_rig{  
122 - font-size:22rpx;  
123 - font-family:PingFang SC;  
124 - font-weight:400;  
125 - line-height:32rpx;  
126 - color:rgba(204,204,204,1);  
127 - opacity:1;  
128 -}  
129 -.right_mid{  
130 - margin-top: 16rpx;  
131 - display: flex;  
132 - align-items: center;  
133 -}  
134 -.right_mid_lef{  
135 - width:288rpx;  
136 - height:16rpx;  
137 - background:rgba(236,236,236,1);  
138 - opacity:1;  
139 - border-radius:8rpx;  
140 -}  
141 -.right_mid_lef_color{  
142 - width:206rpx;  
143 - height:16rpx;  
144 - background:rgba(181,222,150,1);  
145 - opacity:1;  
146 - border-radius:8rpx;  
147 -}  
148 -.right_mid_rig{  
149 - margin-left: 16rpx; 92 + align-content: center;
  93 +}
  94 +.ware_2Txt1{
  95 + font-size:32rpx;
  96 + font-family:PingFang SC;
  97 + font-weight:600;
  98 + line-height:44rpx;
  99 + color:rgba(51,51,51,1);
  100 +}
  101 +.ware_2Txt2{
  102 + font-size:22rpx;
  103 + /* margin-left:98rpx; */
  104 + font-family:PingFang SC;
  105 + font-weight:400;
  106 + line-height:32rpx;
  107 + color:rgba(204,204,204,1);
  108 +}
  109 +.ware_3 progress{
  110 + width:370rpx;
  111 + color:#B5DE96;
  112 + margin-top:24rpx;
  113 +}
  114 +.ware_4 text,.ware5_t2{
  115 + font-size:22rpx;
  116 + font-family:PingFang SC;
  117 + font-weight:400;
  118 + line-height:32rpx;
  119 + color:rgba(204,204,204,1);
  120 +}
  121 +.ware_5{
  122 + display: flex;
  123 + display: -webkit-flex;
  124 + justify-content: space-between;
  125 +}
  126 +.ware5_t1{
  127 + font-size:30rpx;
  128 + font-family:DIN 1451 Std Mittelschrift;
  129 + font-weight:400;
  130 + color:rgba(255,0,0,1);
  131 +}
  132 +.ware5_t3{
  133 + font-size:22rpx;
  134 + font-family:PingFang SC;
  135 + font-weight:400;
  136 + line-height:30rpx;
  137 + color:rgba(51,51,51,1);
  138 +}
  139 +.ware5_t4{
  140 + font-size:18rpx;
  141 + font-family:PingFang SC;
  142 + font-weight:400;
  143 + color:rgba(153,153,153,1);
  144 +}
  145 +.ware_6{
  146 + width:144rpx;
  147 + height:48rpx;
  148 + background:rgba(249,150,20,1);
  149 + box-shadow:0px 2rpx 12rpx rgba(255,145,0,0.16);
  150 + border-radius:24rpx;
  151 +}
  152 +.ware_6 view{
  153 + font-size:26rpx;
  154 + font-family:PingFang SC;
  155 + font-weight:400;
  156 + text-align: center;
  157 + line-height:48rpx;
  158 + color:rgba(255,255,255,1);
  159 +}
  160 +.ware_bot{
  161 + width:670rpx;
  162 + height:80rpx;
  163 + margin: auto;
  164 + display: flex;
  165 + line-height:80rpx;
  166 + margin-top:32rpx;
  167 + background-color:#F1F7F1;
  168 +}
  169 +.ware_bot_tit{
  170 + font-size:30rpx;
  171 + font-weight:bold;
  172 + margin-left:32rpx;
  173 + color:rgba(110,172,61,1);
  174 +}
  175 +.ware_bot_tit:after{
  176 + content:"";
  177 + margin:0 38rpx;
  178 + border-right:1px solid #B5DE96;
  179 +}
  180 +.ware_bot_txt{
  181 + font-size:24rpx;
  182 + font-family:PingFang SC;
  183 + font-weight:400;
  184 + color:rgba(153,153,153,1);
  185 +}
  186 +/* 规格 */
  187 +.spec{
  188 + width:100%;
  189 + padding:0 32rpx;
  190 + line-height:80rpx;
  191 + display: flex;
  192 + height:80rpx;
  193 + margin-top:8rpx;
  194 + background:white;
  195 +}
  196 +.spec_txt{
  197 + font-size:32rpx;
  198 + font-family:PingFang SC;
  199 + font-weight:400;
  200 + color:rgba(51,51,51,1);
  201 +}
  202 +.spec_txt2{
150 font-size:24rpx; 203 font-size:24rpx;
151 font-family:PingFang SC; 204 font-family:PingFang SC;
152 font-weight:400; 205 font-weight:400;
153 - line-height:34rpx;  
154 - color:rgba(181,222,150,1);  
155 - opacity:1;  
156 -}  
157 -.right_text{  
158 - margin-top: 14rpx;  
159 - font-size:22rpx;  
160 - font-family:PingFang SC;  
161 - font-weight:400;  
162 - color:rgba(204,204,204,1);  
163 - opacity:1;  
164 -}  
165 -.right_bottom{  
166 - display: flex;  
167 - align-items: center;  
168 - justify-content: space-between;  
169 -}  
170 -.RBM{  
171 - font-size: 22rpx;  
172 - color: #ff0000;  
173 -}  
174 -.number{  
175 - font-size: 30rpx;  
176 - color: #ff0000;  
177 -}  
178 -.text{  
179 -  
180 - font-size:22rpx;  
181 - font-family:PingFang SC;  
182 - font-weight:400;  
183 - line-height:32rpx;  
184 - color:rgba(204,204,204,1);  
185 - opacity:1;  
186 -}  
187 -.right_bottom_mid{  
188 - width: 122rpx;  
189 -}  
190 -.right_bottom_mid_t{  
191 -  
192 - font-size:22rpx;  
193 - font-family:PingFang SC;  
194 - font-weight:400;  
195 - color:rgba(51,51,51,1);  
196 - opacity:1;  
197 -  
198 - overflow: hidden;  
199 - text-overflow: ellipsis;  
200 - white-space: nowrap;  
201 -  
202 -}  
203 -.right_bottom_mid_b{  
204 - font-size:18rpx;  
205 - font-family:PingFang SC;  
206 - font-weight:400; 206 + margin-left:108rpx;
207 color:rgba(153,153,153,1); 207 color:rgba(153,153,153,1);
208 - opacity:1;  
209 -  
210 - overflow: hidden;  
211 - text-overflow: ellipsis;  
212 - white-space: nowrap;  
213 -}  
214 -.right_bottom_rig{  
215 - width:144rpx;  
216 - height:48rpx;  
217 - line-height: 48rpx;  
218 - background:rgba(249,150,20,1);  
219 - box-shadow:0rpx 2rpx 12rpx rgba(255,145,0,0.16);  
220 - opacity:1;  
221 - border-radius:24rpx;  
222 -  
223 - text-align: center;  
224 - font-size:26rpx;  
225 - font-family:PingFang SC;  
226 - font-weight:400;  
227 - color:rgba(255,255,255,1);  
228 -}  
229 -.mid_item_bottom{  
230 - margin-top: 32rpx;  
231 - width:640rpx;  
232 - height:80rpx;  
233 - background:rgba(181,222,150,0.1);  
234 - border-radius:16rpx;  
235 - display: flex;  
236 - align-items: center;  
237 - box-sizing: border-box;  
238 - padding: 0 32rpx;  
239 } 208 }
240 -.mid_item_bottom_left{  
241 - font-size:30rpx;  
242 - font-family:汉真广标;  
243 - font-weight:400;  
244 - color:rgba(110,172,61,1);  
245 - opacity:1;  
246 - 209 +/* 商品详情 */
  210 +.ware_detail{
  211 + width:100%;
  212 + margin-top:8rpx;
  213 + margin-bottom:96rpx;
  214 + padding-bottom:66rpx;
  215 + background: white;
  216 +}
  217 +.ware_detail_tit{
  218 + width:688rpx;
  219 + margin: auto;
  220 + display: flex;
  221 + padding:44rpx 0rpx 42rpx;
  222 + justify-content:space-around;
  223 + border-bottom:2rpx solid #F5F5F5;
  224 +}
  225 +.ware_detail .ware_active{
  226 + color:#6EAC3D;
  227 + font-weight:600;
  228 +}
  229 +.ware_active:after{
  230 + content: "";
  231 + width:16rpx;
  232 + height: 6rpx;
  233 + margin: auto;
  234 + display: block;
  235 + margin-top:6rpx;
  236 + border-radius:8rpx;
  237 + background:rgba(110,172,61,1);
  238 +}
  239 +.ware_detail_tit view{
  240 + font-size:28rpx;
  241 + font-family:PingFang SC;
  242 + font-weight:400;
  243 + color:rgba(153,153,153,1);
  244 +}
  245 +.ware_detailC{
  246 + width:688rpx;
  247 + margin:26rpx auto 0;
247 } 248 }
248 -.mid_line{  
249 - margin: 0 36rpx;  
250 - width:2rpx;  
251 - height:60rpx;  
252 - background:rgba(181,222,150,1);  
253 - opacity:1;  
254 - border-radius:4rpx; 249 +
  250 +.ware_detailImg{
  251 + width:688rpx;
  252 + height:470rpx;
255 } 253 }
256 -.mid_item_bottom_bot{  
257 - font-size:24rpx;  
258 - font-family:PingFang SC;  
259 - font-weight:400;  
260 - color:rgba(153,153,153,1);  
261 - opacity:1;  
262 - overflow: hidden;  
263 - text-overflow: ellipsis;  
264 - white-space: nowrap;  
265 -}  
266 -.text_color{  
267 - width:202rpx;  
268 - height:48rpx;  
269 - line-height: 48rpx;  
270 - text-align: center;  
271 - background:rgba(204,204,204,0.7);  
272 - font-size:24rpx;  
273 - font-family:PingFang SC;  
274 - font-weight:400;  
275 - color:rgba(255,255,255,1);  
276 - opacity:1;  
277 - overflow: hidden;  
278 - text-overflow: ellipsis;  
279 - white-space: nowrap;  
280 -}  
281 -.right_bottom_lef{  
282 - width: 140rpx;  
283 - overflow: hidden;  
284 - text-overflow: ellipsis;  
285 - white-space: nowrap; 254 +.ware_detailImg image{
  255 + width:100%;
  256 + height:100%;
286 } 257 }