修改身份证添加,首页和规则弹窗,提现看广告

This commit is contained in:
duan
2025-01-03 16:37:13 +08:00
parent 01185edd14
commit 8e283e276b
7 changed files with 592 additions and 437 deletions

View File

@@ -1,30 +1,24 @@
<template>
<view class="tixian">
<view
class="top-bg">
<view class="top-bg">
<view class="class1">可提现总额</view>
<view class="class2">¥ {{ mayMoney }}</view>
<view
class="class3">
<view class="class4" style="">
<view class="class3">
<view class="class4" style="">
<view class="color-333 u-font-32">提现金额
<!-- <text style="font-size: 28upx;color: #ff7581;"
v-if="shouxufei">提现手续费为{{shouxufei * 100}}%</text> -->
</view>
</view>
<view
class="u-flex flex-row justify-between align-center"
style="padding: 20upx">
<view class="flex align-center" >
<view class="u-flex flex-row justify-between align-center" style="padding: 20upx">
<view class="flex align-center">
<view class="color-333" style="font-size: 40upx;">¥</view>
<input type="number" v-model="money" placeholder="请输入金额" @input="ymfmoneyInput" @blur="ymfymfmoneyBlur"
class="color-333 u-text-left u-m-l-10 u-font-40"
style="width: 80%;"/>
class="color-333 u-text-left u-m-l-10 u-font-40" style="width: 80%;" />
</view>
<view @click="ymfsetAllMoney"
class="u-font-28 color-333 u-p-l-15 u-p-r-15 u-p-t-16 u-p-b-16 flex-0 "
style="background: #ff7581;color: white;border-radius: 10rpx;">
<view @click="ymfsetAllMoney" class="u-font-28 color-333 u-p-l-15 u-p-r-15 u-p-t-16 u-p-b-16 flex-0 "
style="background: #ff7581;color: white;border-radius: 10rpx;">
全部
</view>
@@ -44,14 +38,13 @@
</view>
</view> -->
</view>
<view @click="ymfgetOut"
class="u-m-40 u-font-36 color-fff u-border-10"
style="background: #ff7581;border-radius: 10px;height: 80rpx;line-height: 80rpx;">
提现
<view @click="withdraw" class="u-m-40 u-font-36 color-fff u-border-10"
style="background: #ff7581;border-radius: 10px;height: 80rpx;line-height: 80rpx;">
<!-- 提现 -->
{{ !isWithdraw ? '观看广告提现' : '立即提现' }}
</view>
<view
class="flex w-full justify-center ">
<view class="flex w-full justify-center ">
<view class="u-flex-1" style="color: grey;padding-bottom: 30px;padding-top: 20upx;" @click="ymfgoaliZhiFuBao">
提现账号
</view>
@@ -66,9 +59,9 @@
<view v-if="list.length" v-for="(item, index) in list" :key="index" class="item">
<view>
<view style="margin-bottom: 8rpx;text-align: right;">
<text style="margin-bottom: 8rpx;color: green" v-if="item.state===1"> 提现成功</text>
<text style="margin-bottom: 8rpx;color: green" v-if="item.state===0"> 提现中</text>
<text style="margin-bottom: 8rpx;color: #FD6416" v-if="item.state===-1||item.state===2">
<text style="margin-bottom: 8rpx;color: green" v-if="item.state === 1"> 提现成功</text>
<text style="margin-bottom: 8rpx;color: green" v-if="item.state === 0"> 提现中</text>
<text style="margin-bottom: 8rpx;color: #FD6416" v-if="item.state === -1 || item.state === 2">
提现失败
</text>
</view>
@@ -77,8 +70,8 @@
<view class="u-m-t-8"> 收款人账号{{ item.zhifubao }}</view>
<view class="u-m-t-8"> 收款人姓名{{ item.zhifubaoName }}</view>
<view class="u-m-t-8"> 发起时间{{ item.createAt }}</view>
<view class="u-m-t-8" v-if="item.state===1">成功时间 {{ item.outAt }}</view>
<view style="margin-bottom: 8rpx;color: #FD6416" v-if="item.state===-1||item.state===2">
<view class="u-m-t-8" v-if="item.state === 1">成功时间 {{ item.outAt }}</view>
<view style="margin-bottom: 8rpx;color: #FD6416" v-if="item.state === -1 || item.state === 2">
失败原因{{ item.refund }}
</view>
@@ -102,6 +95,21 @@
</view>
</view>
<u-modal v-model="ruleShow" confirm-text="知道了" title="规则说明" :title-style="{ fontWeight: '700' }"
confirm-color="rgb(255, 117, 129)">
<view class="u-p-30 u-text-left">
<scroll-view scroll-y="true" style="max-height: 50vh;">
<rich-text class="color-666" :nodes="ruleInfo"></rich-text>
</scroll-view>
</view>
</u-modal>
<!-- 激励视频广告 -->
<ad-rewarded-video v-if="adRewardedVideo" ref="adRewardedVideo" adpid="1531580352" :loadnext="true"
v-slot:default="{ loading, error }" :url-callback="urlCallback" @load="onadload" @close="onadclose"
@error="onaderror">
<view class="ad-error" v-if="error">{{ error }}</view>
</ad-rewarded-video>
</view>
</template>
@@ -115,21 +123,21 @@ export default {
tixianList: [{
money: '10'
},
{
money: '20'
},
{
money: '50'
},
{
money: '100'
},
{
money: '200'
},
{
money: '500'
}
{
money: '20'
},
{
money: '50'
},
{
money: '100'
},
{
money: '200'
},
{
money: '500'
}
],
value: 0,
min: '',
@@ -141,6 +149,27 @@ export default {
page: 1,
limit: 10,
totalCount: 0,
isWithdraw: false,
urlCallback: null,
adRewardedVideo: true,
ruleShow: true,
ruleInfo: `
用户在平台中对奖励提现的,适用以下规则:
<br/>
<br/>
1用户的收益达到最低提现金额要求后可以申请提现。每日发起前10笔提现为自动到账超出则需第二个工作日后到账。
<br/>
2用户需要通过支付宝提现需按照要求绑定支付宝账号并填写提现金额或其他提现所需信息请确保提供的信息准确无误以免提现失败。
<br/>
3如果用户发现显示「提现失败」需确认当前填写或绑定的支付宝账号或银行卡账号是否正确以及支付宝账号是否可用。如果用户发现显示「提现成功」但没到账
<br/>
(1)如果用户有多个支付宝账号,请检查用户是否提现到了其他支付宝账号。
<br/>
(2)高峰期提现人数多会导致网络拥堵显示提现成功之后72小时内属于正常现象请耐心等候。
<br/>
4每日23:00至次日11:00为系统维护时间活动的对应奖励可能延迟到账。提现通常会在72小时内到账如遇双休日、节假日提现到账时间可能会延长。活动高峰期间由于网络拥堵用户可能存在短时间内无法提现的情况。平台将尽最大努力及时恢复提现功能但无需因此承担任何责任。
<br/>
`,
};
},
onLoad() {
@@ -153,6 +182,7 @@ export default {
this.aliZhiFuBao = uni.getStorageSync('zhiFuBao')
this.aliZhiFuBaoName = uni.getStorageSync('zhiFuBaoName')
this.ymfgetcashMoney()
this.getCanCash()
},
onReachBottom: function () {
@@ -170,6 +200,61 @@ export default {
// this.list();
},
methods: {
onNavigationBarButtonTap() {
this.showRule()
},
showRule() {
this.ruleShow = true
},
/**
* 广告播放成功回调
* @param {Object} e
*/
async onadclose(e) {
const detail = e.detail
if (detail && detail.isEnded) {
// 正常播放结束
let res = await this.$Request.getT('app/ad/state', {
extraKey: this.urlCallback.extra
})
this.getCanCash()
} else {
// 播放中途退出
}
},
/**
* 广告加载失败回调
* @param {Object} e
*/
onaderror(e) {
if (this.adRewardedVideoloadNum >= 3) {
this.adRewardedVideo = false;
return
}
this.adRewardedVideoloadNum++
setTimeout(() => {
this.$refs.adRewardedVideo.load();
}, 1000); // 10
console.log("广告加载失败")
},
/**
* 广告数据加载成功回调
* @param {Object} e
*/
onadload(e) {
this.adRewardedVideo = true;
console.log('广告数据加载成功');
},
getCanCash() {
this.$Request.getT('/app/cash/canCash').then(res => {
if (res.code == 0) {
this.isWithdraw = res.data;
} else {
this.isWithdraw = false;
}
})
},
ymfmoneyInput(e) {
let num = e.detail.value.match(/^\d*(\.?\d{0,2})/g)[0] || null;
this.$nextTick(() => {
@@ -287,6 +372,16 @@ export default {
setTimeout(function () {
that.ymfgetcashMoney()
}, 1500)
} else if (res.code == 9991) {
uni.showToast({
title: res.msg,
icon: 'none'
})
setTimeout(function () {
uni.navigateTo({
url: '/me/yaoqing/zhifubao-tixain'
});
}, 1500)
} else {
uni.showToast({
@@ -301,7 +396,22 @@ export default {
ymfcheckMobile(money) {
return RegExp(/^1[34578]\d{9}$/).test(money);
},
withdraw() {
if (!this.isWithdraw) {
this.urlCallback = {
userId: this.userId,
extra: 'cash:' + this.userId + "" + new Date().getTime(),
}
this.$refs.adRewardedVideo.show();
} else {
this.ymfgetOut()
}
},
ymfgetOut() {
let that = this;
let token = that.token
let userId = that.userId
@@ -326,7 +436,7 @@ export default {
uni.showModal({
title: "提现申请提示",
content: '请仔细确认收款人信息\n\n收款人姓名:' + that.aliZhiFuBaoName + '\n\n提现金额:' + that
.money + '元\n\n收款人账号' + that.aliZhiFuBao + '',
.money + '元\n\n收款人账号' + that.aliZhiFuBao + '',
// content: '请仔细确认收款人信息\n\n收款人姓名:' + that.aliZhiFuBaoName + '\n\n提现金额:' + that
// .money + '元\n\n提现手续费' + shouxufei +
// '\n\n收款人账号' + that.aliZhiFuBao + '',
@@ -342,8 +452,8 @@ export default {
uni.showModal({
title: "提现申请提示",
content: '请仔细确认收款人信息\n\n收款人姓名:' + that.aliZhiFuBaoName + '\n\n提现金额:' + that
.money + '元\n\n收款人账号' + that.aliZhiFuBao +
'',
.money + '元\n\n收款人账号' + that.aliZhiFuBao +
'',
success: (e) => {
if (e.confirm) {
// that.money = money
@@ -367,8 +477,8 @@ export default {
});
}
} else {
console.log(that.aliZhiFuBao,that.aliZhiFuBaoName,'tixian');
this.ymfgoaliZhiFuBao()
console.log(that.aliZhiFuBao, that.aliZhiFuBaoName, 'tixian');
this.ymfgoaliZhiFuBao()
}
} else {
uni.navigateTo({
@@ -389,7 +499,7 @@ export default {
uni.showModal({
title: '提现申请提示',
content: '请仔细确认收款人信息\n\n收款人姓名:' + that.aliZhiFuBaoName + '\n\n提现金额:' + money +
'元\n\n收款人账号' + that.aliZhiFuBao + '',
'元\n\n收款人账号' + that.aliZhiFuBao + '',
// content: '请仔细确认收款人信息\n\n收款人姓名:' + that.aliZhiFuBaoName + '\n\n提现金额:' + money +
// '元\n\n提现手续费' + shouxufei +
// '\n\n收款人账号' + that.aliZhiFuBao + '',
@@ -409,8 +519,8 @@ export default {
uni.showModal({
title: '提现申请提示',
content: '请仔细确认收款人信息\n\n收款人姓名:' + that.aliZhiFuBaoName + '\n\n提现金额:' + money +
'元\n\n收款人账号' + that.aliZhiFuBao +
'',
'元\n\n收款人账号' + that.aliZhiFuBao +
'',
success: e => {
if (e.confirm) {
this.money = money
@@ -452,21 +562,41 @@ export default {
<style lang="less">
// @import '../../static/css/index.css';
.top-bg{
background-color: #ff7581;height: 400upx;border-bottom-right-radius: 40upx;border-bottom-left-radius: 40upx;
.top-bg {
background-color: #ff7581;
height: 400upx;
border-bottom-right-radius: 40upx;
border-bottom-left-radius: 40upx;
}
.class1{
font-size: 32upx;color: #FFFFFF;padding-top: 100upx;
.class1 {
font-size: 32upx;
color: #FFFFFF;
padding-top: 100upx;
}
.class2{
font-size: 40upx;color: #FFFFFF;padding-top: 20upx;
.class2 {
font-size: 40upx;
color: #FFFFFF;
padding-top: 20upx;
}
.class3{
width: 90%;height: max-content;margin-left: 40upx;background-color: #FFFFFF;box-shadow: rgba(183, 183, 183, 0.3) 0px 1px 10px;margin-top: 50upx;border-radius: 20upx;
.class3 {
width: 90%;
height: max-content;
margin-left: 40upx;
background-color: #FFFFFF;
box-shadow: rgba(183, 183, 183, 0.3) 0px 1px 10px;
margin-top: 50upx;
border-radius: 20upx;
}
.class4{
display: flex;flex-direction: row;padding: 20upx;
.class4 {
display: flex;
flex-direction: row;
padding: 20upx;
}
.view2-view-text {
font-size: 14px;
color: #000000;

View File

@@ -4,8 +4,9 @@
<list-cell title="支付宝账号" type="text" placeholder="请输入要绑定的支付宝手机号" v-model="zhiFuBao"></list-cell>
<list-cell title="身份证号码" type="text" placeholder="请输入要绑定身份证号码" v-model="certNum"></list-cell>
<button :class="zhiFuBao&&zhiFuBaoName?'confirm-btn':'ymf-confirm-btn1'" @click="ymftoLogin"
<button :class="zhiFuBao && zhiFuBaoName ? 'confirm-btn' : 'ymf-confirm-btn1'" @click="ymftoLogin"
:disabled="logining">绑定账户</button>
<view style="padding: 32upx 64upx;font-size: 24upx;color: #999999;">提示请正确填写收款人的支付宝账户和真实的收款人姓名否则将无法正常收款</view>
@@ -13,166 +14,177 @@
</template>
<script>
import listCell from '@/me/components/com-input';
export default {
components: {
listCell
},
data() {
return {
zhiFuBao: '',
zhiFuBaoName: '',
logining: false
}
},
onLoad() {
let userId = uni.getStorageSync('userId');
import listCell from '@/me/components/com-input';
export default {
components: {
listCell
},
data() {
return {
zhiFuBao: '',
zhiFuBaoName: '',
logining: false,
certNum: '',
if (userId) {
this.$u.api.userinfo().then(res => {
if (res.code === 0) {
if (res.data.zhiFuBao) {
this.zhiFuBao = res.data.zhiFuBao;
}
if (res.data.zhiFuBaoName) {
this.zhiFuBaoName = res.data.zhiFuBaoName;
}
// console.log(this.zhiFuBao )
// console.log(this.zhiFuBaoName )
}
},
onLoad() {
let userId = uni.getStorageSync('userId');
this.certNum = uni.getStorageSync('certNum')
if (userId) {
this.$u.api.userinfo().then(res => {
if (res.code === 0) {
if (res.data.zhiFuBao) {
this.zhiFuBao = res.data.zhiFuBao;
}
if (res.data.zhiFuBaoName) {
this.zhiFuBaoName = res.data.zhiFuBaoName;
}
if (res.data.certNo) {
this.certNum = res.data.certNo;
}
})
}
},
methods: {
inputChange(e) {
const key = e.currentTarget.dataset.key;
this[key] = e.detail.value;
},
ymfnavBack() {
uni.navigateBack();
},
ymftoLogin() {
// console.log(this.zhiFuBao )
// console.log(this.zhiFuBaoName )
// const {
// zhiFuBao,
// zhiFuBaoName
// } = this;
let zhiFuBao = this.zhiFuBao
let zhiFuBaoName = this.zhiFuBaoName
console.log(zhiFuBao)
console.log(zhiFuBaoName)
if (!zhiFuBao) {
uni.showToast({
title: '请设置收款人姓名',
icon: 'none'
})
} else if (!zhiFuBaoName) {
uni.showToast({
title: '请设置收款人支付宝账号',
icon: 'none'
})
} else {
this.$u.post('app/user/updateUser?zhiFuBao=' + zhiFuBao + '&zhiFuBaoName=' + zhiFuBaoName).then(
res => {
console.log(res);
if(res.code===0){
uni.setStorageSync('zhiFuBao', zhiFuBao)
uni.setStorageSync('zhiFuBaoName', zhiFuBaoName)
uni.showToast({
title: '修改成功',
icon: 'none',
complete() {
setTimeout(function() {
uni.navigateBack();
}, 1000)
}
})
}else{
uni.showToast({
title:res.msg||'修改失败',
icon:'none'
})
}
});
}
// if (!zhifubao) {
// this.$queue.showToast("请设置收款人支付宝账号");
// } else if (!zhifubaoName) {
// this.$queue.showToast("请设置收款人姓名");
// } else {
// this.$queue.showLoading("修改中...");
// this.$Request.postT("/cash/userinfo?userId=" + userId + "&zhifubao=" + zhifubao + "&zhifubaoName=" + zhifubaoName).then(
// res => {
// if (res.status === 0) {
// if (res.data.zhifubao) {
// this.zhifubao = res.data.zhifubao;
// }
// if (res.data.zhifubaoName) {
// this.zhifubaoName = res.data.zhifubaoName;
// }
// this.ymfnavBack();
// } else {
// // this.$queue.showToast(res.msg)
// }
// uni.hideLoading();
// });
// }
},
})
}
},
methods: {
inputChange(e) {
const key = e.currentTarget.dataset.key;
this[key] = e.detail.value;
},
ymfnavBack() {
uni.navigateBack();
},
}
ymftoLogin() {
// console.log(this.zhiFuBao )
// console.log(this.zhiFuBaoName )
// const {
// zhiFuBao,
// zhiFuBaoName
// } = this;
let zhiFuBao = this.zhiFuBao
let zhiFuBaoName = this.zhiFuBaoName
let certNum = this.certNum
if (!zhiFuBao) {
uni.showToast({
title: '请设置收款人姓名',
icon: 'none'
})
} else if (!certNum) {
uni.showToast({
title: '请设置收款人身份证账号',
icon: 'none'
})
} else if (!zhiFuBaoName) {
uni.showToast({
title: '请设置收款人支付宝账号',
icon: 'none'
})
} else {
this.$u.post('app/user/updateUser?zhiFuBao=' + zhiFuBao + '&certName=' + zhiFuBaoName + '&certNum=' + certNum).then(
res => {
console.log(res);
if (res.code === 0) {
uni.setStorageSync('zhiFuBao', zhiFuBao)
uni.setStorageSync('zhiFuBaoName', zhiFuBaoName)
uni.setStorageSync('certNum', certNum)
uni.showToast({
title: '修改成功',
icon: 'none',
complete() {
setTimeout(function () {
uni.navigateBack();
}, 1000)
}
})
} else {
uni.showToast({
title: res.msg || '修改失败',
icon: 'none'
})
}
});
}
// if (!zhifubao) {
// this.$queue.showToast("请设置收款人支付宝账号");
// } else if (!zhifubaoName) {
// this.$queue.showToast("请设置收款人姓名");
// } else {
// this.$queue.showLoading("修改中...");
// this.$Request.postT("/cash/userinfo?userId=" + userId + "&zhifubao=" + zhifubao + "&zhifubaoName=" + zhifubaoName).then(
// res => {
// if (res.status === 0) {
// if (res.data.zhifubao) {
// this.zhifubao = res.data.zhifubao;
// }
// if (res.data.zhifubaoName) {
// this.zhifubaoName = res.data.zhifubaoName;
// }
// this.ymfnavBack();
// } else {
// // this.$queue.showToast(res.msg)
// }
// uni.hideLoading();
// });
// }
},
},
}
</script>
<style lang='scss'>
page {
background: #FFFFFF;
page {
background: #FFFFFF;
}
.page {
padding-top: 32upx;
position: relative;
width: 100%;
height: 100%;
overflow: hidden;
background: #ffffff;
}
.ymf-confirm-btn1 {
width: 300px;
height: 42px;
line-height: 42px;
border-radius: 30px;
margin-top: 70upx;
/* background: whitesmoke; */
background: #ff7581;
color: #FFFFFF;
font-size: 32rpx;
&:after {
border-radius: 60px;
}
}
.page {
padding-top: 32upx;
position: relative;
width: 100%;
height: 100%;
overflow: hidden;
background: #ffffff;
}
.ymf-confirm-btn1 {
width: 300px;
height: 42px;
line-height: 42px;
border-radius: 30px;
margin-top: 70upx;
/* background: whitesmoke; */
background: #ff7581;
color: #FFFFFF;
font-size: 32rpx;
&:after {
border-radius: 60px;
}
}
.confirm-btn {
width: 300px;
height: 42px;
line-height: 42px;
border-radius: 30px;
margin-top: 70upx;
background: #ff7581;
color: #ffffff;
font-size: 32rpx;
&:after {
border-radius: 60px;
}
.confirm-btn {
width: 300px;
height: 42px;
line-height: 42px;
border-radius: 30px;
margin-top: 70upx;
background: #ff7581;
color: #ffffff;
font-size: 32rpx;
&:after {
border-radius: 60px;
}
}
</style>