From 33707c41ce46365551646cf46aea10b25705aa9e Mon Sep 17 00:00:00 2001 From: yvan.ni <765199919@qq.com> Date: Wed, 22 Jul 2020 09:46:05 +0800 Subject: [PATCH] 1. 等级卡 邀请明细的优化 --- pages/user/Detailed/Detailed.js | 114 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------------- pages/user/Detailed/Detailed.wxml | 37 +++++++++++++++++++++++++++++++++++++ pages/user/Detailed/Detailed.wxss | 244 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 3 files changed, 374 insertions(+), 21 deletions(-) diff --git a/pages/user/Detailed/Detailed.js b/pages/user/Detailed/Detailed.js index 83a71af..1e4274a 100644 --- a/pages/user/Detailed/Detailed.js +++ b/pages/user/Detailed/Detailed.js @@ -33,6 +33,10 @@ Page({ imagePath:"", //分享的生成图片 canvasHidden:true, + isBind:true, + isBinds:true, + + input_val:null, }, /** @@ -108,20 +112,36 @@ Page({ selectDetailed: function() { var th = this, e = th; + var r_data={ + storeId: o.stoid, + userId: r.user_id, + page: th.data.page, + pageSize: th.data.pageSize + }; + + if(th.data.datet!="" && th.data.datet){ + r_data.Sdate=th.data.datet; + } + if(th.data.dates!="" && th.data.dates){ + r_data.Edate=th.data.dates; + } + if(th.data.input_val!="" && th.data.input_val){ + r_data.MobileTel=th.data.input_val; + } + getApp().request.promiseGet("/api/weshop/plus/vip/mem/referee/page", { - data: { - storeId: o.stoid, - userId: r.user_id, - page: th.data.page, - pageSize: th.data.pageSize - } + data:r_data }).then(res => { - - th.setData({isDetailed:1}) + + setTimeout(function () { + th.setData({isDetailed: 1 }); + },300) if(res.data.code==0 && res.data.data.pageData && res.data.data.pageData.length>0) { th.data.page++;//当前页数+1 var arr1 = th.data.arrayDetailed;//获取明细数组 var arr2 = res.data.data.pageData;//获取当前查询数据 + if(!arr1) arr1=[]; + var arr3 = [...arr1, ...arr2];//把当前查询数组拼接到原本数组后面 var ismore = 0; if (arr3.length == res.data.data.total) ismore = 1 //数据已加载完判断 @@ -129,8 +149,9 @@ Page({ arrayDetailed: arr3, total: res.data.data.total, ismore: ismore, - isDetailed: 1 }) + + } }) @@ -152,7 +173,6 @@ Page({ * 页面上拉触底事件的处理函数 */ onReachBottom: function() { - if (this.data.total <= this.data.pageSize) return; if (this.data.ismore) { t.my_warnning("加载完啦!", 0, this); @@ -183,7 +203,7 @@ Page({ var privilege_o = th.data.privilege_o;//勋章图片 var img_square=th.data.img_square; var app = getApp(); - var user=app.globalData.userInfo; + var user=app.globalData.userInfo; var unit = th.data.screenWidth / 750 * 1.35; var scene = getApp().globalData.user_id; var nickname = user.nickname; @@ -368,10 +388,7 @@ Page({ },300) }) }) - - - - + } }) @@ -435,9 +452,66 @@ Page({ }) }, - - - - - + + + //起始时间 + bindDateChenge: function(e) { + var isBind = false; + this.setData({ + datet: e.detail.value, + isBind: isBind + }); + }, + // 结束时间 + bindDateChenges: function(e) { + var isBinds = false; + this.setData({ + dates: e.detail.value, + isBinds: isBinds + }); + }, + //catchtap阻止冒泡,点击清除开始时间的按钮 + eliminate: function() { + var isBind = true; + var data = ""; + this.setData({ + datet: data, + isBind: isBind + }) + }, + //catchtap阻止冒泡,点击清除结束时间的按钮 + eliminates: function() { + var isBinds = true; + var dates = ""; + this.setData({ + dates: dates, + isBinds: isBinds + }) + }, + + get_input:function (e) { + this.data.input_val=e.detail.value; + }, + + //点击的搜索事件 + get_search:function () { + var th=this; + + if(th.data.datet && th.data.dates){ + var oDate1 = new Date(th.data.datet); + var oDate2 = new Date(th.data.dates); + if(oDate2 +
+ + 日期: + + + + {{datet}} + + + + + + + + + {{dates}} + + + + + + + + 查询内容 + + + + + +
+ + diff --git a/pages/user/Detailed/Detailed.wxss b/pages/user/Detailed/Detailed.wxss index fec8d60..97a6d96 100644 --- a/pages/user/Detailed/Detailed.wxss +++ b/pages/user/Detailed/Detailed.wxss @@ -14,7 +14,6 @@ } - .phone { width: 250rpx; } @@ -59,4 +58,247 @@ height: 56rpx; background-color: rgb(255, 72, 72); border-radius: 40rpx; +} + + +.big-rim{ + margin-top: 15rpx; + width: 100%; + height: 305rpx; + border-bottom: 8px solid #EEEEEE; +} +/* 单据时间 */ +.time{ + + font-size: 25rpx; + color: #999999; + width: 100%; +} +.min-rim{ + display: flex; + width: 100%; + height: auto; + margin-left: 30rpx; +} +/* 日期 */ +.rq{ + height: 25rpx; + font-size: 28rpx; + margin-top:12rpx; + font-family:'SimHei',Arial; +} +/* 日期控件 */ +.pi{ + width:200rpx; + height:auto; + margin-left:10rpx; + +} +.pis{ + width:200rpx; + height:auto; + margin-left:30rpx; +} +/* 日期边框 */ +.rq-rim{ + position:relative; + left:0; + top:0 +} +/* 开始时间边框*/ +.kssj{ + display: inline-block; + height: 50rpx; + background-color: #EEEEEE; + border: 1px solid #DADADA; + width:200rpx; + border-radius: 3px; + line-height:40rpx; + position:relative; + top:0rpx; + left:0rpx; + +} +/* 开始时间的文字 */ +.wz{ + display: inline-block; + font-size: 25rpx; + color: #333; +} + +/* 开始清空按钮的 边框*/ +.qc-rim{ + position:absolute; + top:10rpx; + left:173rpx; + +} +/* 结束时间清空输入框的按钮的边框 */ +.end-rim{ + position: absolute; + top: 23rpx; + left:547rpx; + width: 25rpx; + height: 25rpx; +} +/* 查询内容 */ +.cxnr{ + margin-left:30rpx; + font-size:28rpx; + font-family: 'SimHei',Arial; +} +/* 至 */ +.zi{ + margin-top:14rpx; + font-weight:600; + font-size:28rpx; + font-family: 'SimHei',Arial; + margin-left:30rpx; +} +/* 结束时间 */ + +.jssj{ + padding-left: 10rpx; + margin-left: 30rpx; + padding-bottom: 10rpx; + height: 35rpx; + font-size: 25rpx; + color: #333; + background-color: #EEEEEE; + border: 1px solid #DADADA; + width:85%; + border-radius: 5px; + +} +/* 查询内容的备考的边框 */ +.xknr-rim{ + display: flex; + width: 100%; + height: 55rpx; + line-height:105rpx; + margin-top:20rpx; +} +/* 明细查询 */ +.botton{ + margin-left: 30rpx; + margin-top: 50rpx; + background-color: #C4182E; + width: 95%; + border-radius:10rpx; + text-align: center; + height: 70rpx; + line-height: 70rpx; + color: #FFF; + font-size: 29rpx; + border: none; + font-family: 'SimHei',Arial; +} + +/*开始时间清空输入框的按钮*/ +.empty{ + width: 25rpx; + height: 25rpx; + border-radius:50%; + background: #767676; + color: #fff; + font-size: 25rpx; + text-align: center; + line-height:19rpx; +} +/*结束时间清空输入框的按钮*/ +.end{ + width: 25rpx; + height: 25rpx; + border-radius:50%; + background: #767676; + color: #fff; + font-size: 25rpx; + text-align: center; + line-height:19rpx; +} + +/* 顶部 */ +.top{ + width: 170rpx; + height: 50rpx; + padding: 0 10rpx; + line-height: 50rpx; + font-size: 34rpx; + margin-top: 25rpx; + border-radius:3rpx; +} +.images{ + width:35rpx; + height:35rpx; + margin-left:-9rpx; + margin-top:6rpx; +} +.rim-images{ + width: 62rpx; + height: 46rpx; + line-height: 37rpx; + /* border-style: inset;padding:4rpx;text-align: center; */ + background: #f1f1f1; + border-color:#000000; + border-width: 1rpx; + transform:translateX(28%); + margin-top:-3rpx; + border-radius:5rpx; +} +/* 下拉框 */ +.top-selected{ + width: 100%; + display: flex; + align-items: center; + justify-content: space-between; + border: 1px solid #ccc; + padding: 0 10rpx; + font-size: 30rpx; + background:#eeeeee; + height:50rpx; + border-radius:6rpx; + +} +.texts{ + margin:0 auto; + font-size: 25rpx; +} + +/* 下拉内容 */ +.select-box { + background-color: #eeeeee; + width:190rpx; + position: relative; + z-index:1; + overflow: hidden; + text-align: left; + animation: myfirst 0.5s; + font-size: 25rpx; + border: 1px solid #DADADA; +} +.select_one { + padding-left: 20rpx; + width: 100%; + height: 60rpx; + line-height: 60rpx; +} +/* 注释 */ +.zs{ + margin-left: 30rpx; + font-size: 25rpx; + color: #999999; + font-family: 'SimHei',Arial; + margin-top: 42rpx; + margin-bottom: 30rpx; +} + +.input{ + width: 300rpx; + background-color: #EEEEEE; + border-radius: 10rpx; + font-size: 24rpx; + text-indent: 5rpx; + height: 56rpx; + border: 1rpx solid #ccc; + } \ No newline at end of file -- libgit2 0.21.4