Browse Source

feature:1.0:修正提现BUG,邀请注册BUG

feature-1.0
Penny 3 years ago
parent
commit
14481e158a
  1. 3
      pages-profit/profit/profitEndDetails.vue
  2. 3
      pages-profit/profit/profitInDetails.vue
  3. 3
      pages-profit/profit/profitPreDetails.vue
  4. 2
      pages-userInfo/extends/extends.vue
  5. 19
      pages-userInfo/withdraw/withdraw.vue
  6. 10
      pages-userInfo/withdraw/withdrawDetail.vue
  7. 3
      pages-userInfo/withdraw/withdrawIndex.vue
  8. 19
      pages/index/index.vue
  9. 11
      pages/index/material/material.vue
  10. 2
      pages/index/upload/upload.vue
  11. 2
      pages/login/login.vue
  12. 5
      pages/profit/profit.vue
  13. 21
      pages/register/register.vue
  14. 2
      utils/common.js

3
pages-profit/profit/profitEndDetails.vue

@ -4,7 +4,7 @@
<view class="status-item uni-secondary-color" v-for="(val, i) in items"
:index="i" :key="i"
:class="typeId === i ? 'status-active' : ''"
@click="onClickItem({currentIndex: i})"
@click="$noMultipleClicks(onClickItem,{currentIndex: i})"
>
<view class="status-text">{{val}}</view>
</view>
@ -105,6 +105,7 @@ export default {
flagInvite: false,
loadStatus:'noMore', //more - loading - noMore -
isLoadMore:false, //
noClick:true, //
};
},
created() {

3
pages-profit/profit/profitInDetails.vue

@ -4,7 +4,7 @@
<view class="status-item uni-secondary-color" v-for="(val, i) in items"
:index="i" :key="i"
:class="typeId === i ? 'status-active' : ''"
@click="onClickItem({currentIndex: i})"
@click="$noMultipleClicks(onClickItem,{currentIndex: i})"
>
<view class="status-text">{{val}}</view>
</view>
@ -94,6 +94,7 @@ export default {
data() {
return {
items: ["广告", "邀请"],
noClick:true, //
typeId: 0,
activeColor: "#007aff",
styleType: "text",

3
pages-profit/profit/profitPreDetails.vue

@ -4,7 +4,7 @@
<view class="status-item uni-secondary-color" v-for="(val, i) in items"
:index="i" :key="i"
:class="typeId === i ? 'status-active' : ''"
@click="onClickItem({currentIndex: i})"
@click="$noMultipleClicks(onClickItem,{currentIndex: i})"
>
<view class="status-text">{{val}}</view>
</view>
@ -95,6 +95,7 @@ import { queryFrontPreProfit } from "@/api/profit.js";
export default {
data() {
return {
noClick:true, //
preProfitAdList: [],
preprofitInviteList: [],
items: ["广告", "邀请"],

2
pages-userInfo/extends/extends.vue

@ -12,7 +12,7 @@
<button class="invite-btn" @click="" open-type="share">点击邀请</button>
</view>
</view>
<view class="invited-list-title">已邀请</view>
<view class="invited-list-title">成功邀请(审核通过)</view>
<view>
<uni-list border-full v-for="(item,index) in inviteLogList" :key="index">
<uni-list-item :title="item.invitedScanCode" :note="item.createTime" :thumb="item.img" thumb-size="lg" />

19
pages-userInfo/withdraw/withdraw.vue

@ -14,7 +14,7 @@
<view class="withdraw-amount-tip">小贴士提现金额不少于1元 </view>
</view>
<view class="error-message" v-if="checkFlag == true">输入金额超过当前余额</view>
<view class="error-message" v-if="checkFlag == true">输入金额超过或少于可提现余额</view>
<view class="withdraw-title tl-title-margin">选择提现至</view>
@ -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
});
}

10
pages-userInfo/withdraw/withdrawDetail.vue

@ -7,13 +7,9 @@
<text>{{ withdrawDetailInfo.orderId || '' }}</text>
</view>
<view class="box" v-if="withdrawDetailInfo.channel == '2'">
<text class="title">手机号:</text>
<text>{{withdrawDetailInfo.phone || ''}}</text>
</view>
<view class="box" v-if="withdrawDetailInfo.channel == '1'">
<text class="title">银行卡:</text>
<text>{{withdrawDetailInfo.bankNo || '' }}</text>
<view class="box">
<text class="title">收款账号:</text>
<text>{{withdrawDetailInfo.accountNo || ''}}</text>
</view>
<view class="box">
<text class="title">提现金额:</text>

3
pages-userInfo/withdraw/withdrawIndex.vue

@ -11,7 +11,7 @@
</view>
<view class="account-balance-box">
<MoneyView :character="'¥'" :value="userInfo.amt || 0" :size="60" :hidden="hidden"/>
<span class="income-refresh-but" v-if="!hidden" @click="clickRefresh">
<span class="income-refresh-but" v-if="!hidden" @click="$noMultipleClicks(clickRefresh)">
<uni-icons type="loop" :size="20" :color="'#fff'" />
</span>
</view>
@ -40,6 +40,7 @@ export default {
},
data() {
return {
noClick:true, //
iconColor: '#0b6375',
userInfo: {},
hidden: true,

19
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,

11
pages/index/material/material.vue

@ -4,7 +4,7 @@
<view class="status-item uni-secondary-color" v-for="(val, i) in statusList"
:index="i" :key="i"
:class="statusCurrent === i ? 'status-active' : ''"
@click="onClickStatus({currentIndex: i})"
@click="$noMultipleClicks(onClickStatus,{currentIndex: i})"
>
<view class="status-text">{{val}}</view>
</view>
@ -13,7 +13,7 @@
<view class="type-item uni-secondary-color" v-for="(val, i) in typeList"
:index="i" :key="i"
:class="typeCurrent === i ? 'type-active' : ''"
@click="onClickType({currentIndex: i})"
@click="$noMultipleClicks(onClickType,{currentIndex: i})"
>
<view class="type-text">{{val}}</view>
</view>
@ -28,7 +28,7 @@
<image lazy-load v-for="(item,index) in creatorImgList" :key='index' class="img-box"
:class="[1, 2, 5, 6].includes(item.typeId) ? 'img-2x2' : [4].includes(item.typeId) ? 'img-1x1' : 'img-2x3'"
:src="item.imgUrl"
@click="targetDetail(item)"
@click="$noMultipleClicks(targetDetail,item)"
mode=""></image>
</view>
<!-- 显示加载中或者全部加载完成 -->
@ -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) {

2
pages/index/upload/upload.vue

@ -7,7 +7,7 @@
<view class="type-item uni-secondary-color" v-for="(val, i) in typeList"
:index="i" :key="i"
:class="typeCurrent === i ? 'type-active' : ''"
@click="onClickType({currentIndex: i})"
@click="$noMultipleClicks(onClickType,{currentIndex: i})"
>
<view class="type-text">{{val}}</view>
</view>

2
pages/login/login.vue

@ -42,7 +42,7 @@
<uni-easyinput type="text" v-model="formData.code" placeholder="请输入验证码" :inputBorder="false"/>
<template>
<div>
<image :src="codeUrl" @click="getCode" class="login-code-img"/>
<image :src="codeUrl" @click="$noMultipleClicks(getCode)" class="login-code-img"/>
</div>
</template>
</div>

5
pages/profit/profit.vue

@ -7,14 +7,14 @@
<view>
<div class="accumulate-income-title">
累计收益
<span class="income-hidden-but" @click="clickHidden">
<span class="income-hidden-but" @click="$noMultipleClicks(clickHidden)">
<uni-icons v-if="hidden" type="eye" :size="18" :color="'#909399'" />
<uni-icons v-else type="eye-slash" :size="18" :color="'#909399'" />
</span>
</div>
<div class="income-num">
<MoneyView :character="'¥'" :value="profitInfo.totalProfit" :size="60" :hidden="hidden"/>
<span class="income-refresh-but" v-if="!hidden" @click="clickRefresh">
<span class="income-refresh-but" v-if="!hidden" @click="$noMultipleClicks(clickRefresh)">
<uni-icons type="loop" :size="20" :color="'#909399'" />
</span>
</div>
@ -171,6 +171,7 @@ export default {
data() {
return {
nvueWidth: 730,
noClick:true, //
profitInfo: {
yesterdayAdProfit: 0,
yesterdayInviteProfit: 0,

21
pages/register/register.vue

@ -27,7 +27,7 @@
</uni-forms-item>
<uni-forms-item label="邀请码" required name="inviteCode">
<uni-easyinput v-model="formData.inviteCode" placeholder="请输入邀请码"
:disabled="true"
:disabled="false"
:clearable="false"
:inputBorder="false" />
</uni-forms-item>
@ -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({

2
utils/common.js

@ -13,7 +13,7 @@ function noMultipleClicks(methods, info) {
}
setTimeout(()=> {
that.noClick= true;
}, 2000)
}, 1000)
} else {
// 这里是重复点击的判断
}

Loading…
Cancel
Save