Commit 7bf7c349f493cc133e4c432f8ff3e1401c663f5a

Authored by wdn127929
1 parent a6eaf305

营销中心----优惠券选择页面item UI

@@ -15,17 +15,17 @@ if (flutterRoot == null) { @@ -15,17 +15,17 @@ if (flutterRoot == null) {
15 15
16 16
17 17
18 -def flutterVersionCode = "481" 18 +def flutterVersionCode = "482"
19 if (flutterVersionCode == null) { 19 if (flutterVersionCode == null) {
20 - flutterVersionCode = '481' 20 + flutterVersionCode = '482'
21 } 21 }
22 22
23 23
24 24
25 25
26 -def flutterVersionName = "4.8.1" 26 +def flutterVersionName = "4.8.2"
27 if (flutterVersionName == null) { 27 if (flutterVersionName == null) {
28 - flutterVersionName = '4.8.1' 28 + flutterVersionName = '4.8.2'
29 } 29 }
30 30
31 31
@@ -18,6 +18,7 @@ class CouponItemF extends StatefulWidget { @@ -18,6 +18,7 @@ class CouponItemF extends StatefulWidget {
18 final CouponSunModel couponSonModel; 18 final CouponSunModel couponSonModel;
19 final bool showBtn; 19 final bool showBtn;
20 final bool showCheck; 20 final bool showCheck;
  21 + final bool radio;
21 CouponItemF( 22 CouponItemF(
22 {Key key, 23 {Key key,
23 this.from, 24 this.from,
@@ -25,7 +26,8 @@ class CouponItemF extends StatefulWidget { @@ -25,7 +26,8 @@ class CouponItemF extends StatefulWidget {
25 this.onPressedSwich, 26 this.onPressedSwich,
26 this.couponSonModel, 27 this.couponSonModel,
27 this.showBtn = false, 28 this.showBtn = false,
28 - this.showCheck = false}) 29 + this.showCheck = false,
  30 + this.radio = false})
29 : super(key: key); 31 : super(key: key);
30 32
31 @override 33 @override
@@ -56,301 +58,316 @@ class _CouponItemFState extends State<CouponItemF> { @@ -56,301 +58,316 @@ class _CouponItemFState extends State<CouponItemF> {
56 5, 58 5,
57 context); 59 context);
58 } 60 }
59 - return Stack(  
60 - alignment: widget.from == 'select'  
61 - ? Alignment.centerLeft  
62 - : AlignmentDirectional.topStart,  
63 - children: [  
64 - InkWell(  
65 - onTap: widget.onPressed,  
66 - child: Container(  
67 - // width: ScreenUtil().setWidth(610),  
68 - margin: EdgeInsets.fromLTRB(  
69 - ScreenUtil().setWidth(40),  
70 - ScreenUtil().setWidth(0),  
71 - ScreenUtil().setWidth(40),  
72 - ScreenUtil().setWidth(32)),  
73 - decoration: BoxDecoration(  
74 - color: MyColours.color_ffffff,  
75 - boxShadow: [  
76 - BoxShadow(  
77 - spreadRadius: ScreenUtil().setWidth(2),  
78 - color: Color.fromRGBO(0, 0, 0, 0.25),  
79 - offset: Offset(0, ScreenUtil().setWidth(8)),  
80 - blurRadius: ScreenUtil().setWidth(8))  
81 - ],  
82 - borderRadius: BorderRadius.all(  
83 - Radius.circular(ScreenUtil().setWidth(16)), 61 + return Column(children: [
  62 + Stack(
  63 + alignment: widget.from == 'select'
  64 + ? Alignment.centerLeft
  65 + : AlignmentDirectional.topStart,
  66 + children: [
  67 + InkWell(
  68 + onTap: widget.onPressed,
  69 + child: Container(
  70 + // width: ScreenUtil().setWidth(610),
  71 + margin: EdgeInsets.fromLTRB(
  72 + ScreenUtil().setWidth(40),
  73 + ScreenUtil().setWidth(0),
  74 + ScreenUtil().setWidth(40),
  75 + ScreenUtil().setWidth(0)),
  76 + decoration: BoxDecoration(
  77 + color: MyColours.color_ffffff,
  78 + boxShadow: [
  79 + BoxShadow(
  80 + spreadRadius: ScreenUtil().setWidth(2),
  81 + color: Color.fromRGBO(0, 0, 0, 0.25),
  82 + offset: Offset(0, ScreenUtil().setWidth(8)),
  83 + blurRadius: ScreenUtil().setWidth(8))
  84 + ],
  85 + borderRadius: BorderRadius.all(
  86 + Radius.circular(ScreenUtil().setWidth(16)),
  87 + ),
84 ), 88 ),
85 - ),  
86 - child: Column(  
87 - mainAxisSize: MainAxisSize.min,  
88 - crossAxisAlignment: CrossAxisAlignment.start,  
89 - children: [  
90 - Container(  
91 - height: ScreenUtil().setWidth(40),  
92 - padding: EdgeInsets.symmetric(  
93 - horizontal: ScreenUtil().setWidth(24)),  
94 - decoration: BoxDecoration(  
95 - color: widget.from == 'history'  
96 - ? MyColours.color_BFC4D4  
97 - : notSelect  
98 - ? sunModel.isType == '1'  
99 - ? MyColours.color_438E93  
100 - : MyColours.color_ED7B2F  
101 - : MyColours.color_999999,  
102 - borderRadius: BorderRadius.only(  
103 - topLeft:  
104 - Radius.circular(ScreenUtil().setWidth(16)),  
105 - topRight:  
106 - Radius.circular(ScreenUtil().setWidth(16)))),  
107 - child: Row(  
108 - mainAxisAlignment: MainAxisAlignment.spaceBetween,  
109 - children: [  
110 - Text(  
111 - sunModel.isType == '1'  
112 - ? sunModel.isExamine == '1'  
113 - ? '店铺优惠券(核销)'  
114 - : '店铺优惠券'  
115 - : '我的优惠券',  
116 - style: TextStyle(  
117 - color: MyColours.color_ffffff,  
118 - fontSize: ScreenUtil().setSp(24)),  
119 - ),  
120 - InkWell(  
121 - onTap: widget.onPressedSwich,  
122 - child: Text(  
123 - sunModel.isType == '1'  
124 - ? sunModel.isExamine == '1'  
125 - ? '被领取:${sunModel.receiveNum}张 已核销:${sunModel.useNum}张'  
126 - : '创建人:${sunModel.nickname ?? sunModel.uid} 被领取:${sunModel.receiveNum}张'  
127 - : '被领取:${sunModel.receiveNum}张',  
128 - maxLines: 1,  
129 - overflow: TextOverflow.ellipsis,  
130 - style: TextStyle(  
131 - color: MyColours.color_ffffff,  
132 - fontSize: ScreenUtil().setSp(20))),  
133 - ),  
134 - ], 89 + child: Column(
  90 + mainAxisSize: MainAxisSize.min,
  91 + crossAxisAlignment: CrossAxisAlignment.start,
  92 + children: [
  93 + Container(
  94 + height: ScreenUtil().setWidth(40),
  95 + padding: EdgeInsets.symmetric(
  96 + horizontal: ScreenUtil().setWidth(24)),
  97 + decoration: BoxDecoration(
  98 + color: widget.from == 'history'
  99 + ? MyColours.color_BFC4D4
  100 + : notSelect
  101 + ? sunModel.isType == '1'
  102 + ? MyColours.color_438E93
  103 + : MyColours.color_ED7B2F
  104 + : MyColours.color_999999,
  105 + borderRadius: BorderRadius.only(
  106 + topLeft:
  107 + Radius.circular(ScreenUtil().setWidth(16)),
  108 + topRight: Radius.circular(
  109 + ScreenUtil().setWidth(16)))),
  110 + child: Row(
  111 + mainAxisAlignment: MainAxisAlignment.spaceBetween,
  112 + children: [
  113 + Text(
  114 + sunModel.isType == '1'
  115 + ? sunModel.isExamine == '1'
  116 + ? '店铺优惠券(核销)'
  117 + : '店铺优惠券'
  118 + : '我的优惠券',
  119 + style: TextStyle(
  120 + color: MyColours.color_ffffff,
  121 + fontSize: ScreenUtil().setSp(24)),
  122 + ),
  123 + InkWell(
  124 + onTap: widget.onPressedSwich,
  125 + child: Text(
  126 + sunModel.isType == '1'
  127 + ? sunModel.isExamine == '1'
  128 + ? '被领取:${sunModel.receiveNum}张 已核销:${sunModel.useNum}张'
  129 + : '创建人:${sunModel.nickname ?? sunModel.uid} 被领取:${sunModel.receiveNum}张'
  130 + : '被领取:${sunModel.receiveNum}张',
  131 + maxLines: 1,
  132 + overflow: TextOverflow.ellipsis,
  133 + style: TextStyle(
  134 + color: MyColours.color_ffffff,
  135 + fontSize: ScreenUtil().setSp(20))),
  136 + ),
  137 + ],
  138 + ),
135 ), 139 ),
136 - ),  
137 - Container(  
138 - padding: EdgeInsets.fromLTRB(  
139 - ScreenUtil().setWidth(24 * 2),  
140 - ScreenUtil().setWidth(9 * 2),  
141 - ScreenUtil().setWidth(10),  
142 - ScreenUtil().setWidth(20)),  
143 - child: Column(  
144 - crossAxisAlignment: CrossAxisAlignment.start,  
145 - children: [  
146 - Container( 140 + Container(
  141 + padding: EdgeInsets.fromLTRB(
  142 + ScreenUtil().setWidth(24 * 2),
  143 + ScreenUtil().setWidth(9 * 2),
  144 + ScreenUtil().setWidth(10),
  145 + ScreenUtil().setWidth(20)),
  146 + child: Column(
  147 + crossAxisAlignment: CrossAxisAlignment.start,
  148 + children: [
  149 + Container(
  150 + width: ScreenUtil().setWidth(232 * 2),
  151 + child: Container(
  152 + height: ScreenUtil().setWidth(25 * 2),
  153 + constraints: BoxConstraints(
  154 + maxWidth: ScreenUtil().setWidth(190)),
  155 + child: Text(
  156 + sunModel.aname,
  157 + maxLines: 2,
  158 + overflow: TextOverflow.ellipsis,
  159 + style: TextStyle(
  160 + color: widget.from == 'history'
  161 + ? MyColours.color_BFC4D4
  162 + : notSelect
  163 + ? MyColours.color_515151
  164 + : MyColours.color_999999,
  165 + fontSize: ScreenUtil().setSp(36),
  166 + fontWeight: FontWeight.bold),
  167 + ),
  168 + )),
  169 + Container(
  170 + height: ScreenUtil().setWidth(14 * 2),
147 width: ScreenUtil().setWidth(232 * 2), 171 width: ScreenUtil().setWidth(232 * 2),
148 - child: Container(  
149 - height: ScreenUtil().setWidth(25 * 2),  
150 - constraints: BoxConstraints(  
151 - maxWidth: ScreenUtil().setWidth(190)),  
152 - child: Text(  
153 - sunModel.aname,  
154 - maxLines: 2, 172 + child: Text('${sunModel.desc}',
  173 + maxLines: 1,
155 overflow: TextOverflow.ellipsis, 174 overflow: TextOverflow.ellipsis,
156 style: TextStyle( 175 style: TextStyle(
157 - color: widget.from == 'history'  
158 - ? MyColours.color_BFC4D4  
159 - : notSelect  
160 - ? MyColours.color_515151  
161 - : MyColours.color_999999,  
162 - fontSize: ScreenUtil().setSp(36),  
163 - fontWeight: FontWeight.bold),  
164 - ),  
165 - )),  
166 - Container(  
167 - height: ScreenUtil().setWidth(14 * 2),  
168 - width: ScreenUtil().setWidth(232 * 2),  
169 - child: Text('${sunModel.desc}',  
170 - maxLines: 1,  
171 - overflow: TextOverflow.ellipsis,  
172 - style: TextStyle(  
173 - color: widget.from == 'history'  
174 - ? MyColours.color_BFC4D4  
175 - : notSelect  
176 - ? MyColours.color_515151  
177 - : MyColours.color_999999,  
178 - fontSize: ScreenUtil().setSp(20),  
179 - )),  
180 - ),  
181 - VEmptyView(16),  
182 - (ObjectUtil.isNotEmpty(sunModel.stime) &&  
183 - sunModel.stime != '0') ||  
184 - (ObjectUtil.isNotEmpty(sunModel.etime) &&  
185 - sunModel.etime != '0')  
186 - ? Container(  
187 - child: Text(  
188 - '使用时间:${ObjectUtil.isNotEmpty(sunModel.stime) ? Utils.getDateStrFromJiekou(sunModel.stime) : '--'} 至 ${ObjectUtil.isNotEmpty(sunModel.etime) ? Utils.getDateStrFromJiekou(sunModel.etime) : '--'}',  
189 - style: TextStyle(  
190 - color: widget.from == 'history'  
191 - ? MyColours.color_BFC4D4  
192 - : MyColours.color_999999,  
193 - fontSize: ScreenUtil().setSp(20))),  
194 - )  
195 - : Container(),  
196 - ],  
197 - ),  
198 - // widget.from == 'select'  
199 - // ? widget.showCheck  
200 - // ? Positioned(  
201 - // right: 0,  
202 - // top: ScreenUtil().setWidth(20),  
203 - // child: Image.asset(  
204 - // Utils.getImgPath(widget.couponSonModel.isCheck  
205 - // ? 'check_r'  
206 - // : 'check_un'),  
207 - // width: ScreenUtil().setWidth(40),  
208 - // height: ScreenUtil().setWidth(40),  
209 - // ))  
210 - // : Container()  
211 - // :  
212 - ),  
213 - ObjectUtil.isNotEmpty(sunModel.explain)  
214 - ? const MySeparator(  
215 - width: 3, color: MyColours.color_f3f3f3)  
216 - : SizedBox(),  
217 - ObjectUtil.isNotEmpty(sunModel.explain)  
218 - ? InkWell(  
219 - onTap: () {  
220 - if (explainH > 19) {  
221 - setState(() {  
222 - widget.couponSonModel.showText =  
223 - !widget.couponSonModel.showText;  
224 - });  
225 - }  
226 - },  
227 - child: Container(  
228 - width: double.infinity,  
229 - decoration: BoxDecoration(  
230 color: widget.from == 'history' 176 color: widget.from == 'history'
231 - ? MyColours.color_ffffff 177 + ? MyColours.color_BFC4D4
232 : notSelect 178 : notSelect
233 - ? MyColours.color_ffffff  
234 - : MyColours.color_FAFAFA,  
235 - borderRadius: BorderRadius.only(  
236 - bottomLeft: Radius.circular(  
237 - ScreenUtil().setWidth(20)),  
238 - bottomRight: Radius.circular(  
239 - ScreenUtil().setWidth(20)))),  
240 - child: Row(  
241 - crossAxisAlignment: CrossAxisAlignment.start,  
242 - children: [  
243 - widget.couponSonModel.showText  
244 - ? Container(  
245 - padding: EdgeInsets.fromLTRB(  
246 - ScreenUtil().setWidth(24 * 2),  
247 - ScreenUtil().setWidth(14),  
248 - ScreenUtil().setWidth(0),  
249 - ScreenUtil().setWidth(14)),  
250 - width: ScreenUtil().screenWidth -  
251 - ScreenUtil().setWidth(92 * 2),  
252 - child: Text(  
253 - '说明:${sunModel.explain}',  
254 - maxLines: 5,  
255 - style: TextStyle(  
256 - color: widget.from ==  
257 - 'history'  
258 - ? MyColours.color_BFC4D4  
259 - : MyColours  
260 - .color_999999,  
261 - fontSize: ScreenUtil()  
262 - .setSp(20))),  
263 - )  
264 - : Container(  
265 - padding: EdgeInsets.fromLTRB(  
266 - ScreenUtil().setWidth(24 * 2),  
267 - ScreenUtil().setWidth(14),  
268 - ScreenUtil().setWidth(0),  
269 - ScreenUtil().setWidth(14)),  
270 - width: ScreenUtil().screenWidth -  
271 - ScreenUtil().setWidth(92 * 2) +  
272 - ScreenUtil().setWidth(20),  
273 - child: Text(  
274 - '说明:${sunModel.explain}',  
275 - maxLines: 1,  
276 - overflow: TextOverflow.fade,  
277 - softWrap: false,  
278 - style: TextStyle(  
279 - color: widget.from ==  
280 - 'history'  
281 - ? MyColours.color_BFC4D4  
282 - : MyColours  
283 - .color_999999,  
284 - fontSize: ScreenUtil()  
285 - .setSp(20))),  
286 - ),  
287 - Spacer(),  
288 - explainH > 19  
289 - ? Container(  
290 - margin: EdgeInsets.only(  
291 - top: ScreenUtil().setWidth(10),  
292 - right:  
293 - ScreenUtil().setWidth(16)),  
294 - child: Image.asset(  
295 - !widget.couponSonModel.showText  
296 - ? Utils.getImgPath(  
297 - 'quan_down_f')  
298 - : Utils.getImgPath(  
299 - 'quan_up_f'),  
300 - width:  
301 - ScreenUtil().setWidth(28),  
302 - height:  
303 - ScreenUtil().setWidth(28)),  
304 - )  
305 - : Container(),  
306 - HEmptyView(14)  
307 - ],  
308 - )),  
309 - )  
310 - : Container(),  
311 - ],  
312 - ),  
313 - )),  
314 - Positioned(  
315 - left: ScreenUtil().setWidth(21),  
316 - child: widget.from == 'select'  
317 - ? Image.asset(  
318 - Utils.getImgPath(  
319 - sunModel.isCheck ? 'c_mul_select' : 'c_not_edit'),  
320 - width: w(21),  
321 - )  
322 - : Container()),  
323 - Positioned(  
324 - right: ScreenUtil().setWidth(100),  
325 - top: ScreenUtil().setWidth(37 * 2),  
326 - child: widget.showBtn  
327 - ? RoundButton(  
328 - width: widget.from == 'history'  
329 - ? ScreenUtil().setWidth(44 * 2)  
330 - : ScreenUtil().setWidth(32 * 2),  
331 - height: ScreenUtil().setWidth(21 * 2),  
332 - radius: ScreenUtil().setWidth(10),  
333 - text: widget.from == 'history'  
334 - ? '已过期'  
335 - : notSelect  
336 - ? '停用'  
337 - : '启用',  
338 - fontSize: 24,  
339 - textColor: widget.from == 'history'  
340 - ? MyColours.color_BFC4D4  
341 - : notSelect  
342 - ? MyColours.color_438E93  
343 - : MyColours.color_999999,  
344 - gradientStart: MyColours.color_ffffff,  
345 - gradientEnd: MyColours.color_ffffff,  
346 - borderColor: widget.from == 'history'  
347 - ? MyColours.color_BFC4D4  
348 - : notSelect  
349 - ? MyColours.color_438E93  
350 - : MyColours.color_999999,  
351 - onPressed: widget.onPressedSwich,  
352 - )  
353 - : Container())  
354 - ]); 179 + ? MyColours.color_515151
  180 + : MyColours.color_999999,
  181 + fontSize: ScreenUtil().setSp(20),
  182 + )),
  183 + ),
  184 + VEmptyView(16),
  185 + (ObjectUtil.isNotEmpty(sunModel.stime) &&
  186 + sunModel.stime != '0') ||
  187 + (ObjectUtil.isNotEmpty(sunModel.etime) &&
  188 + sunModel.etime != '0')
  189 + ? Container(
  190 + child: Text(
  191 + '使用时间:${ObjectUtil.isNotEmpty(sunModel.stime) ? Utils.getDateStrFromJiekou(sunModel.stime) : '--'} 至 ${ObjectUtil.isNotEmpty(sunModel.etime) ? Utils.getDateStrFromJiekou(sunModel.etime) : '--'}',
  192 + style: TextStyle(
  193 + color: widget.from == 'history'
  194 + ? MyColours.color_BFC4D4
  195 + : MyColours.color_999999,
  196 + fontSize: ScreenUtil().setSp(20))),
  197 + )
  198 + : Container(),
  199 + ],
  200 + ),
  201 + // widget.from == 'select'
  202 + // ? widget.showCheck
  203 + // ? Positioned(
  204 + // right: 0,
  205 + // top: ScreenUtil().setWidth(20),
  206 + // child: Image.asset(
  207 + // Utils.getImgPath(widget.couponSonModel.isCheck
  208 + // ? 'check_r'
  209 + // : 'check_un'),
  210 + // width: ScreenUtil().setWidth(40),
  211 + // height: ScreenUtil().setWidth(40),
  212 + // ))
  213 + // : Container()
  214 + // :
  215 + ),
  216 + ObjectUtil.isNotEmpty(sunModel.explain)
  217 + ? const MySeparator(
  218 + width: 3, color: MyColours.color_f3f3f3)
  219 + : SizedBox(),
  220 + ObjectUtil.isNotEmpty(sunModel.explain)
  221 + ? InkWell(
  222 + onTap: () {
  223 + if (explainH > 19) {
  224 + setState(() {
  225 + widget.couponSonModel.showText =
  226 + !widget.couponSonModel.showText;
  227 + });
  228 + }
  229 + },
  230 + child: Container(
  231 + width: double.infinity,
  232 + decoration: BoxDecoration(
  233 + color: widget.from == 'history'
  234 + ? MyColours.color_ffffff
  235 + : notSelect
  236 + ? MyColours.color_ffffff
  237 + : MyColours.color_FAFAFA,
  238 + borderRadius: BorderRadius.only(
  239 + bottomLeft: Radius.circular(
  240 + ScreenUtil().setWidth(20)),
  241 + bottomRight: Radius.circular(
  242 + ScreenUtil().setWidth(20)))),
  243 + child: Row(
  244 + crossAxisAlignment:
  245 + CrossAxisAlignment.start,
  246 + children: [
  247 + widget.couponSonModel.showText
  248 + ? Container(
  249 + padding: EdgeInsets.fromLTRB(
  250 + ScreenUtil().setWidth(24 * 2),
  251 + ScreenUtil().setWidth(14),
  252 + ScreenUtil().setWidth(0),
  253 + ScreenUtil().setWidth(14)),
  254 + width: ScreenUtil().screenWidth -
  255 + ScreenUtil().setWidth(92 * 2),
  256 + child: Text(
  257 + '说明:${sunModel.explain}',
  258 + maxLines: 5,
  259 + style: TextStyle(
  260 + color: widget.from ==
  261 + 'history'
  262 + ? MyColours
  263 + .color_BFC4D4
  264 + : MyColours
  265 + .color_999999,
  266 + fontSize: ScreenUtil()
  267 + .setSp(20))),
  268 + )
  269 + : Container(
  270 + padding: EdgeInsets.fromLTRB(
  271 + ScreenUtil().setWidth(24 * 2),
  272 + ScreenUtil().setWidth(14),
  273 + ScreenUtil().setWidth(0),
  274 + ScreenUtil().setWidth(14)),
  275 + width: ScreenUtil().screenWidth -
  276 + ScreenUtil()
  277 + .setWidth(92 * 2) +
  278 + ScreenUtil().setWidth(20),
  279 + child: Text(
  280 + '说明:${sunModel.explain}',
  281 + maxLines: 1,
  282 + overflow: TextOverflow.fade,
  283 + softWrap: false,
  284 + style: TextStyle(
  285 + color: widget.from ==
  286 + 'history'
  287 + ? MyColours
  288 + .color_BFC4D4
  289 + : MyColours
  290 + .color_999999,
  291 + fontSize: ScreenUtil()
  292 + .setSp(20))),
  293 + ),
  294 + Spacer(),
  295 + explainH > 19
  296 + ? Container(
  297 + margin: EdgeInsets.only(
  298 + top:
  299 + ScreenUtil().setWidth(10),
  300 + right: ScreenUtil()
  301 + .setWidth(16)),
  302 + child: Image.asset(
  303 + !widget.couponSonModel
  304 + .showText
  305 + ? Utils.getImgPath(
  306 + 'quan_down_f')
  307 + : Utils.getImgPath(
  308 + 'quan_up_f'),
  309 + width:
  310 + ScreenUtil().setWidth(28),
  311 + height: ScreenUtil()
  312 + .setWidth(28)),
  313 + )
  314 + : Container(),
  315 + HEmptyView(14)
  316 + ],
  317 + )),
  318 + )
  319 + : Container(),
  320 + VEmptyView(32),
  321 + ],
  322 + ),
  323 + )),
  324 + Positioned(
  325 + left: ScreenUtil().setWidth(21),
  326 + child: widget.from == 'select'
  327 + ? Image.asset(
  328 + Utils.getImgPath(sunModel.isCheck
  329 + ? widget.radio
  330 + ? 'select_f'
  331 + : 'c_mul_select'
  332 + : widget.radio
  333 + ? 'show_select_f'
  334 + : 'c_not_edit'),
  335 + width: w(25),
  336 + )
  337 + : Container()),
  338 + Positioned(
  339 + right: ScreenUtil().setWidth(100),
  340 + top: ScreenUtil().setWidth(37 * 2),
  341 + child: widget.showBtn
  342 + ? RoundButton(
  343 + width: widget.from == 'history'
  344 + ? ScreenUtil().setWidth(44 * 2)
  345 + : ScreenUtil().setWidth(32 * 2),
  346 + height: ScreenUtil().setWidth(21 * 2),
  347 + radius: ScreenUtil().setWidth(10),
  348 + text: widget.from == 'history'
  349 + ? '已过期'
  350 + : notSelect
  351 + ? '停用'
  352 + : '启用',
  353 + fontSize: 24,
  354 + textColor: widget.from == 'history'
  355 + ? MyColours.color_BFC4D4
  356 + : notSelect
  357 + ? MyColours.color_438E93
  358 + : MyColours.color_999999,
  359 + gradientStart: MyColours.color_ffffff,
  360 + gradientEnd: MyColours.color_ffffff,
  361 + borderColor: widget.from == 'history'
  362 + ? MyColours.color_BFC4D4
  363 + : notSelect
  364 + ? MyColours.color_438E93
  365 + : MyColours.color_999999,
  366 + onPressed: widget.onPressedSwich,
  367 + )
  368 + : Container())
  369 + ]),
  370 + VEmptyView(32)
  371 + ]);
355 } 372 }
356 } 373 }
@@ -5,6 +5,7 @@ import 'package:flutter_easyrefresh/easy_refresh.dart'; @@ -5,6 +5,7 @@ import 'package:flutter_easyrefresh/easy_refresh.dart';
5 import 'package:flutter_screenutil/flutter_screenutil.dart'; 5 import 'package:flutter_screenutil/flutter_screenutil.dart';
6 import 'package:one_key/constant/state.dart'; 6 import 'package:one_key/constant/state.dart';
7 import 'package:one_key/pages/coupon/coupon_item.dart'; 7 import 'package:one_key/pages/coupon/coupon_item.dart';
  8 +import 'package:one_key/pages/coupon/coupon_item_f.dart';
