diff --git a/app.json b/app.json index 7eadb8c..f019350 100644 --- a/app.json +++ b/app.json @@ -20,7 +20,8 @@ "pages/editSuccess/index", "pages/exchange/index", "pages/creditOperate/index", - "pages/goHtml/goHtml" + "pages/goHtml/goHtml", + "pages/orderUrl/orderUrl" ], "window": { "backgroundTextStyle": "light", diff --git a/config/config.js b/config/config.js index 92ef2ce..def6738 100644 --- a/config/config.js +++ b/config/config.js @@ -5,6 +5,7 @@ let url = extConfig.attr.configUrl; var apiPrefix = url + '/B'; let config = { + apiPrefix:apiPrefix, api: { // 获取进件 页面地址 @@ -328,6 +329,10 @@ let config = { * 发货 */ sendGoods: "/api/couponOrder/sendGoods", + /** + * 导出订单记录 + */ + exportUrl: "/api/couponOrder/getVerifiedExportUrl", }, weapp: { diff --git a/pages/main/main.js b/pages/main/main.js index 74e32af..23ffcc4 100644 --- a/pages/main/main.js +++ b/pages/main/main.js @@ -374,7 +374,7 @@ Page({ }, onLoad: function (options) { var that = this; - this.checkuserstatus() + // this.checkuserstatus() }, onReady() { // this.oneComponent = this.selectComponent('#mychart-pament'); @@ -685,21 +685,21 @@ Page({ }) }, - checkuserstatus() { - let _this = this; - HttpBasics.get({ - url: config.api.checkPhoneStatus - }) - .then(res => { - }) - .catch(err => { - if (err.code == 11005) { - tt.redirectTo({ - url: `/pages/getuserinfo/index` - }) - } - }); - }, + // checkuserstatus() { + // let _this = this; + // HttpBasics.get({ + // url: config.api.checkPhoneStatus + // }) + // .then(res => { + // }) + // .catch(err => { + // if (err.code == 11005) { + // tt.redirectTo({ + // url: `/pages/getuserinfo/index` + // }) + // } + // }); + // }, }) diff --git a/pages/orderUrl/orderUrl.js b/pages/orderUrl/orderUrl.js new file mode 100644 index 0000000..e9b4d48 --- /dev/null +++ b/pages/orderUrl/orderUrl.js @@ -0,0 +1,88 @@ +// const extConfig = tt.getExtConfigSync ? tt.getExtConfigSync() : {} +// let appVersion = extConfig.appVersion; +var app = getApp(); +const config = require('../../config/config.js') +const Http = require('../../utils/HttpBasics.js') + +Page({ + data: { + date: null, + date2: null, + codeUrl:'', + today:'',//当天日期 + }, + bindDateChange1: function(e) { + this.setData({ + date: e.detail.value, + }) + }, + bindDateChange2: function(e) { + this.setData({ + date2: e.detail.value + }) + }, + onLoad(){ + let date = new Date; + let year = date.getFullYear(); + var month = ''; + let day = date.getDate(); + if(day<10){ + day = '0'+day + } + if (date.getMonth() + 1 < 10) { + var month = '0' + (date.getMonth() + 1); + } else { + var month = date.getMonth() + 1; + } + this.setData({ + date: year + '-' + month + '-' + day, + date2: year + '-' + month + '-' + day, + today: year + '-' + month + '-' + day + }) + }, + onShow(){ + + }, + mode(){ + wx.hideLoading(); + tt.showLoading({ + title: '加载中...', + }) + console.log(config.apiPrefix); + Http.get({ + url:config.api.exportUrl, + data:{ + verifyStartDate:this.data.date, + verifyEndDate:this.data.date2 + } + }).then(res=>{ + tt.hideLoading(); + if(res.data){ + this.setData({ + codeUrl:config.apiPrefix+res.data + }) + } + }).catch(err=>{ + wx.hideLoading(); + tt.showToast({ + title: err.message?err.message:err.data, + icon:"none", + duration:2000 + }) + }) + }, + goWebView(e){ + let this_ = this; + tt.setClipboardData({ + data: this_.data.codeUrl, + success: function() { + tt.showToast({ + title: '复制成功 请到浏览器打开', + icon: "none", + duration: 3000, + }) + } + }) + }, + +}) \ No newline at end of file diff --git a/pages/orderUrl/orderUrl.json b/pages/orderUrl/orderUrl.json new file mode 100644 index 0000000..793627c --- /dev/null +++ b/pages/orderUrl/orderUrl.json @@ -0,0 +1,6 @@ +{ + "backgroundTextStyle": "light", + "navigationBarBackgroundColor": "#52A0FD", + "navigationBarTextStyle": "white", + "navigationBarTitleText": "导出核销记录" + } \ No newline at end of file diff --git a/pages/orderUrl/orderUrl.ttml b/pages/orderUrl/orderUrl.ttml new file mode 100644 index 0000000..fd4cf4c --- /dev/null +++ b/pages/orderUrl/orderUrl.ttml @@ -0,0 +1,16 @@ + + + + + {{date}} + + 至 + + {{date2}} + + + + 复制链接到浏览器打开 + + + \ No newline at end of file diff --git a/pages/orderUrl/orderUrl.ttss b/pages/orderUrl/orderUrl.ttss new file mode 100644 index 0000000..f0a31af --- /dev/null +++ b/pages/orderUrl/orderUrl.ttss @@ -0,0 +1,238 @@ +page { + padding: 90rpx 0 30rpx; + } + .tabTit { + height: 90rpx; + line-height: 82rpx; + position: fixed; + top: 0; + width: 750rpx; + z-index: 1; + } + + .tabTit > view:nth-of-type(1) { + border-left: 0; + } + + .tabTit > view:nth-of-type(4) { + border-right: 0; + } + + + .tabTit .active image { + transform: rotate(180deg); + background: none; + } + + .tabTit image { + width: 18rpx; + height: 9rpx; + vertical-align: middle; + margin-left: 5px; + } + + .tabLayer { + width: 750rpx; + overflow: hidden; + position: fixed; + top: 90rpx; + z-index: 1; + background: #fff; + padding-bottom: 26rpx; + box-shadow:2px 9px 10px rgba(0, 0, 0, 0.05); + bottom: 0; + border-top:1px solid #eee; + } + + .tabLayer a { + float: left; + width: 210rpx; + height: 80rpx; + line-height: 80rpx; + margin: 30rpx 0 0 26rpx; + text-align: center; + color: #888; + font-size: 30rpx; + background: rgba(255, 255, 255, 1); + border: 1px solid rgba(234, 234, 234, 1); + border-radius: 10rpx; + } + + .tabLayer .active { + text-align: center; + height: 80rpx; + background: rgba(255, 255, 255, 1); + border: 1px solid rgba(101, 158, 246, 1); + border-radius: 10rpx; + color: #659ef6; + } + .tabTit .active { + background: #fff; + font-size: 32prx; + font-weight: 500; + color: rgba(101, 158, 246, 1); + } + /*弹性盒模型*/ + + .box { + background: #fff; + border-bottom:1px solid #eee; + } + + .flex1 { + overflow: hidden; + width: 25%; + display: block; + text-align: center; + } + + .flex1 text,.text { + font-size: 30rpx; + } + .text{ + display: block; + width: 25%; + text-align: center; + } + /* 日期选择 */ + + .picker_group { + height: 85rpx; + line-height: 85rpx; + justify-content: center; + display: flex; + align-items: center; + font-size: 30rpx; + color: #888; + } + + .picker_group picker { + height: 55rpx; + line-height: 55rpx; + margin: 0 2%; + padding: 2% 5%; + border-bottom: 1px solid #eee; + } + + .view view:nth-of-type(1) { + font-size: 28rpx; + color: #888; + } + + .list { + width: 644rpx; + border-radius: 16rpx; + padding: 32rpx; + margin: 40rpx auto; + box-shadow: 0 6px 20px 0 rgba(0, 0, 0, 0.1); + } + + .list >view { + height: 60rpx; + line-height: 60rpx; + font-size: 30rpx; + } + + .txt1 { + font-size: 32rpx; + font-weight: 500; + color: rgba(85, 85, 85, 1); + } + + .txt2 { + font-size: 28rpx; + font-weight: 500; + color: rgba(255, 106, 106, 1); + } + + .money { + font-weight: 500; + color: rgba(85, 85, 85, 1); + font-size: 26rpx; + /* width: 123rpx; */ + padding-right: 20rpx; + } + + .time { + font-size: 28rpx; + font-weight: 500; + color: rgba(125, 125, 125, 1); + } + + .status1 { + color: #659ef6; + } + + .status2 { + color: #eea959; + } + + .status3 { + color: #ff6a6a; + } + + .status4 { + color: #8aaa6b; + } + + .btn { + float: right; + height: 52rpx; + line-height: 52rpx; + background: rgba(101, 158, 246, 1); + border-radius: 10rpx; + font-size: 28rpx; + font-weight: 500; + padding: 0 25rpx; + color: rgba(255, 255, 255, 1); + } + + .active1 { + opacity: 0.6; + } + + .btns { + width:160rpx; + margin-top: 21rpx; + background: #52a0fd; + border-radius: 8rpx; + color: #fff; + font-size: 26rpx; + height: 64rpx; + line-height: 64rpx; + } + .btnGo{ + width:300rpx; + margin: 21rpx auto; + background: #52a0fd; + border-radius: 8rpx; + color: #fff; + font-size: 26rpx; + height: 64rpx; + line-height: 64rpx; + text-align: center; + } + .active2{ + border: 1px solid #52a0fd!important; + color: #52a0fd!important; + } + .recond{ + text-align: center; + font-size: 30rpx; + margin-top: 60rpx; + } + .active3{ + color: #659ef6; + } + .loading{ + text-align: center; + font-size: 28rpx; + color: #999; + /* padding: 20rpx 0 40rpx; */ + } + .mr{ + margin-top: 200rpx!important; + } + .lists{ + height: 100%; + } \ No newline at end of file diff --git a/pages/transaction/transaction.js b/pages/transaction/transaction.js index ff7f672..ccbf150 100644 --- a/pages/transaction/transaction.js +++ b/pages/transaction/transaction.js @@ -42,10 +42,12 @@ Page({ file.expiredTime = format.formatTime(file.expiredTime, 'yyyy-MM-dddd hh:mm:ss') file.createDate = format.formatTime(file.createDate, 'yyyy-MM-dddd hh:mm:ss') file.updateDate = format.formatTime(file.updateDate, 'yyyy-MM-dddd hh:mm:ss') + file.ids = file.id.slice(0,4)+`******`+file.id.slice(14) dataList.push(file) }) } + console.log(dataList,"dataList"); this.setData({ list: dataList, @@ -70,6 +72,7 @@ Page({ file.expiredTime = format.formatTime(file.expiredTime, 'yyyy-MM-dddd hh:mm:ss') file.createDate = format.formatTime(file.createDate, 'yyyy-MM-dddd hh:mm:ss') file.updateDate = format.formatTime(file.updateDate, 'yyyy-MM-dddd hh:mm:ss') + file.ids = file.id.slice(0,4)+`******`+file.id.slice(14) dataList.push(file) }) } diff --git a/pages/transaction/transaction.ttml b/pages/transaction/transaction.ttml index 49d941b..afd24f2 100644 --- a/pages/transaction/transaction.ttml +++ b/pages/transaction/transaction.ttml @@ -34,7 +34,7 @@ 券码 - {{item.id}} + {{item.ids}} {{timeName}} diff --git a/pages/user/user.ttml b/pages/user/user.ttml index 186a49a..95fbdc6 100644 --- a/pages/user/user.ttml +++ b/pages/user/user.ttml @@ -37,6 +37,17 @@ + + + 导出核销记录 + + + + + 开通收款账户 点击复制链接 diff --git a/project.config.json b/project.config.json index be98c88..e1021f9 100644 --- a/project.config.json +++ b/project.config.json @@ -1,32 +1,32 @@ { - "setting": { - "urlCheck": true, - "es6": true, - "newFeature": false, - "postcss": false, - "autoCompile": true, - "mockUpdate": true, - "minified": false, - "autoPush": false, - "scripts": false, - "mockLogin": false - }, - "appid": "tt1f6669db8058907a01", - "projectname": "tt富茂B", - "condition": { - "miniprogram": { - "current": -1, - "list": [ - { - "id": 1637139224806, - "name": "11", - "pathName": "pages/index/index", - "query": "", - "scene": "990001", - "launchFrom": "scan", - "location": "qr_code" - } - ] + "setting": { + "urlCheck": true, + "es6": true, + "newFeature": false, + "postcss": false, + "autoCompile": true, + "mockUpdate": true, + "minified": false, + "autoPush": false, + "scripts": false, + "mockLogin": false + }, + "appid": "tt1f6669db8058907a01", + "projectname": "tt富茂B", + "condition": { + "miniprogram": { + "current": -1, + "list": [ + { + "id": 1637139224806, + "name": "11", + "pathName": "pages/orderUrl/orderUrl", + "query": "", + "scene": "990001", + "launchFrom": "scan", + "location": "qr_code" } + ] } + } }