From 14481e158ab8817859486831229d6766d5aa6159 Mon Sep 17 00:00:00 2001 From: Penny <2500338766@qq.com> Date: Sun, 26 Mar 2023 21:56:37 +0800 Subject: [PATCH] =?UTF-8?q?feature:1.0:=E4=BF=AE=E6=AD=A3=E6=8F=90?= =?UTF-8?q?=E7=8E=B0BUG=EF=BC=8C=E9=82=80=E8=AF=B7=E6=B3=A8=E5=86=8CBUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages-profit/profit/profitEndDetails.vue | 3 ++- pages-profit/profit/profitInDetails.vue | 3 ++- pages-profit/profit/profitPreDetails.vue | 3 ++- pages-userInfo/extends/extends.vue | 2 +- pages-userInfo/withdraw/withdraw.vue | 19 ++++++++++++------- pages-userInfo/withdraw/withdrawDetail.vue | 10 +++------- pages-userInfo/withdraw/withdrawIndex.vue | 3 ++- pages/index/index.vue | 19 ++++++++++--------- pages/index/material/material.vue | 11 ++++++----- pages/index/upload/upload.vue | 2 +- pages/login/login.vue | 2 +- pages/profit/profit.vue | 5 +++-- pages/register/register.vue | 21 ++++++++++++++++++--- utils/common.js | 2 +- 14 files changed, 64 insertions(+), 41 deletions(-) diff --git a/pages-profit/profit/profitEndDetails.vue b/pages-profit/profit/profitEndDetails.vue index 0caf819..671fabb 100644 --- a/pages-profit/profit/profitEndDetails.vue +++ b/pages-profit/profit/profitEndDetails.vue @@ -4,7 +4,7 @@ {{val}} @@ -105,6 +105,7 @@ export default { flagInvite: false, loadStatus:'noMore', //加载样式:more - 加载前样式,loading - 加载中样式,noMore - 没有数据样式 isLoadMore:false, //是否加载中 + noClick:true, //防止重复提交 }; }, created() { diff --git a/pages-profit/profit/profitInDetails.vue b/pages-profit/profit/profitInDetails.vue index de61b6e..49fecaa 100644 --- a/pages-profit/profit/profitInDetails.vue +++ b/pages-profit/profit/profitInDetails.vue @@ -4,7 +4,7 @@ {{val}} @@ -94,6 +94,7 @@ export default { data() { return { items: ["广告", "邀请"], + noClick:true, //防止重复提交 typeId: 0, activeColor: "#007aff", styleType: "text", diff --git a/pages-profit/profit/profitPreDetails.vue b/pages-profit/profit/profitPreDetails.vue index 94d9135..41ae98a 100644 --- a/pages-profit/profit/profitPreDetails.vue +++ b/pages-profit/profit/profitPreDetails.vue @@ -4,7 +4,7 @@ {{val}} @@ -95,6 +95,7 @@ import { queryFrontPreProfit } from "@/api/profit.js"; export default { data() { return { + noClick:true, //防止重复提交 preProfitAdList: [], preprofitInviteList: [], items: ["广告", "邀请"], diff --git a/pages-userInfo/extends/extends.vue b/pages-userInfo/extends/extends.vue index b73d618..235fe09 100644 --- a/pages-userInfo/extends/extends.vue +++ b/pages-userInfo/extends/extends.vue @@ -12,7 +12,7 @@ - 已邀请 + 已成功邀请(审核通过) diff --git a/pages-userInfo/withdraw/withdraw.vue b/pages-userInfo/withdraw/withdraw.vue index 765dc76..4437ced 100644 --- a/pages-userInfo/withdraw/withdraw.vue +++ b/pages-userInfo/withdraw/withdraw.vue @@ -14,7 +14,7 @@ 小贴士:提现金额不少于1元 - 输入金额超过当前余额 + 输入金额超过或少于可提现余额 选择提现至 @@ -73,6 +73,7 @@ noClick:true, //防止重复提交 creatorAccountList:[], accountNo: '', + accountRealNo: '', //真实已加密账户账号 type: '', current: 0, payType: [ @@ -126,6 +127,7 @@ for (let param of res.data.data) { if(param.isUse === '1'){ that.accountNo = param.accountNo; + that.accountRealNo = param.accountRealNo; that.type = param.type; } } @@ -145,11 +147,13 @@ that.accountNo = param.accountNo; }, - //检查是否超出余额 + //检查是否超出余额或少于1元 checkAmt:function(){ let that = this; if(parseFloat(that.amt) > parseFloat(that.userInfo.amt)){ that.checkFlag = true; + }else if(parseFloat(that.amt) < parseFloat(1)){ + that.checkFlag = true; }else{ that.checkFlag = false; } @@ -170,9 +174,9 @@ }); } if(that.checkFlag == true){ - console.log('that.checkFlag',that.checkFlag) + //console.log('that.checkFlag',that.checkFlag) uni.showModal({ - content: '输入金额超过可提现余额!', + content: '输入金额超过或少于可提现余额!', showCancel: false }); }else{ @@ -183,14 +187,15 @@ } const checkRes = await checkWithdraw(param); if(checkRes.data.code === 200){ + //服务器返回true可提现 if(checkRes.data.data === true){ - //可提现 const withdrawParam = { creatorId: that.userInfo.id, amt: that.amt, - accountNo: that.accountNo, + accountNo: that.accountRealNo, channel: that.type } + console.log('withdrawParam',withdrawParam) const withdrawRes = await withdraw(withdrawParam); if(withdrawRes.data.code === 200){ //更新艺术家缓存 @@ -230,7 +235,7 @@ }else{ //不可提现 uni.showModal({ - content: '输入金额超过可提现余额!', + content: '输入金额超过或少于可提现余额!', showCancel: false }); } diff --git a/pages-userInfo/withdraw/withdrawDetail.vue b/pages-userInfo/withdraw/withdrawDetail.vue index d1f9d8d..1b98972 100644 --- a/pages-userInfo/withdraw/withdrawDetail.vue +++ b/pages-userInfo/withdraw/withdrawDetail.vue @@ -7,13 +7,9 @@ {{ withdrawDetailInfo.orderId || '' }} - - 手机号: - {{withdrawDetailInfo.phone || ''}} - - - 银行卡: - {{withdrawDetailInfo.bankNo || '' }} + + 收款账号: + {{withdrawDetailInfo.accountNo || ''}} 提现金额: diff --git a/pages-userInfo/withdraw/withdrawIndex.vue b/pages-userInfo/withdraw/withdrawIndex.vue index 5543c93..14ebf87 100644 --- a/pages-userInfo/withdraw/withdrawIndex.vue +++ b/pages-userInfo/withdraw/withdrawIndex.vue @@ -11,7 +11,7 @@ - + @@ -40,6 +40,7 @@ export default { }, data() { return { + noClick:true, //防止重复提交 iconColor: '#0b6375', userInfo: {}, hidden: true, diff --git a/pages/index/index.vue b/pages/index/index.vue index b0b8de7..d4869ae 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -52,20 +52,21 @@ export default { data() { return { - iconColor: '#0b6375', + iconColor: '#0b6375', userInfo:{}, banner:[], current: 0, mode: 'default', - dotsStyles: { - backgroundColor: 'rgba(255, 255, 255, .5)', - border: '1px rgba(0, 0, 0, .3) solid', - color: '#fff', - selectedBackgroundColor: 'rgba(11, 99, 117, .9)', - selectedBorder: '1px rgba(0, 0, 0, .9) solid', - bottom: 50 - }, + dotsStyles: { + backgroundColor: 'rgba(255, 255, 255, .5)', + border: '1px rgba(0, 0, 0, .3) solid', + color: '#fff', + selectedBackgroundColor: 'rgba(11, 99, 117, .9)', + selectedBorder: '1px rgba(0, 0, 0, .9) solid', + bottom: 50 + }, swiperDotIndex: 0, + noClick:true, //防止重复提交 autoplay: true, interval: 5000, duration: 500, diff --git a/pages/index/material/material.vue b/pages/index/material/material.vue index cbf3f0c..3955d3b 100644 --- a/pages/index/material/material.vue +++ b/pages/index/material/material.vue @@ -4,7 +4,7 @@ {{val}} @@ -13,7 +13,7 @@ {{val}} @@ -28,7 +28,7 @@ @@ -61,8 +61,9 @@ imgWidth: 0, // 图片宽 imgHeight: 0, // 图片高 flag: false, - loadStatus:'noMore', //加载样式:more - 加载前样式,loading - 加载中样式,noMore - 没有数据样式 - isLoadMore:false, //是否加载中 + loadStatus:'noMore', //加载样式:more - 加载前样式,loading - 加载中样式,noMore - 没有数据样式 + isLoadMore:false, //是否加载中 + noClick:true, //防止重复提交 } }, onLoad(option) { diff --git a/pages/index/upload/upload.vue b/pages/index/upload/upload.vue index 1ea3561..a01f5ce 100644 --- a/pages/index/upload/upload.vue +++ b/pages/index/upload/upload.vue @@ -7,7 +7,7 @@ {{val}} diff --git a/pages/login/login.vue b/pages/login/login.vue index 408e205..0e8e4f8 100644 --- a/pages/login/login.vue +++ b/pages/login/login.vue @@ -42,7 +42,7 @@ diff --git a/pages/profit/profit.vue b/pages/profit/profit.vue index f31a903..cb93cb1 100644 --- a/pages/profit/profit.vue +++ b/pages/profit/profit.vue @@ -7,14 +7,14 @@
累计收益 - +
- +
@@ -171,6 +171,7 @@ export default { data() { return { nvueWidth: 730, + noClick:true, //防止重复提交 profitInfo: { yesterdayAdProfit: 0, yesterdayInviteProfit: 0, diff --git a/pages/register/register.vue b/pages/register/register.vue index 774b675..036a895 100644 --- a/pages/register/register.vue +++ b/pages/register/register.vue @@ -27,7 +27,7 @@ @@ -87,12 +87,23 @@ name: { rules: [{ required: true, - errorMessage: '请输入昵称' + errorMessage: '请输入昵称', }, { minLength: 1, maxLength: 8, errorMessage: '昵称长度应在 {minLength} 到 {maxLength} 个字符' + }, + { + validateFunction: () =>{ + return new Promise((resolve, reject) => { + if (/(\ud83c[\udc00-\udfff])|(\ud83d[\udc00-\udfff])|(\ud83e[\udc00-\udfff])|[\u2100-\u32ff]|[\u0030-\u007f][\u20d0-\u20ff]|[\u0080-\u00ff]/.test(this.formData.name)){ + reject(new Error('请输入中文,英文,数字等非特殊字符组成的名称')); + }else{ + resolve(); + } + }); + } } ], }, @@ -174,7 +185,7 @@ required: true, errorMessage: '请输入邀请码' }, { - minLength: 6, + minLength: 5, errorMessage: '邀请码长度最短 {minLength} 个字符' }, { validateFunction: () => { @@ -299,8 +310,12 @@ }, submit() { let that = this; + console.log('that',that) that.$refs.form.validate([], (err, formData) => { if (!err) { + console.log('that.fileList',that.fileList) + console.log('err',err) + console.log('formData',formData) that.uploadImg(that.fileList) } else { uni.showToast({ diff --git a/utils/common.js b/utils/common.js index d276246..4ba5cbc 100644 --- a/utils/common.js +++ b/utils/common.js @@ -13,7 +13,7 @@ function noMultipleClicks(methods, info) { } setTimeout(()=> { that.noClick= true; - }, 2000) + }, 1000) } else { // 这里是重复点击的判断 }