8 import 'package:one_key/provider/SmsModel.dart'; 9 import 'package:one_key/provider/SmsModel.dart';
9 import 'package:one_key/provider/coupon_provider.dart'; 10 import 'package:one_key/provider/coupon_provider.dart';
10 import 'package:one_key/provider/user_model.dart'; 11 import 'package:one_key/provider/user_model.dart';
@@ -157,9 +158,10 @@ class _MarkingCouponSelectPageState extends State<MarkingCouponSelectPage> { @@ -157,9 +158,10 @@ class _MarkingCouponSelectPageState extends State<MarkingCouponSelectPage> {
157 // ? 'assets/select.png' 158 // ? 'assets/select.png'
158 // : 'assets/unselect.png', 159 // : 'assets/unselect.png',
159 // width: ScreenUtil().setWidth(44)), 160 // width: ScreenUtil().setWidth(44)),
160 - child: CouponItem( 161 + child: CouponItemF(
161 from: 'select', 162 from: 'select',
162 showCheck: true, 163 showCheck: true,
  164 + radio: true,
163 couponSonModel: 165 couponSonModel:
164 couponProvider.couponListSelect[index], 166 couponProvider.couponListSelect[index],
165 onPressed: () { 167 onPressed: () {
@@ -81,10 +81,18 @@ class _MarkingInteractionPageState extends State<MarkingInteractionPage> { @@ -81,10 +81,18 @@ class _MarkingInteractionPageState extends State<MarkingInteractionPage> {
81 // 'uid': userModel.user.openid 81 // 'uid': userModel.user.openid
82 }; 82 };
83 await marketingCenterProvider.getNewRechargeList(context, params); 83 await marketingCenterProvider.getNewRechargeList(context, params);
84 - if (rechargeData == null &&  
85 - marketingCenterProvider.rechargeList != null &&  
86 - marketingCenterProvider.rechargeList.length > 0) {  
87 - rechargeData = marketingCenterProvider.rechargeList[0]; 84 + List<RechargeListSunModel> rechargeListCanUse = [];
  85 + if (marketingCenterProvider.rechargeList.length > 0) {
  86 + marketingCenterProvider.rechargeList.forEach((element) {
  87 + if (element.isOpen == '1') {
  88 + //启用状态
  89 + rechargeListCanUse.add(element);
  90 + }
  91 + });
  92 + }
  93 +
  94 + if (rechargeData == null && rechargeListCanUse.length > 0) {
  95 + rechargeData = rechargeListCanUse[0];
88 _getRechargeContent(); 96 _getRechargeContent();
89 setState(() {}); 97 setState(() {});
90 } 98 }
@@ -470,15 +478,16 @@ class _MarkingInteractionPageState extends State<MarkingInteractionPage> { @@ -470,15 +478,16 @@ class _MarkingInteractionPageState extends State<MarkingInteractionPage> {
470 : SizedBox(), 478 : SizedBox(),
471 ], 479 ],
472 ), 480 ),
473 - VEmptyView(20),  
474 - Text(  
475 - content,  
476 - style: TextStyle(  
477 - height: 1.2,  
478 - fontSize: font(10),  
479 - fontWeight: FontWeight.bold,  
480 - color: MyColours.color_515151),  
481 - ) 481 + if (content != '') VEmptyView(20),
  482 + if (content != '')
  483 + Text(
  484 + content,
  485 + style: TextStyle(
  486 + height: 1.2,
  487 + fontSize: font(10),
  488 + fontWeight: FontWeight.bold,
  489 + color: MyColours.color_515151),
  490 + )
482 ], 491 ],
483 )), 492 )),
484 RoundButton( 493 RoundButton(
@@ -508,27 +517,27 @@ class _MarkingInteractionPageState extends State<MarkingInteractionPage> { @@ -508,27 +517,27 @@ class _MarkingInteractionPageState extends State<MarkingInteractionPage> {
508 color: MyColours.color_ffffff, 517 color: MyColours.color_ffffff,
509 margin: EdgeInsets.only(left: w(21), top: w(12), right: w(21)), 518 margin: EdgeInsets.only(left: w(21), top: w(12), right: w(21)),
510 child: Column(children: [ 519 child: Column(children: [
511 - // InkWell(  
512 - // onTap: () {  
513 - // setState(() {  
514 - // isLink = !isLink;  
515 - // });  
516 - // },  
517 - // child: Row(  
518 - // children: [  
519 - // Image.asset(  
520 - // Utils.getImgPath(isLink ? 'f_select' : 'f_select_not'),  
521 - // width: w(20),  
522 - // ),  
523 - // HEmptyView(20),  
524 - // Text(  
525 - // '推荐店内充值优惠活动链接',  
526 - // style: TextStyle(  
527 - // fontSize: font(14), color: MyColours.color_515151),  
528 - // )  
529 - // ],  
530 - // )),  
531 - // VEmptyView(24), 520 + InkWell(
  521 + onTap: () {
  522 + setState(() {
  523 + isLink = !isLink;
  524 + });
  525 + },
  526 + child: Row(
  527 + children: [
  528 + Image.asset(
  529 + Utils.getImgPath(isLink ? 'f_select' : 'f_select_not'),
  530 + width: w(20),
  531 + ),
  532 + HEmptyView(20),
  533 + Text(
  534 + '推荐店内充值优惠活动链接',
  535 + style: TextStyle(
  536 + fontSize: font(14), color: MyColours.color_515151),
  537 + )
  538 + ],
  539 + )),
  540 + VEmptyView(24),
532 Container( 541 Container(
533 height: w(180), 542 height: w(180),
534 child: _uploadImageProvider.firstImage.file != null || 543 child: _uploadImageProvider.firstImage.file != null ||
@@ -713,38 +722,38 @@ class _MarkingInteractionPageState extends State<MarkingInteractionPage> { @@ -713,38 +722,38 @@ class _MarkingInteractionPageState extends State<MarkingInteractionPage> {
713 }); 722 });
714 }), 723 }),
715 ), 724 ),
716 - // VEmptyView(40),  
717 - // Container(  
718 - // width: w(188),  
719 - // height: w(22),  
720 - // alignment: Alignment.center,  
721 - // decoration: BoxDecoration(  
722 - // borderRadius: BorderRadius.circular(r(11)),  
723 - // gradient: LinearGradient(stops: [  
724 - // -0.57,  
725 - // 0.55,  
726 - // 1.48  
727 - // ], colors: [  
728 - // MyColours.color_4C8DAD,  
729 - // MyColours.color_0143A3,  
730 - // MyColours.color_42A5FF  
731 - // ], begin: Alignment.centerLeft, end: Alignment.centerRight)),  
732 - // child: RoundButton(  
733 - // width: w(186),  
734 - // height: w(20),  
735 - // text: '点击了解更多会员优惠政策',  
736 - // gradientStart: MyColours.color_ffffff,  
737 - // gradientEnd: MyColours.color_ffffff,  
738 - // borderColor: Colors.transparent,  
739 - // // borderColor: MyColours.color_999999,  
740 - // textColor: MyColours.color_999999,  
741 - // radius: r(11),  
742 - // fontSize: 24,  
743 -  
744 - // isBold: true,  
745 - // onPressed: () {},  
746 - // )),  
747 - // VEmptyView(18), 725 + VEmptyView(40),
  726 + Container(
  727 + width: w(188),
  728 + height: w(22),
  729 + alignment: Alignment.center,
  730 + decoration: BoxDecoration(
  731 + borderRadius: BorderRadius.circular(r(11)),
  732 + gradient: LinearGradient(stops: [
  733 + -0.57,
  734 + 0.55,
  735 + 1.48
  736 + ], colors: [
  737 + MyColours.color_4C8DAD,
  738 + MyColours.color_0143A3,
  739 + MyColours.color_42A5FF
  740 + ], begin: Alignment.centerLeft, end: Alignment.centerRight)),
  741 + child: RoundButton(
  742 + width: w(186),
  743 + height: w(20),
  744 + text: '点击了解更多会员优惠政策',
  745 + gradientStart: MyColours.color_ffffff,
  746 + gradientEnd: MyColours.color_ffffff,
  747 + borderColor: Colors.transparent,
  748 + // borderColor: MyColours.color_999999,
  749 + textColor: MyColours.color_999999,
  750 + radius: r(11),
  751 + fontSize: 24,
  752 +
  753 + isBold: true,
  754 + onPressed: () {},
  755 + )),
  756 + VEmptyView(18),
748 // Container( 757 // Container(
749 // height: w(28), 758 // height: w(28),
750 // alignment: Alignment.center, 759 // alignment: Alignment.center,
@@ -865,7 +874,7 @@ class _MarkingInteractionPageState extends State<MarkingInteractionPage> { @@ -865,7 +874,7 @@ class _MarkingInteractionPageState extends State<MarkingInteractionPage> {
865 Map temp = 874 Map temp =
866 await NavigatorUtil.goMarkingRechargeSelectPage( 875 await NavigatorUtil.goMarkingRechargeSelectPage(
867 context, rechargeData.id); 876 context, rechargeData.id);
868 - if (temp['recharge'] != null) { 877 + if (temp != null && temp['recharge'] != null) {
869 rechargeData = temp['recharge']; 878 rechargeData = temp['recharge'];
870 _getRechargeContent(); 879 _getRechargeContent();
871 setState(() {}); 880 setState(() {});
@@ -1366,25 +1366,29 @@ class _MarkingPreviewPageState extends State<MarkingPreviewPage> { @@ -1366,25 +1366,29 @@ class _MarkingPreviewPageState extends State<MarkingPreviewPage> {
1366 // .setWidth(imgSize * 2), 1366 // .setWidth(imgSize * 2),
1367 height: w(180), 1367 height: w(180),
1368 )), 1368 )),
1369 - VEmptyView(40),  
1370 - Container(  
1371 - width: double.infinity,  
1372 - alignment: Alignment.center,  
1373 - padding: EdgeInsets.symmetric(  
1374 - horizontal: ScreenUtil().setWidth(40),  
1375 - ),  
1376 - child: Text(  
1377 - _marketingCenterProvider.markDataModel.marketing.wecomle,  
1378 - style: TextStyle(  
1379 - color: MyColours.color_000000,  
1380 - fontSize: ScreenUtil().setSp(40),  
1381 - textBaseline: TextBaseline.alphabetic),  
1382 - textAlign: TextAlign.center,  
1383 - maxLines: 5,  
1384 - overflow: TextOverflow.ellipsis,  
1385 - // maxLength: 38, 1369 + if (_marketingCenterProvider.markDataModel.marketing.wecomle != null &&
  1370 + _marketingCenterProvider.markDataModel.marketing.wecomle != '')
  1371 + VEmptyView(40),
  1372 + if (_marketingCenterProvider.markDataModel.marketing.wecomle != null &&
  1373 + _marketingCenterProvider.markDataModel.marketing.wecomle != '')
  1374 + Container(
  1375 + width: double.infinity,
  1376 + alignment: Alignment.center,
  1377 + padding: EdgeInsets.symmetric(
  1378 + horizontal: ScreenUtil().setWidth(40),
  1379 + ),
  1380 + child: Text(
  1381 + _marketingCenterProvider.markDataModel.marketing.wecomle,
  1382 + style: TextStyle(
  1383 + color: MyColours.color_000000,
  1384 + fontSize: ScreenUtil().setSp(40),
  1385 + textBaseline: TextBaseline.alphabetic),
  1386 + textAlign: TextAlign.center,
  1387 + maxLines: 5,
  1388 + overflow: TextOverflow.ellipsis,
  1389 + // maxLength: 38,
  1390 + ),
1386 ), 1391 ),
1387 - ),  
1388 _marketingCenterProvider.markDataModel.marketing.isLink == '1' 1392 _marketingCenterProvider.markDataModel.marketing.isLink == '1'
1389 ? VEmptyView(90) 1393 ? VEmptyView(90)
1390 : SizedBox(), 1394 : SizedBox(),
@@ -44,6 +44,8 @@ class _MarkingRechargeSelectPageState extends State<MarkingRechargeSelectPage> { @@ -44,6 +44,8 @@ class _MarkingRechargeSelectPageState extends State<MarkingRechargeSelectPage> {
44 MarketingCenterProvider marketingCenterProvider; 44 MarketingCenterProvider marketingCenterProvider;
45 RechargeListSunModel selectData; 45 RechargeListSunModel selectData;
46 46
  47 + List<RechargeListSunModel> rechargeListCanUse = []; //没有停用的优惠
  48 +
47 @override 49 @override
48 void initState() { 50 void initState() {
49 // TODO: implement initState 51 // TODO: implement initState
@@ -51,6 +53,7 @@ class _MarkingRechargeSelectPageState extends State<MarkingRechargeSelectPage> { @@ -51,6 +53,7 @@ class _MarkingRechargeSelectPageState extends State<MarkingRechargeSelectPage> {
51 WidgetsBinding.instance.addPostFrameCallback((_) { 53 WidgetsBinding.instance.addPostFrameCallback((_) {
52 // if (!couponProvider.hasModify) { 54 // if (!couponProvider.hasModify) {
53 _getNewRechargeList(); 55 _getNewRechargeList();
  56 +
54 // } else { 57 // } else {
55 // couponProvider.pageStateSelect = PageState.Success; 58 // couponProvider.pageStateSelect = PageState.Success;
56 // // couponProvider.notifyListeners(); 59 // // couponProvider.notifyListeners();
@@ -66,20 +69,35 @@ class _MarkingRechargeSelectPageState extends State<MarkingRechargeSelectPage> { @@ -66,20 +69,35 @@ class _MarkingRechargeSelectPageState extends State<MarkingRechargeSelectPage> {
66 ///获取优惠券列表数据 69 ///获取优惠券列表数据
67 /// 70 ///
68 _getNewRechargeList() async { 71 _getNewRechargeList() async {
69 - UserModel userModel = Provider.of<UserModel>(context, listen: false); 72 + UserModel userModel = Provider.of<UserModel>(context, listen: false);
70 Map<String, String> params = { 73 Map<String, String> params = {
71 "sellerid": userModel.user.sellerid, 74 "sellerid": userModel.user.sellerid,
72 // 'uid': userModel.user.openid 75 // 'uid': userModel.user.openid
73 }; 76 };
74 - await marketingCenterProvider.getNewRechargeList(context,params);  
75 - outerloop:  
76 - for (var i = 0; i < marketingCenterProvider.rechargeList.length; i++) {  
77 - if (marketingCenterProvider.rechargeList[i].id == widget.selectid) {  
78 - marketingCenterProvider.rechargeList[i].isCheck = true;  
79 - selectData = marketingCenterProvider.rechargeList[i];  
80 - break outerloop; 77 + await marketingCenterProvider.getNewRechargeList(context, params);
  78 +
  79 + rechargeListCanUse = [];
  80 +
  81 + marketingCenterProvider.rechargeList.forEach((element) {
  82 + if (element.isOpen == '1') {
  83 + //启用状态
  84 + rechargeListCanUse.add(element);
  85 + }
  86 + });
  87 + if (rechargeListCanUse.length == 0) {
  88 + marketingCenterProvider.pageStateRechargeHome = PageState.Empty;
  89 + } else {
  90 + marketingCenterProvider.pageStateRechargeHome = PageState.Success;
  91 + outerloop:
  92 + for (var i = 0; i < rechargeListCanUse.length; i++) {
  93 + if (rechargeListCanUse[i].id == widget.selectid) {
  94 + rechargeListCanUse[i].isCheck = true;
  95 + selectData = rechargeListCanUse[i];
  96 + break outerloop;
  97 + }
81 } 98 }
82 } 99 }
  100 +
83 setState(() {}); 101 setState(() {});
84 } 102 }
85 103
@@ -90,7 +108,7 @@ class _MarkingRechargeSelectPageState extends State<MarkingRechargeSelectPage> { @@ -90,7 +108,7 @@ class _MarkingRechargeSelectPageState extends State<MarkingRechargeSelectPage> {
90 return Scaffold( 108 return Scaffold(
91 backgroundColor: MyColours.color_ffffff, 109 backgroundColor: MyColours.color_ffffff,
92 appBar: SystemAppBar( 110 appBar: SystemAppBar(
93 - '优惠券', 111 + '充值优惠活动',
94 onTap: () { 112 onTap: () {
95 Navigator.pop(context); 113 Navigator.pop(context);
96 }, 114 },
@@ -129,15 +147,12 @@ class _MarkingRechargeSelectPageState extends State<MarkingRechargeSelectPage> { @@ -129,15 +147,12 @@ class _MarkingRechargeSelectPageState extends State<MarkingRechargeSelectPage> {
129 return InkWell( 147 return InkWell(
130 onTap: () { 148 onTap: () {
131 //改这里 ******8 149 //改这里 ******8
132 - marketingCenterProvider.rechargeList  
133 - .forEach((element) { 150 + rechargeListCanUse.forEach((element) {
134 element.isCheck = false; 151 element.isCheck = false;
135 }); 152 });
136 153
137 - marketingCenterProvider  
138 - .rechargeList[index].isCheck = true;  
139 - selectData =  
140 - marketingCenterProvider.rechargeList[index]; 154 + rechargeListCanUse[index].isCheck = true;
  155 + selectData = rechargeListCanUse[index];
141 }, 156 },
142 // child: Row( 157 // child: Row(
143 // children: [ 158 // children: [
@@ -159,30 +174,25 @@ class _MarkingRechargeSelectPageState extends State<MarkingRechargeSelectPage> { @@ -159,30 +174,25 @@ class _MarkingRechargeSelectPageState extends State<MarkingRechargeSelectPage> {
159 child: RechargeItem( 174 child: RechargeItem(
160 from: 'select', 175 from: 'select',
161 showCheck: true, 176 showCheck: true,
162 - rechargeListSunModel: marketingCenterProvider  
163 - .rechargeList[index], 177 + rechargeListSunModel:
  178 + rechargeListCanUse[index],
164 onPressed: () { 179 onPressed: () {
165 // bool old = couponProvider 180 // bool old = couponProvider
166 // .couponListSelect[index].isCheck; 181 // .couponListSelect[index].isCheck;
167 //改这里 ******8 182 //改这里 ******8
168 - marketingCenterProvider.rechargeList  
169 - .forEach((element) { 183 + rechargeListCanUse.forEach((element) {
170 element.isCheck = false; 184 element.isCheck = false;
171 }); 185 });
172 186
173 - marketingCenterProvider  
174 - .rechargeList[index].isCheck = true; 187 + rechargeListCanUse[index].isCheck = true;
175 188
176 - selectData = marketingCenterProvider  
177 - .rechargeList[index]; 189 + selectData = rechargeListCanUse[index];
178 190
179 // couponProvider 191 // couponProvider
180 // .couponListSelect[index].isCheck = !old; 192 // .couponListSelect[index].isCheck = !old;
181 setState(() {}); 193 setState(() {});
182 })); 194 }));
183 - },  
184 - childCount:  
185 - marketingCenterProvider.rechargeList.length), 195 + }, childCount: rechargeListCanUse.length),
186 ) 196 )
187 ], 197 ],
188 // onRefresh: () async { 198 // onRefresh: () async {
@@ -94,74 +94,167 @@ class _RechargeItemState extends State<RechargeItem> { @@ -94,74 +94,167 @@ class _RechargeItemState extends State<RechargeItem> {
94 // } 94 // }
95 return InkWell( 95 return InkWell(
96 onTap: widget.onPressed, 96 onTap: widget.onPressed,
97 - child: Stack(  
98 - clipBehavior: Clip.none,  
99 - alignment: Alignment.centerLeft,  
100 - children: [  
101 - InkWell(  
102 - onTap: widget.onPressed,  
103 - child: Container(  
104 - // width: ScreenUtil().setWidth(610),  
105 - margin: EdgeInsets.fromLTRB(  
106 - ScreenUtil().setWidth(40),  
107 - ScreenUtil().setWidth(30),  
108 - ScreenUtil().setWidth(40),  
109 - ScreenUtil().setWidth(0)),  
110 - decoration: BoxDecoration(  
111 - color: MyColours.color_ffffff,  
112 - boxShadow: [  
113 - BoxShadow(  
114 - spreadRadius: ScreenUtil().setWidth(2),  
115 - color: Color.fromRGBO(0, 0, 0, 0.25),  
116 - offset: Offset(0, ScreenUtil().setWidth(8)),  
117 - blurRadius: ScreenUtil().setWidth(8))  
118 - ],  
119 - borderRadius: BorderRadius.all(  
120 - Radius.circular(ScreenUtil().setWidth(16)),  
121 - ),  
122 - ),  
123 - child: Column(  
124 - mainAxisSize: MainAxisSize.min,  
125 - crossAxisAlignment: CrossAxisAlignment.start,  
126 - children: [  
127 - Container(  
128 - height: ScreenUtil().setWidth(60),  
129 - padding: EdgeInsets.symmetric(  
130 - horizontal: ScreenUtil().setWidth(40)),  
131 - decoration: decoration,  
132 - child: Row(  
133 - mainAxisAlignment: MainAxisAlignment.spaceBetween,  
134 - children: [  
135 - Text(  
136 - widget.rechargeListSunModel.rname,  
137 - style: TextStyle(  
138 - color: MyColours.color_ffffff,  
139 - fontWeight: FontWeight.bold,  
140 - fontSize: ScreenUtil().setSp(32)),  
141 - ),  
142 - Text(  
143 - '更新时间:${widget.rechargeListSunModel.cdateStr}',  
144 - maxLines: 1,  
145 - overflow: TextOverflow.ellipsis,  
146 - style: TextStyle(  
147 - color: MyColours.color_ffffff,  
148 - fontSize: ScreenUtil().setSp(20))),  
149 - ], 97 + child: Column(
  98 + children: [
  99 + Stack(
  100 + clipBehavior: Clip.none,
  101 + alignment: Alignment.centerLeft,
  102 + children: [
  103 + InkWell(
  104 + onTap: widget.onPressed,
  105 + child: Container(
  106 + // width: ScreenUtil().setWidth(610),
  107 + margin: EdgeInsets.fromLTRB(
  108 + ScreenUtil().setWidth(40),
  109 + ScreenUtil().setWidth(0),
  110 + ScreenUtil().setWidth(40),
  111 + ScreenUtil().setWidth(0)),
  112 + decoration: BoxDecoration(
  113 + color: MyColours.color_ffffff,
  114 + boxShadow: [
  115 + BoxShadow(
  116 + spreadRadius: ScreenUtil().setWidth(2),
  117 + color: Color.fromRGBO(0, 0, 0, 0.25),
  118 + offset: Offset(0, ScreenUtil().setWidth(8)),
  119 + blurRadius: ScreenUtil().setWidth(8))
  120 + ],
  121 + borderRadius: BorderRadius.all(
  122 + Radius.circular(ScreenUtil().setWidth(16)),
150 ), 123 ),
151 ), 124 ),
152 - Container(  
153 - padding: EdgeInsets.fromLTRB(  
154 - ScreenUtil().setWidth(20 * 2),  
155 - ScreenUtil().setWidth(26),  
156 - ScreenUtil().setWidth(40),  
157 - ScreenUtil().setWidth(26)),  
158 - child: widget.from == 'menu-show'  
159 - ? Row(  
160 - mainAxisAlignment:  
161 - MainAxisAlignment.spaceBetween,  
162 - children: [  
163 - Expanded(  
164 - child: Column( 125 + child: Column(
  126 + mainAxisSize: MainAxisSize.min,
  127 + crossAxisAlignment: CrossAxisAlignment.start,
  128 + children: [
  129 + Container(
  130 + height: ScreenUtil().setWidth(60),
  131 + padding: EdgeInsets.symmetric(
  132 + horizontal: ScreenUtil().setWidth(40)),
  133 + decoration: decoration,
  134 + child: Row(
  135 + mainAxisAlignment:
  136 + MainAxisAlignment.spaceBetween,
  137 + children: [
  138 + Text(
  139 + widget.rechargeListSunModel.rname,
  140 + style: TextStyle(
  141 + color: MyColours.color_ffffff,
  142 + fontWeight: FontWeight.bold,
  143 + fontSize: ScreenUtil().setSp(32)),
  144 + ),
  145 + Text(
  146 + '更新时间:${widget.rechargeListSunModel.cdateStr}',
  147 + maxLines: 1,
  148 + overflow: TextOverflow.ellipsis,
  149 + style: TextStyle(
  150 + color: MyColours.color_ffffff,
  151 + fontSize: ScreenUtil().setSp(20))),
  152 + ],
  153 + ),
  154 + ),
  155 + Container(
  156 + padding: EdgeInsets.fromLTRB(
  157 + ScreenUtil().setWidth(20 * 2),
  158 + ScreenUtil().setWidth(26),
  159 + ScreenUtil().setWidth(40),
  160 + ScreenUtil().setWidth(26)),
  161 + child: widget.from == 'menu-show'
  162 + ? Row(
  163 + mainAxisAlignment:
  164 + MainAxisAlignment.spaceBetween,
  165 + children: [
  166 + Expanded(
  167 + child: Column(
  168 + crossAxisAlignment:
  169 + CrossAxisAlignment.start,
  170 + children: [
  171 + if (widget.rechargeListSunModel
  172 + .rechargeList.isPrice ==
  173 + '1')
  174 + Container(
  175 + // height: ScreenUtil().setWidth(14 * 2),
  176 + // width: ScreenUtil().setWidth(232 * 2),
  177 + constraints: BoxConstraints(
  178 + maxWidth: w(180)),
  179 + margin: EdgeInsets.only(
  180 + bottom: w(5)),
  181 + child: Text(
  182 + '会员充值满${widget.rechargeListSunModel.rechargeMoney}元赠余额${widget.rechargeListSunModel.rechargeList.price}元;',
  183 + maxLines: 10,
  184 + overflow:
  185 + TextOverflow.ellipsis,
  186 + style: TextStyle(
  187 + color: MyColours
  188 + .color_999999,
  189 + fontSize: ScreenUtil()
  190 + .setSp(20),
  191 + )),
  192 + ),
  193 + if (widget.rechargeListSunModel
  194 + .rechargeList.isScore ==
  195 + '1')
  196 + Container(
  197 + // height: ScreenUtil().setWidth(14 * 2),
  198 + // width: ScreenUtil().setWidth(232 * 2),
  199 + margin: EdgeInsets.only(
  200 + bottom: w(5)),
  201 + child: Text(
  202 + '会员充值满${widget.rechargeListSunModel.rechargeMoney}元赠送${widget.rechargeListSunModel.rechargeList.score}积分;',
  203 + maxLines: 10,
  204 + overflow:
  205 + TextOverflow.ellipsis,
  206 + style: TextStyle(
  207 + color: MyColours
  208 + .color_999999,
  209 + fontSize: ScreenUtil()
  210 + .setSp(20),
  211 + )),
  212 + ),
  213 + if (widget.rechargeListSunModel
  214 + .rechargeList.isCoupons ==
  215 + '1')
  216 + Container(
  217 + // height: ScreenUtil().setWidth(14 * 2),
  218 + // width: ScreenUtil().setWidth(232 * 2),
  219 + child: Text(
  220 + '会员充值满${widget.rechargeListSunModel.rechargeMoney}元赠送${Utils.listToStringEnglish3(widget.rechargeListSunModel.rechargeList.couponsNames)}。',
  221 + maxLines: 10,
  222 + overflow:
  223 + TextOverflow.ellipsis,
  224 + style: TextStyle(
  225 + color: MyColours
  226 + .color_999999,
  227 + fontSize: ScreenUtil()
  228 + .setSp(20),
  229 + )),
  230 + ),
  231 + ],
  232 + )),
  233 + if (widget
  234 + .rechargeListSunModel.qrcode !=
  235 + null)
  236 + Column(
  237 + children: [
  238 + CachedNetworkImage(
  239 + imageUrl: widget
  240 + .rechargeListSunModel
  241 + .qrcode,
  242 + width: w(60),
  243 + fit: BoxFit.cover,
  244 + ),
  245 + VEmptyView(10),
  246 + Text(
  247 + '长按识别二维码前往充值',
  248 + style: TextStyle(
  249 + fontSize: font(10),
  250 + color:
  251 + MyColours.color_999999),
  252 + )
  253 + ],
  254 + )
  255 + ],
  256 + )
  257 + : Column(
165 crossAxisAlignment: 258 crossAxisAlignment:
166 CrossAxisAlignment.start, 259 CrossAxisAlignment.start,
167 children: [ 260 children: [
@@ -171,13 +264,11 @@ class _RechargeItemState extends State<RechargeItem> { @@ -171,13 +264,11 @@ class _RechargeItemState extends State<RechargeItem> {
171 Container( 264 Container(
172 // height: ScreenUtil().setWidth(14 * 2), 265 // height: ScreenUtil().setWidth(14 * 2),
173 // width: ScreenUtil().setWidth(232 * 2), 266 // width: ScreenUtil().setWidth(232 * 2),
174 - constraints: BoxConstraints(  
175 - maxWidth: w(180)),  
176 margin: 267 margin:
177 EdgeInsets.only(bottom: w(5)), 268 EdgeInsets.only(bottom: w(5)),
178 child: Text( 269 child: Text(
179 '会员充值满${widget.rechargeListSunModel.rechargeMoney}元赠余额${widget.rechargeListSunModel.rechargeList.price}元;', 270 '会员充值满${widget.rechargeListSunModel.rechargeMoney}元赠余额${widget.rechargeListSunModel.rechargeList.price}元;',
180 - maxLines: 10, 271 + maxLines: 1,
181 overflow: TextOverflow.ellipsis, 272 overflow: TextOverflow.ellipsis,
182 style: TextStyle( 273 style: TextStyle(
183 color: MyColours.color_999999, 274 color: MyColours.color_999999,
@@ -195,7 +286,7 @@ class _RechargeItemState extends State<RechargeItem> { @@ -195,7 +286,7 @@ class _RechargeItemState extends State<RechargeItem> {
195 EdgeInsets.only(bottom: w(5)), 286 EdgeInsets.only(bottom: w(5)),
196 child: Text( 287 child: Text(
197 '会员充值满${widget.rechargeListSunModel.rechargeMoney}元赠送${widget.rechargeListSunModel.rechargeList.score}积分;', 288 '会员充值满${widget.rechargeListSunModel.rechargeMoney}元赠送${widget.rechargeListSunModel.rechargeList.score}积分;',
198 - maxLines: 10, 289 + maxLines: 1,
199 overflow: TextOverflow.ellipsis, 290 overflow: TextOverflow.ellipsis,
200 style: TextStyle( 291 style: TextStyle(
201 color: MyColours.color_999999, 292 color: MyColours.color_999999,
@@ -211,7 +302,7 @@ class _RechargeItemState extends State<RechargeItem> { @@ -211,7 +302,7 @@ class _RechargeItemState extends State<RechargeItem> {
211 // width: ScreenUtil().setWidth(232 * 2), 302 // width: ScreenUtil().setWidth(232 * 2),
212 child: Text( 303 child: Text(
213 '会员充值满${widget.rechargeListSunModel.rechargeMoney}元赠送${Utils.listToStringEnglish3(widget.rechargeListSunModel.rechargeList.couponsNames)}。', 304 '会员充值满${widget.rechargeListSunModel.rechargeMoney}元赠送${Utils.listToStringEnglish3(widget.rechargeListSunModel.rechargeList.couponsNames)}。',
214 - maxLines: 10, 305 + maxLines: 1,
215 overflow: TextOverflow.ellipsis, 306 overflow: TextOverflow.ellipsis,
216 style: TextStyle( 307 style: TextStyle(
217 color: MyColours.color_999999, 308 color: MyColours.color_999999,
@@ -220,174 +311,105 @@ class _RechargeItemState extends State<RechargeItem> { @@ -220,174 +311,105 @@ class _RechargeItemState extends State<RechargeItem> {
220 )), 311 )),
221 ), 312 ),
222 ], 313 ],
223 - )),  
224 - if (widget.rechargeListSunModel.qrcode !=  
225 - null)  
226 - Column(  
227 - children: [  
228 - CachedNetworkImage(  
229 - imageUrl: widget  
230 - .rechargeListSunModel.qrcode,  
231 - width: w(60),  
232 - fit: BoxFit.cover,  
233 - ),  
234 - VEmptyView(10),  
235 - Text(  
236 - '长按识别二维码前往充值',  
237 - style: TextStyle(  
238 - fontSize: font(10),  
239 - color: MyColours.color_999999),  
240 - )  
241 - ],  
242 - )  
243 - ],  
244 - )  
245 - : Column(  
246 - crossAxisAlignment: CrossAxisAlignment.start,  
247 - children: [  
248 - if (widget.rechargeListSunModel.rechargeList  
249 - .isPrice ==  
250 - '1')  
251 - Container(  
252 - // height: ScreenUtil().setWidth(14 * 2),  
253 - // width: ScreenUtil().setWidth(232 * 2),  
254 - margin: EdgeInsets.only(bottom: w(5)),  
255 - child: Text(  
256 - '会员充值满${widget.rechargeListSunModel.rechargeMoney}元赠余额${widget.rechargeListSunModel.rechargeList.price}元;',  
257 - maxLines: 1,  
258 - overflow: TextOverflow.ellipsis,  
259 - style: TextStyle(  
260 - color: MyColours.color_999999,  
261 - fontSize: ScreenUtil().setSp(20),  
262 - )),  
263 - ),  
264 - if (widget.rechargeListSunModel.rechargeList  
265 - .isScore ==  
266 - '1')  
267 - Container(  
268 - // height: ScreenUtil().setWidth(14 * 2),  
269 - // width: ScreenUtil().setWidth(232 * 2),  
270 - margin: EdgeInsets.only(bottom: w(5)),  
271 - child: Text(  
272 - '会员充值满${widget.rechargeListSunModel.rechargeMoney}元赠送${widget.rechargeListSunModel.rechargeList.score}积分;',  
273 - maxLines: 1,  
274 - overflow: TextOverflow.ellipsis,  
275 - style: TextStyle(  
276 - color: MyColours.color_999999,  
277 - fontSize: ScreenUtil().setSp(20),  
278 - )),  
279 - ),  
280 - if (widget.rechargeListSunModel.rechargeList  
281 - .isCoupons ==  
282 - '1')  
283 - Container(  
284 - // height: ScreenUtil().setWidth(14 * 2),  
285 - // width: ScreenUtil().setWidth(232 * 2),  
286 - child: Text(  
287 - '会员充值满${widget.rechargeListSunModel.rechargeMoney}元赠送${Utils.listToStringEnglish3(widget.rechargeListSunModel.rechargeList.couponsNames)}。',  
288 - maxLines: 1,  
289 - overflow: TextOverflow.ellipsis,  
290 - style: TextStyle(  
291 - color: MyColours.color_999999,  
292 - fontSize: ScreenUtil().setSp(20),  
293 - )),  
294 - ),  
295 - ],  
296 - ), 314 + ),
  315 +
  316 + // widget.from == 'select'
  317 + // ? widget.showCheck
  318 + // ? Positioned(
  319 + // right: 0,
  320 + // top: ScreenUtil().setWidth(20),
  321 + // child: Image.asset(
  322 + // Utils.getImgPath(widget.couponSonModel.isCheck
  323 + // ? 'check_r'
  324 + // : 'check_un'),
  325 + // width: ScreenUtil().setWidth(40),
  326 + // height: ScreenUtil().setWidth(40),
  327 + // ))
  328 + // : Container()
  329 + // :
  330 + ),
  331 + if (widget.showBtn && widget.from != 'history')
  332 + MySeparator(
  333 + width: w(4), color: MyColours.color_BFC4D4),
  334 + if (widget.showBtn) VEmptyView(15),
  335 + if (widget.showBtn && widget.from != 'history')
  336 + Row(
  337 + mainAxisAlignment: MainAxisAlignment.end,
  338 + children: [
  339 + RoundButton(
  340 + width: widget.from == 'history'
  341 + ? ScreenUtil().setWidth(50 * 2)
  342 + : ScreenUtil().setWidth(50 * 2),
  343 + height: ScreenUtil().setWidth(20 * 2),
  344 + radius: ScreenUtil().setWidth(10),
  345 + text: '删除',
  346 + fontSize: 24,
  347 + textColor: MyColours.color_E34D59,
  348 + gradientStart: MyColours.color_ffffff,
  349 + gradientEnd: MyColours.color_ffffff,
  350 + borderColor: MyColours.color_E34D59,
  351 + onPressed: widget.onPressedDel,
  352 + ),
  353 + HEmptyView(34),
  354 + RoundButton(
  355 + width: ScreenUtil().setWidth(50 * 2),
  356 + height: ScreenUtil().setWidth(20 * 2),
  357 + radius: ScreenUtil().setWidth(10),
  358 + text: widget.rechargeListSunModel.isOpen ==
  359 + '1'
  360 + ? '禁用'
  361 + : '启用',
297 362
298 - // widget.from == 'select'  
299 - // ? widget.showCheck  
300 - // ? Positioned(  
301 - // right: 0,  
302 - // top: ScreenUtil().setWidth(20),  
303 - // child: Image.asset(  
304 - // Utils.getImgPath(widget.couponSonModel.isCheck  
305 - // ? 'check_r'  
306 - // : 'check_un'),  
307 - // width: ScreenUtil().setWidth(40),  
308 - // height: ScreenUtil().setWidth(40),  
309 - // ))  
310 - // : Container()  
311 - // : 363 + ///启用
  364 + fontSize: 24,
  365 + textColor: MyColours.color_438E93,
  366 + gradientStart: MyColours.color_ffffff,
  367 + gradientEnd: MyColours.color_ffffff,
  368 + borderColor: MyColours.color_438E93,
  369 + onPressed: widget.onPressedUse,
  370 + ),
  371 + HEmptyView(38),
  372 + ],
  373 + ),
  374 + if (widget.showBtn && widget.from != 'history')
  375 + VEmptyView(15)
  376 + ],
312 ), 377 ),
313 - if (widget.showBtn && widget.from != 'history')  
314 - MySeparator(  
315 - width: w(4), color: MyColours.color_BFC4D4),  
316 - if (widget.showBtn) VEmptyView(15),  
317 - if (widget.showBtn && widget.from != 'history')  
318 - Row(  
319 - mainAxisAlignment: MainAxisAlignment.end,  
320 - children: [  
321 - RoundButton( 378 + )),
  379 + widget.showCheck
  380 + ? Positioned(
  381 + left: w(10),
  382 + // top: ScreenUtil().setWidth(115),
  383 + child: Image.asset(
  384 + Utils.getImgPath(widget.rechargeListSunModel.isCheck
  385 + ? 'select_f'
  386 + : 'show_select_f'),
  387 + width: ScreenUtil().setWidth(50),
  388 + height: ScreenUtil().setWidth(50),
  389 + ))
  390 + : SizedBox(),
  391 + if (widget.from == 'history')
  392 + Positioned(
  393 + right: ScreenUtil().setWidth(100),
  394 + top: ScreenUtil().setWidth(60 * 2),
  395 + child: widget.showBtn
  396 + ? RoundButton(
322 width: widget.from == 'history' 397 width: widget.from == 'history'
323 - ? ScreenUtil().setWidth(50 * 2)  
324 - : ScreenUtil().setWidth(50 * 2),  
325 - height: ScreenUtil().setWidth(20 * 2), 398 + ? ScreenUtil().setWidth(44 * 2)
  399 + : ScreenUtil().setWidth(32 * 2),
  400 + height: ScreenUtil().setWidth(21 * 2),
326 radius: ScreenUtil().setWidth(10), 401 radius: ScreenUtil().setWidth(10),
327 - text: '删除', 402 + text: '已过期',
328 fontSize: 24, 403 fontSize: 24,
329 - textColor: MyColours.color_E34D59, 404 + textColor: MyColours.color_BFC4D4,
330 gradientStart: MyColours.color_ffffff, 405 gradientStart: MyColours.color_ffffff,
331 gradientEnd: MyColours.color_ffffff, 406 gradientEnd: MyColours.color_ffffff,
332 - borderColor: MyColours.color_E34D59,  
333 - onPressed: widget.onPressedDel,  
334 - ),  
335 - HEmptyView(34),  
336 - RoundButton(  
337 - width: ScreenUtil().setWidth(50 * 2),  
338 - height: ScreenUtil().setWidth(20 * 2),  
339 - radius: ScreenUtil().setWidth(10),  
340 - text: widget.rechargeListSunModel.isOpen == '1'  
341 - ? '禁用'  
342 - : '启用',  
343 -  
344 - ///启用  
345 - fontSize: 24,  
346 - textColor: MyColours.color_438E93,  
347 - gradientStart: MyColours.color_ffffff,  
348 - gradientEnd: MyColours.color_ffffff,  
349 - borderColor: MyColours.color_438E93,  
350 - onPressed: widget.onPressedUse,  
351 - ),  
352 - HEmptyView(38),  
353 - ],  
354 - ),  
355 - if (widget.showBtn && widget.from != 'history')  
356 - VEmptyView(15)  
357 - ],  
358 - ),  
359 - )),  
360 - widget.showCheck  
361 - ? Positioned(  
362 - left: w(10),  
363 - top: ScreenUtil().setWidth(115),  
364 - child: Image.asset(  
365 - Utils.getImgPath(widget.rechargeListSunModel.isCheck  
366 - ? 'select_f'  
367 - : 'show_select_f'),  
368 - width: ScreenUtil().setWidth(50),  
369 - height: ScreenUtil().setWidth(50),  
370 - ))  
371 - : SizedBox(),  
372 - if (widget.from == 'history')  
373 - Positioned(  
374 - right: ScreenUtil().setWidth(100),  
375 - top: ScreenUtil().setWidth(60 * 2),  
376 - child: widget.showBtn  
377 - ? RoundButton(  
378 - width: widget.from == 'history'  
379 - ? ScreenUtil().setWidth(44 * 2)  
380 - : ScreenUtil().setWidth(32 * 2),  
381 - height: ScreenUtil().setWidth(21 * 2),  
382 - radius: ScreenUtil().setWidth(10),  
383 - text: '已过期',  
384 - fontSize: 24,  
385 - textColor: MyColours.color_BFC4D4,  
386 - gradientStart: MyColours.color_ffffff,  
387 - gradientEnd: MyColours.color_ffffff,  
388 - borderColor: MyColours.color_BFC4D4,  
389 - )  
390 - : Container())  
391 - ])); 407 + borderColor: MyColours.color_BFC4D4,
  408 + )
  409 + : Container())
  410 + ]),
  411 + VEmptyView(30)
  412 + ],
  413 + ));
392 } 414 }
393 } 415 }
@@ -226,7 +226,10 @@ class _RechargeSelectStoreCouponPageState @@ -226,7 +226,10 @@ class _RechargeSelectStoreCouponPageState
226 } 226 }
227 couponProvider.getCheckValue(); 227 couponProvider.getCheckValue();
228 } 228 }
229 - })); 229 + })
  230 +
  231 +
  232 + );
230 }, childCount: couponProvider.couponListSelect.length), 233 }, childCount: couponProvider.couponListSelect.length),
231 ) 234 )
232 ], 235 ],