From 7de206c0a27b8e8a237aa4e67f947cfcc1b54f90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=94=90=E6=98=8E=E6=98=8E?= <970899069@qq.com> Date: Fri, 17 Mar 2023 15:57:43 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=B7=E5=90=88=E6=94=AF=E4=BB=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apis/interfaces/account.js | 3 +- apis/interfaces/pay.js | 1 + pages.json | 5 - pages/account/bonus.vue | 6 +- pages/account/cash.vue | 126 ++++++++++++++---- pages/account/withdraws.vue | 104 ++++++++++++--- pages/im/{chat.vue => chat.nvue} | 7 +- pages/pay/pay.vue | 118 +++++++++++++--- pages/user/certification.vue | 9 +- uni_modules/oct-im/changelog.md | 0 .../oct-im/components/oct-im/oct-im.vue | 9 ++ uni_modules/oct-im/package.json | 81 +++++++++++ uni_modules/oct-im/readme.md | 1 + 13 files changed, 395 insertions(+), 75 deletions(-) rename pages/im/{chat.vue => chat.nvue} (90%) create mode 100644 uni_modules/oct-im/changelog.md create mode 100644 uni_modules/oct-im/components/oct-im/oct-im.vue create mode 100644 uni_modules/oct-im/package.json create mode 100644 uni_modules/oct-im/readme.md diff --git a/apis/interfaces/account.js b/apis/interfaces/account.js index 1523f04..b7cb453 100644 --- a/apis/interfaces/account.js +++ b/apis/interfaces/account.js @@ -27,7 +27,8 @@ const log = data => { // 业绩账户 const cash = data => { return request({ - url: "perf/lists", + // 1.3.5^ 版本废弃 url: "perf/lists", + url: "perf/new_lists", data }) } diff --git a/apis/interfaces/pay.js b/apis/interfaces/pay.js index 71dcf40..12085dc 100644 --- a/apis/interfaces/pay.js +++ b/apis/interfaces/pay.js @@ -32,6 +32,7 @@ const umsPay = (orderId, data) => { // 银联支付补差价 const diffUmsPay = (orderId, data) => { + console.log(data) return request({ url: 'pay/diff/' + orderId + '/ums', data diff --git a/pages.json b/pages.json index 37d8eb5..5d2e1d6 100644 --- a/pages.json +++ b/pages.json @@ -599,11 +599,6 @@ "selectedIconPath": "static/icons/tabs_show_02.png", "pagePath": "pages/work/index", "text": "工作台" - }, { - "iconPath": "static/icons/tabs_icon_04.png", - "selectedIconPath": "static/icons/tabs_show_04.png", - "pagePath": "pages/im/msg", - "text": "消息" }, { "iconPath": "static/icons/tabs_icon_03.png", "selectedIconPath": "static/icons/tabs_show_03.png", diff --git a/pages/account/bonus.vue b/pages/account/bonus.vue index 96d415c..5ec1150 100644 --- a/pages/account/bonus.vue +++ b/pages/account/bonus.vue @@ -10,8 +10,8 @@ 提现 - 已发放 :¥{{sended}} - 待发放 :¥{{frozen}} + 已发放 :¥{{sended}} + 待发放 :¥{{frozen}} @@ -130,7 +130,7 @@ this.page = logs.page this.pagesShow = false uni.hideLoading() - }).catch(err => { + }).catch(err => { this.errMsg(err) }) }, diff --git a/pages/account/cash.vue b/pages/account/cash.vue index 011e4f3..7cc2058 100644 --- a/pages/account/cash.vue +++ b/pages/account/cash.vue @@ -8,21 +8,25 @@ - {{total}} + {{count}} {{type == 'self' ? '个人总业绩': '团队总业绩'}} + 筛选区间业绩:{{total}} - - + + + + + {{dayTime.start_at || "开始日期"}} + {{dayTime.end_at || "结束日期"}} + + + + 默认 + @@ -60,7 +64,21 @@ - + + @@ -69,14 +87,16 @@ export default { data() { return { - tabs : [ - { name: '全部业绩', value: 'all'}, - { name: '当月业绩', value: 'month'}, - { name: '当年业绩', value: 'year'} - ], - dayType : 'all', + dayShow : false, + minDate : '', + maxDate : '', + dayTime : { + start_at: '', + end_at : '' + }, type : 'self', total : '0.00', + count : '0.00', list : [], page : { current : 1, @@ -88,6 +108,12 @@ }, created() { this.getLog() + // 获取当天前日期 + let date = new Date() + let year = date.getFullYear() + let month = date.getMonth() + 1 + let day = date.getDate() + 1 + this.maxDate = year + '-' + month + '-' + day }, methods: { onTabs(e){ @@ -96,27 +122,45 @@ this.page.current = 1 this.getLog() }, + // 默认日期 + onDefaultLog(){ + this.dayTime = { + start_at: '', + end_at : '' + } + this.page.current = 1 + this.getLog() + }, // 选择日期 - onDayTab(e){ - if(this.dayType === e.value) return - this.dayType = e.value + onDay(e){ + this.dayTime = { + start_at: e[0], + end_at : e[e.length - 1] + } + this.dayShow = false this.page.current = 1 this.getLog() }, // 获取列表 getLog(){ cash({ - day : this.dayType, - type: this.type, - page: this.page.current + start_at: this.dayTime.start_at, + end_at : this.dayTime.end_at, + type : this.type, + page : this.page.current }).then(res => { - let { total, lists } = res; + let { total, lists, start, now, count } = res; let atList = lists.page.current == 1 ? [] : this.list + if(this.minDate == '') this.minDate = start this.list = atList.concat(lists.data) this.total = total + this.count = count this.page = lists.page this.pagesShow = false }).catch(err => { + + console.log(err) + uni.showToast({ title: err.message, icon : 'none' @@ -172,6 +216,13 @@ line-height: 40rpx; padding-top: 10rpx; } + .total-total{ + margin-top: 30rpx; + border-top: solid 1px rgba(255, 255, 255, .7); + font-size: 30rpx; + line-height: 40rpx; + padding-top: 30rpx; + } } // 记录空 .list-null{ @@ -184,6 +235,35 @@ .logs{ padding: 30rpx; box-sizing: border-box; + // 记录筛选 + .log-header{ + border-bottom: solid 1rpx #ddd; + display: flex; + flex-wrap: wrap; + align-items: center; + justify-content: space-between; + padding: 30rpx 0; + .log-header-title{ + line-height: 70rpx; + font-size: 30rpx; + color: gray; + color: $main-color; + } + .log-header-data{ + display: flex; + align-items: center; + label{ + font-size: 30rpx; + } + .log-header-data-q{ + font-size: 24rpx; + line-height: 30rpx; + color: gray; + .show{ color: $main-color; } + } + } + } + // 记录 .log-item{ background: white; padding: 10rpx 30rpx; diff --git a/pages/account/withdraws.vue b/pages/account/withdraws.vue index 841e475..8a3a630 100644 --- a/pages/account/withdraws.vue +++ b/pages/account/withdraws.vue @@ -2,7 +2,11 @@ - 到账银行卡 + + + 本人银行卡 + 非本人银行卡 + @@ -19,9 +23,9 @@ - + - + @@ -40,6 +44,8 @@ + + 后台提现管理时间 上午11:00-12:00 下午17:00-18:00 @@ -48,17 +54,22 @@ export default { data() { return { + type : 1, banks : [], bankVal : 0, bankNo : '', mobile : '', name : '', idcard : '', + identity : { + name : '', + id_card_no : '' + }, amount : '', min : 0, rate : 0, balance : '0.00', - isDisabled : false + isDisabled : false, }; }, @@ -73,29 +84,62 @@ mask : true }) withdrawsCreate().then(res => { - let { bank, tax, min, balance, banks} = res; - let bankIndex - this.rate = tax - this.min = min - this.balance = balance - this.banks = [ { id: '', name: '请选择开户银行'}, ...banks ] - this.name = bank.name - if(bank.bank_no){ - bankIndex = this.banks.findIndex(val => val.name === bank.bank_name) + let { bank, tax, min, balance, banks, id_card, has_bank} = res; + + this.rate = tax + this.min = min + this.balance = balance + this.banks = [ { id: '', name: '请选择开户银行'}, ...banks ] + this.identity = id_card + this.type = bank.message_type + this.isDisabled = has_bank + + this.name = id_card.name + this.idcard = id_card.id_card_no + if(has_bank){ + let bankIndex = this.banks.findIndex(val => val.name === bank.bank_name) + this.bankNo = bank.bank_no this.mobile = bank.mobile this.bankVal = bankIndex >= 0 ? bankIndex : 0 - this.isDisabled = true } + uni.hideLoading() }).catch(err => { - uni.showToast({ - title: err.message, - icon : 'none' + + console.log(err) + + uni.showModal({ + content : err.message, + showCancel : false, + success : ModalRes => { + if(ModalRes.confirm){ + this.$Router.back() + } + } }) }) }, methods: { + onTypeTab(type){ + if(type == this.type) return + if(this.isDisabled){ + uni.showToast({ + title: "银行卡信息已绑定,如需变更请联系系统管理员", + icon : "none" + }) + return + } + + if(type == 1){ + this.name = this.identity.name + this.idcard = this.identity.id_card_no + }else{ + this.name = '' + this.idcard = '' + } + this.type = type + }, onSubmit(){ if(this.bankVal === 0){ uni.showToast({ @@ -114,6 +158,8 @@ name : this.name, mobileNo : this.mobile, bank_no : this.bankNo, + id_card : this.idcard, + message_type: this.type, }).then(res => { uni.showModal({ title : '提示', @@ -141,16 +187,40 @@ .content{ padding: 30rpx; } + .withdraws-hint{ + padding: 30rpx; + font-size: 30rpx; + color: gray; + } .block{ background: white; .block-title{ font-size: 30rpx; color: gray; line-height: 50rpx; + text{ + color: $main-color; + margin: 0 5rpx; + } } .bank{ background: #fdfdfd; padding: 50rpx; + .bank-tabs{ + @extend .border-solid; + margin-bottom: 30rpx; + display: flex; + align-items: center; + line-height: 100rpx; + .item{ + width: 50%; + text-align: center; + font-size: 30rpx; + &.active{ + color: $main-color; + } + } + } .bank-input{ display: flex; justify-content: space-between; diff --git a/pages/im/chat.vue b/pages/im/chat.nvue similarity index 90% rename from pages/im/chat.vue rename to pages/im/chat.nvue index 8084856..5388f64 100644 --- a/pages/im/chat.vue +++ b/pages/im/chat.nvue @@ -1,6 +1,9 @@ diff --git a/pages/pay/pay.vue b/pages/pay/pay.vue index 9c8c5d1..563ab6d 100644 --- a/pages/pay/pay.vue +++ b/pages/pay/pay.vue @@ -39,6 +39,26 @@ + + + + 使用火力值抵扣 + 余额:{{balance}} + + + + + + 使用数量 + + + + @@ -49,17 +69,21 @@ + diff --git a/uni_modules/oct-im/package.json b/uni_modules/oct-im/package.json new file mode 100644 index 0000000..d56881d --- /dev/null +++ b/uni_modules/oct-im/package.json @@ -0,0 +1,81 @@ +{ + "id": "oct-im", + "displayName": "oct-im", + "version": "1.0.0", + "description": "oct-im", + "keywords": [ + "oct-im" +], + "repository": "", + "engines": { + "HBuilderX": "^3.1.0" + }, + "dcloudext": { + "type": "component-vue", + "sale": { + "regular": { + "price": "0.00" + }, + "sourcecode": { + "price": "0.00" + } + }, + "contact": { + "qq": "" + }, + "declaration": { + "ads": "", + "data": "", + "permissions": "" + }, + "npmurl": "" + }, + "uni_modules": { + "dependencies": [], + "encrypt": [], + "platforms": { + "cloud": { + "tcb": "u", + "aliyun": "u" + }, + "client": { + "Vue": { + "vue2": "u", + "vue3": "u" + }, + "App": { + "app-vue": "u", + "app-nvue": "u" + }, + "H5-mobile": { + "Safari": "u", + "Android Browser": "u", + "微信浏览器(Android)": "u", + "QQ浏览器(Android)": "u" + }, + "H5-pc": { + "Chrome": "u", + "IE": "u", + "Edge": "u", + "Firefox": "u", + "Safari": "u" + }, + "小程序": { + "微信": "u", + "阿里": "u", + "百度": "u", + "字节跳动": "u", + "QQ": "u", + "钉钉": "u", + "快手": "u", + "飞书": "u", + "京东": "u" + }, + "快应用": { + "华为": "u", + "联盟": "u" + } + } + } + } +} \ No newline at end of file diff --git a/uni_modules/oct-im/readme.md b/uni_modules/oct-im/readme.md new file mode 100644 index 0000000..6bff57a --- /dev/null +++ b/uni_modules/oct-im/readme.md @@ -0,0 +1 @@ +# oct-im \ No newline at end of file