正在显示
49 个修改的文件
包含
2291 行增加
和
858 行删除
@@ -84,6 +84,23 @@ App({ | @@ -84,6 +84,23 @@ App({ | ||
84 | }) | 84 | }) |
85 | }, | 85 | }, |
86 | 86 | ||
87 | + popSuccessTest(msg) { | ||
88 | + wx.showToast({ | ||
89 | + title: msg, | ||
90 | + icon: '', | ||
91 | + duration: 1300, | ||
92 | + mask: true | ||
93 | + }) | ||
94 | + }, | ||
95 | + popTest(msg) { | ||
96 | + wx.showToast({ | ||
97 | + title: msg, | ||
98 | + icon: 'none', | ||
99 | + duration: 1300, | ||
100 | + mask: true | ||
101 | + }) | ||
102 | + }, | ||
103 | + | ||
87 | globalData: { | 104 | globalData: { |
88 | userInfo: null, | 105 | userInfo: null, |
89 | baseUrl: 'https://car.goorcar.com/', | 106 | baseUrl: 'https://car.goorcar.com/', |
@@ -10,22 +10,22 @@ | @@ -10,22 +10,22 @@ | ||
10 | <view class="searchbox"> | 10 | <view class="searchbox"> |
11 | <view class="searchinput" bindtap="goSearch"> | 11 | <view class="searchinput" bindtap="goSearch"> |
12 | <image class="searchicon" src="{{imagesUrl}}assets/static/img/v-y.png" mode=""></image> | 12 | <image class="searchicon" src="{{imagesUrl}}assets/static/img/v-y.png" mode=""></image> |
13 | - <input bindinput="navtosearch" type="text" placeholder="搜索您想要的商品" placeholder-style="color:#C8C9CC;font-size:28rpx" value="" /> | 13 | + <input bindinput="navtosearch" type="text" placeholder="搜索你想要的4S店产品" placeholder-style="color:#C8C9CC;font-size:28rpx" value="" /> |
14 | </view> | 14 | </view> |
15 | </view> | 15 | </view> |
16 | <view class="top_tit"> | 16 | <view class="top_tit"> |
17 | <view class="tit_list"> | 17 | <view class="tit_list"> |
18 | <view class="tit_item"> | 18 | <view class="tit_item"> |
19 | <image src="{{imagesUrl}}assets/static/img/a_2.png" /> | 19 | <image src="{{imagesUrl}}assets/static/img/a_2.png" /> |
20 | - <view class="item_names">口碑商品</view> | 20 | + <view class="item_names">品牌授权</view> |
21 | </view> | 21 | </view> |
22 | <view class="tit_item"> | 22 | <view class="tit_item"> |
23 | <image src="{{imagesUrl}}assets/static/img/a_3.png" /> | 23 | <image src="{{imagesUrl}}assets/static/img/a_3.png" /> |
24 | - <view class="item_names">仓储供应</view> | 24 | + <view class="item_names">品质保障</view> |
25 | </view> | 25 | </view> |
26 | <view class="tit_item"> | 26 | <view class="tit_item"> |
27 | <image src="{{imagesUrl}}assets/static/img/a_1.png" /> | 27 | <image src="{{imagesUrl}}assets/static/img/a_1.png" /> |
28 | - <view class="item_names">品质担保</view> | 28 | + <view class="item_names">服务担保</view> |
29 | </view> | 29 | </view> |
30 | </view> | 30 | </view> |
31 | </view> | 31 | </view> |
@@ -8,6 +8,105 @@ Page({ | @@ -8,6 +8,105 @@ Page({ | ||
8 | _num: 1, | 8 | _num: 1, |
9 | way: 1, | 9 | way: 1, |
10 | MyGarageNoCar: [], | 10 | MyGarageNoCar: [], |
11 | + | ||
12 | + list: [{ | ||
13 | + id: 0, | ||
14 | + title: '标题1', | ||
15 | + create_time: '2019-09-06' | ||
16 | + }, { | ||
17 | + id: 1, | ||
18 | + title: '标题2', | ||
19 | + create_time: '2019-09-06' | ||
20 | + }, { | ||
21 | + id: 2, | ||
22 | + title: '标题3', | ||
23 | + create_time: '2019-09-06' | ||
24 | + }], | ||
25 | + | ||
26 | + startX: 0, //开始坐标 | ||
27 | + startY: 0, | ||
28 | + page: 1, | ||
29 | + is_cloose: false, | ||
30 | + | ||
31 | + }, | ||
32 | + | ||
33 | + | ||
34 | + touchE: function (e) { | ||
35 | + // console.log(e); | ||
36 | + var that = this | ||
37 | + if (e.changedTouches.length == 1) { | ||
38 | + //手指移动结束后触摸点位置的X坐标 | ||
39 | + var endX = e.changedTouches[0].clientX; | ||
40 | + //触摸开始与结束,手指移动的距离 | ||
41 | + var disX = that.data.startX - endX; | ||
42 | + var delBtnWidth = that.data.delBtnWidth; | ||
43 | + //如果距离小于删除按钮的1/2,不显示删除按钮 | ||
44 | + var txtStyle = disX > delBtnWidth / 2 ? "left:-" + delBtnWidth + "rpx" : "left:0rpx"; | ||
45 | + //获取手指触摸的是哪一项 | ||
46 | + var index = e.currentTarget.dataset.index; | ||
47 | + var MyGarageNoCar = that.data.MyGarageNoCar; | ||
48 | + MyGarageNoCar[index].txtStyle = txtStyle; | ||
49 | + //更新列表的状态 | ||
50 | + that.setData({ | ||
51 | + MyGarageNoCar: MyGarageNoCar | ||
52 | + }); | ||
53 | + } | ||
54 | + }, | ||
55 | + //手指触摸动作开始 记录起点X坐标 | ||
56 | + touchstart: function (e) { | ||
57 | + //开始触摸时 重置所有删除 | ||
58 | + this.data.MyGarageNoCar.forEach(function (v, i) { | ||
59 | + if (v.isTouchMove) //只操作为true的 | ||
60 | + v.isTouchMove = false; | ||
61 | + }) | ||
62 | + this.setData({ | ||
63 | + startX: e.changedTouches[0].clientX, | ||
64 | + startY: e.changedTouches[0].clientY, | ||
65 | + MyGarageNoCar: this.data.MyGarageNoCar | ||
66 | + }) | ||
67 | + }, | ||
68 | + //滑动事件处理 | ||
69 | + touchmove: function (e) { | ||
70 | + var that = this, | ||
71 | + index = e.currentTarget.dataset.index, //当前索引 | ||
72 | + startX = that.data.startX, //开始X坐标 | ||
73 | + startY = that.data.startY, //开始Y坐标 | ||
74 | + touchMoveX = e.changedTouches[0].clientX, //滑动变化坐标 | ||
75 | + touchMoveY = e.changedTouches[0].clientY, //滑动变化坐标 | ||
76 | + //获取滑动角度 | ||
77 | + angle = that.angle({ | ||
78 | + X: startX, | ||
79 | + Y: startY | ||
80 | + }, { | ||
81 | + X: touchMoveX, | ||
82 | + Y: touchMoveY | ||
83 | + }); | ||
84 | + that.data.MyGarageNoCar.forEach(function (v, i) { | ||
85 | + v.isTouchMove = false | ||
86 | + //滑动超过30度角 return | ||
87 | + if (Math.abs(angle) > 30) return; | ||
88 | + if (i == index) { | ||
89 | + if (touchMoveX > startX) //右滑 | ||
90 | + v.isTouchMove = false | ||
91 | + else //左滑 | ||
92 | + v.isTouchMove = true | ||
93 | + } | ||
94 | + }) | ||
95 | + //更新数据 | ||
96 | + that.setData({ | ||
97 | + MyGarageNoCar: that.data.MyGarageNoCar | ||
98 | + }) | ||
99 | + }, | ||
100 | + /** | ||
101 | + * 计算滑动角度 | ||
102 | + * @param {Object} start 起点坐标 | ||
103 | + * @param {Object} end 终点坐标 | ||
104 | + */ | ||
105 | + angle: function (start, end) { | ||
106 | + var _X = end.X - start.X, | ||
107 | + _Y = end.Y - start.Y | ||
108 | + //返回角度 /Math.atan()返回数字的反正切值 | ||
109 | + return 360 * Math.atan(_Y / _X) / (2 * Math.PI); | ||
11 | }, | 110 | }, |
12 | 111 | ||
13 | 112 | ||
@@ -29,18 +128,21 @@ Page({ | @@ -29,18 +128,21 @@ Page({ | ||
29 | }, | 128 | }, |
30 | onShow: function () { | 129 | onShow: function () { |
31 | this.getMyGarageNoCar() | 130 | this.getMyGarageNoCar() |
131 | + | ||
32 | }, | 132 | }, |
33 | getMyGarageNoCar() { //获取待 | 133 | getMyGarageNoCar() { //获取待 |
34 | let that = this | 134 | let that = this |
35 | let cat = that.data._num | 135 | let cat = that.data._num |
36 | if (cat == 1) { | 136 | if (cat == 1) { |
37 | that.setData({ | 137 | that.setData({ |
38 | - way: 1 | 138 | + way: 1, |
139 | + is_cloose: false | ||
39 | }) | 140 | }) |
40 | that.getadd() | 141 | that.getadd() |
41 | } else { | 142 | } else { |
42 | that.setData({ | 143 | that.setData({ |
43 | - way: 2 | 144 | + way: 2, |
145 | + is_cloose: false | ||
44 | }) | 146 | }) |
45 | that.getadd() | 147 | that.getadd() |
46 | } | 148 | } |
@@ -66,6 +168,15 @@ Page({ | @@ -66,6 +168,15 @@ Page({ | ||
66 | that.setData({ | 168 | that.setData({ |
67 | MyGarageNoCar: data | 169 | MyGarageNoCar: data |
68 | }) | 170 | }) |
171 | + if (data.length != 0) { | ||
172 | + that.setData({ | ||
173 | + is_cloose: false | ||
174 | + }) | ||
175 | + } else { | ||
176 | + that.setData({ | ||
177 | + is_cloose: true | ||
178 | + }) | ||
179 | + } | ||
69 | console.log(that.data.MyGarageNoCar, "有赞"); | 180 | console.log(that.data.MyGarageNoCar, "有赞"); |
70 | } catch (err) { | 181 | } catch (err) { |
71 | console.log(err); | 182 | console.log(err); |
@@ -77,6 +188,50 @@ Page({ | @@ -77,6 +188,50 @@ Page({ | ||
77 | 188 | ||
78 | }, | 189 | }, |
79 | 190 | ||
191 | + delOrder(e) { // 删除 | ||
192 | + let that = this | ||
193 | + wx.showModal({ | ||
194 | + title: '提示', | ||
195 | + content: '确定要删除该商品吗?', | ||
196 | + success: async function (res) { | ||
197 | + if (res.confirm) { | ||
198 | + try { | ||
199 | + const { | ||
200 | + data | ||
201 | + } = await request({ | ||
202 | + url: 'api/new2/zanShareDel', | ||
203 | + data: { | ||
204 | + id: e.currentTarget.dataset.id | ||
205 | + } | ||
206 | + }) | ||
207 | + console.log(data, "删除"); | ||
208 | + if (data.code == 1) { | ||
209 | + let msg = data.msg | ||
210 | + a.popSuccessTest(msg) | ||
211 | + setTimeout(() => { | ||
212 | + that.getMyGarageNoCar() | ||
213 | + | ||
214 | + }, 1000); | ||
215 | + } else { | ||
216 | + let msg = data.msg | ||
217 | + a.popTest(msg) | ||
218 | + | ||
219 | + } | ||
220 | + } catch (err) { | ||
221 | + let msg = err.msg | ||
222 | + a.popTest(msg) | ||
223 | + | ||
224 | + | ||
225 | + } | ||
226 | + } else { | ||
227 | + | ||
228 | + } | ||
229 | + } | ||
230 | + | ||
231 | + }) | ||
232 | + | ||
233 | + | ||
234 | + }, | ||
80 | storeDetail(e) { | 235 | storeDetail(e) { |
81 | console.log(e); | 236 | console.log(e); |
82 | let id = e.currentTarget.dataset.id | 237 | let id = e.currentTarget.dataset.id |
@@ -89,13 +244,15 @@ Page({ | @@ -89,13 +244,15 @@ Page({ | ||
89 | title: this.data.msg, | 244 | title: this.data.msg, |
90 | icon: '', | 245 | icon: '', |
91 | duration: 1300, | 246 | duration: 1300, |
247 | + mask: true | ||
92 | }) | 248 | }) |
93 | }, | 249 | }, |
94 | popTest() { | 250 | popTest() { |
95 | wx.showToast({ | 251 | wx.showToast({ |
96 | title: this.data.msg, | 252 | title: this.data.msg, |
97 | icon: 'none', | 253 | icon: 'none', |
98 | - duration: 1300 | 254 | + duration: 1300, |
255 | + mask: true | ||
99 | }) | 256 | }) |
100 | }, | 257 | }, |
101 | 258 |
@@ -49,152 +49,200 @@ | @@ -49,152 +49,200 @@ | ||
49 | } | 49 | } |
50 | 50 | ||
51 | .smallcontainer { | 51 | .smallcontainer { |
52 | - padding: 32rpx; | 52 | + padding: 32rpx 0; |
53 | box-sizing: border-box; | 53 | box-sizing: border-box; |
54 | 54 | ||
55 | 55 | ||
56 | /* 列表 */ | 56 | /* 列表 */ |
57 | .like_list { | 57 | .like_list { |
58 | - width: 100%; | ||
59 | height: 100%; | 58 | height: 100%; |
60 | - display: flex; | ||
61 | - padding: 30rpx 0; | ||
62 | - box-sizing: border-box; | ||
63 | border-bottom: 1rpx solid #F2F2F2; | 59 | border-bottom: 1rpx solid #F2F2F2; |
64 | 60 | ||
65 | - .list_left { | ||
66 | - width: 208rpx; | ||
67 | - height: 208rpx; | ||
68 | - flex: 0 0 auto; | 61 | + .fei_del { |
62 | + display: flex; | ||
63 | + padding: 32rpx 0 32rpx 32rpx; | ||
64 | + box-sizing: border-box; | ||
69 | 65 | ||
70 | - image { | ||
71 | - width: 100%; | ||
72 | - height: 100%; | ||
73 | - border-radius: 8rpx; | ||
74 | - } | ||
75 | - } | 66 | + .list_left { |
67 | + width: 208rpx; | ||
68 | + height: 208rpx; | ||
69 | + flex: 0 0 auto; | ||
76 | 70 | ||
77 | - .list_right { | ||
78 | - padding-left: 40rpx; | ||
79 | - box-sizing: border-box; | ||
80 | - flex: 1; | ||
81 | - height: 208rpx; | ||
82 | - display: flex; | ||
83 | - flex-direction: column; | ||
84 | - justify-content: space-between; | ||
85 | - | ||
86 | - .list_right_content { | ||
87 | - font-size: 28rpx; | ||
88 | - line-height: 38rpx; | ||
89 | - height: 82rpx; | ||
90 | - color: rgba(6, 18, 31, 1); | ||
91 | - display: -webkit-box; | ||
92 | - -webkit-line-clamp: 2; | ||
93 | - overflow: hidden; | ||
94 | - text-overflow: ellipsis; | ||
95 | - -webkit-box-orient: vertical; | 71 | + image { |
72 | + width: 100%; | ||
73 | + height: 100%; | ||
74 | + border-radius: 8rpx; | ||
75 | + } | ||
96 | } | 76 | } |
97 | 77 | ||
98 | - .newzeng { | ||
99 | - width: 100%; | 78 | + .list_right { |
79 | + padding: 0 32rpx; | ||
80 | + box-sizing: border-box; | ||
81 | + flex: 1; | ||
82 | + height: 208rpx; | ||
100 | display: flex; | 83 | display: flex; |
101 | - align-items: center; | 84 | + flex-direction: column; |
85 | + justify-content: space-between; | ||
102 | 86 | ||
103 | - .status_change { | ||
104 | - padding: 5rpx 10rpx; | ||
105 | - color: #E8370F; | ||
106 | - border: 1rpx solid #E8370F; | ||
107 | - font-size: 24rpx; | 87 | + .list_right_content { |
88 | + font-size: 28rpx; | ||
89 | + line-height: 38rpx; | ||
90 | + height: 82rpx; | ||
91 | + color: rgba(6, 18, 31, 1); | ||
92 | + display: -webkit-box; | ||
93 | + -webkit-line-clamp: 2; | ||
94 | + overflow: hidden; | ||
95 | + text-overflow: ellipsis; | ||
96 | + -webkit-box-orient: vertical; | ||
108 | } | 97 | } |
109 | 98 | ||
110 | - .rit_text { | ||
111 | - margin-left: 30rpx; | 99 | + .newzeng { |
100 | + width: 100%; | ||
112 | display: flex; | 101 | display: flex; |
113 | align-items: center; | 102 | align-items: center; |
114 | 103 | ||
115 | - .numPer { | ||
116 | - color: #FF444B; | 104 | + .status_change { |
105 | + padding: 5rpx 10rpx; | ||
106 | + color: #E8370F; | ||
107 | + border: 1rpx solid #E8370F; | ||
117 | font-size: 24rpx; | 108 | font-size: 24rpx; |
118 | } | 109 | } |
119 | 110 | ||
120 | - .numperson { | ||
121 | - font-size: 24rpx; | ||
122 | - color: #8C9198; | ||
123 | - } | ||
124 | - | ||
125 | - } | ||
126 | - | ||
127 | - } | ||
128 | - | ||
129 | - .list_right_box { | ||
130 | - display: flex; | ||
131 | - align-items: center; | ||
132 | - justify-content: space-between; | ||
133 | - | ||
134 | - .let { | ||
135 | - | ||
136 | - display: flex; | ||
137 | - align-items: baseline; | ||
138 | - | ||
139 | - .del { | ||
140 | - margin-left: 10rpx; | 111 | + .rit_text { |
112 | + margin-left: 30rpx; | ||
113 | + display: flex; | ||
114 | + align-items: center; | ||
141 | 115 | ||
142 | - .money_icon_ { | ||
143 | - font-size: 20rpx; | ||
144 | - line-height: 42rpx; | ||
145 | - color: #8C9198; | 116 | + .numPer { |
117 | + color: #FF444B; | ||
118 | + font-size: 24rpx; | ||
146 | } | 119 | } |
147 | 120 | ||
148 | - .del_price_ { | 121 | + .numperson { |
149 | font-size: 24rpx; | 122 | font-size: 24rpx; |
150 | color: #8C9198; | 123 | color: #8C9198; |
151 | - text-decoration: line-through; | ||
152 | } | 124 | } |
125 | + | ||
153 | } | 126 | } |
154 | 127 | ||
155 | - .zan_price { | 128 | + } |
129 | + | ||
130 | + .list_right_box { | ||
131 | + display: flex; | ||
132 | + align-items: center; | ||
133 | + justify-content: space-between; | ||
134 | + | ||
135 | + .let { | ||
136 | + | ||
156 | display: flex; | 137 | display: flex; |
157 | align-items: baseline; | 138 | align-items: baseline; |
158 | - line-height: 55rpx; | ||
159 | - font-weight: bold; | ||
160 | - justify-content: space-between; | ||
161 | - | ||
162 | - .icon_name { | ||
163 | - font-size: 28rpx; | ||
164 | - color: #FF444B; | ||
165 | - } | ||
166 | 139 | ||
167 | - .money_icon { | 140 | + .del_priced { |
168 | margin-left: 10rpx; | 141 | margin-left: 10rpx; |
169 | - font-size: 20rpx; | ||
170 | - line-height: 42rpx; | ||
171 | - color: #FF444B; | ||
172 | - } | ||
173 | 142 | ||
174 | - .price_big { | ||
175 | - color: #FF444B; | ||
176 | - font-size: 32rpx; | 143 | + .money_icon_ { |
144 | + font-size: 20rpx; | ||
145 | + line-height: 42rpx; | ||
146 | + color: #8C9198; | ||
147 | + } | ||
148 | + | ||
149 | + .del_price_ { | ||
150 | + font-size: 24rpx; | ||
151 | + color: #8C9198; | ||
152 | + text-decoration: line-through; | ||
153 | + } | ||
177 | } | 154 | } |
178 | 155 | ||
156 | + .zan_price { | ||
157 | + display: flex; | ||
158 | + align-items: baseline; | ||
159 | + line-height: 55rpx; | ||
160 | + font-weight: bold; | ||
161 | + justify-content: space-between; | ||
162 | + | ||
163 | + .icon_name { | ||
164 | + font-size: 28rpx; | ||
165 | + color: #FF444B; | ||
166 | + } | ||
179 | 167 | ||
168 | + .money_icon { | ||
169 | + margin-left: 10rpx; | ||
170 | + font-size: 20rpx; | ||
171 | + line-height: 42rpx; | ||
172 | + color: #FF444B; | ||
173 | + } | ||
180 | 174 | ||
175 | + .price_big { | ||
176 | + color: #FF444B; | ||
177 | + font-size: 32rpx; | ||
178 | + } | ||
181 | 179 | ||
182 | 180 | ||
181 | + | ||
182 | + | ||
183 | + | ||
184 | + } | ||
185 | + | ||
183 | } | 186 | } |
184 | 187 | ||
185 | - } | 188 | + .dateTime { |
189 | + // height: 40rpx; | ||
190 | + font-size: 24rpx; | ||
191 | + color: #8C9198; | ||
186 | 192 | ||
187 | - .dateTime { | ||
188 | - // height: 40rpx; | ||
189 | - font-size: 24rpx; | ||
190 | - color: #8C9198; | 193 | + } |
191 | 194 | ||
192 | } | 195 | } |
193 | - | ||
194 | } | 196 | } |
195 | } | 197 | } |
196 | } | 198 | } |
197 | 199 | ||
200 | + .touch_item { | ||
201 | + display: flex; | ||
202 | + justify-content: space-between; | ||
203 | + max-width: 750rpx; | ||
204 | + overflow: hidden; | ||
205 | + margin-bottom: 10rpx; | ||
206 | + background: #f5f5f5; | ||
207 | + | ||
208 | + .content { | ||
209 | + width: 100%; | ||
210 | + margin-right: 0; | ||
211 | + -webkit-transition: all 0.4s; | ||
212 | + transition: all 0.4s; | ||
213 | + -webkit-transform: translateX(90px); | ||
214 | + transform: translateX(90px); | ||
215 | + margin-left: -90px; | ||
216 | + | ||
217 | + } | ||
218 | + | ||
219 | + | ||
220 | + .del { | ||
221 | + width: 90px; | ||
222 | + display: flex; | ||
223 | + flex-direction: column; | ||
224 | + align-items: center; | ||
225 | + justify-content: center; | ||
226 | + color: #fff; | ||
227 | + background-color: #e8370f; | ||
228 | + -webkit-transform: translateX(90px); | ||
229 | + transform: translateX(90px); | ||
230 | + -webkit-transition: all 0.4s; | ||
231 | + transition: all 0.4s; | ||
232 | + font-size: 35rpx; | ||
233 | + | ||
234 | + } | ||
235 | + } | ||
236 | + | ||
237 | + .touch_move_active { | ||
238 | + | ||
239 | + .del, | ||
240 | + .content { | ||
241 | + -webkit-transform: translateX(0); | ||
242 | + transform: translateX(0); | ||
243 | + } | ||
244 | + } | ||
245 | + | ||
198 | /* 没图片的样式 */ | 246 | /* 没图片的样式 */ |
199 | .like_list_1 { | 247 | .like_list_1 { |
200 | width: 100%; | 248 | width: 100%; |
@@ -300,6 +348,8 @@ | @@ -300,6 +348,8 @@ | ||
300 | 348 | ||
301 | } | 349 | } |
302 | 350 | ||
351 | + | ||
352 | + | ||
303 | } | 353 | } |
304 | 354 | ||
305 | .noCar { | 355 | .noCar { |
@@ -322,4 +372,50 @@ | @@ -322,4 +372,50 @@ | ||
322 | } | 372 | } |
323 | 373 | ||
324 | 374 | ||
375 | + | ||
376 | + .touch_item { | ||
377 | + display: flex; | ||
378 | + justify-content: space-between; | ||
379 | + max-width: 750rpx; | ||
380 | + overflow: hidden; | ||
381 | + margin-bottom: 10rpx; | ||
382 | + background: #f5f5f5; | ||
383 | + height: 216rpx; | ||
384 | + | ||
385 | + .content { | ||
386 | + width: 100%; | ||
387 | + margin-right: 0; | ||
388 | + -webkit-transition: all 0.4s; | ||
389 | + transition: all 0.4s; | ||
390 | + -webkit-transform: translateX(90px); | ||
391 | + transform: translateX(90px); | ||
392 | + margin-left: -90px; | ||
393 | + | ||
394 | + .item { | ||
395 | + width: 100%; | ||
396 | + background-color: #fffccc; | ||
397 | + } | ||
398 | + } | ||
399 | + | ||
400 | + | ||
401 | + .del { | ||
402 | + width: 90px; | ||
403 | + display: flex; | ||
404 | + flex-direction: column; | ||
405 | + align-items: center; | ||
406 | + justify-content: center; | ||
407 | + color: #fff; | ||
408 | + background-color: #cccfff; | ||
409 | + -webkit-transform: translateX(90px); | ||
410 | + transform: translateX(90px); | ||
411 | + -webkit-transition: all 0.4s; | ||
412 | + transition: all 0.4s; | ||
413 | + font-size: 35rpx; | ||
414 | + } | ||
415 | + } | ||
416 | + | ||
417 | + | ||
418 | + | ||
419 | + | ||
420 | + | ||
325 | } | 421 | } |
@@ -8,72 +8,86 @@ | @@ -8,72 +8,86 @@ | ||
8 | </view> | 8 | </view> |
9 | </view> | 9 | </view> |
10 | <view class="smallcontainer" wx:if="{{MyGarageNoCar.length > 0}}"> | 10 | <view class="smallcontainer" wx:if="{{MyGarageNoCar.length > 0}}"> |
11 | - <view wx:for="{{MyGarageNoCar}}" wx:key="*this" wx:for-item="item"> | ||
12 | - <view wx:if="{{item.good.img !=''}}" class="like_list" bindtap="storeDetail" data-num="1" data-id="{{item.good.id}}"> | ||
13 | - <view class="list_left"> | ||
14 | - <image src="{{item.good.img}}"></image> | ||
15 | - </view> | ||
16 | - <view class="list_right"> | ||
17 | - <text class="list_right_content">{{item.good.name}}</text> | ||
18 | - <view class="newzeng"> | ||
19 | - <view class="status_change">{{item.good.shop_type}}</view> | ||
20 | - <view class="rit_text"> | ||
21 | - <text class="numPer">{{item.good.sales_initial}}</text> | ||
22 | - <text class="numperson">位车友推荐</text> | ||
23 | - </view> | 11 | + <view wx:for="{{MyGarageNoCar}}" wx:key="index" wx:for-index="index" wx:for-item="item"> |
12 | + <view wx:if="{{item.good.img !=''}}" class="like_list touch_item {{item.isTouchMove ? 'touch_move_active' : ''}}" bindtap="storeDetail" data-num="1" data-id="{{item.good.id}}"> | ||
13 | + <view class="fei_del content " style="{{item.txtStyle}}" data-index='{{index}}' bindtouchstart="touchstart" bindtouchmove="touchmove" bindtouchend="touchE"> | ||
14 | + <view class="list_left"> | ||
15 | + <image src="{{item.good.img}}"></image> | ||
24 | </view> | 16 | </view> |
25 | - <view class="list_right_box"> | ||
26 | - <view class="let"> | ||
27 | - <view class="zan_price"> | ||
28 | - <text class="icon_name">点赞价:</text> | ||
29 | - <text class="money_icon">¥</text> | ||
30 | - <text class="price_big">{{item.good.price}}</text> | 17 | + <view class="list_right"> |
18 | + <text class="list_right_content">{{item.good.name}}</text> | ||
19 | + <view class="newzeng"> | ||
20 | + <view class="status_change">{{item.good.shop_type}}</view> | ||
21 | + <view class="rit_text"> | ||
22 | + <text class="numPer">{{item.good.sales_initial}}</text> | ||
23 | + <text class="numperson">位车友推荐</text> | ||
31 | </view> | 24 | </view> |
32 | - <view class="del"> | ||
33 | - <text class="money_icon_">¥</text> | ||
34 | - <text class="del_price_">{{item.good.line_price}}</text> | 25 | + </view> |
26 | + <view class="list_right_box"> | ||
27 | + <view class="let"> | ||
28 | + <view class="zan_price"> | ||
29 | + <text class="icon_name">点赞价:</text> | ||
30 | + <text class="money_icon">¥</text> | ||
31 | + <text class="price_big">{{item.good.price}}</text> | ||
32 | + </view> | ||
33 | + <view class="del_priced"> | ||
34 | + <text class="money_icon_">¥</text> | ||
35 | + <text class="del_price_">{{item.good.line_price}}</text> | ||
36 | + </view> | ||
35 | </view> | 37 | </view> |
38 | + <view class="dateTime">{{item.good.have_num}}/{{item.good.num}}</view> | ||
36 | </view> | 39 | </view> |
37 | - <view class="dateTime">{{item.good.have_num}}/{{item.good.num}}</view> | ||
38 | </view> | 40 | </view> |
39 | </view> | 41 | </view> |
42 | + <view class="del" data-id="{{item.good.id}}" catchtap="delOrder" data-index="{{index}}"> | ||
43 | + 删除 | ||
44 | + </view> | ||
40 | </view> | 45 | </view> |
41 | <view class="like_list_1" wx:else bindtap="storeDetail" data-id="{{item.good.id}}" data-num="2"> | 46 | <view class="like_list_1" wx:else bindtap="storeDetail" data-id="{{item.good.id}}" data-num="2"> |
42 | - <text class="title_content2">{{item.good.name}}</text> | ||
43 | - <view class="down_next"> | ||
44 | - <view class="newzeng"> | ||
45 | - <view class="status_change">{{item.good.shop_type}}</view> | ||
46 | - <view class="rit_text"> | ||
47 | - <text class="numPer">{{item.good.sales_initial}}</text> | ||
48 | - <text class="numperson">位车友推荐</text> | ||
49 | - </view> | ||
50 | - </view> | ||
51 | - <view class="price_dP_"> | ||
52 | - <view class="let"> | ||
53 | - <view class="zan_price_"> | ||
54 | - <text class="icon_name_">点赞价:</text> | ||
55 | - <text class="money_icon_">¥</text> | ||
56 | - <text class="price_big_">{{item.good.price}}</text> | 47 | + <view class="fei_del"> |
48 | + <text class="title_content2">{{item.good.name}}</text> | ||
49 | + <view class="down_next"> | ||
50 | + <view class="newzeng"> | ||
51 | + <view class="status_change">{{item.good.shop_type}}</view> | ||
52 | + <view class="rit_text"> | ||
53 | + <text class="numPer">{{item.good.sales_initial}}</text> | ||
54 | + <text class="numperson">位车友推荐</text> | ||
57 | </view> | 55 | </view> |
58 | - <view class="del"> | ||
59 | - <text class="money_icon_">¥</text> | ||
60 | - <text class="del_price_">{{item.good.line_price}}</text> | 56 | + </view> |
57 | + <view class="price_dP_"> | ||
58 | + <view class="let"> | ||
59 | + <view class="zan_price_"> | ||
60 | + <text class="icon_name_">点赞价:</text> | ||
61 | + <text class="money_icon_">¥</text> | ||
62 | + <text class="price_big_">{{item.good.price}}</text> | ||
63 | + </view> | ||
64 | + <view class="del"> | ||
65 | + <text class="money_icon_">¥</text> | ||
66 | + <text class="del_price_">{{item.good.line_price}}</text> | ||
67 | + </view> | ||
61 | </view> | 68 | </view> |
69 | + <view class="dateTime">{{item.good.have_num}}/{{item.good.num}}</view> | ||
62 | </view> | 70 | </view> |
63 | - <view class="dateTime">{{item.good.have_num}}/{{item.good.num}}</view> | ||
64 | </view> | 71 | </view> |
65 | </view> | 72 | </view> |
73 | + <view class="del" data-id="{{item.good.id}}" catchtap="delBtn" data-index="{{index}}"> | ||
74 | + 删除 | ||
75 | + </view> | ||
66 | </view> | 76 | </view> |
67 | </view> | 77 | </view> |
68 | </view> | 78 | </view> |
69 | <view wx:else> | 79 | <view wx:else> |
70 | <view class="noCar" wx:if="{{way ==1}}"> | 80 | <view class="noCar" wx:if="{{way ==1}}"> |
71 | - <view class="c">挑选有赞商品</view> | ||
72 | - <view class="c">喊好友助力可享超低折扣</view> | 81 | + <block wx:if="{{is_cloose}}"> |
82 | + <view class="c">挑选有赞商品</view> | ||
83 | + <view class="c">喊好友助力可享超低折扣</view> | ||
84 | + </block> | ||
73 | </view> | 85 | </view> |
74 | <view class="noCar" wx:else> | 86 | <view class="noCar" wx:else> |
75 | - <view class="c">您尚无好朋友为你点赞</view> | ||
76 | - <view class="c">要和好朋友常联系哦</view> | 87 | + <block wx:if="{{is_cloose}}"> |
88 | + <view class="c">您尚无好朋友为你点赞</view> | ||
89 | + <view class="c">要和好朋友常联系哦</view> | ||
90 | + </block> | ||
77 | </view> | 91 | </view> |
78 | </view> | 92 | </view> |
79 | </view> | 93 | </view> |
@@ -40,31 +40,32 @@ | @@ -40,31 +40,32 @@ | ||
40 | text-align: center; | 40 | text-align: center; |
41 | } | 41 | } |
42 | .container .smallcontainer { | 42 | .container .smallcontainer { |
43 | - padding: 32rpx; | 43 | + padding: 32rpx 0; |
44 | box-sizing: border-box; | 44 | box-sizing: border-box; |
45 | /* 列表 */ | 45 | /* 列表 */ |
46 | /* 没图片的样式 */ | 46 | /* 没图片的样式 */ |
47 | } | 47 | } |
48 | .container .smallcontainer .like_list { | 48 | .container .smallcontainer .like_list { |
49 | - width: 100%; | ||
50 | height: 100%; | 49 | height: 100%; |
50 | + border-bottom: 1rpx solid #F2F2F2; | ||
51 | +} | ||
52 | +.container .smallcontainer .like_list .fei_del { | ||
51 | display: flex; | 53 | display: flex; |
52 | - padding: 30rpx 0; | 54 | + padding: 32rpx 0 32rpx 32rpx; |
53 | box-sizing: border-box; | 55 | box-sizing: border-box; |
54 | - border-bottom: 1rpx solid #F2F2F2; | ||
55 | } | 56 | } |
56 | -.container .smallcontainer .like_list .list_left { | 57 | +.container .smallcontainer .like_list .fei_del .list_left { |
57 | width: 208rpx; | 58 | width: 208rpx; |
58 | height: 208rpx; | 59 | height: 208rpx; |
59 | flex: 0 0 auto; | 60 | flex: 0 0 auto; |
60 | } | 61 | } |
61 | -.container .smallcontainer .like_list .list_left image { | 62 | +.container .smallcontainer .like_list .fei_del .list_left image { |
62 | width: 100%; | 63 | width: 100%; |
63 | height: 100%; | 64 | height: 100%; |
64 | border-radius: 8rpx; | 65 | border-radius: 8rpx; |
65 | } | 66 | } |
66 | -.container .smallcontainer .like_list .list_right { | ||
67 | - padding-left: 40rpx; | 67 | +.container .smallcontainer .like_list .fei_del .list_right { |
68 | + padding: 0 32rpx; | ||
68 | box-sizing: border-box; | 69 | box-sizing: border-box; |
69 | flex: 1; | 70 | flex: 1; |
70 | height: 208rpx; | 71 | height: 208rpx; |
@@ -72,7 +73,7 @@ | @@ -72,7 +73,7 @@ | ||
72 | flex-direction: column; | 73 | flex-direction: column; |
73 | justify-content: space-between; | 74 | justify-content: space-between; |
74 | } | 75 | } |
75 | -.container .smallcontainer .like_list .list_right .list_right_content { | 76 | +.container .smallcontainer .like_list .fei_del .list_right .list_right_content { |
76 | font-size: 28rpx; | 77 | font-size: 28rpx; |
77 | line-height: 38rpx; | 78 | line-height: 38rpx; |
78 | height: 82rpx; | 79 | height: 82rpx; |
@@ -83,77 +84,113 @@ | @@ -83,77 +84,113 @@ | ||
83 | text-overflow: ellipsis; | 84 | text-overflow: ellipsis; |
84 | -webkit-box-orient: vertical; | 85 | -webkit-box-orient: vertical; |
85 | } | 86 | } |
86 | -.container .smallcontainer .like_list .list_right .newzeng { | 87 | +.container .smallcontainer .like_list .fei_del .list_right .newzeng { |
87 | width: 100%; | 88 | width: 100%; |
88 | display: flex; | 89 | display: flex; |
89 | align-items: center; | 90 | align-items: center; |
90 | } | 91 | } |
91 | -.container .smallcontainer .like_list .list_right .newzeng .status_change { | 92 | +.container .smallcontainer .like_list .fei_del .list_right .newzeng .status_change { |
92 | padding: 5rpx 10rpx; | 93 | padding: 5rpx 10rpx; |
93 | color: #E8370F; | 94 | color: #E8370F; |
94 | border: 1rpx solid #E8370F; | 95 | border: 1rpx solid #E8370F; |
95 | font-size: 24rpx; | 96 | font-size: 24rpx; |
96 | } | 97 | } |
97 | -.container .smallcontainer .like_list .list_right .newzeng .rit_text { | 98 | +.container .smallcontainer .like_list .fei_del .list_right .newzeng .rit_text { |
98 | margin-left: 30rpx; | 99 | margin-left: 30rpx; |
99 | display: flex; | 100 | display: flex; |
100 | align-items: center; | 101 | align-items: center; |
101 | } | 102 | } |
102 | -.container .smallcontainer .like_list .list_right .newzeng .rit_text .numPer { | 103 | +.container .smallcontainer .like_list .fei_del .list_right .newzeng .rit_text .numPer { |
103 | color: #FF444B; | 104 | color: #FF444B; |
104 | font-size: 24rpx; | 105 | font-size: 24rpx; |
105 | } | 106 | } |
106 | -.container .smallcontainer .like_list .list_right .newzeng .rit_text .numperson { | 107 | +.container .smallcontainer .like_list .fei_del .list_right .newzeng .rit_text .numperson { |
107 | font-size: 24rpx; | 108 | font-size: 24rpx; |
108 | color: #8C9198; | 109 | color: #8C9198; |
109 | } | 110 | } |
110 | -.container .smallcontainer .like_list .list_right .list_right_box { | 111 | +.container .smallcontainer .like_list .fei_del .list_right .list_right_box { |
111 | display: flex; | 112 | display: flex; |
112 | align-items: center; | 113 | align-items: center; |
113 | justify-content: space-between; | 114 | justify-content: space-between; |
114 | } | 115 | } |
115 | -.container .smallcontainer .like_list .list_right .list_right_box .let { | 116 | +.container .smallcontainer .like_list .fei_del .list_right .list_right_box .let { |
116 | display: flex; | 117 | display: flex; |
117 | align-items: baseline; | 118 | align-items: baseline; |
118 | } | 119 | } |
119 | -.container .smallcontainer .like_list .list_right .list_right_box .let .del { | 120 | +.container .smallcontainer .like_list .fei_del .list_right .list_right_box .let .del_priced { |
120 | margin-left: 10rpx; | 121 | margin-left: 10rpx; |
121 | } | 122 | } |
122 | -.container .smallcontainer .like_list .list_right .list_right_box .let .del .money_icon_ { | 123 | +.container .smallcontainer .like_list .fei_del .list_right .list_right_box .let .del_priced .money_icon_ { |
123 | font-size: 20rpx; | 124 | font-size: 20rpx; |
124 | line-height: 42rpx; | 125 | line-height: 42rpx; |
125 | color: #8C9198; | 126 | color: #8C9198; |
126 | } | 127 | } |
127 | -.container .smallcontainer .like_list .list_right .list_right_box .let .del .del_price_ { | 128 | +.container .smallcontainer .like_list .fei_del .list_right .list_right_box .let .del_priced .del_price_ { |
128 | font-size: 24rpx; | 129 | font-size: 24rpx; |
129 | color: #8C9198; | 130 | color: #8C9198; |
130 | text-decoration: line-through; | 131 | text-decoration: line-through; |
131 | } | 132 | } |
132 | -.container .smallcontainer .like_list .list_right .list_right_box .let .zan_price { | 133 | +.container .smallcontainer .like_list .fei_del .list_right .list_right_box .let .zan_price { |
133 | display: flex; | 134 | display: flex; |
134 | align-items: baseline; | 135 | align-items: baseline; |
135 | line-height: 55rpx; | 136 | line-height: 55rpx; |
136 | font-weight: bold; | 137 | font-weight: bold; |
137 | justify-content: space-between; | 138 | justify-content: space-between; |
138 | } | 139 | } |
139 | -.container .smallcontainer .like_list .list_right .list_right_box .let .zan_price .icon_name { | 140 | +.container .smallcontainer .like_list .fei_del .list_right .list_right_box .let .zan_price .icon_name { |
140 | font-size: 28rpx; | 141 | font-size: 28rpx; |
141 | color: #FF444B; | 142 | color: #FF444B; |
142 | } | 143 | } |
143 | -.container .smallcontainer .like_list .list_right .list_right_box .let .zan_price .money_icon { | 144 | +.container .smallcontainer .like_list .fei_del .list_right .list_right_box .let .zan_price .money_icon { |
144 | margin-left: 10rpx; | 145 | margin-left: 10rpx; |
145 | font-size: 20rpx; | 146 | font-size: 20rpx; |
146 | line-height: 42rpx; | 147 | line-height: 42rpx; |
147 | color: #FF444B; | 148 | color: #FF444B; |
148 | } | 149 | } |
149 | -.container .smallcontainer .like_list .list_right .list_right_box .let .zan_price .price_big { | 150 | +.container .smallcontainer .like_list .fei_del .list_right .list_right_box .let .zan_price .price_big { |
150 | color: #FF444B; | 151 | color: #FF444B; |
151 | font-size: 32rpx; | 152 | font-size: 32rpx; |
152 | } | 153 | } |
153 | -.container .smallcontainer .like_list .list_right .list_right_box .dateTime { | 154 | +.container .smallcontainer .like_list .fei_del .list_right .list_right_box .dateTime { |
154 | font-size: 24rpx; | 155 | font-size: 24rpx; |
155 | color: #8C9198; | 156 | color: #8C9198; |
156 | } | 157 | } |
158 | +.container .smallcontainer .touch_item { | ||
159 | + display: flex; | ||
160 | + justify-content: space-between; | ||
161 | + max-width: 750rpx; | ||
162 | + overflow: hidden; | ||
163 | + margin-bottom: 10rpx; | ||
164 | + background: #f5f5f5; | ||
165 | +} | ||
166 | +.container .smallcontainer .touch_item .content { | ||
167 | + width: 100%; | ||
168 | + margin-right: 0; | ||
169 | + -webkit-transition: all 0.4s; | ||
170 | + transition: all 0.4s; | ||
171 | + -webkit-transform: translateX(90px); | ||
172 | + transform: translateX(90px); | ||
173 | + margin-left: -90px; | ||
174 | +} | ||
175 | +.container .smallcontainer .touch_item .del { | ||
176 | + width: 90px; | ||
177 | + display: flex; | ||
178 | + flex-direction: column; | ||
179 | + align-items: center; | ||
180 | + justify-content: center; | ||
181 | + color: #fff; | ||
182 | + background-color: #e8370f; | ||
183 | + -webkit-transform: translateX(90px); | ||
184 | + transform: translateX(90px); | ||
185 | + -webkit-transition: all 0.4s; | ||
186 | + transition: all 0.4s; | ||
187 | + font-size: 35rpx; | ||
188 | +} | ||
189 | +.container .smallcontainer .touch_move_active .del, | ||
190 | +.container .smallcontainer .touch_move_active .content { | ||
191 | + -webkit-transform: translateX(0); | ||
192 | + transform: translateX(0); | ||
193 | +} | ||
157 | .container .smallcontainer .like_list_1 { | 194 | .container .smallcontainer .like_list_1 { |
158 | width: 100%; | 195 | width: 100%; |
159 | height: 100%; | 196 | height: 100%; |
@@ -251,3 +288,39 @@ | @@ -251,3 +288,39 @@ | ||
251 | width: 100%; | 288 | width: 100%; |
252 | text-align: center; | 289 | text-align: center; |
253 | } | 290 | } |
291 | +.container .touch_item { | ||
292 | + display: flex; | ||
293 | + justify-content: space-between; | ||
294 | + max-width: 750rpx; | ||
295 | + overflow: hidden; | ||
296 | + margin-bottom: 10rpx; | ||
297 | + background: #f5f5f5; | ||
298 | + height: 216rpx; | ||
299 | +} | ||
300 | +.container .touch_item .content { | ||
301 | + width: 100%; | ||
302 | + margin-right: 0; | ||
303 | + -webkit-transition: all 0.4s; | ||
304 | + transition: all 0.4s; | ||
305 | + -webkit-transform: translateX(90px); | ||
306 | + transform: translateX(90px); | ||
307 | + margin-left: -90px; | ||
308 | +} | ||
309 | +.container .touch_item .content .item { | ||
310 | + width: 100%; | ||
311 | + background-color: #fffccc; | ||
312 | +} | ||
313 | +.container .touch_item .del { | ||
314 | + width: 90px; | ||
315 | + display: flex; | ||
316 | + flex-direction: column; | ||
317 | + align-items: center; | ||
318 | + justify-content: center; | ||
319 | + color: #fff; | ||
320 | + background-color: #cccfff; | ||
321 | + -webkit-transform: translateX(90px); | ||
322 | + transform: translateX(90px); | ||
323 | + -webkit-transition: all 0.4s; | ||
324 | + transition: all 0.4s; | ||
325 | + font-size: 35rpx; | ||
326 | +} |
@@ -20,6 +20,7 @@ Page({ | @@ -20,6 +20,7 @@ Page({ | ||
20 | esl: '', | 20 | esl: '', |
21 | nav_list: ['全部订单', '待付款', '待自提', '待发货', '待收货', '待评价', '已完成', '退款中', '已退款'], | 21 | nav_list: ['全部订单', '待付款', '待自提', '待发货', '待收货', '待评价', '已完成', '退款中', '已退款'], |
22 | it_collse: false, | 22 | it_collse: false, |
23 | + deltrue: false | ||
23 | }, | 24 | }, |
24 | onLoad: function (options) { // 接收参数 | 25 | onLoad: function (options) { // 接收参数 |
25 | 26 | ||
@@ -133,6 +134,59 @@ Page({ | @@ -133,6 +134,59 @@ Page({ | ||
133 | 134 | ||
134 | 135 | ||
135 | }, | 136 | }, |
137 | + delOrder(e) { // 删除 | ||
138 | + let that = this | ||
139 | + that.setData({ | ||
140 | + deltrue: true | ||
141 | + }) | ||
142 | + wx.showModal({ | ||
143 | + title: '提示', | ||
144 | + content: '确定要删除该订单吗?', | ||
145 | + success: async function (res) { | ||
146 | + if (res.confirm) { | ||
147 | + try { | ||
148 | + const { | ||
149 | + data | ||
150 | + } = await request({ | ||
151 | + url: 'api/new2/cheOrderDel', | ||
152 | + data: { | ||
153 | + order_no: e.currentTarget.dataset.order_no | ||
154 | + } | ||
155 | + }) | ||
156 | + console.log(data, "取消订单"); | ||
157 | + if (data.code == 1) { | ||
158 | + let msg = data.msg | ||
159 | + a.popSuccessTest(msg) | ||
160 | + setTimeout(() => { | ||
161 | + that.getMyorder() | ||
162 | + that.setData({ | ||
163 | + deltrue: false | ||
164 | + }) | ||
165 | + }, 1000); | ||
166 | + } else { | ||
167 | + let msg = data.msg | ||
168 | + a.popTest(msg) | ||
169 | + that.setData({ | ||
170 | + deltrue: false | ||
171 | + }) | ||
172 | + } | ||
173 | + } catch (err) { | ||
174 | + let msg = err.msg | ||
175 | + a.popTest(msg) | ||
176 | + that.setData({ | ||
177 | + deltrue: false | ||
178 | + }) | ||
179 | + | ||
180 | + } | ||
181 | + } else { | ||
182 | + | ||
183 | + } | ||
184 | + } | ||
185 | + | ||
186 | + }) | ||
187 | + | ||
188 | + | ||
189 | + }, | ||
136 | async Abholung(e) { // 已自提 | 190 | async Abholung(e) { // 已自提 |
137 | let that = this | 191 | let that = this |
138 | try { | 192 | try { |
1 | page { | 1 | page { |
2 | // background-color: #f9f9f9; | 2 | // background-color: #f9f9f9; |
3 | + width: 100%; | ||
4 | + height: 100%; | ||
5 | +} | ||
6 | + | ||
7 | +.container { | ||
8 | + border-top: 1rpx solid #F9F9F9; | ||
9 | + padding: 0 32rpx; | ||
10 | + box-sizing: border-box; | ||
11 | + | ||
12 | + .bottom_scroll { | ||
13 | + height: 80rpx; | ||
14 | + display: flex; | ||
15 | + white-space: nowrap; | ||
16 | + overflow-y: scroll; | ||
17 | + border-bottom: 1rpx solid #f5f5f5; | ||
18 | + | ||
19 | + .nav { | ||
20 | + line-height: 80rpx; | ||
21 | + | ||
22 | + .nav_tab { | ||
23 | + padding: 0 20rpx; | ||
24 | + box-sizing: border-box; | ||
25 | + color: #06121E; | ||
26 | + line-height: 80rpx; | ||
27 | + font-size: 28rpx; | ||
3 | 28 | ||
4 | - .container { | ||
5 | - border-top: 1rpx solid #F9F9F9; | ||
6 | - padding: 0 32rpx; | ||
7 | - box-sizing: border-box; | ||
8 | - | ||
9 | - .bottom_scroll { | ||
10 | - height: 80rpx; | ||
11 | - display: flex; | ||
12 | - white-space: nowrap; | ||
13 | - overflow-y: scroll; | ||
14 | - border-bottom: 1rpx solid #f5f5f5; | 29 | + } |
15 | 30 | ||
16 | - .nav { | 31 | + .active { |
32 | + color: #E8370F; | ||
33 | + font-weight: bold; | ||
17 | line-height: 80rpx; | 34 | line-height: 80rpx; |
35 | + position: relative; | ||
36 | + } | ||
18 | 37 | ||
19 | - .nav_tab { | ||
20 | - padding: 0 20rpx; | ||
21 | - box-sizing: border-box; | ||
22 | - color: #06121E; | ||
23 | - line-height: 80rpx; | ||
24 | - font-size: 28rpx; | 38 | + .active::after { |
39 | + position: relative; | ||
40 | + border-bottom: 4rpx solid #E8370F; | ||
41 | + display: block; | ||
42 | + content: ''; | ||
43 | + width: 40rpx; | ||
44 | + height: 1rpx; | ||
45 | + background: #E8370F; | ||
46 | + position: absolute; | ||
47 | + bottom: 0; | ||
48 | + left: 50%; | ||
49 | + transform: translateX(-50%); | ||
50 | + } | ||
51 | + } | ||
25 | 52 | ||
26 | - } | 53 | + } |
27 | 54 | ||
28 | - .active { | ||
29 | - color: #E8370F; | ||
30 | - font-weight: bold; | ||
31 | - line-height: 80rpx; | ||
32 | - position: relative; | ||
33 | - } | 55 | + .changeService { |
56 | + background-color: #fff; | ||
57 | + padding: 32rpx; | ||
58 | + box-sizing: border-box; | ||
59 | + border-radius: 8rpx; | ||
60 | + display: flex; | ||
61 | + flex-direction: column; | ||
34 | 62 | ||
35 | - .active::after { | ||
36 | - position: relative; | ||
37 | - border-bottom: 4rpx solid #E8370F; | ||
38 | - display: block; | ||
39 | - content: ''; | ||
40 | - width: 40rpx; | ||
41 | - height: 1rpx; | ||
42 | - background: #E8370F; | ||
43 | - position: absolute; | ||
44 | - bottom: 0; | ||
45 | - left: 50%; | ||
46 | - transform: translateX(-50%); | ||
47 | - } | 63 | + .service_title { |
64 | + display: flex; | ||
65 | + align-items: center; | ||
66 | + justify-content: space-between; | ||
67 | + padding-bottom: 20rpx; | ||
68 | + box-sizing: border-box; | ||
69 | + border-bottom: 1rpx solid #f5f5f5; | ||
70 | + | ||
71 | + .title_ { | ||
72 | + font-size: 28rpx; | ||
73 | + line-height: 40rpx; | ||
74 | + font-weight: bold; | ||
75 | + } | ||
76 | + | ||
77 | + .title_status { | ||
78 | + font-size: 28rpx; | ||
79 | + line-height: 40rpx; | ||
80 | + color: #E8370F; | ||
81 | + font-weight: bold; | ||
48 | } | 82 | } |
49 | 83 | ||
50 | } | 84 | } |
51 | 85 | ||
52 | - .changeService { | ||
53 | - background-color: #fff; | ||
54 | - padding: 32rpx; | ||
55 | - box-sizing: border-box; | ||
56 | - border-radius: 8rpx; | 86 | + .service_content { |
57 | display: flex; | 87 | display: flex; |
58 | - flex-direction: column; | ||
59 | - | ||
60 | - .service_title { | ||
61 | - display: flex; | ||
62 | - align-items: center; | ||
63 | - justify-content: space-between; | ||
64 | - padding-bottom: 20rpx; | ||
65 | - box-sizing: border-box; | ||
66 | - border-bottom: 1rpx solid #f5f5f5; | 88 | + align-items: center; |
89 | + padding: 20rpx 0; | ||
90 | + box-sizing: border-box; | ||
91 | + border-bottom: 1rpx solid #f5f5f5; | ||
67 | 92 | ||
68 | - .title_ { | ||
69 | - font-size: 28rpx; | ||
70 | - line-height: 40rpx; | ||
71 | - font-weight: bold; | ||
72 | - } | 93 | + .ser_img { |
94 | + width: 208rpx; | ||
95 | + height: 208rpx; | ||
73 | 96 | ||
74 | - .title_status { | ||
75 | - font-size: 28rpx; | ||
76 | - line-height: 40rpx; | ||
77 | - color: #E8370F; | ||
78 | - font-weight: bold; | 97 | + image { |
98 | + width: 100%; | ||
79 | } | 99 | } |
80 | - | ||
81 | } | 100 | } |
82 | 101 | ||
83 | - .service_content { | ||
84 | - display: flex; | ||
85 | - align-items: center; | ||
86 | - padding: 20rpx 0; | 102 | + .ser_cont { |
103 | + flex: 1; | ||
104 | + height: 208rpx; | ||
105 | + padding-left: 20rpx; | ||
87 | box-sizing: border-box; | 106 | box-sizing: border-box; |
88 | - border-bottom: 1rpx solid #f5f5f5; | ||
89 | - | ||
90 | - .ser_img { | ||
91 | - width: 208rpx; | ||
92 | - height: 208rpx; | 107 | + display: flex; |
108 | + flex-direction: column; | ||
109 | + justify-content: space-between; | ||
93 | 110 | ||
94 | - image { | ||
95 | - width: 100%; | ||
96 | - } | 111 | + .ser_title { |
112 | + font-size: 28rpx; | ||
113 | + line-height: 48rpx; | ||
114 | + font-weight: bold; | ||
97 | } | 115 | } |
98 | 116 | ||
99 | - .ser_cont { | ||
100 | - flex: 1; | ||
101 | - height: 208rpx; | ||
102 | - padding-left: 20rpx; | ||
103 | - box-sizing: border-box; | 117 | + .baoma { |
104 | display: flex; | 118 | display: flex; |
105 | - flex-direction: column; | ||
106 | justify-content: space-between; | 119 | justify-content: space-between; |
120 | + align-items: center; | ||
107 | 121 | ||
108 | - .ser_title { | ||
109 | - font-size: 28rpx; | ||
110 | - line-height: 48rpx; | ||
111 | - font-weight: bold; | ||
112 | - } | 122 | + .pd { |
123 | + .red_money_icon { | ||
124 | + font-size: 24rpx; | ||
125 | + line-height: 40rpx; | ||
126 | + color: #E8370F; | ||
127 | + font-weight: bold; | ||
128 | + } | ||
129 | + | ||
130 | + .red_money { | ||
131 | + font-size: 28rpx; | ||
132 | + line-height: 40rpx; | ||
133 | + color: #E8370F; | ||
134 | + font-weight: bold; | ||
113 | 135 | ||
114 | - .baoma { | ||
115 | - display: flex; | ||
116 | - justify-content: space-between; | ||
117 | - align-items: center; | ||
118 | - | ||
119 | - .pd { | ||
120 | - .red_money_icon { | ||
121 | - font-size: 24rpx; | ||
122 | - line-height: 40rpx; | ||
123 | - color: #E8370F; | ||
124 | - font-weight: bold; | ||
125 | - } | ||
126 | - | ||
127 | - .red_money { | ||
128 | - font-size: 28rpx; | ||
129 | - line-height: 40rpx; | ||
130 | - color: #E8370F; | ||
131 | - font-weight: bold; | ||
132 | - | ||
133 | - } | ||
134 | } | 136 | } |
137 | + } | ||
135 | 138 | ||
136 | 139 | ||
137 | 140 | ||
138 | - .count { | ||
139 | - font-size: 24rpx; | ||
140 | - line-height: 40rpx; | 141 | + .count { |
142 | + font-size: 24rpx; | ||
143 | + line-height: 40rpx; | ||
141 | 144 | ||
142 | - } | ||
143 | } | 145 | } |
144 | } | 146 | } |
145 | } | 147 | } |
148 | + } | ||
149 | + | ||
150 | + .btns { | ||
151 | + display: flex; | ||
152 | + justify-content: flex-end; | ||
153 | + padding: 32rpx 0 0; | ||
154 | + box-sizing: border-box; | ||
146 | 155 | ||
147 | - .btns { | 156 | + .btn { |
157 | + width: 152rpx; | ||
158 | + height: 52rpx; | ||
159 | + padding: 0; | ||
160 | + line-height: 52rpx; | ||
161 | + font-weight: 400; | ||
162 | + font-size: 24rpx; | ||
163 | + margin: 0 10rpx; | ||
164 | + } | ||
165 | + | ||
166 | + .btn_1 { | ||
167 | + border: 2rpx solid #ccc; | ||
168 | + color: #06121E; | ||
169 | + background-color: #fff; | ||
170 | + } | ||
171 | + | ||
172 | + .btn_2 { | ||
173 | + color: #fff; | ||
174 | + background-color: #E8370F; | ||
175 | + } | ||
176 | + | ||
177 | + .btn_3 { | ||
178 | + background-color: #fff; | ||
179 | + color: #999999; | ||
180 | + } | ||
181 | + | ||
182 | + .tuitime2 {} | ||
183 | + | ||
184 | + .cd { | ||
148 | display: flex; | 185 | display: flex; |
149 | - justify-content: flex-end; | ||
150 | - padding: 32rpx 0 0; | ||
151 | - box-sizing: border-box; | 186 | + align-items: center; |
152 | 187 | ||
153 | .btn { | 188 | .btn { |
154 | width: 152rpx; | 189 | width: 152rpx; |
@@ -174,89 +209,50 @@ page { | @@ -174,89 +209,50 @@ page { | ||
174 | background-color: #fff; | 209 | background-color: #fff; |
175 | color: #999999; | 210 | color: #999999; |
176 | } | 211 | } |
212 | + } | ||
213 | + } | ||
177 | 214 | ||
178 | - .tuitime2 {} | 215 | + .btnitem { |
216 | + justify-content: space-between; | ||
217 | + } | ||
179 | 218 | ||
180 | - .cd { | ||
181 | - display: flex; | ||
182 | - align-items: center; | 219 | + .btnRight { |
220 | + justify-content: flex-end; | ||
221 | + } | ||
183 | 222 | ||
184 | - .btn { | ||
185 | - width: 152rpx; | ||
186 | - height: 52rpx; | ||
187 | - padding: 0; | ||
188 | - line-height: 52rpx; | ||
189 | - font-weight: 400; | ||
190 | - font-size: 24rpx; | ||
191 | - margin: 0 10rpx; | ||
192 | - } | 223 | + .btn3 { |
224 | + justify-content: flex-end !important; | ||
225 | + } | ||
193 | 226 | ||
194 | - .btn_1 { | ||
195 | - border: 2rpx solid #ccc; | ||
196 | - color: #06121E; | ||
197 | - } | 227 | + } |
198 | 228 | ||
199 | - .btn_2 { | ||
200 | - color: #fff; | ||
201 | - background-color: #E8370F; | ||
202 | - } | 229 | + .cno { |
230 | + width: 100%; | ||
231 | + // height: 800rpx; | ||
232 | + display: flex; | ||
233 | + align-items: center; | ||
234 | + justify-content: center; | ||
203 | 235 | ||
204 | - .btn_3 { | ||
205 | - background-color: #fff; | ||
206 | - color: #999999; | ||
207 | - } | ||
208 | - } | ||
209 | - } | 236 | + .kongbox { |
237 | + width: 100%; | ||
238 | + height: 100%; | ||
239 | + display: flex; | ||
240 | + flex-direction: column; | ||
241 | + justify-content: center; | ||
242 | + align-items: center; | ||
243 | + margin: 200rpx auto; | ||
210 | 244 | ||
211 | - .btnitem { | ||
212 | - justify-content: space-between; | ||
213 | - } | ||
214 | 245 | ||
215 | - .btnRight { | ||
216 | - justify-content: flex-end; | 246 | + image { |
247 | + width: 500rpx; | ||
217 | } | 248 | } |
218 | 249 | ||
219 | - .btn3 { | ||
220 | - justify-content: flex-end !important; | 250 | + .c_name { |
251 | + margin-top: 30rpx; | ||
252 | + font-size: 32rpx; | ||
253 | + color: #ccc; | ||
221 | } | 254 | } |
222 | - | ||
223 | } | 255 | } |
224 | 256 | ||
225 | - .dmc { | ||
226 | - .emmpty4S { | ||
227 | - width: 100%; | ||
228 | - height: 100%; | ||
229 | - position: relative; | ||
230 | - padding-bottom: 200rpx; | ||
231 | - | ||
232 | - .c_img { | ||
233 | - width: 196rpx; | ||
234 | - height: 196rpx; | ||
235 | - position: absolute; | ||
236 | - top: 400rpx; | ||
237 | - left: 0; | ||
238 | - bottom: 0; | ||
239 | - right: 0; | ||
240 | - margin: auto; | ||
241 | - | ||
242 | - image { | ||
243 | - width: 100%; | ||
244 | - } | ||
245 | - } | ||
246 | - | ||
247 | - .textName { | ||
248 | - width: 100%; | ||
249 | - padding: 0 80rpx; | ||
250 | - text-align: center; | ||
251 | - line-height: 40rpx; | ||
252 | - font-size: 28rpx; | ||
253 | - color: #999999; | ||
254 | - position: absolute; | ||
255 | - top: 430rpx; | ||
256 | - } | ||
257 | - | ||
258 | - | ||
259 | - } | ||
260 | - } | ||
261 | } | 257 | } |
262 | } | 258 | } |
@@ -5,7 +5,7 @@ | @@ -5,7 +5,7 @@ | ||
5 | </view> | 5 | </view> |
6 | </view> | 6 | </view> |
7 | <!-- 列表 --> | 7 | <!-- 列表 --> |
8 | - <block wx:if="{{myOrder.length > 0}}"> | 8 | + <block wx:if="{{myOrder.length != 0}}"> |
9 | <view class="changeService" wx:for="{{myOrder}}" wx:key="id" bindtap="tomyOrderObligation" data-order_no="{{item.order_no}}" data-stateway="{{item.way2}}" data-is_car="{{item.is_car}}"> | 9 | <view class="changeService" wx:for="{{myOrder}}" wx:key="id" bindtap="tomyOrderObligation" data-order_no="{{item.order_no}}" data-stateway="{{item.way2}}" data-is_car="{{item.is_car}}"> |
10 | <view class="service_title"> | 10 | <view class="service_title"> |
11 | <view class="title_">{{item.shop}}</view> | 11 | <view class="title_">{{item.shop}}</view> |
@@ -63,7 +63,9 @@ | @@ -63,7 +63,9 @@ | ||
63 | </button> | 63 | </button> |
64 | </view> | 64 | </view> |
65 | <view class="btns btnitem btn3" wx:if="{{item.way2 == 7}}"> | 65 | <view class="btns btnitem btn3" wx:if="{{item.way2 == 7}}"> |
66 | - <button class="btn btn_2 btnRight" data-order_no="{{item.order_no}}">已完成</button> | 66 | + <button class="btn btn_1 btnRight" disabled="{{deltrue}}" catchtap="delOrder" data-order_no="{{item.order_no}}"> |
67 | + 删除 | ||
68 | + </button> | ||
67 | </view> | 69 | </view> |
68 | <view class="btns btnitem" wx:if="{{item.way2 == 8}}"> | 70 | <view class="btns btnitem" wx:if="{{item.way2 == 8}}"> |
69 | <view class="date_time tuitime2">{{item.tui_time2}}</view> | 71 | <view class="date_time tuitime2">{{item.tui_time2}}</view> |
@@ -72,18 +74,16 @@ | @@ -72,18 +74,16 @@ | ||
72 | </view> | 74 | </view> |
73 | </view> | 75 | </view> |
74 | <view class="btns btnitem btn3" wx:if="{{item.way2 == 9}}"> | 76 | <view class="btns btnitem btn3" wx:if="{{item.way2 == 9}}"> |
75 | - <button class="btn btn_2 ">已完成</button> | 77 | + <button class="btn btn_2 " disabled="{{deltrue}}" data-order_no="{{item.order_no}}"> |
78 | + 已退款 | ||
79 | + </button> | ||
76 | </view> | 80 | </view> |
77 | </view> | 81 | </view> |
78 | </block> | 82 | </block> |
79 | - <view class="dmc" wx:else> | ||
80 | - <view class="emmpty4S" bindtap="goGuang" wx:if="{{it_collse}}"> | ||
81 | - <view class="c_img"> | ||
82 | - <image src="{{imagesUrl}}assets/static/img/web2x_gouwuche_img.png" /> | ||
83 | - </view> | ||
84 | - <view class="textName"> | ||
85 | - <view class="c">您暂时没有相关订单</view> | ||
86 | - </view> | 83 | + <view class="cno" wx:else> |
84 | + <view class="kongbox" wx:if="{{it_collse}}"> | ||
85 | + <image src="{{imagesUrl}}assets/static/img/web2x_gouwuche_img.png" mode="widthFix" /> | ||
86 | + <view class="c_name">暂无数据</view> | ||
87 | </view> | 87 | </view> |
88 | </view> | 88 | </view> |
89 | </view> | 89 | </view> |
1 | -page .container { | 1 | +page { |
2 | + width: 100%; | ||
3 | + height: 100%; | ||
4 | +} | ||
5 | +.container { | ||
2 | border-top: 1rpx solid #F9F9F9; | 6 | border-top: 1rpx solid #F9F9F9; |
3 | padding: 0 32rpx; | 7 | padding: 0 32rpx; |
4 | box-sizing: border-box; | 8 | box-sizing: border-box; |
5 | } | 9 | } |
6 | -page .container .bottom_scroll { | 10 | +.container .bottom_scroll { |
7 | height: 80rpx; | 11 | height: 80rpx; |
8 | display: flex; | 12 | display: flex; |
9 | white-space: nowrap; | 13 | white-space: nowrap; |
10 | overflow-y: scroll; | 14 | overflow-y: scroll; |
11 | border-bottom: 1rpx solid #f5f5f5; | 15 | border-bottom: 1rpx solid #f5f5f5; |
12 | } | 16 | } |
13 | -page .container .bottom_scroll .nav { | 17 | +.container .bottom_scroll .nav { |
14 | line-height: 80rpx; | 18 | line-height: 80rpx; |
15 | } | 19 | } |
16 | -page .container .bottom_scroll .nav .nav_tab { | 20 | +.container .bottom_scroll .nav .nav_tab { |
17 | padding: 0 20rpx; | 21 | padding: 0 20rpx; |
18 | box-sizing: border-box; | 22 | box-sizing: border-box; |
19 | color: #06121E; | 23 | color: #06121E; |
20 | line-height: 80rpx; | 24 | line-height: 80rpx; |
21 | font-size: 28rpx; | 25 | font-size: 28rpx; |
22 | } | 26 | } |
23 | -page .container .bottom_scroll .nav .active { | 27 | +.container .bottom_scroll .nav .active { |
24 | color: #E8370F; | 28 | color: #E8370F; |
25 | font-weight: bold; | 29 | font-weight: bold; |
26 | line-height: 80rpx; | 30 | line-height: 80rpx; |
27 | position: relative; | 31 | position: relative; |
28 | } | 32 | } |
29 | -page .container .bottom_scroll .nav .active::after { | 33 | +.container .bottom_scroll .nav .active::after { |
30 | position: relative; | 34 | position: relative; |
31 | border-bottom: 4rpx solid #E8370F; | 35 | border-bottom: 4rpx solid #E8370F; |
32 | display: block; | 36 | display: block; |
@@ -39,7 +43,7 @@ page .container .bottom_scroll .nav .active::after { | @@ -39,7 +43,7 @@ page .container .bottom_scroll .nav .active::after { | ||
39 | left: 50%; | 43 | left: 50%; |
40 | transform: translateX(-50%); | 44 | transform: translateX(-50%); |
41 | } | 45 | } |
42 | -page .container .changeService { | 46 | +.container .changeService { |
43 | background-color: #fff; | 47 | background-color: #fff; |
44 | padding: 32rpx; | 48 | padding: 32rpx; |
45 | box-sizing: border-box; | 49 | box-sizing: border-box; |
@@ -47,7 +51,7 @@ page .container .changeService { | @@ -47,7 +51,7 @@ page .container .changeService { | ||
47 | display: flex; | 51 | display: flex; |
48 | flex-direction: column; | 52 | flex-direction: column; |
49 | } | 53 | } |
50 | -page .container .changeService .service_title { | 54 | +.container .changeService .service_title { |
51 | display: flex; | 55 | display: flex; |
52 | align-items: center; | 56 | align-items: center; |
53 | justify-content: space-between; | 57 | justify-content: space-between; |
@@ -55,32 +59,32 @@ page .container .changeService .service_title { | @@ -55,32 +59,32 @@ page .container .changeService .service_title { | ||
55 | box-sizing: border-box; | 59 | box-sizing: border-box; |
56 | border-bottom: 1rpx solid #f5f5f5; | 60 | border-bottom: 1rpx solid #f5f5f5; |
57 | } | 61 | } |
58 | -page .container .changeService .service_title .title_ { | 62 | +.container .changeService .service_title .title_ { |
59 | font-size: 28rpx; | 63 | font-size: 28rpx; |
60 | line-height: 40rpx; | 64 | line-height: 40rpx; |
61 | font-weight: bold; | 65 | font-weight: bold; |
62 | } | 66 | } |
63 | -page .container .changeService .service_title .title_status { | 67 | +.container .changeService .service_title .title_status { |
64 | font-size: 28rpx; | 68 | font-size: 28rpx; |
65 | line-height: 40rpx; | 69 | line-height: 40rpx; |
66 | color: #E8370F; | 70 | color: #E8370F; |
67 | font-weight: bold; | 71 | font-weight: bold; |
68 | } | 72 | } |
69 | -page .container .changeService .service_content { | 73 | +.container .changeService .service_content { |
70 | display: flex; | 74 | display: flex; |
71 | align-items: center; | 75 | align-items: center; |
72 | padding: 20rpx 0; | 76 | padding: 20rpx 0; |
73 | box-sizing: border-box; | 77 | box-sizing: border-box; |
74 | border-bottom: 1rpx solid #f5f5f5; | 78 | border-bottom: 1rpx solid #f5f5f5; |
75 | } | 79 | } |
76 | -page .container .changeService .service_content .ser_img { | 80 | +.container .changeService .service_content .ser_img { |
77 | width: 208rpx; | 81 | width: 208rpx; |
78 | height: 208rpx; | 82 | height: 208rpx; |
79 | } | 83 | } |
80 | -page .container .changeService .service_content .ser_img image { | 84 | +.container .changeService .service_content .ser_img image { |
81 | width: 100%; | 85 | width: 100%; |
82 | } | 86 | } |
83 | -page .container .changeService .service_content .ser_cont { | 87 | +.container .changeService .service_content .ser_cont { |
84 | flex: 1; | 88 | flex: 1; |
85 | height: 208rpx; | 89 | height: 208rpx; |
86 | padding-left: 20rpx; | 90 | padding-left: 20rpx; |
@@ -89,39 +93,39 @@ page .container .changeService .service_content .ser_cont { | @@ -89,39 +93,39 @@ page .container .changeService .service_content .ser_cont { | ||
89 | flex-direction: column; | 93 | flex-direction: column; |
90 | justify-content: space-between; | 94 | justify-content: space-between; |
91 | } | 95 | } |
92 | -page .container .changeService .service_content .ser_cont .ser_title { | 96 | +.container .changeService .service_content .ser_cont .ser_title { |
93 | font-size: 28rpx; | 97 | font-size: 28rpx; |
94 | line-height: 48rpx; | 98 | line-height: 48rpx; |
95 | font-weight: bold; | 99 | font-weight: bold; |
96 | } | 100 | } |
97 | -page .container .changeService .service_content .ser_cont .baoma { | 101 | +.container .changeService .service_content .ser_cont .baoma { |
98 | display: flex; | 102 | display: flex; |
99 | justify-content: space-between; | 103 | justify-content: space-between; |
100 | align-items: center; | 104 | align-items: center; |
101 | } | 105 | } |
102 | -page .container .changeService .service_content .ser_cont .baoma .pd .red_money_icon { | 106 | +.container .changeService .service_content .ser_cont .baoma .pd .red_money_icon { |
103 | font-size: 24rpx; | 107 | font-size: 24rpx; |
104 | line-height: 40rpx; | 108 | line-height: 40rpx; |
105 | color: #E8370F; | 109 | color: #E8370F; |
106 | font-weight: bold; | 110 | font-weight: bold; |
107 | } | 111 | } |
108 | -page .container .changeService .service_content .ser_cont .baoma .pd .red_money { | 112 | +.container .changeService .service_content .ser_cont .baoma .pd .red_money { |
109 | font-size: 28rpx; | 113 | font-size: 28rpx; |
110 | line-height: 40rpx; | 114 | line-height: 40rpx; |
111 | color: #E8370F; | 115 | color: #E8370F; |
112 | font-weight: bold; | 116 | font-weight: bold; |
113 | } | 117 | } |
114 | -page .container .changeService .service_content .ser_cont .baoma .count { | 118 | +.container .changeService .service_content .ser_cont .baoma .count { |
115 | font-size: 24rpx; | 119 | font-size: 24rpx; |
116 | line-height: 40rpx; | 120 | line-height: 40rpx; |
117 | } | 121 | } |
118 | -page .container .changeService .btns { | 122 | +.container .changeService .btns { |
119 | display: flex; | 123 | display: flex; |
120 | justify-content: flex-end; | 124 | justify-content: flex-end; |
121 | padding: 32rpx 0 0; | 125 | padding: 32rpx 0 0; |
122 | box-sizing: border-box; | 126 | box-sizing: border-box; |
123 | } | 127 | } |
124 | -page .container .changeService .btns .btn { | 128 | +.container .changeService .btns .btn { |
125 | width: 152rpx; | 129 | width: 152rpx; |
126 | height: 52rpx; | 130 | height: 52rpx; |
127 | padding: 0; | 131 | padding: 0; |
@@ -130,23 +134,24 @@ page .container .changeService .btns .btn { | @@ -130,23 +134,24 @@ page .container .changeService .btns .btn { | ||
130 | font-size: 24rpx; | 134 | font-size: 24rpx; |
131 | margin: 0 10rpx; | 135 | margin: 0 10rpx; |
132 | } | 136 | } |
133 | -page .container .changeService .btns .btn_1 { | 137 | +.container .changeService .btns .btn_1 { |
134 | border: 2rpx solid #ccc; | 138 | border: 2rpx solid #ccc; |
135 | color: #06121E; | 139 | color: #06121E; |
140 | + background-color: #fff; | ||
136 | } | 141 | } |
137 | -page .container .changeService .btns .btn_2 { | 142 | +.container .changeService .btns .btn_2 { |
138 | color: #fff; | 143 | color: #fff; |
139 | background-color: #E8370F; | 144 | background-color: #E8370F; |
140 | } | 145 | } |
141 | -page .container .changeService .btns .btn_3 { | 146 | +.container .changeService .btns .btn_3 { |
142 | background-color: #fff; | 147 | background-color: #fff; |
143 | color: #999999; | 148 | color: #999999; |
144 | } | 149 | } |
145 | -page .container .changeService .btns .cd { | 150 | +.container .changeService .btns .cd { |
146 | display: flex; | 151 | display: flex; |
147 | align-items: center; | 152 | align-items: center; |
148 | } | 153 | } |
149 | -page .container .changeService .btns .cd .btn { | 154 | +.container .changeService .btns .cd .btn { |
150 | width: 152rpx; | 155 | width: 152rpx; |
151 | height: 52rpx; | 156 | height: 52rpx; |
152 | padding: 0; | 157 | padding: 0; |
@@ -155,53 +160,47 @@ page .container .changeService .btns .cd .btn { | @@ -155,53 +160,47 @@ page .container .changeService .btns .cd .btn { | ||
155 | font-size: 24rpx; | 160 | font-size: 24rpx; |
156 | margin: 0 10rpx; | 161 | margin: 0 10rpx; |
157 | } | 162 | } |
158 | -page .container .changeService .btns .cd .btn_1 { | 163 | +.container .changeService .btns .cd .btn_1 { |
159 | border: 2rpx solid #ccc; | 164 | border: 2rpx solid #ccc; |
160 | color: #06121E; | 165 | color: #06121E; |
161 | } | 166 | } |
162 | -page .container .changeService .btns .cd .btn_2 { | 167 | +.container .changeService .btns .cd .btn_2 { |
163 | color: #fff; | 168 | color: #fff; |
164 | background-color: #E8370F; | 169 | background-color: #E8370F; |
165 | } | 170 | } |
166 | -page .container .changeService .btns .cd .btn_3 { | 171 | +.container .changeService .btns .cd .btn_3 { |
167 | background-color: #fff; | 172 | background-color: #fff; |
168 | color: #999999; | 173 | color: #999999; |
169 | } | 174 | } |
170 | -page .container .changeService .btnitem { | 175 | +.container .changeService .btnitem { |
171 | justify-content: space-between; | 176 | justify-content: space-between; |
172 | } | 177 | } |
173 | -page .container .changeService .btnRight { | 178 | +.container .changeService .btnRight { |
174 | justify-content: flex-end; | 179 | justify-content: flex-end; |
175 | } | 180 | } |
176 | -page .container .changeService .btn3 { | 181 | +.container .changeService .btn3 { |
177 | justify-content: flex-end !important; | 182 | justify-content: flex-end !important; |
178 | } | 183 | } |
179 | -page .container .dmc .emmpty4S { | 184 | +.container .cno { |
180 | width: 100%; | 185 | width: 100%; |
181 | - height: 100%; | ||
182 | - position: relative; | ||
183 | - padding-bottom: 200rpx; | ||
184 | -} | ||
185 | -page .container .dmc .emmpty4S .c_img { | ||
186 | - width: 196rpx; | ||
187 | - height: 196rpx; | ||
188 | - position: absolute; | ||
189 | - top: 400rpx; | ||
190 | - left: 0; | ||
191 | - bottom: 0; | ||
192 | - right: 0; | ||
193 | - margin: auto; | 186 | + display: flex; |
187 | + align-items: center; | ||
188 | + justify-content: center; | ||
194 | } | 189 | } |
195 | -page .container .dmc .emmpty4S .c_img image { | 190 | +.container .cno .kongbox { |
196 | width: 100%; | 191 | width: 100%; |
192 | + height: 100%; | ||
193 | + display: flex; | ||
194 | + flex-direction: column; | ||
195 | + justify-content: center; | ||
196 | + align-items: center; | ||
197 | + margin: 200rpx auto; | ||
197 | } | 198 | } |
198 | -page .container .dmc .emmpty4S .textName { | ||
199 | - width: 100%; | ||
200 | - padding: 0 80rpx; | ||
201 | - text-align: center; | ||
202 | - line-height: 40rpx; | ||
203 | - font-size: 28rpx; | ||
204 | - color: #999999; | ||
205 | - position: absolute; | ||
206 | - top: 430rpx; | 199 | +.container .cno .kongbox image { |
200 | + width: 500rpx; | ||
201 | +} | ||
202 | +.container .cno .kongbox .c_name { | ||
203 | + margin-top: 30rpx; | ||
204 | + font-size: 32rpx; | ||
205 | + color: #ccc; | ||
207 | } | 206 | } |
@@ -12,6 +12,7 @@ Page({ | @@ -12,6 +12,7 @@ Page({ | ||
12 | time: 30 * 60 * 60 * 1000, | 12 | time: 30 * 60 * 60 * 1000, |
13 | timeData: {}, | 13 | timeData: {}, |
14 | storeList: 4, | 14 | storeList: 4, |
15 | + it_collse: false | ||
15 | }, | 16 | }, |
16 | onLoad: function (options) { | 17 | onLoad: function (options) { |
17 | let that = this | 18 | let that = this |
@@ -19,6 +20,7 @@ Page({ | @@ -19,6 +20,7 @@ Page({ | ||
19 | that.setData({ | 20 | that.setData({ |
20 | // order_id: options.order_id, | 21 | // order_id: options.order_id, |
21 | }) | 22 | }) |
23 | + that.getMoneyLog() | ||
22 | }, | 24 | }, |
23 | onChange(e) { | 25 | onChange(e) { |
24 | this.setData({ | 26 | this.setData({ |
@@ -29,7 +31,7 @@ Page({ | @@ -29,7 +31,7 @@ Page({ | ||
29 | goback() { | 31 | goback() { |
30 | wx.navigateBack() | 32 | wx.navigateBack() |
31 | }, | 33 | }, |
32 | - async public() { | 34 | + async getMoneyLog() { |
33 | let that = this | 35 | let that = this |
34 | try { | 36 | try { |
35 | const { | 37 | const { |
@@ -37,15 +39,23 @@ Page({ | @@ -37,15 +39,23 @@ Page({ | ||
37 | data | 39 | data |
38 | } | 40 | } |
39 | } = await request({ | 41 | } = await request({ |
40 | - url: '', | ||
41 | - data: { | ||
42 | - goods_id: that.data.goods_id | ||
43 | - } | 42 | + url: 'api/new2/moneyLog', |
44 | }) | 43 | }) |
45 | console.log(data); | 44 | console.log(data); |
46 | that.setData({ | 45 | that.setData({ |
47 | - public: data | 46 | + moneyLog: data |
48 | }) | 47 | }) |
48 | + if (data.length != 0) { | ||
49 | + that.setData({ | ||
50 | + it_collse: true | ||
51 | + }) | ||
52 | + console.log(123); | ||
53 | + console.log(that.data.it_cloose); | ||
54 | + } else { | ||
55 | + that.setData({ | ||
56 | + it_collse: false | ||
57 | + }) | ||
58 | + } | ||
49 | } catch (err) { | 59 | } catch (err) { |
50 | console.log(err); | 60 | console.log(err); |
51 | that.setData({ | 61 | that.setData({ |
@@ -54,6 +64,8 @@ Page({ | @@ -54,6 +64,8 @@ Page({ | ||
54 | that.popTest() | 64 | that.popTest() |
55 | } | 65 | } |
56 | }, | 66 | }, |
67 | + | ||
68 | + | ||
57 | popTest() { | 69 | popTest() { |
58 | wx.showToast({ | 70 | wx.showToast({ |
59 | title: this.data.msg, | 71 | title: this.data.msg, |
1 | page { | 1 | page { |
2 | background: #f9f9f9; | 2 | background: #f9f9f9; |
3 | + width: 100%; | ||
4 | + height: 100%; | ||
3 | } | 5 | } |
4 | 6 | ||
5 | .container { | 7 | .container { |
@@ -37,6 +39,7 @@ page { | @@ -37,6 +39,7 @@ page { | ||
37 | 39 | ||
38 | .health { | 40 | .health { |
39 | width: 100%; | 41 | width: 100%; |
42 | + height: 100%; | ||
40 | 43 | ||
41 | .rechange { | 44 | .rechange { |
42 | width: 100%; | 45 | width: 100%; |
@@ -67,24 +70,64 @@ page { | @@ -67,24 +70,64 @@ page { | ||
67 | } | 70 | } |
68 | } | 71 | } |
69 | 72 | ||
70 | - .pt { | ||
71 | - | 73 | + .lis_icoon { |
72 | display: flex; | 74 | display: flex; |
73 | - align-items: baseline; | ||
74 | - justify-content: flex-end; | 75 | + align-items: center; |
75 | 76 | ||
76 | - .pt_icon { | ||
77 | - font-size: 22rpx; | 77 | + .icon_is { |
78 | + font-size: 32rpx; | ||
78 | color: #06121E; | 79 | color: #06121E; |
79 | } | 80 | } |
80 | 81 | ||
81 | - .pt_price { | ||
82 | - font-size: 32rpx; | ||
83 | - color: #06121E; | 82 | + .pt { |
83 | + | ||
84 | + display: flex; | ||
85 | + align-items: baseline; | ||
86 | + justify-content: flex-end; | ||
87 | + | ||
88 | + .pt_icon { | ||
89 | + font-size: 22rpx; | ||
90 | + color: #06121E; | ||
91 | + } | ||
92 | + | ||
93 | + .pt_price { | ||
94 | + font-size: 32rpx; | ||
95 | + color: #06121E; | ||
96 | + } | ||
84 | } | 97 | } |
85 | } | 98 | } |
86 | } | 99 | } |
87 | } | 100 | } |
88 | 101 | ||
102 | + .cno { | ||
103 | + width: 100%; | ||
104 | + // height: 800rpx; | ||
105 | + display: flex; | ||
106 | + align-items: center; | ||
107 | + justify-content: center; | ||
108 | + | ||
109 | + .kongbox { | ||
110 | + width: 100%; | ||
111 | + height: 100%; | ||
112 | + display: flex; | ||
113 | + flex-direction: column; | ||
114 | + justify-content: center; | ||
115 | + align-items: center; | ||
116 | + margin: 200rpx auto; | ||
117 | + | ||
118 | + | ||
119 | + image { | ||
120 | + width: 500rpx; | ||
121 | + } | ||
122 | + | ||
123 | + .c_name { | ||
124 | + margin-top: 30rpx; | ||
125 | + font-size: 32rpx; | ||
126 | + color: #ccc; | ||
127 | + } | ||
128 | + } | ||
129 | + | ||
130 | + } | ||
131 | + | ||
89 | } | 132 | } |
90 | } | 133 | } |
@@ -7,19 +7,30 @@ | @@ -7,19 +7,30 @@ | ||
7 | </view> | 7 | </view> |
8 | </view> | 8 | </view> |
9 | <view class="health"> | 9 | <view class="health"> |
10 | - <view class="rechange"> | ||
11 | - <block wx:for-index="index" wx:for="{{four}}" wx:for-item="item" wx:key="index"> | 10 | + <view class="rechange" wx:if="{{moneyLog.length !=0}}"> |
11 | + <block wx:for-index="index" wx:for="{{moneyLog}}" wx:for-item="item" wx:key="index"> | ||
12 | <view class="item_rechange"> | 12 | <view class="item_rechange"> |
13 | <view class="left_item"> | 13 | <view class="left_item"> |
14 | - <view class="item_name">余额充值</view> | ||
15 | - <view class="item_date">2020-10-22</view> | 14 | + <view class="item_name">{{item.memo}}</view> |
15 | + <view class="item_date">{{item.createtime2}}</view> | ||
16 | </view> | 16 | </view> |
17 | - <view class="pt"> | ||
18 | - <view class="pt_icon">¥</view> | ||
19 | - <view class="pt_price">50</view> | 17 | + <view class="lis_icoon"> |
18 | + <view class="icon_is" wx:if="{{item.sign==1}}">+</view> | ||
19 | + <view class="icon_is" wx:if="{{item.sign==-1}}">-</view> | ||
20 | + <view class="icon_is" wx:if="{{item.sign==0}}"></view> | ||
21 | + <view class="pt"> | ||
22 | + <view class="pt_icon">¥</view> | ||
23 | + <view class="pt_price">{{item.money2}}</view> | ||
24 | + </view> | ||
20 | </view> | 25 | </view> |
21 | </view> | 26 | </view> |
22 | </block> | 27 | </block> |
23 | </view> | 28 | </view> |
29 | + <view class="cno" wx:else> | ||
30 | + <view class="kongbox" wx:if="{{it_collse}}"> | ||
31 | + <image src="{{imagesUrl}}assets/static/img/web2x_gouwuche_img.png" mode="widthFix" /> | ||
32 | + <view class="c_name">暂无数据</view> | ||
33 | + </view> | ||
34 | + </view> | ||
24 | </view> | 35 | </view> |
25 | </view> | 36 | </view> |
1 | page { | 1 | page { |
2 | background: #f9f9f9; | 2 | background: #f9f9f9; |
3 | + width: 100%; | ||
4 | + height: 100%; | ||
3 | } | 5 | } |
4 | .container { | 6 | .container { |
5 | width: 100%; | 7 | width: 100%; |
@@ -30,6 +32,7 @@ page { | @@ -30,6 +32,7 @@ page { | ||
30 | } | 32 | } |
31 | .container .health { | 33 | .container .health { |
32 | width: 100%; | 34 | width: 100%; |
35 | + height: 100%; | ||
33 | } | 36 | } |
34 | .container .health .rechange { | 37 | .container .health .rechange { |
35 | width: 100%; | 38 | width: 100%; |
@@ -54,16 +57,47 @@ page { | @@ -54,16 +57,47 @@ page { | ||
54 | font-size: 24rpx; | 57 | font-size: 24rpx; |
55 | color: #06121E; | 58 | color: #06121E; |
56 | } | 59 | } |
57 | -.container .health .rechange .item_rechange .pt { | 60 | +.container .health .rechange .item_rechange .lis_icoon { |
61 | + display: flex; | ||
62 | + align-items: center; | ||
63 | +} | ||
64 | +.container .health .rechange .item_rechange .lis_icoon .icon_is { | ||
65 | + font-size: 32rpx; | ||
66 | + color: #06121E; | ||
67 | +} | ||
68 | +.container .health .rechange .item_rechange .lis_icoon .pt { | ||
58 | display: flex; | 69 | display: flex; |
59 | align-items: baseline; | 70 | align-items: baseline; |
60 | justify-content: flex-end; | 71 | justify-content: flex-end; |
61 | } | 72 | } |
62 | -.container .health .rechange .item_rechange .pt .pt_icon { | 73 | +.container .health .rechange .item_rechange .lis_icoon .pt .pt_icon { |
63 | font-size: 22rpx; | 74 | font-size: 22rpx; |
64 | color: #06121E; | 75 | color: #06121E; |
65 | } | 76 | } |
66 | -.container .health .rechange .item_rechange .pt .pt_price { | 77 | +.container .health .rechange .item_rechange .lis_icoon .pt .pt_price { |
67 | font-size: 32rpx; | 78 | font-size: 32rpx; |
68 | color: #06121E; | 79 | color: #06121E; |
69 | } | 80 | } |
81 | +.container .health .cno { | ||
82 | + width: 100%; | ||
83 | + display: flex; | ||
84 | + align-items: center; | ||
85 | + justify-content: center; | ||
86 | +} | ||
87 | +.container .health .cno .kongbox { | ||
88 | + width: 100%; | ||
89 | + height: 100%; | ||
90 | + display: flex; | ||
91 | + flex-direction: column; | ||
92 | + justify-content: center; | ||
93 | + align-items: center; | ||
94 | + margin: 200rpx auto; | ||
95 | +} | ||
96 | +.container .health .cno .kongbox image { | ||
97 | + width: 500rpx; | ||
98 | +} | ||
99 | +.container .health .cno .kongbox .c_name { | ||
100 | + margin-top: 30rpx; | ||
101 | + font-size: 32rpx; | ||
102 | + color: #ccc; | ||
103 | +} |
@@ -24,12 +24,13 @@ Page({ | @@ -24,12 +24,13 @@ Page({ | ||
24 | let that = this | 24 | let that = this |
25 | console.log(options); | 25 | console.log(options); |
26 | that.setData({ | 26 | that.setData({ |
27 | - // order_id: options.order_id, | 27 | + kw: options.kw, |
28 | }) | 28 | }) |
29 | + that.getmoreList() | ||
29 | }, | 30 | }, |
30 | onShow: function () { | 31 | onShow: function () { |
31 | let that = this | 32 | let that = this |
32 | - that.getmoreList() | 33 | + |
33 | }, | 34 | }, |
34 | goback() { | 35 | goback() { |
35 | wx.navigateBack() | 36 | wx.navigateBack() |
@@ -186,8 +186,7 @@ page { | @@ -186,8 +186,7 @@ page { | ||
186 | justify-content: center; | 186 | justify-content: center; |
187 | 187 | ||
188 | .kongbox { | 188 | .kongbox { |
189 | - width: 100%; | ||
190 | - height: 100%; | 189 | + width: 500rpx; |
191 | display: flex; | 190 | display: flex; |
192 | flex-direction: column; | 191 | flex-direction: column; |
193 | justify-content: center; | 192 | justify-content: center; |
@@ -197,7 +196,6 @@ page { | @@ -197,7 +196,6 @@ page { | ||
197 | 196 | ||
198 | image { | 197 | image { |
199 | width: 100%; | 198 | width: 100%; |
200 | - height: 600rpx; | ||
201 | } | 199 | } |
202 | 200 | ||
203 | .c_name { | 201 | .c_name { |
@@ -36,7 +36,7 @@ | @@ -36,7 +36,7 @@ | ||
36 | </block> | 36 | </block> |
37 | <view class="cno" wx:else> | 37 | <view class="cno" wx:else> |
38 | <view class="kongbox" wx:if="{{it_cloose}}"> | 38 | <view class="kongbox" wx:if="{{it_cloose}}"> |
39 | - <image src="{{imagesUrl}}assets/static/img/web2x_gouwuche_img.png" /> | 39 | + <image src="{{imagesUrl}}assets/static/img/web2x_gouwuche_img.png" mode="widthFix" /> |
40 | <view class="c_name">暂无数据</view> | 40 | <view class="c_name">暂无数据</view> |
41 | </view> | 41 | </view> |
42 | </view> | 42 | </view> |
@@ -155,8 +155,7 @@ page { | @@ -155,8 +155,7 @@ page { | ||
155 | justify-content: center; | 155 | justify-content: center; |
156 | } | 156 | } |
157 | .container .cno .kongbox { | 157 | .container .cno .kongbox { |
158 | - width: 100%; | ||
159 | - height: 100%; | 158 | + width: 500rpx; |
160 | display: flex; | 159 | display: flex; |
161 | flex-direction: column; | 160 | flex-direction: column; |
162 | justify-content: center; | 161 | justify-content: center; |
@@ -165,7 +164,6 @@ page { | @@ -165,7 +164,6 @@ page { | ||
165 | } | 164 | } |
166 | .container .cno .kongbox image { | 165 | .container .cno .kongbox image { |
167 | width: 100%; | 166 | width: 100%; |
168 | - height: 600rpx; | ||
169 | } | 167 | } |
170 | .container .cno .kongbox .c_name { | 168 | .container .cno .kongbox .c_name { |
171 | margin-top: 30rpx; | 169 | margin-top: 30rpx; |
@@ -10,22 +10,22 @@ | @@ -10,22 +10,22 @@ | ||
10 | <view class="searchbox"> | 10 | <view class="searchbox"> |
11 | <view class="searchinput" bindtap="goSearch"> | 11 | <view class="searchinput" bindtap="goSearch"> |
12 | <image class="searchicon" src="{{imagesUrl}}assets/static/img/v-y.png" mode=""></image> | 12 | <image class="searchicon" src="{{imagesUrl}}assets/static/img/v-y.png" mode=""></image> |
13 | - <input bindinput="navtosearch" type="text" placeholder="搜索您想要的商品" placeholder-style="color:#C8C9CC;font-size:28rpx" value="" /> | 13 | + <input bindinput="navtosearch" type="text" placeholder="搜索你想要的4S店产品" placeholder-style="color:#C8C9CC;font-size:28rpx" value="" /> |
14 | </view> | 14 | </view> |
15 | </view> | 15 | </view> |
16 | <view class="top_tit"> | 16 | <view class="top_tit"> |
17 | <view class="tit_list"> | 17 | <view class="tit_list"> |
18 | <view class="tit_item"> | 18 | <view class="tit_item"> |
19 | <image src="{{imagesUrl}}assets/static/img/a_2.png" /> | 19 | <image src="{{imagesUrl}}assets/static/img/a_2.png" /> |
20 | - <view class="item_names">口碑商品</view> | 20 | + <view class="item_names">品牌授权</view> |
21 | </view> | 21 | </view> |
22 | <view class="tit_item"> | 22 | <view class="tit_item"> |
23 | <image src="{{imagesUrl}}assets/static/img/a_3.png" /> | 23 | <image src="{{imagesUrl}}assets/static/img/a_3.png" /> |
24 | - <view class="item_names">仓储供应</view> | 24 | + <view class="item_names">品质保障</view> |
25 | </view> | 25 | </view> |
26 | <view class="tit_item"> | 26 | <view class="tit_item"> |
27 | <image src="{{imagesUrl}}assets/static/img/a_1.png" /> | 27 | <image src="{{imagesUrl}}assets/static/img/a_1.png" /> |
28 | - <view class="item_names">品质担保</view> | 28 | + <view class="item_names">服务担保</view> |
29 | </view> | 29 | </view> |
30 | </view> | 30 | </view> |
31 | </view> | 31 | </view> |
@@ -4,7 +4,7 @@ | @@ -4,7 +4,7 @@ | ||
4 | <view class="search_box"> | 4 | <view class="search_box"> |
5 | <view class="search"> | 5 | <view class="search"> |
6 | <image src="{{imagesUrl}}assets/static/img/searchone.png"></image> | 6 | <image src="{{imagesUrl}}assets/static/img/searchone.png"></image> |
7 | - <input type="text" placeholder="请输入搜索内容" value="{{searchValue}}" confirm-type="search" bindinput="getInput" bindconfirm="bindconfirm" name="input"></input> | 7 | + <input type="text" placeholder="请输入汽车4S店名称" value="{{searchValue}}" confirm-type="search" bindinput="getInput" bindconfirm="bindconfirm" name="input"></input> |
8 | </view> | 8 | </view> |
9 | <button class="search_btn" style="width:100rpx!important" formType='submit'>搜索</button> | 9 | <button class="search_btn" style="width:100rpx!important" formType='submit'>搜索</button> |
10 | </view> | 10 | </view> |
@@ -25,6 +25,7 @@ Page({ | @@ -25,6 +25,7 @@ Page({ | ||
25 | good_id: '', | 25 | good_id: '', |
26 | good_name: '', | 26 | good_name: '', |
27 | imgShare: '', | 27 | imgShare: '', |
28 | + deltrue: false | ||
28 | }, | 29 | }, |
29 | onLoad: function (options) { // 接收参数 | 30 | onLoad: function (options) { // 接收参数 |
30 | console.log(options); | 31 | console.log(options); |
@@ -32,15 +33,9 @@ Page({ | @@ -32,15 +33,9 @@ Page({ | ||
32 | that.setData({ | 33 | that.setData({ |
33 | id: options.id | 34 | id: options.id |
34 | }) | 35 | }) |
36 | + that.getMyorder() | ||
35 | }, | 37 | }, |
36 | - onShow: function () { | ||
37 | - this.getMyorder() | ||
38 | - }, | ||
39 | - goGuang() { | ||
40 | - // wx.switchTab({ | ||
41 | - // url: '/pages/home/home' | ||
42 | - // }) | ||
43 | - }, | 38 | + onShow: function () {}, |
44 | onChange(e) { | 39 | onChange(e) { |
45 | this.setData({ | 40 | this.setData({ |
46 | timeData: e.detail, | 41 | timeData: e.detail, |
@@ -70,8 +65,7 @@ Page({ | @@ -70,8 +65,7 @@ Page({ | ||
70 | } | 65 | } |
71 | 66 | ||
72 | }, | 67 | }, |
73 | - // 去支付 | ||
74 | - gotoplay() { | 68 | + gotoplay() { // 去支付 |
75 | wx.navigateTo({ | 69 | wx.navigateTo({ |
76 | url: '/pages/cheConfirmAnOrder/cheConfirmAnOrder' | 70 | url: '/pages/cheConfirmAnOrder/cheConfirmAnOrder' |
77 | }) | 71 | }) |
@@ -177,33 +171,53 @@ Page({ | @@ -177,33 +171,53 @@ Page({ | ||
177 | 171 | ||
178 | 172 | ||
179 | }, | 173 | }, |
180 | - async Abholung(e) { // | 174 | + delOrder(e) { // 删除 |
181 | let that = this | 175 | let that = this |
182 | - // try { | ||
183 | - // const { | ||
184 | - // data | ||
185 | - // } = await request({ | ||
186 | - // url: 'api/my/qvOrder', | ||
187 | - // data: { | ||
188 | - // order_no: e.currentTarget.dataset.order_no | ||
189 | - // } | ||
190 | - // }) | ||
191 | - // console.log(data, ""); | ||
192 | - // that.setData({ | ||
193 | - // msg: data.msg | ||
194 | - // }) | ||
195 | - // that.popSuccessTest() | ||
196 | - // setTimeout(() => { | ||
197 | - // that.getMyorder() | ||
198 | - // }, 1300); | ||
199 | - | ||
200 | - // } catch (err) { | ||
201 | - // that.setData({ | ||
202 | - // msg: err.msg | ||
203 | - // }) | ||
204 | - // that.popMaskTest() | ||
205 | - // } | 176 | + that.setData({ |
177 | + deltrue: true | ||
178 | + }) | ||
179 | + wx.showModal({ | ||
180 | + title: '提示', | ||
181 | + content: '确定要删除该订单吗?', | ||
182 | + success: async function (res) { | ||
183 | + if (res.confirm) { | ||
184 | + try { | ||
185 | + const { | ||
186 | + data | ||
187 | + } = await request({ | ||
188 | + url: 'api/new2/tuiOrderDel', | ||
189 | + data: { | ||
190 | + order_no: e.currentTarget.dataset.order_no | ||
191 | + } | ||
192 | + }) | ||
193 | + console.log(data, "取消订单"); | ||
194 | + if (data.code == 1) { | ||
195 | + let msg = data.msg | ||
196 | + a.popSuccessTest(msg) | ||
197 | + setTimeout(() => { | ||
198 | + that.getMyorder() | ||
199 | + that.setData({ | ||
200 | + deltrue: false | ||
201 | + }) | ||
202 | + }, 1000); | ||
203 | + } else { | ||
204 | + let msg = data.msg | ||
205 | + a.popTest(msg) | ||
206 | + that.setData({ | ||
207 | + deltrue: false | ||
208 | + }) | ||
209 | + } | ||
210 | + } catch (err) { | ||
211 | + let msg = err.msg | ||
212 | + a.popTest(msg) | ||
213 | + that.setData({ | ||
214 | + deltrue: false | ||
215 | + }) | ||
206 | 216 | ||
217 | + } | ||
218 | + } else {} | ||
219 | + } | ||
220 | + }) | ||
207 | }, | 221 | }, |
208 | async returnStore(e) { // 申请退货 | 222 | async returnStore(e) { // 申请退货 |
209 | let that = this | 223 | let that = this |
@@ -274,8 +288,6 @@ Page({ | @@ -274,8 +288,6 @@ Page({ | ||
274 | }) | 288 | }) |
275 | this.popMaskTest() | 289 | this.popMaskTest() |
276 | } | 290 | } |
277 | - | ||
278 | - | ||
279 | }, | 291 | }, |
280 | async CancelRefund(e) { //取消退款 | 292 | async CancelRefund(e) { //取消退款 |
281 | let that = this | 293 | let that = this |
@@ -37,7 +37,7 @@ | @@ -37,7 +37,7 @@ | ||
37 | </view> | 37 | </view> |
38 | </view> | 38 | </view> |
39 | </view> | 39 | </view> |
40 | - <view class="down_buttons" wx:if="{{item.way3 != 7 }}"> | 40 | + <view class="down_buttons"> |
41 | <view class="pay_time_per"> | 41 | <view class="pay_time_per"> |
42 | <view class="surplus_times" wx:if="{{item.way3 == 3 }}"> | 42 | <view class="surplus_times" wx:if="{{item.way3 == 3 }}"> |
43 | <view class="buy_tims">剩余时间:</view> | 43 | <view class="buy_tims">剩余时间:</view> |
@@ -80,9 +80,11 @@ | @@ -80,9 +80,11 @@ | ||
80 | 立即评价 | 80 | 立即评价 |
81 | </button> | 81 | </button> |
82 | </view> | 82 | </view> |
83 | - <!-- <view class="btns btnitem btn3" wx:if="{{item.way3 == 7}}"> | ||
84 | - <button class="btn btn_2 btnRight" data-order_no="{{item.order_no}}">已完成</button> | ||
85 | - </view> --> | 83 | + <view class="btns btnitem btn3" wx:if="{{item.way3 == 7}}"> |
84 | + <button class="btn btn_1 btnRight" disabled="{{deltrue}}" catchtap="delOrder" data-order_no="{{item.order_no}}"> | ||
85 | + 删除 | ||
86 | + </button> | ||
87 | + </view> | ||
86 | <view class="btns btnitem" wx:if="{{item.way3 == 8}}"> | 88 | <view class="btns btnitem" wx:if="{{item.way3 == 8}}"> |
87 | <view class="date_time tuitime2">{{item.tui_time2}}</view> | 89 | <view class="date_time tuitime2">{{item.tui_time2}}</view> |
88 | <view class="cd"> | 90 | <view class="cd"> |
@@ -97,7 +99,7 @@ | @@ -97,7 +99,7 @@ | ||
97 | </block> | 99 | </block> |
98 | </block> | 100 | </block> |
99 | <view class="dmc" wx:else> | 101 | <view class="dmc" wx:else> |
100 | - <view class="emmpty4S" bindtap="goGuang" wx:if="{{it_cloose == true}}"> | 102 | + <view class="emmpty4S" wx:if="{{it_cloose == true}}"> |
101 | <view class="c_img"> | 103 | <view class="c_img"> |
102 | <image src="{{imagesUrl}}assets/static/img/web2x_gouwuche_img.png" /> | 104 | <image src="{{imagesUrl}}assets/static/img/web2x_gouwuche_img.png" /> |
103 | <view class="textName">暂无相关订单</view> | 105 | <view class="textName">暂无相关订单</view> |
@@ -203,6 +203,7 @@ page .container .tuan_order_lists .changeService .down_buttons .btns .btn { | @@ -203,6 +203,7 @@ page .container .tuan_order_lists .changeService .down_buttons .btns .btn { | ||
203 | page .container .tuan_order_lists .changeService .down_buttons .btns .btn_1 { | 203 | page .container .tuan_order_lists .changeService .down_buttons .btns .btn_1 { |
204 | border: 2rpx solid #ccc; | 204 | border: 2rpx solid #ccc; |
205 | color: #06121E; | 205 | color: #06121E; |
206 | + background-color: #fff; | ||
206 | } | 207 | } |
207 | page .container .tuan_order_lists .changeService .down_buttons .btns .btn_2 { | 208 | page .container .tuan_order_lists .changeService .down_buttons .btns .btn_2 { |
208 | color: #fff; | 209 | color: #fff; |
@@ -56,9 +56,33 @@ Page({ | @@ -56,9 +56,33 @@ Page({ | ||
56 | name: e.detail.value | 56 | name: e.detail.value |
57 | }) | 57 | }) |
58 | }, | 58 | }, |
59 | + bindinputed(e) { | ||
60 | + let that = this | ||
61 | + let carNum = e.detail.value | ||
62 | + let sheng_id = that.data.sheng_id | ||
63 | + let reg = /^(([A-Z](([0-9]{5}[DF])|([DF]([A-HJ-NP-Z0-9])[0-9]{4})))|([A-Z][A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳使领]))$/ | ||
64 | + const careg = reg.test(carNum); | ||
65 | + if (!careg) { | ||
66 | + wx.showToast({ | ||
67 | + icon: 'none', | ||
68 | + title: '请输入正确车牌号', | ||
69 | + }) | ||
70 | + return; | ||
71 | + } else { | ||
72 | + that.setData({ | ||
73 | + pai: carNum | ||
74 | + }) | ||
75 | + console.log(that.data.shengItem, "shengItem"); | ||
76 | + if (sheng_id != '') { | ||
77 | + that.getRegister() | ||
78 | + } | ||
79 | + | ||
80 | + } | ||
81 | + }, | ||
59 | paiInput(e) { // c车牌号 | 82 | paiInput(e) { // c车牌号 |
60 | let that = this | 83 | let that = this |
61 | let carNum = e.detail.value | 84 | let carNum = e.detail.value |
85 | + // let sheng_id = that.data.sheng_id | ||
62 | let reg = /^(([A-Z](([0-9]{5}[DF])|([DF]([A-HJ-NP-Z0-9])[0-9]{4})))|([A-Z][A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳使领]))$/ | 86 | let reg = /^(([A-Z](([0-9]{5}[DF])|([DF]([A-HJ-NP-Z0-9])[0-9]{4})))|([A-Z][A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳使领]))$/ |
63 | const careg = reg.test(carNum); | 87 | const careg = reg.test(carNum); |
64 | if (!careg) { | 88 | if (!careg) { |
@@ -71,9 +95,56 @@ Page({ | @@ -71,9 +95,56 @@ Page({ | ||
71 | that.setData({ | 95 | that.setData({ |
72 | pai: carNum | 96 | pai: carNum |
73 | }) | 97 | }) |
98 | + console.log(that.data.shengItem, "shengItem"); | ||
99 | + // if (sheng_id != '') { | ||
100 | + // that.getRegister() | ||
101 | + // } | ||
102 | + | ||
74 | } | 103 | } |
75 | 104 | ||
76 | }, | 105 | }, |
106 | + async getRegister() { // 注册 | ||
107 | + let that = this | ||
108 | + try { | ||
109 | + const { | ||
110 | + data | ||
111 | + } = await request({ | ||
112 | + url: 'api/new2/checkPai', | ||
113 | + data: { | ||
114 | + sheng_id: that.data.sheng_id, | ||
115 | + pai: that.data.pai, | ||
116 | + } | ||
117 | + }) | ||
118 | + console.log(data, "注册"); | ||
119 | + if (data.code == 1) { | ||
120 | + let msg = data.msg | ||
121 | + a.popSuccessTest(msg) | ||
122 | + } else { | ||
123 | + let msg = data.msg | ||
124 | + // a.popTest(msg) | ||
125 | + wx.showModal({ | ||
126 | + title: '提示', | ||
127 | + content: '该车已被注册,是否申请加入车辆管理?', | ||
128 | + success: function (res) { | ||
129 | + if (res.confirm) { | ||
130 | + wx.navigateTo({ | ||
131 | + | ||
132 | + }) | ||
133 | + | ||
134 | + } else { | ||
135 | + | ||
136 | + } | ||
137 | + } | ||
138 | + }) | ||
139 | + } | ||
140 | + | ||
141 | + } catch (err) { | ||
142 | + let msg = err.msg | ||
143 | + a.popTest(msg) | ||
144 | + } | ||
145 | + | ||
146 | + | ||
147 | + }, | ||
77 | bindTimeChange(e) { // 时间 | 148 | bindTimeChange(e) { // 时间 |
78 | this.setData({ | 149 | this.setData({ |
79 | buy_time: e.detail.value | 150 | buy_time: e.detail.value |
@@ -233,6 +304,7 @@ Page({ | @@ -233,6 +304,7 @@ Page({ | ||
233 | tiveCar(e) { // 车牌号 | 304 | tiveCar(e) { // 车牌号 |
234 | let that = this | 305 | let that = this |
235 | let idx = e.currentTarget.dataset.id | 306 | let idx = e.currentTarget.dataset.id |
307 | + let pai = that.data.pai | ||
236 | that.setData({ | 308 | that.setData({ |
237 | idx: idx | 309 | idx: idx |
238 | }) | 310 | }) |
@@ -246,6 +318,9 @@ Page({ | @@ -246,6 +318,9 @@ Page({ | ||
246 | } | 318 | } |
247 | }) | 319 | }) |
248 | that.hideModal() | 320 | that.hideModal() |
321 | + if (pai != '') { | ||
322 | + that.getRegister() | ||
323 | + } | ||
249 | }, | 324 | }, |
250 | async formSubmit(e) { // 保存时 | 325 | async formSubmit(e) { // 保存时 |
251 | let that = this | 326 | let that = this |
@@ -11,10 +11,10 @@ | @@ -11,10 +11,10 @@ | ||
11 | <view class='select'> | 11 | <view class='select'> |
12 | <view class="colorHui" wx:if="{{color == 1}}">{{shengItem}}</view> | 12 | <view class="colorHui" wx:if="{{color == 1}}">{{shengItem}}</view> |
13 | <view class="sheng_id" wx:else>{{shengItem}}</view> | 13 | <view class="sheng_id" wx:else>{{shengItem}}</view> |
14 | - <image class='select_img {{show&&"select_img_rotate"}}' src='{{imagesUrl}}assets/static/img/down_arrow.png'></image> | 14 | + <image class='select_img {{show &&"select_img_rotate"}}' src='{{imagesUrl}}assets/static/img/down_arrow.png'></image> |
15 | </view> | 15 | </view> |
16 | </view> | 16 | </view> |
17 | - <input type="text" value="{{pai}}" placeholder="英文字母请大写" placeholder-class="text_car" name="pai" bindblur="paiInput" bindinput="bindinput" class="inputitem" maxlength="17" /> | 17 | + <input type="text" value="{{pai}}" placeholder="英文字母请大写" placeholder-class="text_car" name="pai" bindblur="paiInput" bindinput="bindinputed" class="inputitem" maxlength="17" /> |
18 | </view> | 18 | </view> |
19 | <view class="card_logo car"> | 19 | <view class="card_logo car"> |
20 | <label for="车辆品牌" class="labelsitem">车辆品牌:</label> | 20 | <label for="车辆品牌" class="labelsitem">车辆品牌:</label> |
@@ -58,6 +58,7 @@ Page({ | @@ -58,6 +58,7 @@ Page({ | ||
58 | paiInput(e) { // c车牌号 | 58 | paiInput(e) { // c车牌号 |
59 | let that = this | 59 | let that = this |
60 | let carNum = e.detail.value | 60 | let carNum = e.detail.value |
61 | + let sheng_id = that.data.sheng_id | ||
61 | let reg = /^(([A-Z](([0-9]{5}[DF])|([DF]([A-HJ-NP-Z0-9])[0-9]{4})))|([A-Z][A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳使领]))$/ | 62 | let reg = /^(([A-Z](([0-9]{5}[DF])|([DF]([A-HJ-NP-Z0-9])[0-9]{4})))|([A-Z][A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳使领]))$/ |
62 | const careg = reg.test(carNum); | 63 | const careg = reg.test(carNum); |
63 | if (!careg) { | 64 | if (!careg) { |
@@ -70,25 +71,79 @@ Page({ | @@ -70,25 +71,79 @@ Page({ | ||
70 | that.setData({ | 71 | that.setData({ |
71 | pai: carNum | 72 | pai: carNum |
72 | }) | 73 | }) |
74 | + if (sheng_id != '') { | ||
75 | + that.getRegister() | ||
76 | + } | ||
77 | + } | ||
78 | + | ||
79 | + }, | ||
80 | + bindinputed(e) { | ||
81 | + let that = this | ||
82 | + let carNum = e.detail.value | ||
83 | + let sheng_id = that.data.sheng_id | ||
84 | + let reg = /^(([A-Z](([0-9]{5}[DF])|([DF]([A-HJ-NP-Z0-9])[0-9]{4})))|([A-Z][A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳使领]))$/ | ||
85 | + const careg = reg.test(carNum); | ||
86 | + if (!careg) { | ||
87 | + wx.showToast({ | ||
88 | + icon: 'none', | ||
89 | + title: '请输入正确车牌号', | ||
90 | + }) | ||
91 | + return; | ||
92 | + } else { | ||
93 | + that.setData({ | ||
94 | + pai: carNum | ||
95 | + }) | ||
96 | + console.log(that.data.shengItem, "shengItem"); | ||
97 | + if (sheng_id != '') { | ||
98 | + that.getRegister() | ||
99 | + } | ||
100 | + | ||
101 | + } | ||
102 | + }, | ||
103 | + async getRegister() { // 注册 | ||
104 | + let that = this | ||
105 | + try { | ||
106 | + const { | ||
107 | + data | ||
108 | + } = await request({ | ||
109 | + url: 'api/new2/checkPai', | ||
110 | + data: { | ||
111 | + sheng_id: that.data.sheng_id, | ||
112 | + pai: that.data.pai, | ||
113 | + } | ||
114 | + }) | ||
115 | + console.log(data, "注册"); | ||
116 | + if (data.code == 1) { | ||
117 | + let msg = data.msg | ||
118 | + a.popSuccessTest(msg) | ||
119 | + } else { | ||
120 | + let msg = data.msg | ||
121 | + // a.popTest(msg) | ||
122 | + wx.showModal({ | ||
123 | + title: '提示', | ||
124 | + content: '该车已被注册,是否申请加入车辆管理?', | ||
125 | + success: function (res) { | ||
126 | + if (res.confirm) { | ||
127 | + wx.navigateTo({ | ||
128 | + | ||
129 | + }) | ||
130 | + | ||
131 | + } else { | ||
132 | + | ||
133 | + } | ||
134 | + } | ||
135 | + }) | ||
136 | + } | ||
137 | + | ||
138 | + } catch (err) { | ||
139 | + that.setData({ | ||
140 | + msg: err.msg | ||
141 | + }) | ||
142 | + that.popTest() | ||
73 | } | 143 | } |
74 | - // let value = (e.detail.value || '').trim() | ||
75 | - // console.log(value); | ||
76 | - // if (value) { | ||
77 | - // const reg = /[\u4e00-\u9fa5]/ig | ||
78 | - // if ((reg.test(value))) { | ||
79 | - // value = value.replace(reg, '') | ||
80 | - // that.setData({ | ||
81 | - // msg: '不允许输入中文', | ||
82 | - // pai: '' | ||
83 | - // }) | ||
84 | - // that.popTest() | ||
85 | - // } else { | ||
86 | - // that.setData({ | ||
87 | - // pai: value | ||
88 | - // }) | ||
89 | - // } | ||
90 | - // } | 144 | + |
91 | }, | 145 | }, |
146 | + | ||
92 | bindTimeChange(e) { // 时间 | 147 | bindTimeChange(e) { // 时间 |
93 | this.setData({ | 148 | this.setData({ |
94 | buy_time: e.detail.value | 149 | buy_time: e.detail.value |
@@ -214,6 +269,7 @@ Page({ | @@ -214,6 +269,7 @@ Page({ | ||
214 | tiveCar(e) { // 车牌号 | 269 | tiveCar(e) { // 车牌号 |
215 | let that = this | 270 | let that = this |
216 | let idx = e.currentTarget.dataset.id | 271 | let idx = e.currentTarget.dataset.id |
272 | + let pai = that.data.pai | ||
217 | that.setData({ | 273 | that.setData({ |
218 | idx: idx | 274 | idx: idx |
219 | }) | 275 | }) |
@@ -228,6 +284,9 @@ Page({ | @@ -228,6 +284,9 @@ Page({ | ||
228 | }) | 284 | }) |
229 | // console.log(that.data.shengItem, that.data.sheng_id); | 285 | // console.log(that.data.shengItem, that.data.sheng_id); |
230 | that.hideModal() | 286 | that.hideModal() |
287 | + if (pai != '') { | ||
288 | + that.getRegister() | ||
289 | + } | ||
231 | }, | 290 | }, |
232 | async getShengSu() { // 默认省份 | 291 | async getShengSu() { // 默认省份 |
233 | let that = this | 292 | let that = this |
@@ -18,7 +18,7 @@ | @@ -18,7 +18,7 @@ | ||
18 | </view> | 18 | </view> |
19 | </view> | 19 | </view> |
20 | <view class="box_input"> | 20 | <view class="box_input"> |
21 | - <input type="text" maxlength="10" value="{{pai}}" placeholder="英文字母请大写" placeholder-class="text_car" name="pai" catchblur="paiInput" /> | 21 | + <input type="text" maxlength="10" value="{{pai}}" placeholder="英文字母请大写" placeholder-class="text_car" name="pai" catchinput="bindinputed" catchblur="paiInput" /> |
22 | </view> | 22 | </view> |
23 | </view> | 23 | </view> |
24 | </view> | 24 | </view> |
@@ -10,14 +10,9 @@ Page({ | @@ -10,14 +10,9 @@ Page({ | ||
10 | way: 1, | 10 | way: 1, |
11 | msg: '', | 11 | msg: '', |
12 | it_cloosy: false, | 12 | it_cloosy: false, |
13 | + deltrue: false | ||
13 | }, | 14 | }, |
14 | onShow: function () { | 15 | onShow: function () { |
15 | - // wx.showToast({ | ||
16 | - // title: '加载中', | ||
17 | - // icon: "loading", | ||
18 | - // duration: 1500, | ||
19 | - // mask: false | ||
20 | - // }) | ||
21 | this.getMyorder() | 16 | this.getMyorder() |
22 | }, | 17 | }, |
23 | tomyOrderObligation(e) { // 进订单详情 | 18 | tomyOrderObligation(e) { // 进订单详情 |
@@ -55,34 +50,71 @@ Page({ | @@ -55,34 +50,71 @@ Page({ | ||
55 | 50 | ||
56 | } catch (err) { | 51 | } catch (err) { |
57 | console.log(err); | 52 | console.log(err); |
58 | - that.setData({ | ||
59 | - msg: err.msg | ||
60 | - }) | ||
61 | - that.popMaskTest() | 53 | + let msg = err.msg |
54 | + a.popTest(msg) | ||
62 | } | 55 | } |
63 | }, | 56 | }, |
64 | - goGuang() { | ||
65 | - wx.switchTab({ | ||
66 | - url: '/pages/home/home' | 57 | + |
58 | + delOrder(e) { // 删除 | ||
59 | + let that = this | ||
60 | + that.setData({ | ||
61 | + deltrue: true | ||
67 | }) | 62 | }) |
68 | - }, | ||
69 | - popSuccessTest() { | ||
70 | - wx.showToast({ | ||
71 | - title: this.data.msg, | ||
72 | - icon: '', //默认值是success,就算没有icon这个值,就算有其他值最终也显示success | ||
73 | - duration: 1300, //停留时间 | 63 | + wx.showModal({ |
64 | + title: '提示', | ||
65 | + content: '确定要删除该订单吗?', | ||
66 | + success: async function (res) { | ||
67 | + if (res.confirm) { | ||
68 | + try { | ||
69 | + const { | ||
70 | + data | ||
71 | + } = await request({ | ||
72 | + url: 'api/new2/activeOrderDel', | ||
73 | + data: { | ||
74 | + id: e.currentTarget.dataset.id | ||
75 | + } | ||
76 | + }) | ||
77 | + console.log(data, "删除"); | ||
78 | + if (data.code == 1) { | ||
79 | + let msg = data.msg | ||
80 | + a.popSuccessTest(msg) | ||
81 | + setTimeout(() => { | ||
82 | + that.getMyorder() | ||
83 | + that.setData({ | ||
84 | + deltrue: false | ||
85 | + }) | ||
86 | + }, 1000); | ||
87 | + } else { | ||
88 | + let msg = data.msg | ||
89 | + a.popTest(msg) | ||
90 | + that.setData({ | ||
91 | + deltrue: false | ||
92 | + }) | ||
93 | + } | ||
94 | + } catch (err) { | ||
95 | + let msg = err.msg | ||
96 | + a.popTest(msg) | ||
97 | + that.setData({ | ||
98 | + deltrue: false | ||
99 | + }) | ||
100 | + | ||
101 | + } | ||
102 | + } else { | ||
103 | + | ||
104 | + } | ||
105 | + } | ||
106 | + | ||
74 | }) | 107 | }) |
108 | + | ||
109 | + | ||
75 | }, | 110 | }, |
76 | - popMaskTest() { | ||
77 | - wx.showToast({ | ||
78 | - title: this.data.msg, | ||
79 | - duration: 1300, | ||
80 | - icon: 'none', | ||
81 | - mask: true //是否有透明蒙层,默认为false | ||
82 | - //如果有透明蒙层,弹窗的期间不能点击文档内容 | 111 | + goGuang() { |
112 | + wx.switchTab({ | ||
113 | + url: '/pages/home/home' | ||
83 | }) | 114 | }) |
84 | }, | 115 | }, |
85 | 116 | ||
86 | 117 | ||
87 | 118 | ||
119 | + | ||
88 | }) | 120 | }) |
@@ -124,6 +124,13 @@ page { | @@ -124,6 +124,13 @@ page { | ||
124 | background-color: #E8370F; | 124 | background-color: #E8370F; |
125 | } | 125 | } |
126 | 126 | ||
127 | + .delbtn { | ||
128 | + background-color: #fff; | ||
129 | + color: #06121E; | ||
130 | + margin-left: 20rpx; | ||
131 | + border: 2rpx solid #ccc; | ||
132 | + } | ||
133 | + | ||
127 | } | 134 | } |
128 | 135 | ||
129 | } | 136 | } |
@@ -150,8 +157,8 @@ page { | @@ -150,8 +157,8 @@ page { | ||
150 | justify-content: center; | 157 | justify-content: center; |
151 | 158 | ||
152 | image { | 159 | image { |
153 | - width: 196rpx; | ||
154 | - height: 196rpx; | 160 | + width: 500rpx; |
161 | + // height: 196rpx; | ||
155 | } | 162 | } |
156 | } | 163 | } |
157 | 164 |
@@ -22,13 +22,16 @@ | @@ -22,13 +22,16 @@ | ||
22 | </view> | 22 | </view> |
23 | <view class="btns"> | 23 | <view class="btns"> |
24 | <button class="btn" catchtap="tomyOrderObligation" data-id="{{item.id}}">查看订单</button> | 24 | <button class="btn" catchtap="tomyOrderObligation" data-id="{{item.id}}">查看订单</button> |
25 | + <button class="btn delbtn" disabled="{{deltrue}}" catchtap="delOrder" data-id="{{item.id}}"> | ||
26 | + 删除 | ||
27 | + </button> | ||
25 | </view> | 28 | </view> |
26 | </view> | 29 | </view> |
27 | </block> | 30 | </block> |
28 | <view class="dmc" wx:else> | 31 | <view class="dmc" wx:else> |
29 | <view class="emmpty4S" bindtap="goGuang" wx:if="{{it_cloosy}}"> | 32 | <view class="emmpty4S" bindtap="goGuang" wx:if="{{it_cloosy}}"> |
30 | <view class="c_img"> | 33 | <view class="c_img"> |
31 | - <image src="{{imagesUrl}}assets/static/img/web2x_gouwuche_img.png" /> | 34 | + <image src="{{imagesUrl}}assets/static/img/web2x_gouwuche_img.png" mode="widthFix" /> |
32 | </view> | 35 | </view> |
33 | <view class="textName"> | 36 | <view class="textName"> |
34 | <view class="c">您暂时没有相关订单</view> | 37 | <view class="c">您暂时没有相关订单</view> |
@@ -103,6 +103,12 @@ page { | @@ -103,6 +103,12 @@ page { | ||
103 | color: #fff; | 103 | color: #fff; |
104 | background-color: #E8370F; | 104 | background-color: #E8370F; |
105 | } | 105 | } |
106 | +.container .changeService .btns .delbtn { | ||
107 | + background-color: #fff; | ||
108 | + color: #06121E; | ||
109 | + margin-left: 20rpx; | ||
110 | + border: 2rpx solid #ccc; | ||
111 | +} | ||
106 | .container .dmc { | 112 | .container .dmc { |
107 | width: 100%; | 113 | width: 100%; |
108 | position: relative; | 114 | position: relative; |
@@ -125,8 +131,7 @@ page { | @@ -125,8 +131,7 @@ page { | ||
125 | justify-content: center; | 131 | justify-content: center; |
126 | } | 132 | } |
127 | .container .dmc .emmpty4S .c_img image { | 133 | .container .dmc .emmpty4S .c_img image { |
128 | - width: 196rpx; | ||
129 | - height: 196rpx; | 134 | + width: 500rpx; |
130 | } | 135 | } |
131 | .container .dmc .emmpty4S .textName { | 136 | .container .dmc .emmpty4S .textName { |
132 | width: 100%; | 137 | width: 100%; |
@@ -156,16 +156,6 @@ Page({ | @@ -156,16 +156,6 @@ Page({ | ||
156 | 156 | ||
157 | }, | 157 | }, |
158 | fail() { //这里是用户拒绝授权后的回调 | 158 | fail() { //这里是用户拒绝授权后的回调 |
159 | - // wx.openSetting({ | ||
160 | - // success: function (data) { | ||
161 | - // console.log(data) | ||
162 | - // if (data.authSetting["scope.writePhotosAlbum"] === true) { | ||
163 | - // console.log("是否授权成功") | ||
164 | - // } else { | ||
165 | - // applyApi.toast("授权失败"); | ||
166 | - // } | ||
167 | - // } | ||
168 | - // }) | ||
169 | wx.showModal({ | 159 | wx.showModal({ |
170 | title: '提示', | 160 | title: '提示', |
171 | content: '您取消授权,无法保存图片,点击确定打开权限', | 161 | content: '您取消授权,无法保存图片,点击确定打开权限', |
@@ -175,10 +165,6 @@ Page({ | @@ -175,10 +165,6 @@ Page({ | ||
175 | wx.openSetting({ | 165 | wx.openSetting({ |
176 | success(res) { | 166 | success(res) { |
177 | console.log(res.authSetting) | 167 | console.log(res.authSetting) |
178 | - // res.authSetting = { | ||
179 | - // "scope.userInfo": true, | ||
180 | - // "scope.userLocation": true | ||
181 | - // } | ||
182 | } | 168 | } |
183 | }) | 169 | }) |
184 | } else if (res.cancel) { | 170 | } else if (res.cancel) { |
@@ -229,14 +215,8 @@ Page({ | @@ -229,14 +215,8 @@ Page({ | ||
229 | complete: function (res) { | 215 | complete: function (res) { |
230 | console.log('complete后的res数据:') | 216 | console.log('complete后的res数据:') |
231 | }, | 217 | }, |
232 | - }) //, | 218 | + }) |
233 | }, | 219 | }, |
234 | - // fail: function (res) { | ||
235 | - // wx.showModal({ | ||
236 | - // title: '下载失败', | ||
237 | - // content: '请联系管理员', | ||
238 | - // }) | ||
239 | - // }, | ||
240 | complete: function (res) {}, | 220 | complete: function (res) {}, |
241 | }) | 221 | }) |
242 | }, | 222 | }, |
1 | page { | 1 | page { |
2 | - background-color: #fff; | 2 | + background-color: #f9f9f9; |
3 | + width: 100%; | ||
4 | + height: 100%; | ||
3 | } | 5 | } |
4 | 6 | ||
5 | .container { | 7 | .container { |
6 | - padding: 0 18rpx; | ||
7 | - box-sizing: border-box; | 8 | + |
9 | + width: 100%; | ||
10 | + | ||
11 | + .good { | ||
12 | + width: 100%; | ||
13 | + padding: 0 18rpx; | ||
14 | + box-sizing: border-box; | ||
15 | + | ||
16 | + .footlist_a { | ||
17 | + width: 100%; | ||
18 | + position: relative; | ||
19 | + border-top-left-radius: 10rpx; | ||
20 | + border-top-right-radius: 10rpx; | ||
21 | + | ||
22 | + .foot_left_a { | ||
23 | + float: left; | ||
24 | + width: 50%; | ||
25 | + padding: 24rpx 14rpx; | ||
26 | + box-sizing: border-box; | ||
27 | + | ||
28 | + .footbox { | ||
29 | + width: 100%; | ||
30 | + margin: 0 auto 20rpx; | ||
31 | + background: #fff; | ||
32 | + position: relative; | ||
33 | + border-radius: 20rpx; | ||
34 | + | ||
35 | + | ||
36 | + image { | ||
37 | + width: 100%; | ||
38 | + border-top-left-radius: 10rpx; | ||
39 | + border-top-right-radius: 10rpx; | ||
40 | + } | ||
41 | + | ||
42 | + .text_bx { | ||
43 | + width: 100%; | ||
44 | + padding: 0 18rpx 20rpx; | ||
45 | + box-sizing: border-box; | ||
46 | + | ||
47 | + .ster_nams { | ||
48 | + width: 100%; | ||
49 | + font-size: 28rpx; | ||
50 | + font-family: PingFang SC, | ||
51 | + PingFang SC-Regular; | ||
52 | + font-weight: 400; | ||
53 | + text-align: left; | ||
54 | + color: #06121e; | ||
55 | + line-height: 40rpx; | ||
56 | + } | ||
57 | + | ||
58 | + .cen_tite { | ||
59 | + width: 100%; | ||
60 | + display: flex; | ||
61 | + align-items: center; | ||
62 | + justify-content: space-between; | ||
63 | + padding: 20rpx 0; | ||
64 | + box-sizing: border-box; | ||
65 | + | ||
66 | + | ||
67 | + .lis_title { | ||
68 | + padding: 5rpx 14rpx; | ||
69 | + box-sizing: border-box; | ||
70 | + display: flex; | ||
71 | + align-items: center; | ||
72 | + justify-content: center; | ||
73 | + font-size: 22rpx; | ||
74 | + color: #fff; | ||
75 | + background-color: #F02928; | ||
76 | + border-radius: 4rpx; | ||
77 | + } | ||
78 | + | ||
79 | + .stay { | ||
80 | + display: flex; | ||
81 | + align-items: center; | ||
82 | + justify-content: flex-end; | ||
83 | + | ||
84 | + .numbe { | ||
85 | + font-size: 22rpx; | ||
86 | + color: #E8370F; | ||
87 | + | ||
88 | + } | ||
89 | + | ||
90 | + .ber_name { | ||
91 | + font-size: 22rpx; | ||
92 | + color: #06121E; | ||
93 | + } | ||
94 | + } | ||
95 | + } | ||
96 | + | ||
97 | + .price_bx { | ||
98 | + width: 100%; | ||
99 | + display: flex; | ||
100 | + align-items: center; | ||
101 | + | ||
102 | + .pt { | ||
103 | + display: flex; | ||
104 | + align-items: baseline; | ||
105 | + | ||
106 | + .pt_icon { | ||
107 | + font-size: 22rpx; | ||
108 | + color: #FF4444; | ||
109 | + font-weight: 500; | ||
110 | + | ||
111 | + } | ||
112 | + | ||
113 | + .pt_price { | ||
114 | + font-size: 28rpx; | ||
115 | + color: #FF4444; | ||
116 | + font-weight: 500; | ||
117 | + | ||
118 | + } | ||
119 | + } | ||
120 | + | ||
121 | + .del { | ||
122 | + margin-left: 30rpx; | ||
123 | + font-size: 24rpx; | ||
124 | + color: #5B5E63; | ||
125 | + text-decoration: line-through; | ||
126 | + } | ||
127 | + | ||
128 | + } | ||
129 | + } | ||
130 | + | ||
131 | + .cl_color { | ||
132 | + width: 100%; | ||
133 | + background: linear-gradient(90deg, #f02928, #fd7f2e); | ||
134 | + border-radius: 8rpx; | ||
135 | + position: relative; | ||
136 | + padding: 10rpx 0; | ||
137 | + box-sizing: border-box; | ||
138 | + margin-top: 10rpx; | ||
139 | + | ||
140 | + .progess { | ||
141 | + width: 100%; | ||
142 | + padding: 0 10rpx; | ||
143 | + box-sizing: border-box; | ||
144 | + } | ||
145 | + | ||
146 | + .cl_name { | ||
147 | + width: 100%; | ||
148 | + font-size: 28rpx; | ||
149 | + font-family: PingFang SC, | ||
150 | + PingFang SC-Medium; | ||
151 | + font-weight: 500; | ||
152 | + text-align: center; | ||
153 | + color: #ffffff; | ||
154 | + } | ||
155 | + | ||
156 | + .image_color { | ||
157 | + width: 32rpx; | ||
158 | + height: 32rpx; | ||
159 | + position: absolute; | ||
160 | + top: -20rpx; | ||
161 | + right: -10rpx; | ||
162 | + } | ||
163 | + } | ||
164 | + } | ||
165 | + } | ||
166 | + | ||
167 | + .foot_right_a { | ||
168 | + float: left; | ||
169 | + width: 50%; | ||
170 | + padding: 24rpx 14rpx; | ||
171 | + box-sizing: border-box; | ||
172 | + | ||
173 | + .footbox { | ||
174 | + width: 100%; | ||
175 | + margin: 0 auto 20rpx; | ||
176 | + background: #fff; | ||
177 | + position: relative; | ||
178 | + border-radius: 20rpx; | ||
179 | + | ||
180 | + | ||
181 | + image { | ||
182 | + width: 100%; | ||
183 | + border-top-left-radius: 10rpx; | ||
184 | + border-top-right-radius: 10rpx; | ||
185 | + } | ||
186 | + | ||
187 | + .text_bx { | ||
188 | + width: 100%; | ||
189 | + padding: 0 18rpx 20rpx; | ||
190 | + box-sizing: border-box; | ||
191 | + | ||
192 | + .ster_nams { | ||
193 | + width: 100%; | ||
194 | + font-size: 28rpx; | ||
195 | + font-family: PingFang SC, | ||
196 | + PingFang SC-Regular; | ||
197 | + font-weight: 400; | ||
198 | + text-align: left; | ||
199 | + color: #06121e; | ||
200 | + line-height: 40rpx; | ||
201 | + } | ||
202 | + | ||
203 | + .cen_tite { | ||
204 | + width: 100%; | ||
205 | + display: flex; | ||
206 | + align-items: center; | ||
207 | + justify-content: space-between; | ||
208 | + padding: 20rpx 0; | ||
209 | + box-sizing: border-box; | ||
210 | + | ||
211 | + | ||
212 | + .lis_title { | ||
213 | + padding: 5rpx 14rpx; | ||
214 | + box-sizing: border-box; | ||
215 | + display: flex; | ||
216 | + align-items: center; | ||
217 | + justify-content: center; | ||
218 | + font-size: 22rpx; | ||
219 | + color: #fff; | ||
220 | + background-color: #F02928; | ||
221 | + border-radius: 4rpx; | ||
222 | + } | ||
223 | + | ||
224 | + .stay { | ||
225 | + display: flex; | ||
226 | + align-items: center; | ||
227 | + justify-content: flex-end; | ||
228 | + | ||
229 | + .numbe { | ||
230 | + font-size: 22rpx; | ||
231 | + color: #E8370F; | ||
232 | + | ||
233 | + } | ||
234 | + | ||
235 | + .ber_name { | ||
236 | + font-size: 22rpx; | ||
237 | + color: #06121E; | ||
238 | + } | ||
239 | + } | ||
240 | + } | ||
241 | + | ||
242 | + .price_bx { | ||
243 | + width: 100%; | ||
244 | + display: flex; | ||
245 | + align-items: center; | ||
246 | + | ||
247 | + | ||
248 | + .pt { | ||
249 | + display: flex; | ||
250 | + align-items: baseline; | ||
251 | + | ||
252 | + .pt_icon { | ||
253 | + font-size: 22rpx; | ||
254 | + color: #FF4444; | ||
255 | + font-weight: 500; | ||
256 | + | ||
257 | + } | ||
258 | + | ||
259 | + .pt_price { | ||
260 | + font-size: 28rpx; | ||
261 | + color: #FF4444; | ||
262 | + font-weight: 500; | ||
263 | + | ||
264 | + } | ||
265 | + } | ||
266 | + | ||
267 | + .del { | ||
268 | + margin-left: 30rpx; | ||
269 | + font-size: 24rpx; | ||
270 | + color: #5B5E63; | ||
271 | + text-decoration: line-through; | ||
272 | + } | ||
273 | + | ||
274 | + } | ||
275 | + } | ||
276 | + | ||
277 | + .cl_color { | ||
278 | + width: 100%; | ||
279 | + background: linear-gradient(90deg, #f02928, #fd7f2e); | ||
280 | + border-radius: 8rpx; | ||
281 | + position: relative; | ||
282 | + padding: 10rpx 0; | ||
283 | + box-sizing: border-box; | ||
284 | + margin-top: 10rpx; | ||
285 | + | ||
286 | + .progess { | ||
287 | + width: 100%; | ||
288 | + padding: 0 10rpx; | ||
289 | + box-sizing: border-box; | ||
290 | + } | ||
291 | + | ||
292 | + .cl_name { | ||
293 | + width: 100%; | ||
294 | + font-size: 28rpx; | ||
295 | + font-family: PingFang SC, | ||
296 | + PingFang SC-Medium; | ||
297 | + font-weight: 500; | ||
298 | + text-align: center; | ||
299 | + color: #ffffff; | ||
300 | + } | ||
301 | + | ||
302 | + .image_color { | ||
303 | + width: 32rpx; | ||
304 | + height: 32rpx; | ||
305 | + position: absolute; | ||
306 | + top: -20rpx; | ||
307 | + right: -10rpx; | ||
308 | + } | ||
309 | + } | ||
310 | + } | ||
311 | + | ||
312 | + } | ||
313 | + | ||
314 | + &::after { | ||
315 | + content: ''; | ||
316 | + clear: both; | ||
317 | + display: block; | ||
318 | + } | ||
319 | + } | ||
320 | + } | ||
8 | 321 | ||
9 | .goods_list { | 322 | .goods_list { |
10 | width: 100%; | 323 | width: 100%; |
@@ -234,175 +547,6 @@ page { | @@ -234,175 +547,6 @@ page { | ||
234 | 547 | ||
235 | } | 548 | } |
236 | 549 | ||
237 | - // .like_list { | ||
238 | - // width: 100%; | ||
239 | - // height: 100%; | ||
240 | - // display: flex; | ||
241 | - // padding: 30rpx 0; | ||
242 | - // box-sizing: border-box; | ||
243 | - // border-bottom: 1rpx solid #EEEEEE; | ||
244 | - | ||
245 | - // .list_left { | ||
246 | - // width: 208rpx; | ||
247 | - // height: 208rpx; | ||
248 | - // margin-right: 20rpx; | ||
249 | - // flex: 0 0 auto; | ||
250 | - | ||
251 | - // image { | ||
252 | - // width: 100%; | ||
253 | - | ||
254 | - // } | ||
255 | - // } | ||
256 | - | ||
257 | - // .list_right { | ||
258 | - // height: 208rpx; | ||
259 | - // display: flex; | ||
260 | - // flex-direction: column; | ||
261 | - // justify-content: space-between; | ||
262 | - | ||
263 | - // .like_list_text { | ||
264 | - // font-size: 28rpx; | ||
265 | - // line-height: 38rpx; | ||
266 | - // height: 82rpx; | ||
267 | - // color: rgba(6, 18, 31, 1); | ||
268 | - // display: -webkit-box; | ||
269 | - // -webkit-line-clamp: 2; | ||
270 | - // overflow: hidden; | ||
271 | - // text-overflow: ellipsis; | ||
272 | - // -webkit-box-orient: vertical; | ||
273 | - // } | ||
274 | - | ||
275 | - // .newzeng { | ||
276 | - // width: 100%; | ||
277 | - // display: flex; | ||
278 | - // align-items: center; | ||
279 | - | ||
280 | - // .status_change { | ||
281 | - // padding: 5rpx 10rpx; | ||
282 | - // color: #E8370F; | ||
283 | - // border: 1rpx solid #E8370F; | ||
284 | - // font-size: 24rpx; | ||
285 | - // } | ||
286 | - | ||
287 | - // .rit_text { | ||
288 | - // margin-left: 30rpx; | ||
289 | - // display: flex; | ||
290 | - // align-items: center; | ||
291 | - | ||
292 | - // .numPer { | ||
293 | - // color: #FF444B; | ||
294 | - // font-size: 24rpx; | ||
295 | - // } | ||
296 | - | ||
297 | - // .numperson { | ||
298 | - // font-size: 24rpx; | ||
299 | - // color: #8C9198; | ||
300 | - // } | ||
301 | - | ||
302 | - // } | ||
303 | - | ||
304 | - // } | ||
305 | - | ||
306 | - // } | ||
307 | - // } | ||
308 | 550 | ||
309 | - /* 没图片的样式 */ | ||
310 | - // .like_list_1 { | ||
311 | - // width: 100%; | ||
312 | - // height: 100%; | ||
313 | - // padding: 20rpx 0; | ||
314 | - // box-sizing: border-box; | ||
315 | - // border-bottom: 1rpx solid #EEEEEE; | ||
316 | - | ||
317 | - // .like_list_text { | ||
318 | - // display: block; | ||
319 | - // height: 100%; | ||
320 | - // line-height: 70rpx; | ||
321 | - // color: #06121F; | ||
322 | - // } | ||
323 | - | ||
324 | - // .down_next { | ||
325 | - // .newzeng { | ||
326 | - // width: 100%; | ||
327 | - // display: flex; | ||
328 | - // align-items: center; | ||
329 | - | ||
330 | - // .status_change { | ||
331 | - // padding: 5rpx 10rpx; | ||
332 | - // color: #E8370F; | ||
333 | - // border: 1rpx solid #E8370F; | ||
334 | - // font-size: 24rpx; | ||
335 | - // } | ||
336 | - | ||
337 | - // .rit_text { | ||
338 | - // margin-left: 30rpx; | ||
339 | - // display: flex; | ||
340 | - // align-items: center; | ||
341 | - | ||
342 | - // .numPer { | ||
343 | - // color: #FF444B; | ||
344 | - // font-size: 24rpx; | ||
345 | - // } | ||
346 | - | ||
347 | - // .numperson { | ||
348 | - // font-size: 24rpx; | ||
349 | - // color: #8C9198; | ||
350 | - // } | ||
351 | - | ||
352 | - // } | ||
353 | - | ||
354 | - // } | ||
355 | - | ||
356 | - // .price_dP_ { | ||
357 | - // display: flex; | ||
358 | - // line-height: 55rpx; | ||
359 | - | ||
360 | - // .zan_price_ { | ||
361 | - // display: flex; | ||
362 | - // font-weight: bold; | ||
363 | - | ||
364 | - // .icon_name_ { | ||
365 | - // font-size: 28rpx; | ||
366 | - // color: #FF444B; | ||
367 | - // } | ||
368 | - | ||
369 | - // .money_icon_ { | ||
370 | - // margin-left: 10rpx; | ||
371 | - // font-size: 20rpx; | ||
372 | - // line-height: 61rpx; | ||
373 | - // color: #FF444B; | ||
374 | - // } | ||
375 | - | ||
376 | - // .price_big_ { | ||
377 | - // color: #FF444B; | ||
378 | - // font-size: 32rpx; | ||
379 | - // } | ||
380 | - // } | ||
381 | - | ||
382 | - // .del { | ||
383 | - // display: flex; | ||
384 | - // align-self: baseline; | ||
385 | - // margin-left: 40rpx; | ||
386 | - | ||
387 | - // .money_icon_ { | ||
388 | - // font-size: 20rpx; | ||
389 | - // color: #8C9198; | ||
390 | - // line-height: 55rpx; | ||
391 | - // } | ||
392 | - | ||
393 | - // .del_price_ { | ||
394 | - // font-size: 24rpx; | ||
395 | - // color: #8C9198; | ||
396 | - // text-decoration: line-through; | ||
397 | - // } | ||
398 | - | ||
399 | - | ||
400 | - // } | ||
401 | - | ||
402 | - // } | ||
403 | - // } | ||
404 | - | ||
405 | - | ||
406 | - // } | ||
407 | } | 551 | } |
408 | } | 552 | } |
1 | <view class="container"> | 1 | <view class="container"> |
2 | - <view class="goods_list"> | 2 | + <view class="good"> |
3 | + <view class='footlist_a' wx:if="{{cateItem.length!=0}}"> | ||
4 | + <view class="foot_left_a"> | ||
5 | + <block wx:for="{{cateItem}}" wx:key="index" wx:for-index="index" wx:for-item="item"> | ||
6 | + <view class='footbox' wx:if="{{index%2==0}}" bindtap="goDetail" data-id="{{item.goods_id}}"> | ||
7 | + <image class='cover' src="{{item.img}}" mode="widthFix"></image> | ||
8 | + <view class="text_bx"> | ||
9 | + <view class="ster_nams title_content2">{{item.goods_name}}</view> | ||
10 | + <view class="cen_tite"> | ||
11 | + <view class="lis_title">{{item.shop_type}}</view> | ||
12 | + <view class="stay"> | ||
13 | + <view class="numbe">{{item.sales_initial}}</view> | ||
14 | + <view class="ber_name">位车友推荐</view> | ||
15 | + </view> | ||
16 | + </view> | ||
17 | + <view class="price_bx"> | ||
18 | + <view class="pt"> | ||
19 | + <view class="pt_icon">¥</view> | ||
20 | + <view class="pt_price">{{item.price}}</view> | ||
21 | + </view> | ||
22 | + <view class="del">¥{{item.line_price}}</view> | ||
23 | + </view> | ||
24 | + <view class="cl_color" wx:if="{{esl==3}}"> | ||
25 | + <view class="cl_name">去抢购</view> | ||
26 | + <view class="progess"> | ||
27 | + <progress percent="{{item.bai_num}}" style="color:#fff" backgroundColor="white" activeColor="#FF9D00" duration="30" border-radius="20" bindtap="progress" show-info active></progress> | ||
28 | + </view> | ||
29 | + <image src="{{imagesUrl}}assets/static/img/x_t.png" class="image_color" /> | ||
30 | + </view> | ||
31 | + </view> | ||
32 | + </view> | ||
33 | + </block> | ||
34 | + </view> | ||
35 | + <view class="foot_right_a"> | ||
36 | + <block wx:for="{{cateItem}}" wx:key="index" wx:for-index="index" wx:for-item="item"> | ||
37 | + <view class='footbox' wx:if="{{index%2==1}}" bindtap="goDetail" data-id="{{item.goods_id}}"> | ||
38 | + <image class='cover' src="{{item.img}}" mode="widthFix"></image> | ||
39 | + <view class="text_bx"> | ||
40 | + <view class="ster_nams title_content2">{{item.goods_name}}</view> | ||
41 | + <view class="cen_tite"> | ||
42 | + <view class="lis_title">{{item.shop_type}}</view> | ||
43 | + <view class="stay"> | ||
44 | + <view class="numbe">{{item.sales_initial}}</view> | ||
45 | + <view class="ber_name">位车友推荐</view> | ||
46 | + </view> | ||
47 | + </view> | ||
48 | + <view class="price_bx"> | ||
49 | + <view class="pt"> | ||
50 | + <view class="pt_icon">¥</view> | ||
51 | + <view class="pt_price">{{item.price}}</view> | ||
52 | + </view> | ||
53 | + <view class="del">¥{{item.line_price}}</view> | ||
54 | + </view> | ||
55 | + <view class="cl_color" wx:if="{{esl==3}}"> | ||
56 | + <view class="cl_name">去抢购</view> | ||
57 | + <view class="progess"> | ||
58 | + <progress percent="{{item.bai_num}}" style="color:#fff" backgroundColor="white" activeColor="#FF9D00" duration="30" border-radius="20" bindtap="progress" show-info active></progress> | ||
59 | + </view> | ||
60 | + <image src="{{imagesUrl}}assets/static/img/x_t.png" class="image_color" /> | ||
61 | + </view> | ||
62 | + </view> | ||
63 | + </view> | ||
64 | + </block> | ||
65 | + </view> | ||
66 | + </view> | ||
67 | + </view> | ||
68 | + <!-- <view class="goods_list"> | ||
3 | <view wx:for="{{cateItem}}" wx:key="*this" wx:for-item="item"> | 69 | <view wx:for="{{cateItem}}" wx:key="*this" wx:for-item="item"> |
4 | <view class="like_list" wx:if="{{item.img !==''}}" bindtap="storeDetail" data-id="{{item.goods_id}}" data-num="1"> | 70 | <view class="like_list" wx:if="{{item.img !==''}}" bindtap="storeDetail" data-id="{{item.goods_id}}" data-num="1"> |
5 | <view class="list_left"> | 71 | <view class="list_left"> |
@@ -53,5 +119,5 @@ | @@ -53,5 +119,5 @@ | ||
53 | </view> | 119 | </view> |
54 | </view> | 120 | </view> |
55 | </view> | 121 | </view> |
56 | - </view> | 122 | + </view> --> |
57 | </view> | 123 | </view> |
1 | page { | 1 | page { |
2 | - background-color: #fff; | 2 | + background-color: #f9f9f9; |
3 | + width: 100%; | ||
4 | + height: 100%; | ||
3 | } | 5 | } |
4 | .container { | 6 | .container { |
7 | + width: 100%; | ||
8 | +} | ||
9 | +.container .good { | ||
10 | + width: 100%; | ||
5 | padding: 0 18rpx; | 11 | padding: 0 18rpx; |
6 | box-sizing: border-box; | 12 | box-sizing: border-box; |
7 | } | 13 | } |
14 | +.container .good .footlist_a { | ||
15 | + width: 100%; | ||
16 | + position: relative; | ||
17 | + border-top-left-radius: 10rpx; | ||
18 | + border-top-right-radius: 10rpx; | ||
19 | +} | ||
20 | +.container .good .footlist_a .foot_left_a { | ||
21 | + float: left; | ||
22 | + width: 50%; | ||
23 | + padding: 24rpx 14rpx; | ||
24 | + box-sizing: border-box; | ||
25 | +} | ||
26 | +.container .good .footlist_a .foot_left_a .footbox { | ||
27 | + width: 100%; | ||
28 | + margin: 0 auto 20rpx; | ||
29 | + background: #fff; | ||
30 | + position: relative; | ||
31 | + border-radius: 20rpx; | ||
32 | +} | ||
33 | +.container .good .footlist_a .foot_left_a .footbox image { | ||
34 | + width: 100%; | ||
35 | + border-top-left-radius: 10rpx; | ||
36 | + border-top-right-radius: 10rpx; | ||
37 | +} | ||
38 | +.container .good .footlist_a .foot_left_a .footbox .text_bx { | ||
39 | + width: 100%; | ||
40 | + padding: 0 18rpx 20rpx; | ||
41 | + box-sizing: border-box; | ||
42 | +} | ||
43 | +.container .good .footlist_a .foot_left_a .footbox .text_bx .ster_nams { | ||
44 | + width: 100%; | ||
45 | + font-size: 28rpx; | ||
46 | + font-family: PingFang SC, PingFang SC-Regular; | ||
47 | + font-weight: 400; | ||
48 | + text-align: left; | ||
49 | + color: #06121e; | ||
50 | + line-height: 40rpx; | ||
51 | +} | ||
52 | +.container .good .footlist_a .foot_left_a .footbox .text_bx .cen_tite { | ||
53 | + width: 100%; | ||
54 | + display: flex; | ||
55 | + align-items: center; | ||
56 | + justify-content: space-between; | ||
57 | + padding: 20rpx 0; | ||
58 | + box-sizing: border-box; | ||
59 | +} | ||
60 | +.container .good .footlist_a .foot_left_a .footbox .text_bx .cen_tite .lis_title { | ||
61 | + padding: 5rpx 14rpx; | ||
62 | + box-sizing: border-box; | ||
63 | + display: flex; | ||
64 | + align-items: center; | ||
65 | + justify-content: center; | ||
66 | + font-size: 22rpx; | ||
67 | + color: #fff; | ||
68 | + background-color: #F02928; | ||
69 | + border-radius: 4rpx; | ||
70 | +} | ||
71 | +.container .good .footlist_a .foot_left_a .footbox .text_bx .cen_tite .stay { | ||
72 | + display: flex; | ||
73 | + align-items: center; | ||
74 | + justify-content: flex-end; | ||
75 | +} | ||
76 | +.container .good .footlist_a .foot_left_a .footbox .text_bx .cen_tite .stay .numbe { | ||
77 | + font-size: 22rpx; | ||
78 | + color: #E8370F; | ||
79 | +} | ||
80 | +.container .good .footlist_a .foot_left_a .footbox .text_bx .cen_tite .stay .ber_name { | ||
81 | + font-size: 22rpx; | ||
82 | + color: #06121E; | ||
83 | +} | ||
84 | +.container .good .footlist_a .foot_left_a .footbox .text_bx .price_bx { | ||
85 | + width: 100%; | ||
86 | + display: flex; | ||
87 | + align-items: center; | ||
88 | +} | ||
89 | +.container .good .footlist_a .foot_left_a .footbox .text_bx .price_bx .pt { | ||
90 | + display: flex; | ||
91 | + align-items: baseline; | ||
92 | +} | ||
93 | +.container .good .footlist_a .foot_left_a .footbox .text_bx .price_bx .pt .pt_icon { | ||
94 | + font-size: 22rpx; | ||
95 | + color: #FF4444; | ||
96 | + font-weight: 500; | ||
97 | +} | ||
98 | +.container .good .footlist_a .foot_left_a .footbox .text_bx .price_bx .pt .pt_price { | ||
99 | + font-size: 28rpx; | ||
100 | + color: #FF4444; | ||
101 | + font-weight: 500; | ||
102 | +} | ||
103 | +.container .good .footlist_a .foot_left_a .footbox .text_bx .price_bx .del { | ||
104 | + margin-left: 30rpx; | ||
105 | + font-size: 24rpx; | ||
106 | + color: #5B5E63; | ||
107 | + text-decoration: line-through; | ||
108 | +} | ||
109 | +.container .good .footlist_a .foot_left_a .footbox .cl_color { | ||
110 | + width: 100%; | ||
111 | + background: linear-gradient(90deg, #f02928, #fd7f2e); | ||
112 | + border-radius: 8rpx; | ||
113 | + position: relative; | ||
114 | + padding: 10rpx 0; | ||
115 | + box-sizing: border-box; | ||
116 | + margin-top: 10rpx; | ||
117 | +} | ||
118 | +.container .good .footlist_a .foot_left_a .footbox .cl_color .progess { | ||
119 | + width: 100%; | ||
120 | + padding: 0 10rpx; | ||
121 | + box-sizing: border-box; | ||
122 | +} | ||
123 | +.container .good .footlist_a .foot_left_a .footbox .cl_color .cl_name { | ||
124 | + width: 100%; | ||
125 | + font-size: 28rpx; | ||
126 | + font-family: PingFang SC, PingFang SC-Medium; | ||
127 | + font-weight: 500; | ||
128 | + text-align: center; | ||
129 | + color: #ffffff; | ||
130 | +} | ||
131 | +.container .good .footlist_a .foot_left_a .footbox .cl_color .image_color { | ||
132 | + width: 32rpx; | ||
133 | + height: 32rpx; | ||
134 | + position: absolute; | ||
135 | + top: -20rpx; | ||
136 | + right: -10rpx; | ||
137 | +} | ||
138 | +.container .good .footlist_a .foot_right_a { | ||
139 | + float: left; | ||
140 | + width: 50%; | ||
141 | + padding: 24rpx 14rpx; | ||
142 | + box-sizing: border-box; | ||
143 | +} | ||
144 | +.container .good .footlist_a .foot_right_a .footbox { | ||
145 | + width: 100%; | ||
146 | + margin: 0 auto 20rpx; | ||
147 | + background: #fff; | ||
148 | + position: relative; | ||
149 | + border-radius: 20rpx; | ||
150 | +} | ||
151 | +.container .good .footlist_a .foot_right_a .footbox image { | ||
152 | + width: 100%; | ||
153 | + border-top-left-radius: 10rpx; | ||
154 | + border-top-right-radius: 10rpx; | ||
155 | +} | ||
156 | +.container .good .footlist_a .foot_right_a .footbox .text_bx { | ||
157 | + width: 100%; | ||
158 | + padding: 0 18rpx 20rpx; | ||
159 | + box-sizing: border-box; | ||
160 | +} | ||
161 | +.container .good .footlist_a .foot_right_a .footbox .text_bx .ster_nams { | ||
162 | + width: 100%; | ||
163 | + font-size: 28rpx; | ||
164 | + font-family: PingFang SC, PingFang SC-Regular; | ||
165 | + font-weight: 400; | ||
166 | + text-align: left; | ||
167 | + color: #06121e; | ||
168 | + line-height: 40rpx; | ||
169 | +} | ||
170 | +.container .good .footlist_a .foot_right_a .footbox .text_bx .cen_tite { | ||
171 | + width: 100%; | ||
172 | + display: flex; | ||
173 | + align-items: center; | ||
174 | + justify-content: space-between; | ||
175 | + padding: 20rpx 0; | ||
176 | + box-sizing: border-box; | ||
177 | +} | ||
178 | +.container .good .footlist_a .foot_right_a .footbox .text_bx .cen_tite .lis_title { | ||
179 | + padding: 5rpx 14rpx; | ||
180 | + box-sizing: border-box; | ||
181 | + display: flex; | ||
182 | + align-items: center; | ||
183 | + justify-content: center; | ||
184 | + font-size: 22rpx; | ||
185 | + color: #fff; | ||
186 | + background-color: #F02928; | ||
187 | + border-radius: 4rpx; | ||
188 | +} | ||
189 | +.container .good .footlist_a .foot_right_a .footbox .text_bx .cen_tite .stay { | ||
190 | + display: flex; | ||
191 | + align-items: center; | ||
192 | + justify-content: flex-end; | ||
193 | +} | ||
194 | +.container .good .footlist_a .foot_right_a .footbox .text_bx .cen_tite .stay .numbe { | ||
195 | + font-size: 22rpx; | ||
196 | + color: #E8370F; | ||
197 | +} | ||
198 | +.container .good .footlist_a .foot_right_a .footbox .text_bx .cen_tite .stay .ber_name { | ||
199 | + font-size: 22rpx; | ||
200 | + color: #06121E; | ||
201 | +} | ||
202 | +.container .good .footlist_a .foot_right_a .footbox .text_bx .price_bx { | ||
203 | + width: 100%; | ||
204 | + display: flex; | ||
205 | + align-items: center; | ||
206 | +} | ||
207 | +.container .good .footlist_a .foot_right_a .footbox .text_bx .price_bx .pt { | ||
208 | + display: flex; | ||
209 | + align-items: baseline; | ||
210 | +} | ||
211 | +.container .good .footlist_a .foot_right_a .footbox .text_bx .price_bx .pt .pt_icon { | ||
212 | + font-size: 22rpx; | ||
213 | + color: #FF4444; | ||
214 | + font-weight: 500; | ||
215 | +} | ||
216 | +.container .good .footlist_a .foot_right_a .footbox .text_bx .price_bx .pt .pt_price { | ||
217 | + font-size: 28rpx; | ||
218 | + color: #FF4444; | ||
219 | + font-weight: 500; | ||
220 | +} | ||
221 | +.container .good .footlist_a .foot_right_a .footbox .text_bx .price_bx .del { | ||
222 | + margin-left: 30rpx; | ||
223 | + font-size: 24rpx; | ||
224 | + color: #5B5E63; | ||
225 | + text-decoration: line-through; | ||
226 | +} | ||
227 | +.container .good .footlist_a .foot_right_a .footbox .cl_color { | ||
228 | + width: 100%; | ||
229 | + background: linear-gradient(90deg, #f02928, #fd7f2e); | ||
230 | + border-radius: 8rpx; | ||
231 | + position: relative; | ||
232 | + padding: 10rpx 0; | ||
233 | + box-sizing: border-box; | ||
234 | + margin-top: 10rpx; | ||
235 | +} | ||
236 | +.container .good .footlist_a .foot_right_a .footbox .cl_color .progess { | ||
237 | + width: 100%; | ||
238 | + padding: 0 10rpx; | ||
239 | + box-sizing: border-box; | ||
240 | +} | ||
241 | +.container .good .footlist_a .foot_right_a .footbox .cl_color .cl_name { | ||
242 | + width: 100%; | ||
243 | + font-size: 28rpx; | ||
244 | + font-family: PingFang SC, PingFang SC-Medium; | ||
245 | + font-weight: 500; | ||
246 | + text-align: center; | ||
247 | + color: #ffffff; | ||
248 | +} | ||
249 | +.container .good .footlist_a .foot_right_a .footbox .cl_color .image_color { | ||
250 | + width: 32rpx; | ||
251 | + height: 32rpx; | ||
252 | + position: absolute; | ||
253 | + top: -20rpx; | ||
254 | + right: -10rpx; | ||
255 | +} | ||
256 | +.container .good .footlist_a::after { | ||
257 | + content: ''; | ||
258 | + clear: both; | ||
259 | + display: block; | ||
260 | +} | ||
8 | .container .goods_list { | 261 | .container .goods_list { |
9 | width: 100%; | 262 | width: 100%; |
10 | height: 100%; | 263 | height: 100%; |
@@ -14,7 +267,6 @@ page { | @@ -14,7 +267,6 @@ page { | ||
14 | margin-bottom: 15rpx; | 267 | margin-bottom: 15rpx; |
15 | /* 列表 */ | 268 | /* 列表 */ |
16 | /* 没图片的样式 */ | 269 | /* 没图片的样式 */ |
17 | - /* 没图片的样式 */ | ||
18 | } | 270 | } |
19 | .container .goods_list .like_list { | 271 | .container .goods_list .like_list { |
20 | width: 100%; | 272 | width: 100%; |
@@ -20,6 +20,10 @@ Page({ | @@ -20,6 +20,10 @@ Page({ | ||
20 | nominate_switch: '', | 20 | nominate_switch: '', |
21 | click_num: '', | 21 | click_num: '', |
22 | childShow: false, | 22 | childShow: false, |
23 | + send: 0, | ||
24 | + it_tue: false, | ||
25 | + newindex: '', | ||
26 | + top_true: true | ||
23 | }, | 27 | }, |
24 | 28 | ||
25 | onShow: function () { | 29 | onShow: function () { |
@@ -51,14 +55,18 @@ Page({ | @@ -51,14 +55,18 @@ Page({ | ||
51 | that.setData({ | 55 | that.setData({ |
52 | cateList2: value.cate2, | 56 | cateList2: value.cate2, |
53 | currentIndex: indexone, | 57 | currentIndex: indexone, |
58 | + newindex: indexone + 1 | ||
54 | }) | 59 | }) |
55 | } | 60 | } |
56 | }) | 61 | }) |
57 | if (res.data.data.length != 0) { | 62 | if (res.data.data.length != 0) { |
58 | if (that.data.id == '') { | 63 | if (that.data.id == '') { |
59 | that.setData({ | 64 | that.setData({ |
60 | - cateList2: res.data.data[0].cate2 | 65 | + cateList2: res.data.data[0].cate2, |
66 | + id: res.data.data[0].id, | ||
67 | + newindex: 1 | ||
61 | }) | 68 | }) |
69 | + console.log(that.data.id, "id22222"); | ||
62 | } | 70 | } |
63 | } | 71 | } |
64 | console.log("分类2 ", that.data.cateList2); | 72 | console.log("分类2 ", that.data.cateList2); |
@@ -68,9 +76,10 @@ Page({ | @@ -68,9 +76,10 @@ Page({ | ||
68 | console.log(e); | 76 | console.log(e); |
69 | let that = this | 77 | let that = this |
70 | that.setData({ | 78 | that.setData({ |
71 | - id: e.currentTarget.dataset.id | 79 | + id: e.currentTarget.dataset.id, |
80 | + send: e.currentTarget.dataset.index | ||
72 | }) | 81 | }) |
73 | - this.getLeftCates() | 82 | + that.getLeftCates() |
74 | }, | 83 | }, |
75 | onReachBottom: function () { | 84 | onReachBottom: function () { |
76 | let newpage = this.page; | 85 | let newpage = this.page; |
@@ -108,5 +117,62 @@ Page({ | @@ -108,5 +117,62 @@ Page({ | ||
108 | url: '/pages/cate3List/cate3List?id=' + id | 117 | url: '/pages/cate3List/cate3List?id=' + id |
109 | }) | 118 | }) |
110 | }, | 119 | }, |
120 | + lower(e) { | ||
121 | + console.log(e); | ||
122 | + let that = this | ||
123 | + let leftCates = that.data.leftCates | ||
124 | + let indexnum = Number(that.data.leftCates.length) | ||
125 | + let id = that.data.id | ||
126 | + let send = '' | ||
127 | + console.log(id); | ||
128 | + leftCates.forEach((item, index) => { | ||
129 | + if (item.id == id) { | ||
130 | + console.log(index); | ||
131 | + send = index + 1 | ||
132 | + } | ||
133 | + }) | ||
134 | + console.log(send); | ||
135 | + if (send != indexnum) { | ||
136 | + let idt = leftCates[send].id | ||
137 | + console.log(idt); | ||
138 | + that.setData({ | ||
139 | + id: idt, | ||
140 | + it_tue: false | ||
141 | + }) | ||
142 | + that.getLeftCates() | ||
143 | + } else { | ||
144 | + that.setData({ | ||
145 | + id, | ||
146 | + it_tue: true | ||
147 | + }) | ||
148 | + | ||
149 | + } | ||
111 | 150 | ||
151 | + | ||
152 | + }, | ||
153 | + upper(e) { | ||
154 | + console.log(e); | ||
155 | + let that = this | ||
156 | + let leftCates = that.data.leftCates | ||
157 | + let id = that.data.id | ||
158 | + let send = '' | ||
159 | + console.log(id); | ||
160 | + leftCates.forEach((item, index) => { | ||
161 | + if (item.id == id) { | ||
162 | + if (index != 0) { | ||
163 | + send = index - 1 | ||
164 | + } else { | ||
165 | + send = index | ||
166 | + } | ||
167 | + } | ||
168 | + }) | ||
169 | + console.log(send); | ||
170 | + let idt = leftCates[send].id | ||
171 | + console.log(idt); | ||
172 | + that.setData({ | ||
173 | + id: idt, | ||
174 | + }) | ||
175 | + that.getLeftCates() | ||
176 | + | ||
177 | + }, | ||
112 | }) | 178 | }) |
@@ -9,7 +9,7 @@ page { | @@ -9,7 +9,7 @@ page { | ||
9 | .category_menu { | 9 | .category_menu { |
10 | display: flex; | 10 | display: flex; |
11 | margin-right: 20rpx; | 11 | margin-right: 20rpx; |
12 | - padding: 30rpx 0 0 20rpx; | 12 | + padding-bottom: 32rpx; |
13 | box-sizing: border-box; | 13 | box-sizing: border-box; |
14 | 14 | ||
15 | 15 | ||
@@ -96,7 +96,8 @@ page { | @@ -96,7 +96,8 @@ page { | ||
96 | right: 0; | 96 | right: 0; |
97 | width: 74%; | 97 | width: 74%; |
98 | height: 100%; | 98 | height: 100%; |
99 | - | 99 | + padding: 28rpx 0; |
100 | + box-sizing: border-box; | ||
100 | 101 | ||
101 | 102 | ||
102 | .goods_group { | 103 | .goods_group { |
@@ -134,40 +135,58 @@ page { | @@ -134,40 +135,58 @@ page { | ||
134 | /* 分类 3级*/ | 135 | /* 分类 3级*/ |
135 | .category { | 136 | .category { |
136 | margin-top: 30rpx; | 137 | margin-top: 30rpx; |
137 | - box-sizing: border-box; | ||
138 | width: 100%; | 138 | width: 100%; |
139 | - display: flex; | ||
140 | - flex-wrap: wrap; | ||
141 | - padding-right: 20rpx; | ||
142 | - box-sizing: border-box; | ||
143 | 139 | ||
144 | - .category_list { | 140 | + .los_cate { |
141 | + width: 100%; | ||
145 | display: flex; | 142 | display: flex; |
146 | - // flex: 0 0 auto; | ||
147 | - flex-direction: column; | ||
148 | - align-items: center; | ||
149 | - justify-content: center; | ||
150 | - width: 33.33%; | ||
151 | - | ||
152 | - | ||
153 | - .imgae { | ||
154 | - width: 156rpx; | ||
155 | - height: 156rpx; | 143 | + flex-wrap: wrap; |
144 | + padding-right: 20rpx; | ||
145 | + box-sizing: border-box; | ||
146 | + | ||
147 | + | ||
148 | + .category_list { | ||
149 | + display: flex; | ||
150 | + // flex: 0 0 auto; | ||
151 | + flex-direction: column; | ||
152 | + align-items: center; | ||
153 | + justify-content: center; | ||
154 | + width: 33.33%; | ||
155 | + | ||
156 | + | ||
157 | + .imgae { | ||
158 | + width: 156rpx; | ||
159 | + height: 156rpx; | ||
160 | + } | ||
161 | + | ||
162 | + .view_text { | ||
163 | + display: inline-block; | ||
164 | + color: #5B5E63; | ||
165 | + font-size: 24rpx; | ||
166 | + padding: 20rpx 0; | ||
167 | + box-sizing: border-box; | ||
168 | + } | ||
169 | + | ||
170 | + &:nth-child(3n + 3) { | ||
171 | + margin-right: 0; | ||
172 | + } | ||
156 | } | 173 | } |
157 | 174 | ||
158 | - .view_text { | ||
159 | - display: inline-block; | ||
160 | - color: #5B5E63; | ||
161 | - font-size: 24rpx; | ||
162 | - padding: 20rpx 0; | ||
163 | - box-sizing: border-box; | ||
164 | - } | ||
165 | 175 | ||
166 | - &:nth-child(3n + 3) { | ||
167 | - margin-right: 0; | ||
168 | - } | ||
169 | } | 176 | } |
170 | 177 | ||
178 | + .bts { | ||
179 | + width: 100%; | ||
180 | + display: flex; | ||
181 | + align-items: center; | ||
182 | + justify-content: center; | ||
183 | + padding: 20rpx 0; | ||
184 | + box-sizing: border-box; | ||
185 | + color: #8C9198; | ||
186 | + font-size: 28rpx; | ||
187 | + } | ||
188 | + | ||
189 | + | ||
171 | } | 190 | } |
172 | 191 | ||
173 | ::-webkit-scrollbar { | 192 | ::-webkit-scrollbar { |
1 | <view class="container"> | 1 | <view class="container"> |
2 | <view class="category_menu"> | 2 | <view class="category_menu"> |
3 | <scroll-view class="left_menu" scroll-y="true"> | 3 | <scroll-view class="left_menu" scroll-y="true"> |
4 | - <!-- bindtap="itemTap" data-index="{{index}}" data-id="{{item.id}}" --> | ||
5 | - <view class="menu_item" wx:for="{{leftCates}}" wx:key="index" wx:for-index="index" wx:for-item="item" bindtap="itemTap" data-id="{{item.id}}"> | 4 | + <view class="menu_item" wx:for="{{leftCates}}" wx:key="index" wx:for-index="index" wx:for-item="item" bindtap="itemTap" data-index="{{index}}" data-id="{{item.id}}"> |
6 | <view class="fu_item {{index === currentIndex? 'active' :''}}">{{item.name}}</view> | 5 | <view class="fu_item {{index === currentIndex? 'active' :''}}">{{item.name}}</view> |
7 | </view> | 6 | </view> |
8 | </scroll-view> | 7 | </scroll-view> |
9 | - <scroll-view class="right_menu" scroll-y="true" scroll-top="{{scroll_top}}"> | ||
10 | - <view> | ||
11 | - <view class="goods_group" wx:for="{{cateList2}}" wx:for-item="item2" wx:key="*this"> | ||
12 | - <view class="goods_title"> | ||
13 | - <!-- <image class="image_title" src="{{imagesUrl}}assets/static/img/1_img@2x.png" /> --> | ||
14 | - <view class="color_bg"></view> | ||
15 | - <view class="text_title">{{item2.name}}</view> | ||
16 | - <view class="color_bg"></view> | ||
17 | - </view> | ||
18 | - <!-- 三级分类 --> | ||
19 | - <view class="category"> | 8 | + <scroll-view class="right_menu" scroll-y="true" scroll-top="{{scroll_top}}" bindscrolltoupper="upper" bindscrolltolower="lower"> |
9 | + <!-- <view> --> | ||
10 | + <view class="goods_group" wx:for="{{cateList2}}" wx:for-item="item2" wx:key="index2" wx:for-index="index2"> | ||
11 | + <view class="goods_title"> | ||
12 | + <view class="color_bg"></view> | ||
13 | + <view class="text_title">{{item2.name}}</view> | ||
14 | + <view class="color_bg"></view> | ||
15 | + </view> | ||
16 | + <!-- 三级分类 --> | ||
17 | + <view class="category"> | ||
18 | + <view class="los_cate"> | ||
20 | <view class="category_list" bindtap="cateDetails" data-id='{{item3.id}}' wx:for="{{item2.cate3}}" wx:for-item="item3" wx:key="*this"> | 19 | <view class="category_list" bindtap="cateDetails" data-id='{{item3.id}}' wx:for="{{item2.cate3}}" wx:for-item="item3" wx:key="*this"> |
21 | <image src="{{item3.img}}" class="imgae"></image> | 20 | <image src="{{item3.img}}" class="imgae"></image> |
22 | <view class="view_text">{{item3.name}}</view> | 21 | <view class="view_text">{{item3.name}}</view> |
23 | </view> | 22 | </view> |
24 | </view> | 23 | </view> |
24 | + <!-- <view class="bts" wx:if="{{top_true}}">上拉继续浏览 {{cateList2[newindex].name}}</view> --> | ||
25 | + <view class="bts" wx:if="{{it_tue}}">到底了哦~</view> | ||
25 | </view> | 26 | </view> |
26 | </view> | 27 | </view> |
28 | + <!-- </view> --> | ||
27 | </scroll-view> | 29 | </scroll-view> |
28 | </view> | 30 | </view> |
29 | </view> | 31 | </view> |
@@ -7,7 +7,7 @@ page { | @@ -7,7 +7,7 @@ page { | ||
7 | .container .category_menu { | 7 | .container .category_menu { |
8 | display: flex; | 8 | display: flex; |
9 | margin-right: 20rpx; | 9 | margin-right: 20rpx; |
10 | - padding: 30rpx 0 0 20rpx; | 10 | + padding-bottom: 32rpx; |
11 | box-sizing: border-box; | 11 | box-sizing: border-box; |
12 | } | 12 | } |
13 | .container .category_menu .left_menu { | 13 | .container .category_menu .left_menu { |
@@ -72,6 +72,8 @@ page { | @@ -72,6 +72,8 @@ page { | ||
72 | right: 0; | 72 | right: 0; |
73 | width: 74%; | 73 | width: 74%; |
74 | height: 100%; | 74 | height: 100%; |
75 | + padding: 28rpx 0; | ||
76 | + box-sizing: border-box; | ||
75 | } | 77 | } |
76 | .container .category_menu .right_menu .goods_group { | 78 | .container .category_menu .right_menu .goods_group { |
77 | width: 100%; | 79 | width: 100%; |
@@ -103,32 +105,45 @@ page { | @@ -103,32 +105,45 @@ page { | ||
103 | .container .category_menu .right_menu .goods_group .category { | 105 | .container .category_menu .right_menu .goods_group .category { |
104 | margin-top: 30rpx; | 106 | margin-top: 30rpx; |
105 | width: 100%; | 107 | width: 100%; |
108 | +} | ||
109 | +.container .category_menu .right_menu .goods_group .category .los_cate { | ||
110 | + width: 100%; | ||
106 | display: flex; | 111 | display: flex; |
107 | flex-wrap: wrap; | 112 | flex-wrap: wrap; |
108 | padding-right: 20rpx; | 113 | padding-right: 20rpx; |
109 | box-sizing: border-box; | 114 | box-sizing: border-box; |
110 | } | 115 | } |
111 | -.container .category_menu .right_menu .goods_group .category .category_list { | 116 | +.container .category_menu .right_menu .goods_group .category .los_cate .category_list { |
112 | display: flex; | 117 | display: flex; |
113 | flex-direction: column; | 118 | flex-direction: column; |
114 | align-items: center; | 119 | align-items: center; |
115 | justify-content: center; | 120 | justify-content: center; |
116 | width: 33.33%; | 121 | width: 33.33%; |
117 | } | 122 | } |
118 | -.container .category_menu .right_menu .goods_group .category .category_list .imgae { | 123 | +.container .category_menu .right_menu .goods_group .category .los_cate .category_list .imgae { |
119 | width: 156rpx; | 124 | width: 156rpx; |
120 | height: 156rpx; | 125 | height: 156rpx; |
121 | } | 126 | } |
122 | -.container .category_menu .right_menu .goods_group .category .category_list .view_text { | 127 | +.container .category_menu .right_menu .goods_group .category .los_cate .category_list .view_text { |
123 | display: inline-block; | 128 | display: inline-block; |
124 | color: #5B5E63; | 129 | color: #5B5E63; |
125 | font-size: 24rpx; | 130 | font-size: 24rpx; |
126 | padding: 20rpx 0; | 131 | padding: 20rpx 0; |
127 | box-sizing: border-box; | 132 | box-sizing: border-box; |
128 | } | 133 | } |
129 | -.container .category_menu .right_menu .goods_group .category .category_list:nth-child(3n + 3) { | 134 | +.container .category_menu .right_menu .goods_group .category .los_cate .category_list:nth-child(3n + 3) { |
130 | margin-right: 0; | 135 | margin-right: 0; |
131 | } | 136 | } |
137 | +.container .category_menu .right_menu .goods_group .category .bts { | ||
138 | + width: 100%; | ||
139 | + display: flex; | ||
140 | + align-items: center; | ||
141 | + justify-content: center; | ||
142 | + padding: 20rpx 0; | ||
143 | + box-sizing: border-box; | ||
144 | + color: #8C9198; | ||
145 | + font-size: 28rpx; | ||
146 | +} | ||
132 | .container .category_menu .right_menu .goods_group ::-webkit-scrollbar { | 147 | .container .category_menu .right_menu .goods_group ::-webkit-scrollbar { |
133 | width: 0; | 148 | width: 0; |
134 | height: 0; | 149 | height: 0; |
@@ -110,6 +110,7 @@ Page({ | @@ -110,6 +110,7 @@ Page({ | ||
110 | tiveCar(e) { // 车牌号 | 110 | tiveCar(e) { // 车牌号 |
111 | let that = this | 111 | let that = this |
112 | let idx = e.currentTarget.dataset.id | 112 | let idx = e.currentTarget.dataset.id |
113 | + let pai = that.data.pai | ||
113 | that.setData({ | 114 | that.setData({ |
114 | idx: idx | 115 | idx: idx |
115 | }) | 116 | }) |
@@ -122,6 +123,9 @@ Page({ | @@ -122,6 +123,9 @@ Page({ | ||
122 | } | 123 | } |
123 | }) | 124 | }) |
124 | that.hideModal() | 125 | that.hideModal() |
126 | + if (pai != '') { | ||
127 | + that.getRegister() | ||
128 | + } | ||
125 | }, | 129 | }, |
126 | getInput(e) { //姓名 | 130 | getInput(e) { //姓名 |
127 | console.log(e); | 131 | console.log(e); |
@@ -163,6 +167,74 @@ Page({ | @@ -163,6 +167,74 @@ Page({ | ||
163 | // } | 167 | // } |
164 | // } | 168 | // } |
165 | }, | 169 | }, |
170 | + | ||
171 | + bindinputed(e) { | ||
172 | + let that = this | ||
173 | + let carNum = e.detail.value | ||
174 | + let sheng_id = that.data.sheng_id | ||
175 | + let reg = /^(([A-Z](([0-9]{5}[DF])|([DF]([A-HJ-NP-Z0-9])[0-9]{4})))|([A-Z][A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳使领]))$/ | ||
176 | + const careg = reg.test(carNum); | ||
177 | + if (!careg) { | ||
178 | + wx.showToast({ | ||
179 | + icon: 'none', | ||
180 | + title: '请输入正确车牌号', | ||
181 | + }) | ||
182 | + return; | ||
183 | + } else { | ||
184 | + that.setData({ | ||
185 | + pai: carNum | ||
186 | + }) | ||
187 | + console.log(that.data.shengItem, "shengItem"); | ||
188 | + if (sheng_id != '') { | ||
189 | + that.getRegister() | ||
190 | + } | ||
191 | + | ||
192 | + } | ||
193 | + }, | ||
194 | + async getRegister() { // 注册 | ||
195 | + let that = this | ||
196 | + try { | ||
197 | + const { | ||
198 | + data | ||
199 | + } = await request({ | ||
200 | + url: 'api/new2/checkPai', | ||
201 | + data: { | ||
202 | + sheng_id: that.data.sheng_id, | ||
203 | + pai: that.data.pai, | ||
204 | + } | ||
205 | + }) | ||
206 | + console.log(data, "注册"); | ||
207 | + if (data.code == 1) { | ||
208 | + let msg = data.msg | ||
209 | + a.popSuccessTest(msg) | ||
210 | + } else { | ||
211 | + let msg = data.msg | ||
212 | + // a.popTest(msg) | ||
213 | + wx.showModal({ | ||
214 | + title: '提示', | ||
215 | + content: '该车已被注册,是否申请加入车辆管理?', | ||
216 | + success: function (res) { | ||
217 | + if (res.confirm) { | ||
218 | + wx.navigateTo({ | ||
219 | + | ||
220 | + }) | ||
221 | + | ||
222 | + } else { | ||
223 | + | ||
224 | + } | ||
225 | + } | ||
226 | + }) | ||
227 | + } | ||
228 | + | ||
229 | + } catch (err) { | ||
230 | + that.setData({ | ||
231 | + msg: err.msg | ||
232 | + }) | ||
233 | + that.popTest() | ||
234 | + } | ||
235 | + | ||
236 | + }, | ||
237 | + | ||
166 | bindTimeChange(e) { // 时间 | 238 | bindTimeChange(e) { // 时间 |
167 | this.setData({ | 239 | this.setData({ |
168 | buy_time2: e.detail.value | 240 | buy_time2: e.detail.value |
@@ -242,7 +314,6 @@ Page({ | @@ -242,7 +314,6 @@ Page({ | ||
242 | console.log(err); | 314 | console.log(err); |
243 | } | 315 | } |
244 | }, | 316 | }, |
245 | - | ||
246 | async formSubmit() { // 提交保存 | 317 | async formSubmit() { // 提交保存 |
247 | let that = this | 318 | let that = this |
248 | console.log(that.data.id); | 319 | console.log(that.data.id); |
@@ -13,7 +13,7 @@ | @@ -13,7 +13,7 @@ | ||
13 | <image class='select_img {{show&&"select_img_rotate"}}' src='{{imagesUrl}}assets/static/img/down_arrow.png'></image> | 13 | <image class='select_img {{show&&"select_img_rotate"}}' src='{{imagesUrl}}assets/static/img/down_arrow.png'></image> |
14 | </view> | 14 | </view> |
15 | </view> | 15 | </view> |
16 | - <input type="text" placeholder="请输入车牌号" maxlength="10" value="{{pai}}" catchblur="paiInput" placeholder-class="text_car" name="pai" /> | 16 | + <input type="text" placeholder="请输入车牌号" maxlength="10" catchinput="bindinputed" value="{{pai}}" catchblur="paiInput" placeholder-class="text_car" name="pai" /> |
17 | </view> | 17 | </view> |
18 | <view class="card_logo car"> | 18 | <view class="card_logo car"> |
19 | <view class="labelsItem">车辆品牌:</view> | 19 | <view class="labelsItem">车辆品牌:</view> |
@@ -67,7 +67,7 @@ Page({ | @@ -67,7 +67,7 @@ Page({ | ||
67 | }, | 67 | }, |
68 | goSearch() { | 68 | goSearch() { |
69 | wx.navigateTo({ | 69 | wx.navigateTo({ |
70 | - url: '/pages/search/search' | 70 | + url: '/pages/search/search?S4_num=1' |
71 | }) | 71 | }) |
72 | }, | 72 | }, |
73 | addLoveCared() { // 去添加车辆 | 73 | addLoveCared() { // 去添加车辆 |
@@ -538,6 +538,50 @@ Page({ | @@ -538,6 +538,50 @@ Page({ | ||
538 | that.goLogin() | 538 | that.goLogin() |
539 | } | 539 | } |
540 | }, | 540 | }, |
541 | + gobindChe() { | ||
542 | + let that = this | ||
543 | + wx.showModal({ | ||
544 | + title: '提示', | ||
545 | + content: that.data.msg, | ||
546 | + success: function (res) { | ||
547 | + if (res.confirm) { | ||
548 | + wx.navigateTo({ | ||
549 | + url: '/pages/MyGarage/MyGarage?tdTap=1' | ||
550 | + }) | ||
551 | + | ||
552 | + } else { | ||
553 | + | ||
554 | + } | ||
555 | + } | ||
556 | + }) | ||
557 | + }, | ||
558 | + onShareAppMessage(options) { | ||
559 | + var that = this; | ||
560 | + var shareObj = { | ||
561 | + title: "汽车互联网4S店", | ||
562 | + path: '/pages/home/home', | ||
563 | + imageUrl: '', | ||
564 | + }; | ||
565 | + return shareObj; | ||
566 | + | ||
567 | + }, | ||
568 | + | ||
569 | + | ||
570 | + | ||
571 | + | ||
572 | + | ||
573 | + | ||
574 | + | ||
575 | + | ||
576 | + | ||
577 | + | ||
578 | + | ||
579 | + | ||
580 | + | ||
581 | + | ||
582 | + | ||
583 | + | ||
584 | + | ||
541 | async public() { | 585 | async public() { |
542 | let that = this | 586 | let that = this |
543 | try { | 587 | try { |
@@ -595,21 +639,5 @@ Page({ | @@ -595,21 +639,5 @@ Page({ | ||
595 | duration: 1300, //停留时间 | 639 | duration: 1300, //停留时间 |
596 | }) | 640 | }) |
597 | }, | 641 | }, |
598 | - gobindChe() { | ||
599 | - let that = this | ||
600 | - wx.showModal({ | ||
601 | - title: '提示', | ||
602 | - content: that.data.msg, | ||
603 | - success: function (res) { | ||
604 | - if (res.confirm) { | ||
605 | - wx.navigateTo({ | ||
606 | - url: '/pages/MyGarage/MyGarage?tdTap=1' | ||
607 | - }) | ||
608 | - | ||
609 | - } else { | ||
610 | 642 | ||
611 | - } | ||
612 | - } | ||
613 | - }) | ||
614 | - } | ||
615 | }) | 643 | }) |
@@ -101,7 +101,7 @@ | @@ -101,7 +101,7 @@ | ||
101 | </view> | 101 | </view> |
102 | <view class="nav_search" bindtap="goSearch"> | 102 | <view class="nav_search" bindtap="goSearch"> |
103 | <image src="{{imagesUrl}}assets/static/img/v-y.png" /> | 103 | <image src="{{imagesUrl}}assets/static/img/v-y.png" /> |
104 | - <input type="text" class="nav_sear" placeholder="请输入搜索内容" placeholder-class="input_placeholder" /> | 104 | + <input type="text" class="nav_sear" placeholder="请输入汽车4S店名称" placeholder-class="input_placeholder" /> |
105 | </view> | 105 | </view> |
106 | <view class="bind_nm"> | 106 | <view class="bind_nm"> |
107 | <view class="bind_box"> | 107 | <view class="bind_box"> |
@@ -65,7 +65,7 @@ | @@ -65,7 +65,7 @@ | ||
65 | </view> | 65 | </view> |
66 | <view class="list_count"> | 66 | <view class="list_count"> |
67 | <view class="list_title">{{OrderObligation.shop}}</view> | 67 | <view class="list_title">{{OrderObligation.shop}}</view> |
68 | - <view class="list" wx:for="{{ConfirmAnOrder}}" wx:key="id"> | 68 | + <view class="list" wx:for="{{ConfirmAnOrder}}" wx:key="id" bindtap="godetails" data-id="{{item.id}}"> |
69 | <view class="left_imgs"> | 69 | <view class="left_imgs"> |
70 | <image src="{{item.img}}" /> | 70 | <image src="{{item.img}}" /> |
71 | </view> | 71 | </view> |
@@ -214,6 +214,7 @@ Page({ | @@ -214,6 +214,7 @@ Page({ | ||
214 | tiveCar(e) { // 车牌号 | 214 | tiveCar(e) { // 车牌号 |
215 | let that = this | 215 | let that = this |
216 | let idx = e.currentTarget.dataset.id | 216 | let idx = e.currentTarget.dataset.id |
217 | + let pai = that.data.pai | ||
217 | that.setData({ | 218 | that.setData({ |
218 | idx: idx | 219 | idx: idx |
219 | }) | 220 | }) |
@@ -227,6 +228,9 @@ Page({ | @@ -227,6 +228,9 @@ Page({ | ||
227 | } | 228 | } |
228 | }) | 229 | }) |
229 | that.hideModal() | 230 | that.hideModal() |
231 | + if (pai != '') { | ||
232 | + that.getRegister() | ||
233 | + } | ||
230 | }, | 234 | }, |
231 | async getShengSu() { // 默认省份 | 235 | async getShengSu() { // 默认省份 |
232 | let that = this | 236 | let that = this |
@@ -253,6 +257,73 @@ Page({ | @@ -253,6 +257,73 @@ Page({ | ||
253 | } | 257 | } |
254 | 258 | ||
255 | }, | 259 | }, |
260 | + | ||
261 | + bindinputed(e) { | ||
262 | + let that = this | ||
263 | + let carNum = e.detail.value | ||
264 | + let sheng_id = that.data.sheng_id | ||
265 | + let reg = /^(([A-Z](([0-9]{5}[DF])|([DF]([A-HJ-NP-Z0-9])[0-9]{4})))|([A-Z][A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳使领]))$/ | ||
266 | + const careg = reg.test(carNum); | ||
267 | + if (!careg) { | ||
268 | + wx.showToast({ | ||
269 | + icon: 'none', | ||
270 | + title: '请输入正确车牌号', | ||
271 | + }) | ||
272 | + return; | ||
273 | + } else { | ||
274 | + that.setData({ | ||
275 | + pai: carNum | ||
276 | + }) | ||
277 | + console.log(that.data.shengItem, "shengItem"); | ||
278 | + if (sheng_id != '') { | ||
279 | + that.getRegister() | ||
280 | + } | ||
281 | + | ||
282 | + } | ||
283 | + }, | ||
284 | + async getRegister() { // 注册 | ||
285 | + let that = this | ||
286 | + try { | ||
287 | + const { | ||
288 | + data | ||
289 | + } = await request({ | ||
290 | + url: 'api/new2/checkPai', | ||
291 | + data: { | ||
292 | + sheng_id: that.data.sheng_id, | ||
293 | + pai: that.data.pai, | ||
294 | + } | ||
295 | + }) | ||
296 | + console.log(data, "注册"); | ||
297 | + if (data.code == 1) { | ||
298 | + let msg = data.msg | ||
299 | + a.popSuccessTest(msg) | ||
300 | + } else { | ||
301 | + let msg = data.msg | ||
302 | + // a.popTest(msg) | ||
303 | + wx.showModal({ | ||
304 | + title: '提示', | ||
305 | + content: '该车已被注册,是否申请加入车辆管理?', | ||
306 | + success: function (res) { | ||
307 | + if (res.confirm) { | ||
308 | + wx.navigateTo({ | ||
309 | + | ||
310 | + }) | ||
311 | + | ||
312 | + } else { | ||
313 | + | ||
314 | + } | ||
315 | + } | ||
316 | + }) | ||
317 | + } | ||
318 | + | ||
319 | + } catch (err) { | ||
320 | + that.setData({ | ||
321 | + msg: err.msg | ||
322 | + }) | ||
323 | + that.popTest() | ||
324 | + } | ||
325 | + | ||
326 | + }, | ||
256 | formSubmit(e) { // 保存时 | 327 | formSubmit(e) { // 保存时 |
257 | let that = this | 328 | let that = this |
258 | let obj = {} | 329 | let obj = {} |
@@ -26,7 +26,7 @@ | @@ -26,7 +26,7 @@ | ||
26 | <image class='select_img {{show&&"select_img_rotate"}}' src='{{imagesUrl}}assets/static/img/down_arrow.png'></image> | 26 | <image class='select_img {{show&&"select_img_rotate"}}' src='{{imagesUrl}}assets/static/img/down_arrow.png'></image> |
27 | </view> | 27 | </view> |
28 | </view> | 28 | </view> |
29 | - <input maxlength="10" type="text" value="{{pai}}" placeholder="英文字母请大写" placeholder-class="text_car" name="pai" catchblur="paiInput" /> | 29 | + <input maxlength="10" type="text" value="{{pai}}" placeholder="英文字母请大写" placeholder-class="text_car" name="pai" catchinput="bindinputed" catchblur="paiInput" /> |
30 | </view> | 30 | </view> |
31 | <view class="card_logo car"> | 31 | <view class="card_logo car"> |
32 | <label for="车辆品牌" style="width:260rpx">车辆品牌:</label> | 32 | <label for="车辆品牌" style="width:260rpx">车辆品牌:</label> |
@@ -15,34 +15,30 @@ Page({ | @@ -15,34 +15,30 @@ Page({ | ||
15 | msg: '', | 15 | msg: '', |
16 | content: '', | 16 | content: '', |
17 | page: 1, | 17 | page: 1, |
18 | - searchValue: '' | 18 | + searchValue: '', |
19 | + S4_num: '', | ||
19 | }, | 20 | }, |
20 | - | ||
21 | - /** | ||
22 | - * 生命周期函数--监听页面显示 | ||
23 | - */ | ||
24 | onShow: function () { | 21 | onShow: function () { |
25 | let that = this | 22 | let that = this |
26 | let token = wx.getStorageSync('token') | 23 | let token = wx.getStorageSync('token') |
27 | - // wx.showToast({ | ||
28 | - // title: '加载中', | ||
29 | - // icon: "loading", | ||
30 | - // duration: 2000, | ||
31 | - // mask: false | ||
32 | - // }) | ||
33 | setTimeout(() => { | 24 | setTimeout(() => { |
34 | if (token) { | 25 | if (token) { |
35 | - this.getList() | 26 | + that.getList() |
36 | } else { | 27 | } else { |
37 | that.setData({ | 28 | that.setData({ |
38 | content: "您尚未登录,请登录后操作" | 29 | content: "您尚未登录,请登录后操作" |
39 | }) | 30 | }) |
40 | - this.popConfirm() | 31 | + that.popConfirm() |
41 | } | 32 | } |
42 | }, 1300); | 33 | }, 1300); |
43 | 34 | ||
44 | }, | 35 | }, |
45 | - onLoad: function (options) {}, | 36 | + onLoad: function (options) { |
37 | + console.log(options); | ||
38 | + this.setData({ | ||
39 | + S4_num: options.S4_num || '' | ||
40 | + }) | ||
41 | + }, | ||
46 | openHistorySearch() { | 42 | openHistorySearch() { |
47 | this.setData({ | 43 | this.setData({ |
48 | searchRecord: wx.getStorageSync('searchRecord') || [] | 44 | searchRecord: wx.getStorageSync('searchRecord') || [] |
@@ -65,7 +61,7 @@ Page({ | @@ -65,7 +61,7 @@ Page({ | ||
65 | that.popMaskTest() | 61 | that.popMaskTest() |
66 | setTimeout(() => { | 62 | setTimeout(() => { |
67 | that.getList() | 63 | that.getList() |
68 | - }, 1700); | 64 | + }, 1000); |
69 | 65 | ||
70 | } catch (err) { | 66 | } catch (err) { |
71 | console.log(err); | 67 | console.log(err); |
@@ -89,9 +85,16 @@ Page({ | @@ -89,9 +85,16 @@ Page({ | ||
89 | async searchInput() { | 85 | async searchInput() { |
90 | let that = this; | 86 | let that = this; |
91 | if (that.data.searchValue != '') { | 87 | if (that.data.searchValue != '') { |
92 | - wx.navigateTo({ | ||
93 | - url: '/pages/searchList/searchList?kw=' + that.data.searchValue + '&change=1' | ||
94 | - }) | 88 | + if (that.data.S4_num == 1) { |
89 | + wx.navigateTo({ | ||
90 | + url: '/pages/Vmore4SList/Vmore4SList?kw=' + that.data.searchValue | ||
91 | + }) | ||
92 | + } else { | ||
93 | + wx.navigateTo({ | ||
94 | + url: '/pages/searchList/searchList?kw=' + that.data.searchValue + '&change=1' | ||
95 | + }) | ||
96 | + } | ||
97 | + | ||
95 | that.setData({ | 98 | that.setData({ |
96 | page: 1, | 99 | page: 1, |
97 | list: [], | 100 | list: [], |
@@ -135,13 +138,8 @@ Page({ | @@ -135,13 +138,8 @@ Page({ | ||
135 | searchRecord: searchRecord, | 138 | searchRecord: searchRecord, |
136 | searchValue: '' | 139 | searchValue: '' |
137 | }) | 140 | }) |
138 | - // console.log(that.data.searchRecord); | ||
139 | - | ||
140 | - //将历史记录数组整体储存到缓存中 | ||
141 | wx.setStorageSync('searchRecord', searchRecord) | 141 | wx.setStorageSync('searchRecord', searchRecord) |
142 | - // wx.navigateTo({ | ||
143 | - // url: '/pages/searchList/searchList?kw=' + inputVal | ||
144 | - // }) | 142 | + |
145 | const { | 143 | const { |
146 | data: { | 144 | data: { |
147 | data | 145 | data |
@@ -173,7 +171,7 @@ Page({ | @@ -173,7 +171,7 @@ Page({ | ||
173 | popMaskTest() { | 171 | popMaskTest() { |
174 | wx.showToast({ | 172 | wx.showToast({ |
175 | title: this.data.msg, | 173 | title: this.data.msg, |
176 | - duration: 2000, | 174 | + duration: 1300, |
177 | icon: 'none', | 175 | icon: 'none', |
178 | mask: true //是否有透明蒙层,默认为false | 176 | mask: true //是否有透明蒙层,默认为false |
179 | //如果有透明蒙层,弹窗的期间不能点击文档内容 | 177 | //如果有透明蒙层,弹窗的期间不能点击文档内容 |
@@ -181,13 +179,20 @@ Page({ | @@ -181,13 +179,20 @@ Page({ | ||
181 | }, | 179 | }, |
182 | 180 | ||
183 | // 点击搜索历史进行搜索 | 181 | // 点击搜索历史进行搜索 |
184 | - async toSearch(e) { | 182 | + toSearch(e) { |
185 | let that = this; | 183 | let that = this; |
186 | console.log(e); | 184 | console.log(e); |
187 | let kw = e.currentTarget.dataset.value | 185 | let kw = e.currentTarget.dataset.value |
188 | - wx.navigateTo({ | ||
189 | - url: '/pages/searchList/searchList?kw=' + kw + '&change=1' | ||
190 | - }) | 186 | + if (that.data.S4_num == 1) { |
187 | + wx.navigateTo({ | ||
188 | + url: '/pages/Vmore4SList/Vmore4SList?kw=' + kw | ||
189 | + }) | ||
190 | + } else { | ||
191 | + wx.navigateTo({ | ||
192 | + url: '/pages/searchList/searchList?kw=' + kw + '&change=1' | ||
193 | + }) | ||
194 | + } | ||
195 | + | ||
191 | that.setData({ | 196 | that.setData({ |
192 | searchValue: '' | 197 | searchValue: '' |
193 | }) | 198 | }) |
@@ -199,13 +204,11 @@ Page({ | @@ -199,13 +204,11 @@ Page({ | ||
199 | url: 'api/shop/souLog', | 204 | url: 'api/shop/souLog', |
200 | }) | 205 | }) |
201 | .then(res => { | 206 | .then(res => { |
202 | - | ||
203 | if (res.data.data.length > 0) { | 207 | if (res.data.data.length > 0) { |
204 | that.setData({ | 208 | that.setData({ |
205 | searchRecord: res.data.data | 209 | searchRecord: res.data.data |
206 | }) | 210 | }) |
207 | - console.log(this.data.searchRecord, res.data.data, | ||
208 | - "搜索") | 211 | + console.log(this.data.searchRecord, res.data.data, "搜索") |
209 | } else { | 212 | } else { |
210 | that.setData({ | 213 | that.setData({ |
211 | msg: '暂无搜索记录' | 214 | msg: '暂无搜索记录' |
@@ -214,13 +217,17 @@ Page({ | @@ -214,13 +217,17 @@ Page({ | ||
214 | } | 217 | } |
215 | }).catch(err => { | 218 | }).catch(err => { |
216 | console.log(err); | 219 | console.log(err); |
220 | + that.setData({ | ||
221 | + msg: err.msg | ||
222 | + }) | ||
223 | + that.popTest() | ||
217 | }) | 224 | }) |
218 | }, | 225 | }, |
219 | popTest() { | 226 | popTest() { |
220 | wx.showToast({ | 227 | wx.showToast({ |
221 | title: this.data.msg, | 228 | title: this.data.msg, |
222 | icon: 'none', //如果要纯文本,不要icon,将值设为'none' | 229 | icon: 'none', //如果要纯文本,不要icon,将值设为'none' |
223 | - duration: 2000 | 230 | + duration: 1300 |
224 | }) | 231 | }) |
225 | }, | 232 | }, |
226 | popConfirm() { | 233 | popConfirm() { |
@@ -28,6 +28,7 @@ | @@ -28,6 +28,7 @@ | ||
28 | "disablePlugins": [], | 28 | "disablePlugins": [], |
29 | "outputPath": "" | 29 | "outputPath": "" |
30 | }, | 30 | }, |
31 | + "enableEngineNative": false, | ||
31 | "useIsolateContext": true, | 32 | "useIsolateContext": true, |
32 | "useCompilerModule": false, | 33 | "useCompilerModule": false, |
33 | "userConfirmedUseCompilerModuleSwitch": false, | 34 | "userConfirmedUseCompilerModuleSwitch": false, |
@@ -152,6 +153,17 @@ | @@ -152,6 +153,17 @@ | ||
152 | "pathName": "pages/productdetailsImg/productdetailsImg", | 153 | "pathName": "pages/productdetailsImg/productdetailsImg", |
153 | "query": "type=1&id=63", | 154 | "query": "type=1&id=63", |
154 | "scene": null | 155 | "scene": null |
156 | + }, | ||
157 | + { | ||
158 | + "name": "pages/MyGarageNoCar/MyGarageNoCar", | ||
159 | + "pathName": "pages/MyGarageNoCar/MyGarageNoCar", | ||
160 | + "query": "", | ||
161 | + "scene": null | ||
162 | + }, | ||
163 | + { | ||
164 | + "name": "pages/center/index", | ||
165 | + "pathName": "pages/center/index", | ||
166 | + "scene": null | ||
155 | } | 167 | } |
156 | ] | 168 | ] |
157 | } | 169 | } |
-
请 注册 或 登录 后发表评论