Commit d21105cd9c684c325a37b49b7e64f1adc2dc39a7
Merge branch 'dev' of http://git.vipzhuang.cn/wxd/MShopWeApp into dev
Showing
5 changed files
with
1497 additions
and
0 deletions
packageB/pages/coupons/filter.wxs
0 → 100644
| 1 | +var numFr = { | |
| 2 | + getNum: function(x) { | |
| 3 | + var f = parseFloat(x); | |
| 4 | + if (isNaN(f)) { | |
| 5 | + return false; | |
| 6 | + } | |
| 7 | + var f = Math.round(x * 100) / 100; | |
| 8 | + var s = f.toString(); | |
| 9 | + var rs = s.indexOf('.'); | |
| 10 | + if (rs < 0) { | |
| 11 | + rs = s.length; | |
| 12 | + s += '.'; | |
| 13 | + } | |
| 14 | + while (s.length <= rs + 2) { | |
| 15 | + s += '0'; | |
| 16 | + } | |
| 17 | + return s; | |
| 18 | + }, | |
| 19 | + showBtnText: function(index) { | |
| 20 | + switch(index) { | |
| 21 | + case 1: { | |
| 22 | + return '已使用'; | |
| 23 | + break; | |
| 24 | + }; | |
| 25 | + case 2: { | |
| 26 | + return '已过期'; | |
| 27 | + break; | |
| 28 | + }; | |
| 29 | + default: { | |
| 30 | + return '立即使用'; | |
| 31 | + }; | |
| 32 | + }; | |
| 33 | + }, | |
| 34 | +} | |
| 35 | +module.exports = { | |
| 36 | + getNum: numFr.getNum, | |
| 37 | + showBtnText: numFr.showBtnText, | |
| 38 | +} | |
| 0 | 39 | \ No newline at end of file | ... | ... |
packageB/pages/coupons/query/index.js
0 → 100644
| 1 | +var t = getApp(), | |
| 2 | + a = t.request, | |
| 3 | + o = t.globalData.setting, | |
| 4 | + os = o, | |
| 5 | + i = require("../../../../utils/util.js"), | |
| 6 | + ut = i, | |
| 7 | + s = require("../../../../utils/common.js"); | |
| 8 | +var regeneratorRuntime = require('../../../../utils/runtime.js'); | |
| 9 | +const { | |
| 10 | + barcode, | |
| 11 | + qrcode | |
| 12 | +} = require('../../../../utils/index.js'); | |
| 13 | +let _this = null; | |
| 14 | + | |
| 15 | +Page({ | |
| 16 | + data: { | |
| 17 | + | |
| 18 | + val:false, | |
| 19 | + datet: "", | |
| 20 | + dates: "", | |
| 21 | + parameter: false, | |
| 22 | + details:[],//数据 | |
| 23 | + isBind:true,//控制清空时间日期的按钮 | |
| 24 | + isBinds: true, | |
| 25 | + select: false,//下拉框 | |
| 26 | + grade_name: '所有', | |
| 27 | + // grades: [ //old | |
| 28 | + // '所有', | |
| 29 | + // '已使用', | |
| 30 | + // '已过期', | |
| 31 | + // '未使用', | |
| 32 | + // ], | |
| 33 | + currentIndex: 0, //tab项当前指示器 | |
| 34 | + grades: [ | |
| 35 | + '未使用', | |
| 36 | + '已使用', | |
| 37 | + '已过期', | |
| 38 | + ], | |
| 39 | + display:false, | |
| 40 | + is_no_more: 0, | |
| 41 | + current_page:1, | |
| 42 | + by_list:[], | |
| 43 | + isloading:0, | |
| 44 | + pageNum: 1, | |
| 45 | + }, | |
| 46 | + /** | |
| 47 | + * 生命周期函数--监听页面加载 | |
| 48 | + */ | |
| 49 | + onLoad: function (options) { | |
| 50 | + _this = this; | |
| 51 | + this.setData({ | |
| 52 | + details: [] | |
| 53 | + }); | |
| 54 | + this.wjquery(); | |
| 55 | + }, | |
| 56 | + /** | |
| 57 | + * 生命周期函数--监听页面显示 | |
| 58 | + */ | |
| 59 | + onShow: function (options) { | |
| 60 | + var th = this; | |
| 61 | + | |
| 62 | + wx.setNavigationBarTitle({ | |
| 63 | + title: "微券查询", | |
| 64 | + }); | |
| 65 | + | |
| 66 | + /** | |
| 67 | + * 控制显示微券兑换 | |
| 68 | + * by sty | |
| 69 | + */ | |
| 70 | + getApp().getConfig2(function (ee) { | |
| 71 | + var json_d = JSON.parse(ee.switch_list); | |
| 72 | + let is_show_dhwz = json_d.dhwz_switch; | |
| 73 | + let grades = th.data.grades; | |
| 74 | + // console.log('is_show_dhwz----------------------------',is_show_dhwz); | |
| 75 | + if(is_show_dhwz) { | |
| 76 | + grades.push('微券兑换'); | |
| 77 | + th.setData({ grades }); | |
| 78 | + }; | |
| 79 | + th.setData({ is_show_dhwz }); | |
| 80 | + },1); | |
| 81 | + }, | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + // 点击选中二维码 | |
| 87 | + click: function (e) { | |
| 88 | + var val = e.currentTarget.dataset.cashrepno; | |
| 89 | + getApp().globalData.val = val; | |
| 90 | + wx.navigateTo({ | |
| 91 | + url: '../qr_code/qr_code', | |
| 92 | + }) | |
| 93 | + }, | |
| 94 | + // 点击返回主页 | |
| 95 | + // clicks: function () { | |
| 96 | + // this.setData({ | |
| 97 | + // hide:true, display:false | |
| 98 | + // }) | |
| 99 | + // }, | |
| 100 | + //监听输入框显示清空按钮 | |
| 101 | + watchPassWord: function (event) { | |
| 102 | + var val = event.detail.value; | |
| 103 | + if (val != "" && val != null) { | |
| 104 | + var isBind = false; | |
| 105 | + this.setData({ isBind: isBind }); | |
| 106 | + | |
| 107 | + } | |
| 108 | + }, | |
| 109 | + /** | |
| 110 | + * 点击下拉框 | |
| 111 | + */ | |
| 112 | + bindShowMsg() { | |
| 113 | + this.setData({ | |
| 114 | + select: !this.data.select | |
| 115 | + }) | |
| 116 | + }, | |
| 117 | + /** | |
| 118 | + * 已选下拉框 | |
| 119 | + */ | |
| 120 | + // mySelect(e) { | |
| 121 | + // var name = e.currentTarget.dataset.name; | |
| 122 | + // this.setData({ | |
| 123 | + // grade_name: name, | |
| 124 | + // select: false | |
| 125 | + // }) | |
| 126 | + // }, | |
| 127 | + | |
| 128 | + /** | |
| 129 | + * 点击tab | |
| 130 | + * by sty | |
| 131 | + */ | |
| 132 | + clickTab(e) { | |
| 133 | + let index = e.target.dataset.index; | |
| 134 | + let name = e.target.dataset.name; | |
| 135 | + | |
| 136 | + this.setData({ | |
| 137 | + is_get: 0, | |
| 138 | + pageNum: 1, | |
| 139 | + grade_name: name, | |
| 140 | + currentIndex: index, | |
| 141 | + is_no_more: 0, | |
| 142 | + current_page: 1, | |
| 143 | + noMore: false, | |
| 144 | + details: [], | |
| 145 | + by_list: [], | |
| 146 | + }); | |
| 147 | + | |
| 148 | + | |
| 149 | + if(index == 3) {//微券兑换 | |
| 150 | + this.exchange(); | |
| 151 | + } else {//其他 | |
| 152 | + this.wjquery(); | |
| 153 | + }; | |
| 154 | + }, | |
| 155 | + | |
| 156 | + /** | |
| 157 | + * 点击"立即使用" | |
| 158 | + * by sty | |
| 159 | + */ | |
| 160 | + clickUse(e) { | |
| 161 | + let useIndex = e.currentTarget.dataset.index; | |
| 162 | + let val = e.currentTarget.dataset.cashrepno; | |
| 163 | + | |
| 164 | + this.setData({ | |
| 165 | + showQr: true, | |
| 166 | + useIndex, | |
| 167 | + }); | |
| 168 | + this.qrcode(val); | |
| 169 | + }, | |
| 170 | + | |
| 171 | + /** | |
| 172 | + * 关闭二维码 | |
| 173 | + * by sty | |
| 174 | + */ | |
| 175 | + closeQr() { | |
| 176 | + this.setData({ | |
| 177 | + showQr: false, | |
| 178 | + }); | |
| 179 | + }, | |
| 180 | + | |
| 181 | + /** | |
| 182 | + * 生成二维码 | |
| 183 | + * by sty | |
| 184 | + */ | |
| 185 | + qrcode:function(val){ | |
| 186 | + // console.log(val); | |
| 187 | + // barcode('barcode', val, 600,160); | |
| 188 | + qrcode('qrcode', val, 300, 300); | |
| 189 | + }, | |
| 190 | + | |
| 191 | + /** | |
| 192 | + * 请求微券列表 | |
| 193 | + * by sty | |
| 194 | + */ | |
| 195 | + async exchange() { | |
| 196 | + var result; | |
| 197 | + var user_id = getApp().globalData.user_id; | |
| 198 | + var store_id = os.stoid; | |
| 199 | + | |
| 200 | + | |
| 201 | + this.getData(true, '/api/weshop/users/listExchangeCoupons?pageSize=10', { | |
| 202 | + user_id: user_id, store_id: store_id, | |
| 203 | + }).then(()=>{ | |
| 204 | + _this.setData({ | |
| 205 | + result: _this.data.list.pageData, | |
| 206 | + }); | |
| 207 | + }); | |
| 208 | + | |
| 209 | + // await getApp().request.promiseGet("/api/weshop/users/listExchangeCoupons", { | |
| 210 | + // data: { | |
| 211 | + // user_id: user_id, store_id: store_id, | |
| 212 | + // } | |
| 213 | + // }).then(res => { | |
| 214 | + // // var msg = res.data; | |
| 215 | + // // result = msg.data.pageData; | |
| 216 | + // }) | |
| 217 | + // e.setData({ | |
| 218 | + // result: result | |
| 219 | + // }) | |
| 220 | + }, | |
| 221 | + | |
| 222 | + /** | |
| 223 | + * 微券兑换对话框 | |
| 224 | + * by sty | |
| 225 | + */ | |
| 226 | + async clickExchange(e) { | |
| 227 | + var th=this; | |
| 228 | + var index = e.currentTarget.dataset.index; | |
| 229 | + var item = this.data.result[index]; | |
| 230 | + this.data.monye = item.ToSum; | |
| 231 | + this.data.integr = item.Integral; | |
| 232 | + this.data.number = item.Number; | |
| 233 | + | |
| 234 | + let content = `确定使用${th.data.integr}积分兑换面值${th.data.monye}元的代金券吗?`; | |
| 235 | + wx.showModal({ | |
| 236 | + title: '提示', | |
| 237 | + content: content, | |
| 238 | + success (res) { | |
| 239 | + if (res.confirm) { | |
| 240 | + console.log('用户点击确定'); | |
| 241 | + th.sure_pay(); | |
| 242 | + } else if (res.cancel) { | |
| 243 | + console.log('用户点击取消') | |
| 244 | + } | |
| 245 | + } | |
| 246 | + }); | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + // var my_con = this.selectComponent("#my_con"); //组件的id | |
| 251 | + // var title="是否使用"+th.data.integr+"积分兑换代金券面值"+th.data.monye+"元"; | |
| 252 | + // my_con.open(title, "确定", "取消", th.sure_pay, null) | |
| 253 | + }, | |
| 254 | + | |
| 255 | + | |
| 256 | + /** | |
| 257 | + * 微券兑换 | |
| 258 | + * by sty | |
| 259 | + */ | |
| 260 | + sure_pay:function(){ | |
| 261 | + var monye=this.data.monye; | |
| 262 | + var integr=this.data.integr; | |
| 263 | + var number=this.data.number; | |
| 264 | + | |
| 265 | + var user_id = getApp().globalData.user_id; | |
| 266 | + console.log(integr,"是什么微卷",typeof integr,monye); | |
| 267 | + var store_id = os.stoid; | |
| 268 | + getApp().request.post("/api/weshop/users/saveInterToCash", { | |
| 269 | + data: { | |
| 270 | + user_id: user_id, | |
| 271 | + store_id: store_id, | |
| 272 | + money:monye, | |
| 273 | + integ:integr, | |
| 274 | + number:number, | |
| 275 | + }, | |
| 276 | + success: function (su) { | |
| 277 | + if (su.data.data!=null) { | |
| 278 | + // getApp().showWarning("兑换成功"); | |
| 279 | + wx.showToast({ | |
| 280 | + title: '兑换成功', | |
| 281 | + icon: 'success', | |
| 282 | + }); | |
| 283 | + }else{ | |
| 284 | + // getApp().showWarning("积分不足"); | |
| 285 | + wx.showToast({ | |
| 286 | + title: '积分不足', | |
| 287 | + icon: 'error', | |
| 288 | + }); | |
| 289 | + } | |
| 290 | + } | |
| 291 | + | |
| 292 | + }) | |
| 293 | + }, | |
| 294 | + | |
| 295 | + | |
| 296 | + //明细查询 | |
| 297 | + Gettime:function(e){ | |
| 298 | + var page = 0; | |
| 299 | + //开始获取时间 | |
| 300 | + var th = this; | |
| 301 | + var stime = th.data.datet; | |
| 302 | + var etime = th.data.dates; | |
| 303 | + var tpye = th.data.grade_name; | |
| 304 | + | |
| 305 | + //开始获取时间结束 | |
| 306 | + //删除字符中的—— | |
| 307 | + var datatk = stime.replace(/[-]/g, ""); | |
| 308 | + var dataj = etime.replace(/[-]/g, ""); | |
| 309 | + //转换类型 | |
| 310 | + var datak = parseInt(datatk); | |
| 311 | + var dataj = parseInt(dataj); | |
| 312 | + | |
| 313 | + //判断初始时间小于结束时间 | |
| 314 | + if (datak > dataj) { | |
| 315 | + getApp().showWarning("结束时间错误"); | |
| 316 | + } else { | |
| 317 | + this.setData({ details: [] }); | |
| 318 | + this.data.current_page=1; | |
| 319 | + this.data.is_no_more=0; | |
| 320 | + this.data.by_list=[]; | |
| 321 | + this.data.details=[]; | |
| 322 | + this.wjquery(); | |
| 323 | + } | |
| 324 | + | |
| 325 | + }, | |
| 326 | + | |
| 327 | + //微卷查询流水明细 | |
| 328 | + async wjquery() { | |
| 329 | + if(this.data.isloading) return; | |
| 330 | + if(this.data.is_no_more) return; | |
| 331 | + this.data.islading=1; | |
| 332 | + var th=this; | |
| 333 | + | |
| 334 | + var len = this.data.details.length; | |
| 335 | + | |
| 336 | + var e = this,sum, val, number; | |
| 337 | + var user_id = getApp().globalData.user_id; | |
| 338 | + var store_id = os.stoid; | |
| 339 | + | |
| 340 | + var stime = this.data.datet; | |
| 341 | + var etime = this.data.dates; | |
| 342 | + | |
| 343 | + var tpye = this.data.grade_name; | |
| 344 | + console.log("是什么类型",tpye); | |
| 345 | + var IsUse = 0; | |
| 346 | + var e = this; | |
| 347 | + var get_data = { | |
| 348 | + user_id: user_id, | |
| 349 | + store_id: store_id, | |
| 350 | + // pageSize: 10, | |
| 351 | + page: e.data.current_page, | |
| 352 | + }; | |
| 353 | + | |
| 354 | + var dd={ | |
| 355 | + user_id: user_id, | |
| 356 | + store_id: store_id, | |
| 357 | + // pageSize: 10, | |
| 358 | + }; | |
| 359 | + dd.isuse=0; | |
| 360 | + // 判断下拉框,添加类型 | |
| 361 | + if (tpye == "已使用"){ | |
| 362 | + get_data.IsUse = 1; | |
| 363 | + dd.isuse=1; | |
| 364 | + } else if (tpye == "已过期"){ | |
| 365 | + get_data.IsUse = 2; | |
| 366 | + } else if (tpye == "未使用"){ | |
| 367 | + get_data.IsUse = 0; | |
| 368 | + }; | |
| 369 | + if (etime != "" && etime != null) { | |
| 370 | + get_data.EndDate = etime; | |
| 371 | + | |
| 372 | + //时间要转成时间戳 | |
| 373 | + var new_t=new Date(etime)/1000; | |
| 374 | + dd.etime=new_t; | |
| 375 | + } | |
| 376 | + | |
| 377 | + if (stime != "" && stime != null) { | |
| 378 | + get_data.BeginDate= stime; | |
| 379 | + //时间要转成时间戳 | |
| 380 | + var new_t=new Date(stime)/1000; | |
| 381 | + dd.stime=new_t; | |
| 382 | + } | |
| 383 | + | |
| 384 | + var by_list=[]; | |
| 385 | + if(th.data.current_page==1){ | |
| 386 | + //先拿包邮券 | |
| 387 | + await getApp().request.promiseGet("/api/weshop/userfeemail/pageAndArea", { | |
| 388 | + data: dd, | |
| 389 | + }).then(res => { | |
| 390 | + | |
| 391 | + if(res.data.code == 0) { | |
| 392 | + th.setData({ | |
| 393 | + byTotal: res.data.data.total, | |
| 394 | + }); | |
| 395 | + }; | |
| 396 | + | |
| 397 | + if(res.data.code==0 && res.data.data && res.data.data.total>0){ | |
| 398 | + | |
| 399 | + by_list=res.data.data.pageData; | |
| 400 | + for(var i in by_list){ | |
| 401 | + by_list[i].isby=1; | |
| 402 | + //过滤是时间的范围 | |
| 403 | + if(get_data.IsUse == 2 && by_list[i].use_end_time>=ut.gettimestamp()){ | |
| 404 | + th.data.by_list.push(by_list[i]); | |
| 405 | + }else if(get_data.IsUse == 0 && by_list[i].use_end_time<ut.gettimestamp()){ | |
| 406 | + th.data.by_list.push(by_list[i]); | |
| 407 | + }else if(get_data.IsUse==1){ | |
| 408 | + th.data.by_list.push(by_list[i]); | |
| 409 | + }else if(get_data.IsUse==undefined){ | |
| 410 | + th.data.by_list.push(by_list[i]); | |
| 411 | + } | |
| 412 | + } | |
| 413 | + } | |
| 414 | + }) | |
| 415 | + } | |
| 416 | + | |
| 417 | + var big_arr = this.data.details; ///api/weshop / users / listQuan | |
| 418 | + if(th.data.current_page==1 && th.data.by_list.length>0) { | |
| 419 | + big_arr=th.data.by_list; | |
| 420 | + }; | |
| 421 | + | |
| 422 | + | |
| 423 | + await getApp().request.promiseGet("/api/weshop/users/listQuan", { | |
| 424 | + data: get_data, | |
| 425 | + isShowLoading: 1 | |
| 426 | + | |
| 427 | + }).then(res => { | |
| 428 | + | |
| 429 | + th.data.islading=0; | |
| 430 | + var a = res.data; | |
| 431 | + var len = e.data.details.length; | |
| 432 | + var details = a.data.pageData; | |
| 433 | + | |
| 434 | + th.setData({ | |
| 435 | + pageSize: a.data.pageSize, | |
| 436 | + wjTotal: a.data.total, | |
| 437 | + }); | |
| 438 | + | |
| 439 | + if (details.length == 0) { | |
| 440 | + // this.data.is_no_more = 1; | |
| 441 | + this.setData({ | |
| 442 | + is_no_more: 1, | |
| 443 | + }); | |
| 444 | + // getApp().showWarning("未找更多数据"); | |
| 445 | + if(th.data.by_list && th.data.current_page==1){ | |
| 446 | + th.setData({ val: val,details:th.data.by_list}); | |
| 447 | + details=th.data.by_list; | |
| 448 | + setTimeout(function () { | |
| 449 | + for (var i = 0; i < details.length; i++) { | |
| 450 | + var no = i + len; | |
| 451 | + qrcode('qrcode' + no, details[i].no,460, 460); | |
| 452 | + } | |
| 453 | + }, 100) | |
| 454 | + } | |
| 455 | + return false; | |
| 456 | + } | |
| 457 | + | |
| 458 | + th.data.current_page++; | |
| 459 | + val = a.data.total+th.data.by_list.length; | |
| 460 | + | |
| 461 | + big_arr=big_arr.concat(details); | |
| 462 | + this.setData({ | |
| 463 | + details: big_arr,val: val, | |
| 464 | + is_get: 1, | |
| 465 | + current_page: this.data.current_page, | |
| 466 | + }); | |
| 467 | + | |
| 468 | + setTimeout(function () { | |
| 469 | + if(by_list) details=big_arr; | |
| 470 | + for (var i = 0; i < details.length; i++) { | |
| 471 | + var no = i + len; | |
| 472 | + qrcode('qrcode' + no, details[i].CashRepNo?details[i].CashRepNo:details[i].no,460, 460); | |
| 473 | + } | |
| 474 | + }, 100) | |
| 475 | + }) | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + }, | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + //---加载更多是靠这个函数---- | |
| 484 | + onReachBottom: function () { | |
| 485 | + if(this.data.currentIndex != 3) { | |
| 486 | + this.wjquery(); | |
| 487 | + } else { | |
| 488 | + this.scrollToLower('/api/weshop/users/listExchangeCoupons?pageSize=10', { | |
| 489 | + user_id: getApp().globalData.user_id, | |
| 490 | + store_id: os.stoid, | |
| 491 | + }, function() { | |
| 492 | + console.log('!!!!!', _this.data.list.pageData); | |
| 493 | + _this.setData({ | |
| 494 | + result: _this.data.list.pageData, | |
| 495 | + }); | |
| 496 | + }); | |
| 497 | + }; | |
| 498 | + }, | |
| 499 | + | |
| 500 | + | |
| 501 | + //起始时间 | |
| 502 | + bindDateChenge: function(e) { | |
| 503 | + console.log("是什么", e.detail.value); | |
| 504 | + var isBind = false; | |
| 505 | + this.setData({ | |
| 506 | + datet: e.detail.value, isBind: isBind | |
| 507 | + }); | |
| 508 | + }, | |
| 509 | + // 结束时间 | |
| 510 | + bindDateChenges: function(e) { | |
| 511 | + console.log("是什么", e.detail.value); | |
| 512 | + var isBinds = false; | |
| 513 | + this.setData({ | |
| 514 | + dates: e.detail.value, isBinds: isBinds | |
| 515 | + }); | |
| 516 | + }, | |
| 517 | + //catchtap阻止冒泡,点击清除开始时间的按钮 | |
| 518 | + eliminate:function(){ | |
| 519 | + console.log("试试"); | |
| 520 | + var isBind= true; | |
| 521 | + var data=""; | |
| 522 | + this.setData({ datet: data, isBind: isBind}) | |
| 523 | + }, | |
| 524 | + //catchtap阻止冒泡,点击清除结束时间的按钮 | |
| 525 | + eliminates: function () { | |
| 526 | + console.log("试试"); | |
| 527 | + var isBinds = true; | |
| 528 | + var dates = ""; | |
| 529 | + this.setData({ dates: dates, isBinds: isBinds }) | |
| 530 | + }, | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + // 上拉加载请求数据 | |
| 538 | + getData: function(isInit, url, data) { | |
| 539 | + return getApp().request.promiseGet(url, {data: data, isShowLoading: true,}) | |
| 540 | + .then((res) => { | |
| 541 | + _this.data.isLoading = false; | |
| 542 | + if(res.data.code == 0) { | |
| 543 | + if(isInit) {// 第一次加载 | |
| 544 | + _this.setData({ | |
| 545 | + list: res.data.data | |
| 546 | + }); | |
| 547 | + } else { | |
| 548 | + _this.setData({ | |
| 549 | + 'list.pageData': _this.data.list.pageData.concat(res.data.data.pageData) | |
| 550 | + }); | |
| 551 | + }; | |
| 552 | + | |
| 553 | + if((res.data.data.pageData.length == 0) || (res.data.data.pageSize * res.data.data.page >= res.data.data.total)) { | |
| 554 | + _this.setData({ | |
| 555 | + noMore: true | |
| 556 | + }); | |
| 557 | + }; | |
| 558 | + }; | |
| 559 | + }); | |
| 560 | + }, | |
| 561 | + | |
| 562 | + | |
| 563 | + // 上拉加载 | |
| 564 | + scrollToLower(url, requestData, callback) { | |
| 565 | + // 页面数据 | |
| 566 | + // let pageData = this.data.list.pageData; | |
| 567 | + // 数据总量 | |
| 568 | + let total = this.data.list.total; | |
| 569 | + // 单页最大数据量 | |
| 570 | + let pageSize = this.data.list.pageSize; | |
| 571 | + // 如果数据总量不为0且小于或等于单页最大数据量,说明数据已全部加载,显示‘没有更多了’ | |
| 572 | + if((total != 0)&&(total <= pageSize)) { | |
| 573 | + this.setData({ | |
| 574 | + noMore: true | |
| 575 | + }); | |
| 576 | + }; | |
| 577 | + | |
| 578 | + if(!this.data.isloading && !this.data.noMore) { | |
| 579 | + this.setData({ | |
| 580 | + isLoading: true, | |
| 581 | + pageNum: this.data.pageNum + 1 | |
| 582 | + }); | |
| 583 | + requestData.page = this.data.pageNum; | |
| 584 | + this.getData(false, url, requestData).then(()=>{ | |
| 585 | + if(callback) { | |
| 586 | + callback(); | |
| 587 | + }; | |
| 588 | + }); | |
| 589 | + }; | |
| 590 | + }, | |
| 591 | + | |
| 592 | +}) | |
| 0 | 593 | \ No newline at end of file | ... | ... |
packageB/pages/coupons/query/index.json
0 → 100644
packageB/pages/coupons/query/index.wxml
0 → 100644
| 1 | +<wxs module="filter" src="../filter.wxs"></wxs> | |
| 2 | +<wxs module="time" src="../../../../utils/filter.wxs"></wxs> | |
| 3 | + | |
| 4 | + | |
| 5 | +<!-- <view class="big-rim"> | |
| 6 | + <form bindsubmit='Gettime'> | |
| 7 | + <view class="min-rim"> | |
| 8 | + <view class="rq">日期:</view> | |
| 9 | + | |
| 10 | + <picker class='pi' mode="date" value='{{datet}}' start="2019/1/1" bindchange='bindDateChenge'> | |
| 11 | + <view class="rq-rim"> | |
| 12 | + <view class='kssj'><text class="wz"name="datat"value='{{datet}}'bindinput='watchPassWord'>{{datet}}</text></view> --> | |
| 13 | + <!-- 清除输入框中的内容--> | |
| 14 | + <!-- <view hidden='{{isBind}}' class="qc-rim"> | |
| 15 | + <button class="empty" catchtap="eliminate">x</button> | |
| 16 | + </view> | |
| 17 | + </view> | |
| 18 | + </picker> | |
| 19 | + | |
| 20 | + <view class="zi">至 </view> | |
| 21 | + <picker class="pi"mode="date" value='{{dates}}' start="2019/1/1" end="" bindchange='bindDateChenges'> | |
| 22 | + <view class="rim"> | |
| 23 | + <view class="kssj"> | |
| 24 | + <text class='wz' name="datas" value='{{dates}}'>{{dates}}</text> | |
| 25 | + </view> --> | |
| 26 | + <!-- 清除输入框中的内容 --> | |
| 27 | + <!-- <view class="end-rim" hidden="{{isBinds}}"> | |
| 28 | + <button class="end" catchtap="eliminates">x</button> | |
| 29 | + </view> | |
| 30 | + </view> | |
| 31 | + </picker> | |
| 32 | + </view> | |
| 33 | + <view class="xknr-rim"> | |
| 34 | + <view class="cxnr">查询内容 </view> | |
| 35 | + <view class='top'> --> | |
| 36 | + <!-- 下拉框 --> | |
| 37 | + <!-- <view class='top-selected' bindtap='bindShowMsg'> | |
| 38 | + <input name="grade_name" class="texts" value='{{grade_name}}'>{{grade_name}}</input> | |
| 39 | + <view class="rim-images"> | |
| 40 | + <image class="images" src='{{iurl}}/miniapp/images/usermoney/ico-pt4.png'></image> | |
| 41 | + </view> | |
| 42 | + </view> --> | |
| 43 | + <!-- 下拉需要显示的列表 --> | |
| 44 | + <!-- <view class="select-box" wx:if="{{select}}"> | |
| 45 | + <view wx:for="{{grades}}" wx:key="unique"> | |
| 46 | + <view class="select_one" bindtap="mySelect" data-name="{{item}}">{{item}}</view> | |
| 47 | + </view> | |
| 48 | + </view> | |
| 49 | + </view> | |
| 50 | + </view> | |
| 51 | + <button class="botton" form-type='submit' data-query='{{item}}'>查询明细</button> | |
| 52 | + </form> | |
| 53 | +</view> --> | |
| 54 | + | |
| 55 | + | |
| 56 | +<view class="tab-head" bindtap="clickTab"> | |
| 57 | + <view wx:for="{{grades}}" wx:key="unique" class="tab-head-item {{currentIndex == index ? 'active':''}}" data-name="{{item}}" data-index="{{index}}">{{item}}</view> | |
| 58 | +</view> | |
| 59 | + | |
| 60 | +<view class="tab-body"> | |
| 61 | + <block wx:if="{{currentIndex != 3}}"> | |
| 62 | + <view class="tab-list-item" wx:for="{{details}}" wx:for-index="idx" wx:for-item="detail"> | |
| 63 | + <block wx:if="{{detail.isby}}"> | |
| 64 | + <view class="coupon"> | |
| 65 | + <view class="flex"> | |
| 66 | + <view class="c-l"><text class="rmb fs40">20</text></view> | |
| 67 | + <view class="c-r dash"> | |
| 68 | + <view class="flex jc_sb ai_c"> | |
| 69 | + <view class="pdr20"> | |
| 70 | + <view class="fs28 ellipsis-1x">包邮券</view> | |
| 71 | + <view class="fs24 c-7b pdt4 ellipsis-1x">微券来源: 微信商城</view> | |
| 72 | + </view> | |
| 73 | + <view class="shrink0"><text class="btn">立即使用</text></view> | |
| 74 | + </view> | |
| 75 | + <view class="c-time"> | |
| 76 | + <text class="ellipsis-1x" wx:if="{{detail.use_end_time!=null}}">有效期:{{detail.use_start_time==null?" " : time.format_time(detail.use_start_time)}}至{{ time.format_time(detail.use_end_time)}}</text> | |
| 77 | + <text wx:else>有效期:不限</text> | |
| 78 | + </view> | |
| 79 | + </view> | |
| 80 | + </view> | |
| 81 | + </view> | |
| 82 | + <!-- <view class="c-info arrow-down"> --> | |
| 83 | + <view class="c-info"> | |
| 84 | + <text class="ellipsis-1x">使用说明: 包邮券,全场通用,满 {{detail.condition}}元使用{{detail.title?',不包邮地区:'+detail.title:''}}</text> | |
| 85 | + </view> | |
| 86 | + </block> | |
| 87 | + | |
| 88 | + <block wx:else> | |
| 89 | + <view class="coupon"> | |
| 90 | + <view class="flex"> | |
| 91 | + <view class="c-l"><text class="rmb fs40">{{filter.getNum(detail.Sum)}}</text></view> | |
| 92 | + <view class="c-r dash"> | |
| 93 | + <view class="flex jc_sb ai_c"> | |
| 94 | + <view class="pdr20"> | |
| 95 | + <view class="fs28 ellipsis-1x">{{filter.getNum(detail.Sum)}}元微券</view> | |
| 96 | + <view class="fs24 c-7b pdt4 ellipsis-1x">微券来源: {{detail.SendMan==null?'线下发放':detail.SendMan==''?"线下发放":detail.SendMan}}</view> | |
| 97 | + </view> | |
| 98 | + <view class="shrink0"> | |
| 99 | + <text class="btn {{currentIndex != 0 ? 'gray':''}}" bindtap="{{currentIndex == 0 ? 'clickUse':''}}" data-index="{{idx}}" data-cashrepno="{{detail.CashRepNo}}">{{filter.showBtnText(currentIndex)}}</text> | |
| 100 | + </view> | |
| 101 | + </view> | |
| 102 | + <view class="c-time"> | |
| 103 | + <text wx:if="{{detail.ValidDate!=null}}" class="ellipsis-1x">有效期:{{detail.BeginDate==null ? " " : time.replace_time2(detail.BeginDate)}} 至 {{time.replace_time2(detail.ValidDate)}}</text> | |
| 104 | + <text wx:else>有效期:不限</text> | |
| 105 | + </view> | |
| 106 | + </view> | |
| 107 | + </view> | |
| 108 | + </view> | |
| 109 | + <view class="c-info"> | |
| 110 | + <text class="ellipsis-1x" wx:if="{{detail.Remark1}}">{{filter.getNum(detail.Sum)}}元优惠券,{{(detail.UseObjectID==null || detail.UseObjectID=='')?"全场通用":"仅限"+(detail.UseObjectName)+"使用"}},满 {{detail.BuySum==null || detail.BuySum==''?filter.getNum(0):filter.getNum(detail.BuySum)}}元使用 {{detail.region_list_name==null || detail.region_list_name==''?"":",不包邮地区:"+region_list_name}};{{detail.Remark}}</text> | |
| 111 | + <text wx:else>使用说明: {{filter.getNum(detail.Sum)}}元优惠券,{{(detail.UseObjectID==null || detail.UseObjectID=='')?"全场通用":"仅限"+(detail.UseObjectName)+"使用"}},满 {{detail.BuySum==null || detail.BuySum==''?filter.getNum(0):filter.getNum(detail.BuySum)}}元使用 {{detail.region_list_name==null || detail.region_list_name==''?"":",不包邮地区:"+region_list_name}}</text> | |
| 112 | + </view> | |
| 113 | + </block> | |
| 114 | + </view> | |
| 115 | + </block> | |
| 116 | + | |
| 117 | + | |
| 118 | + <block wx:else> | |
| 119 | + <view class="tab-list-item" wx:for="{{result}}" wx:for-item="result"> | |
| 120 | + <view class="coupon2"> | |
| 121 | + <view class="flex"> | |
| 122 | + <view class="c-l"><text class="rmb fs40">{{filter.getNum(result.ToSum)}}</text></view> | |
| 123 | + <view class="c-r dash"> | |
| 124 | + <view class="flex jc_sb ai_c"> | |
| 125 | + <view class="pdr20"> | |
| 126 | + <view class="fs28 ellipsis-1x">{{result.Integral}}积分兑换{{filter.getNum(result.ToSum)}}元微券</view> | |
| 127 | + <!-- <view class="fs24 c-7b pdt4 ellipsis-1x">微券来源: 微信商城</view> --> | |
| 128 | + </view> | |
| 129 | + <view class="shrink0"><text class="btn2" bindtap="clickExchange" data-index="{{index}}">立即兑换</text></view> | |
| 130 | + </view> | |
| 131 | + <!-- <view class="c-time"> | |
| 132 | + <text class="ellipsis-1x" wx:if="{{detail.use_end_time!=null}}">有效期:{{detail.use_start_time==null?" " : time.format_time(detail.use_start_time)}}至{{ time.format_time(detail.use_end_time)}}</text> | |
| 133 | + <text wx:else>有效期:不限</text> | |
| 134 | + </view> --> | |
| 135 | + </view> | |
| 136 | + </view> | |
| 137 | + </view> | |
| 138 | + </view> | |
| 139 | + </block> | |
| 140 | + | |
| 141 | + <!-- 暂无数据 --> | |
| 142 | + <nodata nodataContainer="t-c" wx:if="{{(is_no_more == 1 && current_page == 1) || (result.length == 0)}}"></nodata> | |
| 143 | + | |
| 144 | + <block wx:if="{{is_get}}"> | |
| 145 | + <!-- 没有更多数据 --> | |
| 146 | + <view class="noMore 1" wx:if="{{(is_no_more == 1)||((details.length !== 0) && (pageSize >= (byTotal+wjTotal)))}}">—— 已经到底了 ——</view> | |
| 147 | + </block> | |
| 148 | + <view class="noMore 2" wx:if="{{noMore}}">—— 已经到底了 ——</view> | |
| 149 | +</view> | |
| 150 | + | |
| 151 | +<!-- 遮罩层 --> | |
| 152 | +<view class="mask" hidden="{{!showQr}}"></view> | |
| 153 | +<!-- 码 --> | |
| 154 | +<view class="popup-container" hidden="{{!showQr}}"> | |
| 155 | + <view class="t-r pdb20"><text class="iconfont icon-close fs40" bindtap="closeQr"></text></view> | |
| 156 | + <view class="popup"> | |
| 157 | + <view class="popup-title">{{filter.getNum(details[useIndex].Sum)}}元微券</view> | |
| 158 | + <view class="pdt20 c-fe0000"><text class="rmb fs80">{{filter.getNum(details[useIndex].Sum)}}</text></view> | |
| 159 | + <!-- <img src="" alt="" class="img-qr"/> --> | |
| 160 | + <view class="qr-container"> | |
| 161 | + <canvas class="qrcode" canvas-id="qrcode"/> | |
| 162 | + </view> | |
| 163 | + <view class="pdt20 pdb10 fs26">{{details[useIndex].CashRepNo}}</view> | |
| 164 | + <view class="pdv30 c-7b fs26 bdt"> | |
| 165 | + <text wx:if="{{details[useIndex].ValidDate!=null}}" class="ellipsis-1x">有效期:{{details[useIndex].BeginDate==null ? " " : time.replace_time2(details[useIndex].BeginDate)}} 至 {{time.replace_time2(details[useIndex].ValidDate)}}</text> | |
| 166 | + <text wx:else>有效期:不限</text> | |
| 167 | + </view> | |
| 168 | + </view> | |
| 169 | +</view> | |
| 170 | + | |
| 171 | + | |
| 172 | +<!-- <block wx:for="{{details}}" wx:for-index="idx" wx:for-item="detail"> | |
| 173 | + | |
| 174 | + <block wx:if="{{detail.isby}}"> --> | |
| 175 | + <!-- 判断有没有数据有显示没有不显示 --> | |
| 176 | + <!-- <view class="data" data-cashrepno='{{detail.no}}' bindtap='click'> | |
| 177 | + <view class="code_rim"> | |
| 178 | + <canvas class="code" canvas-id="qrcode{{idx}}" /> | |
| 179 | + <view class="code_val">{{detail.no}}</view> | |
| 180 | + </view> | |
| 181 | + | |
| 182 | + <view class="moneys">包邮券</view> | |
| 183 | + <view class="car-rim"> | |
| 184 | + <view class="text">微券来源: 微信商城</view> | |
| 185 | + <view wx:if="{{detail.use_end_time!=null}}"> --> | |
| 186 | + <!-- 不指定格式则默认输出:yyyy-MM-dd hh:mm:ss 格式 --> | |
| 187 | + <!-- <view class="text">有效期: | |
| 188 | + {{detail.use_start_time==null?" " : time.format_time(detail.use_start_time)}} | |
| 189 | + 至 {{ time.format_time(detail.use_end_time)}}</view> | |
| 190 | + </view> | |
| 191 | + <view wx:else> | |
| 192 | + <view class="text">有效期: 不限</view> | |
| 193 | + </view> | |
| 194 | + <view class="textss">使用说明: 包邮券,全场通用,满 {{detail.condition}}元使用{{detail.title?",不包邮地区:"+detail.title:""}} | |
| 195 | + </view> | |
| 196 | + </view> | |
| 197 | + </view> | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + </block> | |
| 202 | + <block wx:else> --> | |
| 203 | + <!-- 判断有没有数据有显示没有不显示 --> | |
| 204 | + <!-- <view class="data" data-cashrepno='{{detail.CashRepNo}}' bindtap='click'> | |
| 205 | + <view class="code_rim"> | |
| 206 | + <canvas class="code" canvas-id="qrcode{{idx}}" /> | |
| 207 | + <view class="code_val">{{detail.CashRepNo}}</view> | |
| 208 | + </view> | |
| 209 | + | |
| 210 | + <view class="moneys">{{filter.getNum(detail.Sum)}}元微券</view> | |
| 211 | + <view class="car-rim"> | |
| 212 | + <view class="text"> | |
| 213 | + 微券来源: {{detail.SendMan==null?'线下发放':detail.SendMan==''?"线下发放":detail.SendMan}}</view> | |
| 214 | + <view wx:if="{{detail.ValidDate!=null}}"> --> | |
| 215 | + <!-- 不指定格式则默认输出:yyyy-MM-dd hh:mm:ss 格式 --> | |
| 216 | + <!-- <view class="text">有效期: | |
| 217 | + {{detail.BeginDate==null?" " : time.replace_time2(detail.BeginDate)}} | |
| 218 | + 至 {{ time.replace_time2(detail.ValidDate)}}</view> | |
| 219 | + </view> | |
| 220 | + <view wx:else> | |
| 221 | + <view class="text">有效期: 不限</view> | |
| 222 | + </view> | |
| 223 | + <view wx:if="{{detail.Remark1}}" class="textss"> {{filter.getNum(detail.Sum)}}元优惠券,{{(detail.UseObjectID==null || detail.UseObjectID=='')?"全场通用":"仅限"+(detail.UseObjectName)+"使用"}},满 {{detail.BuySum==null || detail.BuySum==''?filter.getNum(0):filter.getNum(detail.BuySum)}}元使用 {{detail.region_list_name==null || detail.region_list_name==''?"":",不包邮地区:"+region_list_name}};{{detail.Remark}}</view> | |
| 224 | + <view wx:else class="textss">使用说明: {{filter.getNum(detail.Sum)}}元优惠券,{{(detail.UseObjectID==null || detail.UseObjectID=='')?"全场通用":"仅限"+(detail.UseObjectName)+"使用"}},满 {{detail.BuySum==null || detail.BuySum==''?filter.getNum(0):filter.getNum(detail.BuySum)}}元使用 {{detail.region_list_name==null || detail.region_list_name==''?"":",不包邮地区:"+region_list_name}} | |
| 225 | + </view> | |
| 226 | + </view> | |
| 227 | + </view> | |
| 228 | + </block> | |
| 229 | +</block> --> | |
| 230 | + | ... | ... |
packageB/pages/coupons/query/index.wxss
0 → 100644
| 1 | +/* 大边框 */ | |
| 2 | +.big-rim{ | |
| 3 | + margin-top: 15rpx; | |
| 4 | + width: 100%; | |
| 5 | + height: 310rpx; | |
| 6 | +border-bottom: 8px solid #EEEEEE; | |
| 7 | +} | |
| 8 | +.min-rim{ | |
| 9 | +display: flex; | |
| 10 | +width: 100%; | |
| 11 | +height: auto; | |
| 12 | +margin-left: 30rpx; | |
| 13 | +} | |
| 14 | + | |
| 15 | +/* 开始时间 */ | |
| 16 | +.kssj{ | |
| 17 | + | |
| 18 | +display: inline-block; | |
| 19 | +height: 50rpx; | |
| 20 | +background-color: #EEEEEE; | |
| 21 | +border: 1px solid #DADADA; | |
| 22 | +width:200rpx; | |
| 23 | +border-radius: 3px; | |
| 24 | +line-height:40rpx; | |
| 25 | +} | |
| 26 | +/* 开始时间的文字 */ | |
| 27 | +.wz{ | |
| 28 | + display: inline-block; | |
| 29 | +font-size: 25rpx; | |
| 30 | +color: #333; | |
| 31 | +} | |
| 32 | +/* 日期控件 */ | |
| 33 | +.pi{ | |
| 34 | + width:200rpx; | |
| 35 | + height:auto; | |
| 36 | + margin-left:20rpx; | |
| 37 | + | |
| 38 | +} | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | +/* 查询内容 */ | |
| 43 | +.cxnr{ | |
| 44 | + margin-left:30rpx; | |
| 45 | + font-size:28rpx; | |
| 46 | + font-family: 'SimHei',Arial; | |
| 47 | +} | |
| 48 | +.rq-rim{ | |
| 49 | +position:relative; | |
| 50 | +left:0; | |
| 51 | +top:0; | |
| 52 | +} | |
| 53 | +/* 至 */ | |
| 54 | +.zi{ | |
| 55 | + | |
| 56 | + margin-top:14rpx; | |
| 57 | + font-size:28rpx; | |
| 58 | + font-family: 'SimHei',Arial; | |
| 59 | + margin-left:20rpx; | |
| 60 | + | |
| 61 | +} | |
| 62 | +/* 结束时间 */ | |
| 63 | + | |
| 64 | +.jssj{ | |
| 65 | + padding-left: 10rpx; | |
| 66 | + margin-left: 30rpx; | |
| 67 | +padding-bottom: 10rpx; | |
| 68 | +height: 35rpx; | |
| 69 | +font-size: 25rpx; | |
| 70 | +color: #333; | |
| 71 | +background-color: #EEEEEE; | |
| 72 | +border: 1px solid #DADADA; | |
| 73 | +width:85%; | |
| 74 | +font-family: 'SimHei',Arial; | |
| 75 | +border-radius: 3px; | |
| 76 | +} | |
| 77 | +/* 查询内容的备考的边框 */ | |
| 78 | +.xknr-rim{ | |
| 79 | + display: flex; | |
| 80 | + width: 100%; | |
| 81 | + height: 55rpx; | |
| 82 | + line-height:105rpx; | |
| 83 | + margin-top:10rpx; | |
| 84 | + | |
| 85 | +} | |
| 86 | +/* 明细查询 */ | |
| 87 | +.botton{ | |
| 88 | + margin-left: 30rpx; | |
| 89 | + margin-top: 63rpx; | |
| 90 | + background-color: #C4182E; | |
| 91 | + width: 95%; | |
| 92 | + border-radius:10rpx; | |
| 93 | + text-align: center; | |
| 94 | + height: 70rpx; | |
| 95 | + line-height: 70rpx; | |
| 96 | + color: #FFF; | |
| 97 | + font-size: 25rpx; | |
| 98 | + border: none; | |
| 99 | + font-family: '微软雅黑'; | |
| 100 | + } | |
| 101 | + /* 底部边框线 | |
| 102 | + .bottom{ | |
| 103 | + width: 100%; | |
| 104 | + border-bottom: 20rpx solid #eeeeee; | |
| 105 | + } */ | |
| 106 | + /* 清空按钮的 边框*/ | |
| 107 | +.qc-rim{ | |
| 108 | + position:absolute; | |
| 109 | + top:10rpx; | |
| 110 | + left:175rpx; | |
| 111 | +} | |
| 112 | + | |
| 113 | +/*开始时间清空输入框的按钮*/ | |
| 114 | +.empty{ | |
| 115 | + width: 25rpx; | |
| 116 | + height: 25rpx; | |
| 117 | + border-radius:50%; | |
| 118 | + background: #767676; | |
| 119 | + color: #fff; | |
| 120 | + font-size: 25rpx; | |
| 121 | + text-align: center; | |
| 122 | + line-height:18rpx; | |
| 123 | +} | |
| 124 | +/* 结束时间清空输入框的按钮的边框 */ | |
| 125 | +.end-rim{ | |
| 126 | +position: absolute; | |
| 127 | + top: 11rpx; | |
| 128 | + left:173rpx; | |
| 129 | + width: 25rpx; | |
| 130 | + height: 25rpx; | |
| 131 | +} | |
| 132 | +/*结束时间清空输入框的按钮*/ | |
| 133 | +.end{ | |
| 134 | + | |
| 135 | + width: 25rpx; | |
| 136 | + height: 25rpx; | |
| 137 | + border-radius:50%; | |
| 138 | + background: #767676; | |
| 139 | + color: #fff; | |
| 140 | + font-size: 25rpx; | |
| 141 | + text-align: center; | |
| 142 | + line-height:21rpx; | |
| 143 | + | |
| 144 | +} | |
| 145 | + | |
| 146 | +/* 顶部 */ | |
| 147 | +.top{ | |
| 148 | + width: 200rpx; | |
| 149 | + height: 50rpx; | |
| 150 | + padding: 0 10rpx; | |
| 151 | + line-height: 50rpx; | |
| 152 | + font-size: 34rpx; | |
| 153 | + margin-top: 25rpx; | |
| 154 | + | |
| 155 | + | |
| 156 | +} | |
| 157 | +.images{ | |
| 158 | + width:35rpx; | |
| 159 | +height:30rpx; | |
| 160 | +margin-top:10rpx; | |
| 161 | +margin-left:-14rpx; | |
| 162 | + | |
| 163 | +} | |
| 164 | +.rim-images{ | |
| 165 | + width: 45rpx; | |
| 166 | + height: 46rpx; | |
| 167 | + line-height: 37rpx; | |
| 168 | + /* border-style: inset;padding:4rpx;text-align: center; */ | |
| 169 | + background: #f1f1f1; | |
| 170 | + border-color:#000000; | |
| 171 | + border-width: 1rpx; | |
| 172 | + transform:translateX(28%); | |
| 173 | + margin-top:-3rpx; | |
| 174 | +border-radius:5rpx; | |
| 175 | + | |
| 176 | + | |
| 177 | +} | |
| 178 | +/* 下拉框 */ | |
| 179 | +.top-selected{ | |
| 180 | + width: 100%; | |
| 181 | + display: flex; | |
| 182 | + align-items: center; | |
| 183 | + justify-content: space-between; | |
| 184 | + border: 1px solid #ccc; | |
| 185 | + padding: 0 10rpx; | |
| 186 | + font-size: 30rpx; | |
| 187 | + background:#eeeeee; | |
| 188 | + height:50rpx; | |
| 189 | + border-radius:6rpx; | |
| 190 | +} | |
| 191 | +.texts{ | |
| 192 | + margin:0 auto; | |
| 193 | + font-size: 25rpx; | |
| 194 | + | |
| 195 | +} | |
| 196 | +/* 下拉内容 */ | |
| 197 | +.select-box { | |
| 198 | + background-color: #eeeeee; | |
| 199 | + width:225rpx; | |
| 200 | + position: relative; | |
| 201 | + z-index:1; | |
| 202 | + overflow: hidden; | |
| 203 | + text-align: left; | |
| 204 | + animation: myfirst 0.5s; | |
| 205 | + font-size: 25rpx; | |
| 206 | +} | |
| 207 | +.select_one { | |
| 208 | + padding-left: 20rpx; | |
| 209 | + width: 100%; | |
| 210 | + height: 60rpx; | |
| 211 | + line-height: 60rpx; | |
| 212 | +} | |
| 213 | +/* 优惠券样式 */ | |
| 214 | +.body{ | |
| 215 | + text-align: center; | |
| 216 | + padding: 20rpx; | |
| 217 | + margin: 20rpx auto; | |
| 218 | + width: 80%; | |
| 219 | + max-width: 1000rpx; | |
| 220 | + font-size: 28rpx; | |
| 221 | + color: #333333; | |
| 222 | + border-bottom: 2rpx solid #EEEEEE; | |
| 223 | +} | |
| 224 | + | |
| 225 | +.b_iimg{ | |
| 226 | + background-color: red; | |
| 227 | + width: 400rpx; | |
| 228 | + height: 400rpx; | |
| 229 | +} | |
| 230 | + | |
| 231 | +.b_sz2{ | |
| 232 | + font-size: 40rpx; | |
| 233 | + color: #6fd137; | |
| 234 | + margin: 20rpx 0; | |
| 235 | + text-align: center; | |
| 236 | +} | |
| 237 | +/* 二维码列表查询 */ | |
| 238 | +/* 列表数据*/ | |
| 239 | +.data{ | |
| 240 | + width: 80%; | |
| 241 | + | |
| 242 | + height:auto; | |
| 243 | + margin-left:80rpx; | |
| 244 | + | |
| 245 | +} | |
| 246 | +.rim{ | |
| 247 | + position: relative; | |
| 248 | + top:0rpx; | |
| 249 | + left: 0rpx; | |
| 250 | +} | |
| 251 | +/* 二维码边框 */ | |
| 252 | +.code_rim{ | |
| 253 | + width: 100%; | |
| 254 | + height: auto; | |
| 255 | + text-align: center; | |
| 256 | + font-size: 25rpx; | |
| 257 | + padding-top: -30rpx; | |
| 258 | + margin-top:-20rpx; | |
| 259 | +padding-left:45rpx; | |
| 260 | + | |
| 261 | +} | |
| 262 | + | |
| 263 | +/* 二维码 */ | |
| 264 | +.code{ | |
| 265 | + height: 520rpx; | |
| 266 | + display: flex; | |
| 267 | + flex-direction: column; | |
| 268 | + justify-content: flex-end; | |
| 269 | + align-items: center; | |
| 270 | + margin-left:40rpx; | |
| 271 | + | |
| 272 | +} | |
| 273 | +.car-rim{ | |
| 274 | +width:98%; | |
| 275 | +height:177rpx; | |
| 276 | +text-align:center; | |
| 277 | +border-bottom:2rpx solid #eee; | |
| 278 | +margin-left:22rpx; | |
| 279 | + | |
| 280 | +} | |
| 281 | +/* 二维码值 */ | |
| 282 | +.code_val{ | |
| 283 | + margin-top:-104rpx; | |
| 284 | +margin-left:-59rpx; | |
| 285 | +color:#999999; | |
| 286 | + | |
| 287 | +} | |
| 288 | +/* 金额 */ | |
| 289 | +.moneys{ | |
| 290 | + margin-top:20rpx; | |
| 291 | + height: 47rpx; | |
| 292 | + width: 100%; | |
| 293 | + color:#6fd137; | |
| 294 | + text-align: center; | |
| 295 | + font-size: 38rpx; | |
| 296 | + font-family: 'SimHei',Arial; | |
| 297 | + margin-bottom:20rpx; | |
| 298 | + margin-left:11rpx; | |
| 299 | + | |
| 300 | +} | |
| 301 | +/* 文字 */ | |
| 302 | +.text{ | |
| 303 | + width: 100%; | |
| 304 | + font-size: 25rpx; | |
| 305 | + text-align: center; | |
| 306 | + | |
| 307 | + height: 41rpx; | |
| 308 | + color: #999999; | |
| 309 | +} | |
| 310 | +/* 二维码和条形码的边框 */ | |
| 311 | +.barqrcode{ | |
| 312 | + width: 100%; | |
| 313 | + height: auto; | |
| 314 | + margin-top:50rpx; | |
| 315 | + | |
| 316 | +} | |
| 317 | +/* 日期 */ | |
| 318 | +.rq{ | |
| 319 | + height: 25rpx; | |
| 320 | + font-size: 28rpx; | |
| 321 | + margin-top:12rpx; | |
| 322 | + font-family:'SimHei',Arial; | |
| 323 | +} | |
| 324 | +/* 点击条形 */ | |
| 325 | +.barcode { | |
| 326 | + height: 320rpx; | |
| 327 | + flex-direction: column; | |
| 328 | + justify-content: center; | |
| 329 | + align-items: center; | |
| 330 | + margin-left: 30rpx; | |
| 331 | +} | |
| 332 | +/* 二维码边框*/ | |
| 333 | +.qrcode_rim { | |
| 334 | + width: 100%; | |
| 335 | + height: 420rpx; | |
| 336 | + display: flex; | |
| 337 | + flex-direction: column; | |
| 338 | + justify-content: flex-end; | |
| 339 | + align-items: center; | |
| 340 | + margin-left: 80rpx; | |
| 341 | + margin-top:-210rpx; | |
| 342 | + | |
| 343 | +} | |
| 344 | +.qrcode{ | |
| 345 | + /* margin-left: 100rpx; */ | |
| 346 | +} | |
| 347 | +/* 使用说明 */ | |
| 348 | +.textss{ | |
| 349 | + width: 100%; | |
| 350 | + font-size: 25rpx; | |
| 351 | + text-align: center; | |
| 352 | + | |
| 353 | + min-height: 47rpx; | |
| 354 | + height:auto; | |
| 355 | + color: #999999; | |
| 356 | +} | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | +page { | |
| 364 | + background-color: #f0f0f0; | |
| 365 | + scroll-behavior: smooth; | |
| 366 | +} | |
| 367 | + | |
| 368 | +.c-fe0000 { | |
| 369 | + color: #fe0000; | |
| 370 | +} | |
| 371 | + | |
| 372 | +.tab-head { | |
| 373 | + display: flex; | |
| 374 | + position: sticky; | |
| 375 | + top: 0; | |
| 376 | + background-color: white; | |
| 377 | + font-size: 28rpx; | |
| 378 | + z-index: 2; | |
| 379 | +} | |
| 380 | + | |
| 381 | +.tab-head-item { | |
| 382 | + flex: 1; | |
| 383 | + text-align: center; | |
| 384 | + padding: 30rpx 0; | |
| 385 | + position: relative; | |
| 386 | +} | |
| 387 | + | |
| 388 | +.tab-head-item.active { | |
| 389 | + color: #fe0000; | |
| 390 | +} | |
| 391 | + | |
| 392 | +.tab-head-item.active::after { | |
| 393 | + content: ''; | |
| 394 | + width: 60%; | |
| 395 | + height: 2rpx; | |
| 396 | + background-color: #fe0000; | |
| 397 | + position: absolute; | |
| 398 | + bottom: 0; | |
| 399 | + left: 50%; | |
| 400 | + transform: translateX(-50%); | |
| 401 | +} | |
| 402 | + | |
| 403 | +.tab-body { | |
| 404 | + padding: 0 20rpx; | |
| 405 | + overflow: hidden; | |
| 406 | +} | |
| 407 | + | |
| 408 | + .tab-list-item { | |
| 409 | + border-radius: 10rpx; | |
| 410 | + overflow: hidden; | |
| 411 | + margin-top: 30rpx; | |
| 412 | + } | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | +.coupon { | |
| 417 | + position: relative; | |
| 418 | + | |
| 419 | + background: radial-gradient(transparent 0, #FFD3D6 0) top left / 200rpx no-repeat, | |
| 420 | + radial-gradient(transparent 6px, #fff 0), | |
| 421 | + radial-gradient(transparent 6px, #fff 0); | |
| 422 | +} | |
| 423 | + | |
| 424 | + | |
| 425 | +.coupon::after { | |
| 426 | + content: ''; | |
| 427 | + position: absolute; | |
| 428 | + height: 100%; | |
| 429 | + width:4px; | |
| 430 | + top: 0; | |
| 431 | + left: 0; | |
| 432 | + background-image: linear-gradient(to bottom, #FFD3D6 4px, transparent 4px, transparent), | |
| 433 | + radial-gradient(4px circle at 0px 8px, #f0f0f0 4px, #FFD3D6 4px); | |
| 434 | + background-size: 4px 12px; | |
| 435 | + background-repeat: repeat-y; | |
| 436 | + } | |
| 437 | + | |
| 438 | + | |
| 439 | + .coupon2 { | |
| 440 | + /* width: 300px; */ | |
| 441 | + padding: 40rpx 0; | |
| 442 | + position: relative; | |
| 443 | + background: radial-gradient(circle at right top, transparent 16rpx, #FFD3D6 0) top left / 200rpx 51% no-repeat, | |
| 444 | + radial-gradient(circle at right bottom, transparent 16rpx, #FFD3D6 0) bottom left /200rpx 51% no-repeat, | |
| 445 | + radial-gradient(circle at left top, transparent 16rpx, white 0) top right /calc(100% - 200rpx) 51% no-repeat, | |
| 446 | + radial-gradient(circle at left bottom, transparent 16rpx, white 0) bottom right /calc(100% - 200rpx) 51% no-repeat; | |
| 447 | + /* filter: drop-shadow(2px 2px 2px rgba(0,0,0,.2)); */ | |
| 448 | + } | |
| 449 | + | |
| 450 | + .coupon2::after { | |
| 451 | + content: ''; | |
| 452 | + height: 70%; | |
| 453 | + border: 2rpx dashed #fff; | |
| 454 | + position: absolute; | |
| 455 | + left: 198rpx; | |
| 456 | + top: 0; | |
| 457 | + bottom: 0; | |
| 458 | + margin: auto; | |
| 459 | + } | |
| 460 | + | |
| 461 | +/* .coupon2 .c-l, | |
| 462 | + .coupon2 .c-r { | |
| 463 | + border: 2rpx solid red; | |
| 464 | + padding: 20rpx 0; | |
| 465 | + } */ | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + .c-l { | |
| 470 | + color: #fe0000; | |
| 471 | + width: 200rpx; | |
| 472 | + display: flex; | |
| 473 | + align-items: center; | |
| 474 | + justify-content: center; | |
| 475 | + flex-shrink: 0; | |
| 476 | + } | |
| 477 | + | |
| 478 | + .rmb::before { | |
| 479 | + content: '¥'; | |
| 480 | + font-size: 28rpx; | |
| 481 | + } | |
| 482 | + | |
| 483 | + .c-r { | |
| 484 | + box-sizing: border-box; | |
| 485 | + padding: 20rpx; | |
| 486 | + flex: 1; | |
| 487 | + } | |
| 488 | + | |
| 489 | + .c-time { | |
| 490 | + color: #7b7b7b; | |
| 491 | + font-size: 24rpx; | |
| 492 | + padding-top: 10rpx; | |
| 493 | + word-break: break-all; | |
| 494 | + } | |
| 495 | + | |
| 496 | + .btn, .btn2 { | |
| 497 | + font-size: 26rpx; | |
| 498 | + padding: 10rpx 20rpx; | |
| 499 | + border: 2rpx solid #fe0000; | |
| 500 | + border-radius: 30rpx; | |
| 501 | + flex-shrink: 0; | |
| 502 | + } | |
| 503 | + | |
| 504 | + .btn { | |
| 505 | + color: #fe0000; | |
| 506 | + } | |
| 507 | + | |
| 508 | + .btn.gray { | |
| 509 | + color: #ccc; | |
| 510 | + border-color: #ccc; | |
| 511 | + } | |
| 512 | + | |
| 513 | + .btn2 { | |
| 514 | + color: white; | |
| 515 | + background-color: #fe0000; | |
| 516 | + } | |
| 517 | + | |
| 518 | + .c-info { | |
| 519 | + border-top: 2rpx dashed #f0f0f0; | |
| 520 | + padding: 10rpx 40rpx 10rpx 10rpx; | |
| 521 | + font-size: 22rpx; | |
| 522 | + background-color: #fefefe; | |
| 523 | + color: #7b7b7b; | |
| 524 | + position: relative; | |
| 525 | + } | |
| 526 | + | |
| 527 | + .arrow-down::after { | |
| 528 | + font-family: iconfont; | |
| 529 | + content: '\e600'; | |
| 530 | + font-size: 32rpx; | |
| 531 | + position: absolute; | |
| 532 | + right: 10rpx; | |
| 533 | + top: 50%; | |
| 534 | + transform: translateY(-50%); | |
| 535 | + } | |
| 536 | + | |
| 537 | + .mask { | |
| 538 | + position: fixed; | |
| 539 | + width: 100%; | |
| 540 | + height: 100%; | |
| 541 | + top: 0; | |
| 542 | + background-color: rgba(0,0,0,.7); | |
| 543 | + z-index: 1; | |
| 544 | + } | |
| 545 | + | |
| 546 | + .popup-container { | |
| 547 | + position: fixed; | |
| 548 | + width: 70%; | |
| 549 | + border-radius: 12rpx; | |
| 550 | + top: 50%; | |
| 551 | + left: 50%; | |
| 552 | + transform: translate(-50%, -50%); | |
| 553 | + z-index: 3; | |
| 554 | + } | |
| 555 | + | |
| 556 | + .popup { | |
| 557 | + text-align: center; | |
| 558 | + border-radius: 12rpx; | |
| 559 | + background-color: white; | |
| 560 | + overflow: hidden; | |
| 561 | + /* width: 80%; */ | |
| 562 | + } | |
| 563 | + | |
| 564 | + .popup-container .icon-close { | |
| 565 | + color: rgba(255,255,255,.6); | |
| 566 | + } | |
| 567 | + | |
| 568 | + .popup-title { | |
| 569 | + padding: 40rpx 0; | |
| 570 | + color: #fe0000; | |
| 571 | + background-color: #FFD3D6; | |
| 572 | + position: relative; | |
| 573 | + } | |
| 574 | + | |
| 575 | + .popup-title::after { | |
| 576 | + content: ''; | |
| 577 | + position: absolute; | |
| 578 | + left: -20rpx; | |
| 579 | + bottom: -12rpx; | |
| 580 | + width: 130%; | |
| 581 | + height: 20rpx; | |
| 582 | + background-image: -webkit-radial-gradient(circle, #FFD3D6, #FFD3D6 20rpx, transparent 20rpx, transparent); | |
| 583 | + background-image: -moz-radial-gradient(circle, #FFD3D6, #FFD3D6 20rpx, transparent 20rpx, transparent); | |
| 584 | + background-image: radial-gradient(circle, #FFD3D6, #FFD3D6 20rpx, transparent 20rpx, transparent); | |
| 585 | + background-size: 40rpx 40rpx; | |
| 586 | + transform: rotate(180deg); | |
| 587 | + -webkit-transform: rotate(180deg); | |
| 588 | + } | |
| 589 | + | |
| 590 | + | |
| 591 | + .popup .rmb::before { | |
| 592 | + font-size: 40rpx; | |
| 593 | + } | |
| 594 | + | |
| 595 | + .img-qr { | |
| 596 | + display: block; | |
| 597 | + width: 300rpx; | |
| 598 | + height: 300rpx; | |
| 599 | + margin: 0 auto; | |
| 600 | + background-color: pink; | |
| 601 | + } | |
| 602 | + | |
| 603 | + .qrcode { | |
| 604 | + width: 300rpx; | |
| 605 | + height: 300rpx; | |
| 606 | + margin: 0 auto; | |
| 607 | + } | |
| 608 | + | |
| 609 | + | |
| 610 | + .noMore { | |
| 611 | + padding: 20rpx; | |
| 612 | + color: #bbb; | |
| 613 | + text-align: center; | |
| 614 | + font-size: 22rpx; | |
| 615 | + } | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | ... | ... |