From 001599a8263da91a40aaa95af74ada4d748939e3 Mon Sep 17 00:00:00 2001 From: weipengfei <2187978347@qq.com> Date: Fri, 8 Sep 2023 10:02:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=BB=9F=E4=B8=80=E5=9F=9F?= =?UTF-8?q?=E5=90=8D=E9=85=8D=E7=BD=AE,=E4=BF=AE=E6=94=B9=E6=B5=81?= =?UTF-8?q?=E6=B0=B4=E8=AF=A6=E6=83=85=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- config/app.js | 33 +++-- subpkg/finance/finance.vue | 6 +- subpkg/orderDetail/orderDetail.vue | 216 +++++++++++++++++++++-------- 3 files changed, 182 insertions(+), 73 deletions(-) diff --git a/config/app.js b/config/app.js index 888baa8..06364d8 100644 --- a/config/app.js +++ b/config/app.js @@ -1,20 +1,29 @@ let httpApiThree; -let httpApi; -let httpApiTwo; +let httpApi; // 总域名 +let httpApiTwo; // 物流系统域名 -// 正式使用的域名 -// httpApi = 'https://ceshi-worker-task.lihaink.cn' //测试 -// httpApi = 'https://preview-worker-task.lihaink.cn' //预上线 -httpApi = 'https://worker-task.lihaink.cn' //正式 +// const env = 'dev'; // 开发 +const env = 'prod'; // 生产 +// const env = 'prew'; // 预上线 -// 物流 -httpApiTwo = 'https://logistics.lihaink.cn' //正式环境 -// httpApiTwo = 'https://ceshi-logistics.lihaink.cn' //测试环境 +switch(env){ + case 'prod': + httpApi = 'https://worker-task.lihaink.cn' //正式 + httpApiTwo = 'https://logistics.lihaink.cn' //正式环境 + httpApiThree = 'https://worker-task.lihaink.cn' //正式 + break; + case 'prew': + httpApi = 'https://preview-worker-task.lihaink.cn' //预上线 + httpApiThree = 'https://preview-worker-task.lihaink.cn' //预上线 + httpApiTwo = 'https://preview-logistics.lihaink.cn' //预上线 + break; + default: + httpApi = 'https://ceshi-worker-task.lihaink.cn' //测试 + httpApiThree = 'https://ceshi-worker-task.lihaink.cn' //测试 + httpApiTwo = 'https://ceshi-logistics.lihaink.cn' //测试环境 +} -// httpApiThree = 'https://ceshi-worker-task.lihaink.cn' //测试 -// httpApiThree = 'https://preview-worker-task.lihaink.cn' //预上线 -httpApiThree = 'https://worker-task.lihaink.cn' //正式 // #ifdef H5 // httpApiThree = 'baseUrlTest' //生产 // #endif diff --git a/subpkg/finance/finance.vue b/subpkg/finance/finance.vue index a15515c..eb111ad 100644 --- a/subpkg/finance/finance.vue +++ b/subpkg/finance/finance.vue @@ -486,7 +486,7 @@ page { display: flex; align-items: center; justify-content: center; - border: 1px solid #3274f9; + border: 1px solid #0122c7; &:nth-child(1) { border-radius: 30rpx 0 0 30rpx; @@ -525,7 +525,7 @@ page { .blue { width: 137rpx; height: 49rpx; - background: #3274f9; + background: #0122c7; border-radius: 26rpx 26rpx 26rpx 26rpx; font-size: 25rpx; font-weight: 400; @@ -594,7 +594,7 @@ page { height: 49rpx; line-height: 49rpx; text-align: center; - background: #3274f9; + background: #0122c7; border-radius: 26rpx 26rpx 26rpx 26rpx; color: #fff; margin-right: 28rpx; diff --git a/subpkg/orderDetail/orderDetail.vue b/subpkg/orderDetail/orderDetail.vue index dcda432..b8ae9e5 100644 --- a/subpkg/orderDetail/orderDetail.vue +++ b/subpkg/orderDetail/orderDetail.vue @@ -1,5 +1,5 @@ @@ -68,12 +94,12 @@ return { transition: true, billList: [], - nowDate:{ + nowDate: { y: '', m: '', d: '' }, - loadConfig:{ + loadConfig: { page: 1, limit: 15, loadingText: '努力加载中', @@ -88,31 +114,31 @@ this.loadBill() }, onShow() {}, - computed:{ - nowYMD(){ - let m = this.nowDate.m<10?'0'+this.nowDate.m:this.nowDate.m; - let d = this.nowDate.d<10?'0'+this.nowDate.d:this.nowDate.d; - return this.nowDate.y+'-'+m+'-'+d; + computed: { + nowYMD() { + let m = this.nowDate.m < 10 ? '0' + this.nowDate.m : this.nowDate.m; + let d = this.nowDate.d < 10 ? '0' + this.nowDate.d : this.nowDate.d; + return this.nowDate.y + '-' + m + '-' + d; }, // 总收益 - aggregateAmount(){ - return (this.income>this.disbursement?this.income-this.disbursement:0).toFixed(2); + aggregateAmount() { + return (this.income > this.disbursement ? this.income - this.disbursement : 0).toFixed(2); }, // 收益 - income(){ + income() { let count = 0; - this.billList.forEach(item=>{ - item.action==1?count+=+item.change_amount:null; + this.billList.forEach(item => { + item.action == 1 ? count += +item.change_amount : null; }) return count.toFixed(2); }, // 平台收益 - terraceIncome(){ + terraceIncome() { let count = 0; let num = 0; - this.billList.forEach(item=>{ - if(item.action==1&&item.change_type!==201){ - count+=+item.change_amount; + this.billList.forEach(item => { + if (item.action == 1 && item.change_type !== 201) { + count += +item.change_amount; num++; } }) @@ -122,20 +148,20 @@ }; }, // 支出 - disbursement(){ + disbursement() { let count = 0; - this.billList.forEach(item=>{ - item.action==2?count+=+item.change_amount:null; + this.billList.forEach(item => { + item.action == 2 ? count += +item.change_amount : null; }) return count.toFixed(2); }, // 平台支出 - terraceDisbursement(){ + terraceDisbursement() { let count = 0; let num = 0; - this.billList.forEach(item=>{ - if(item.action==2&&item.change_type!==201){ - count+=+item.change_amount; + this.billList.forEach(item => { + if (item.action == 2 && item.change_type !== 201) { + count += +item.change_amount; num++; } }) @@ -150,26 +176,26 @@ }, methods: { async loadBill() { - if(this.loadConfig.status=="nomore")return; - this.loadConfig.status="loading" + if (this.loadConfig.status == "nomore") return; + this.loadConfig.status = "loading" let res = await accountLogLists({ type: 'um', //账户余额 page_no: this.loadConfig.page, - page_size: this.loadConfig.page_size, + page_size: this.loadConfig.limit, time: this.nowYMD }); - this.loadConfig.status="loadmore" - if(res.data.lists.length \ No newline at end of file