修改问题
|
|
@ -2,7 +2,7 @@
|
||||||
"version" : "1.0",
|
"version" : "1.0",
|
||||||
"configurations" : [
|
"configurations" : [
|
||||||
{
|
{
|
||||||
"playground" : "custom",
|
"playground" : "standard",
|
||||||
"type" : "uni-app:app-android"
|
"type" : "uni-app:app-android"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,8 @@ export const queryUserMoneyDetails = (data) => {
|
||||||
*/
|
*/
|
||||||
export const updateUser = (data) => {
|
export const updateUser = (data) => {
|
||||||
return http.request({
|
return http.request({
|
||||||
url: '/user/updateUser',
|
url: '/user/bindAlipay',
|
||||||
|
method: 'POST',
|
||||||
params: data
|
params: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -157,9 +157,12 @@
|
||||||
</view>
|
</view>
|
||||||
<up-icon name="close" :size="16" color="#333" bold @click="popupClose('pay')"></up-icon>
|
<up-icon name="close" :size="16" color="#333" bold @click="popupClose('pay')"></up-icon>
|
||||||
</view>
|
</view>
|
||||||
<view class="u-m-t-30">
|
<view class="u-m-t-30">
|
||||||
<text class=" color-999 u-font-24">{{paytips}} </text>
|
<text class=" color-999 u-font-24">{{paytips}} </text>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="u-m-t-30">
|
||||||
|
<text class=" color-999 u-font-24">注:抽奖机会仅当日可用,次日作废 </text>
|
||||||
|
</view>
|
||||||
<view class="colo-333 pay-list font-bold u-font-28 u-m-t-20">
|
<view class="colo-333 pay-list font-bold u-font-28 u-m-t-20">
|
||||||
<view class="pay-list-item" v-if="info&&info.price" @click="payBtnClick('money','all')">
|
<view class="pay-list-item" v-if="info&&info.price" @click="payBtnClick('money','all')">
|
||||||
<image class="hot" src="@/static/images/hot.png" mode=""></image>
|
<image class="hot" src="@/static/images/hot.png" mode=""></image>
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
<swiper :autoplay="true" :vertical="true" :interval="4000" :circular="true" :indicator-dots="false"
|
<swiper :autoplay="true" :vertical="true" :interval="4000" :circular="true" :indicator-dots="false"
|
||||||
class="swiperstyle">
|
class="swiperstyle">
|
||||||
<swiper-item v-for="(item, index) in datas.noticeList" :key="index">
|
<swiper-item v-for="(item, index) in datas.noticeList" :key="index">
|
||||||
<view style="height: 80rpx;line-height: 80rpx;">{{ item.title }}</view>
|
<view style="height: 80rpx;line-height: 80rpx;font-size: 14px;">{{ item.title }}</view>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
</swiper>
|
</swiper>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -297,12 +297,12 @@
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.indexStyle {
|
.indexStyle {
|
||||||
height: 555rpx;
|
height: 350rpx;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
>image {
|
>image {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 555rpx;
|
height: 100%;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -334,11 +334,11 @@
|
||||||
|
|
||||||
.gongao {
|
.gongao {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 75rpx;
|
bottom: 85rpx;
|
||||||
left: 70rpx;
|
left: 70rpx;
|
||||||
border-radius: 21rpx 21rpx 21rpx 21rpx;
|
border-radius: 12rpx 12rpx 12rpx 12rpx;
|
||||||
width: 611rpx;
|
width: 611rpx;
|
||||||
height: 78rpx;
|
height: 60rpx;
|
||||||
background-color: rgba(255, 255, 255, .65);
|
background-color: rgba(255, 255, 255, .65);
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
@ -348,10 +348,10 @@
|
||||||
.gongaoicon {
|
.gongaoicon {
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
width: 98rpx;
|
width: 98rpx;
|
||||||
height: 50rpx;
|
height: 40rpx;
|
||||||
line-height: 50rpx;
|
line-height: 40rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 25rpx;
|
font-size: 20rpx;
|
||||||
background-image: url('../../static/index/gonggaobg.png');
|
background-image: url('../../static/index/gonggaobg.png');
|
||||||
background-size: 98rpx 50rpx;
|
background-size: 98rpx 50rpx;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -79,18 +79,22 @@
|
||||||
}
|
}
|
||||||
if (datas.tabIndex == 1) {
|
if (datas.tabIndex == 1) {
|
||||||
if (datas.page == 1) {
|
if (datas.page == 1) {
|
||||||
|
datas.list = []
|
||||||
datas.list = res.records;
|
datas.list = res.records;
|
||||||
} else {
|
} else {
|
||||||
if (res.records.length) {
|
if (res.records.length) {
|
||||||
datas.list.push(...datas.list, res.records)
|
let arr = datas.list.concat(res.records)
|
||||||
|
datas.list = arr
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (datas.page == 1) {
|
if (datas.page == 1) {
|
||||||
|
datas.list = []
|
||||||
datas.list = res.list;
|
datas.list = res.list;
|
||||||
} else {
|
} else {
|
||||||
if (res.records.length) {
|
if (res.records.length) {
|
||||||
datas.list.push(...datas.list, res.list)
|
let arr = datas.list.concat(res.records)
|
||||||
|
datas.list = arr
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// datas.total = res.page.totalCount;
|
// datas.total = res.page.totalCount;
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,8 @@
|
||||||
<view class="t-r-title t-flex-row">活动规则</view>
|
<view class="t-r-title t-flex-row">活动规则</view>
|
||||||
<view class="t-rule">
|
<view class="t-rule">
|
||||||
<text>1.抽奖细则:每日前{{ freeNumDay }}次付款均可获得抽奖机会</text>
|
<text>1.抽奖细则:每日前{{ freeNumDay }}次付款均可获得抽奖机会</text>
|
||||||
<text>2.奖励说明:红包奖励将自动发放到红包余额,已绑定银行卡账号将会自动发起提现。其余奖品则需联系客服领取。</text>
|
<text>2.抽奖机会仅当日可用,次日作废</text>
|
||||||
|
<text>3.奖励说明:红包奖励将自动发放到红包余额,已绑定银行卡账号将会自动发起提现。其余奖品则需联系客服领取。</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
|
||||||
|
|
@ -72,8 +72,8 @@
|
||||||
<view class="card-wrap">
|
<view class="card-wrap">
|
||||||
<view class="menu-list">
|
<view class="menu-list">
|
||||||
<view class="item" @click="toTask">
|
<view class="item" @click="toTask">
|
||||||
<image class="icon" src="/static/me/menu_icon1.png" mode="aspectFit"></image>
|
<image class="icon" src="/static/me/Frame.png" mode="aspectFit"></image>
|
||||||
<view class="name">任务中心</view>
|
<view class="name">邀请好友</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item" @click="linkTo('/pages/me/setting')">
|
<view class="item" @click="linkTo('/pages/me/setting')">
|
||||||
<image class="icon" src="/static/me/menu_icon2.png" mode="aspectFit"></image>
|
<image class="icon" src="/static/me/menu_icon2.png" mode="aspectFit"></image>
|
||||||
|
|
@ -164,9 +164,7 @@ async function selectUserMoneyAjax() {
|
||||||
|
|
||||||
// 跳转任务中心
|
// 跳转任务中心
|
||||||
function toTask() {
|
function toTask() {
|
||||||
uni.switchTab({
|
linkTo('/pages/share/index');
|
||||||
url: '/pages/task/index'
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
onPullDownRefresh(async () => {
|
onPullDownRefresh(async () => {
|
||||||
|
|
|
||||||
|
|
@ -52,11 +52,42 @@
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
data.logining = true
|
data.logining = true
|
||||||
|
|
||||||
|
|
||||||
|
// 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'
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
// });
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
let res = await updateUser({
|
let res = await updateUser({
|
||||||
zhiFuBao: data.zhiFuBao,
|
zhiFuBao: data.zhiFuBao,
|
||||||
certName: data.zhiFuBaoName,
|
certName: data.zhiFuBaoName,
|
||||||
})
|
})
|
||||||
if( res) {
|
if(res) {
|
||||||
data.logining = false
|
data.logining = false
|
||||||
let userInfo = uni.getStorageSync('userInfo')
|
let userInfo = uni.getStorageSync('userInfo')
|
||||||
userInfo.zhiFuBao = data.zhiFuBao
|
userInfo.zhiFuBao = data.zhiFuBao
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,14 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="container">
|
<view class="container">
|
||||||
<up-navbar title="申请提现"
|
<up-navbar title="申请提现" :autoBack="true" bgColor="rgb(255, 117, 129)" leftIconColor="#FFF"
|
||||||
:autoBack="true"
|
:titleStyle="{color:'#FFF'}">
|
||||||
bgColor="rgb(255, 117, 129)"
|
<template #right>
|
||||||
leftIconColor="#FFF"
|
<view class="u-p-r-30 u-flex u-col-center" style="color: #fff;">
|
||||||
:titleStyle ="{color:'#FFF'}" >
|
<text class="rule-btn" @click="showRule">规则</text>
|
||||||
<template #right>
|
</view>
|
||||||
<view class="u-p-r-30 u-flex u-col-center" style="color: #fff;">
|
</template>
|
||||||
<text class="rule-btn" @click="showRule">规则</text>
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
</up-navbar>
|
</up-navbar>
|
||||||
|
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<view class="title">可提现总额</view>
|
<view class="title">可提现总额</view>
|
||||||
<view class="mayMoney">¥ {{ data.mayMoney }}</view>
|
<view class="mayMoney">¥ {{ data.mayMoney }}</view>
|
||||||
|
|
@ -22,17 +19,20 @@
|
||||||
<view class="input" style="">
|
<view class="input" style="">
|
||||||
<view style="display: flex;align-items: center;">
|
<view style="display: flex;align-items: center;">
|
||||||
<view style="font-size: 40upx;color: #333333;">¥</view>
|
<view style="font-size: 40upx;color: #333333;">¥</view>
|
||||||
<input type="digit" v-model="data.money" placeholder="请输入金额" @input="moneyInput" style="font-size: 32rpx;color: #333333;text-align: left;margin-left: 10rpx;width: 80%;" />
|
<input type="digit" v-model="data.money" placeholder="请输入金额" @input="moneyInput"
|
||||||
|
style="font-size: 32rpx;color: #333333;text-align: left;margin-left: 10rpx;width: 80%;" />
|
||||||
</view>
|
</view>
|
||||||
<view class="allbtn" @click="setAllMoney">
|
<view class="allbtn" @click="setAllMoney">
|
||||||
全部
|
全部
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
<view class="witBtn" @click="goWithdraw"> {{data.isWithdraw?'立即提现':'观看广告提现'}} </view>
|
<view class="witBtn" @click="goWithdraw"> {{data.isWithdraw?'立即提现':'观看广告提现'}} </view>
|
||||||
|
<view style="color: #666;" @click="WithdrawalAlipay">
|
||||||
|
提现到支付宝
|
||||||
|
</view>
|
||||||
<view class="tab" style="">
|
<view class="tab" style="">
|
||||||
<view @click="linkTo('/pages/me/withdraw/realName')">实名认证</view>
|
<view @click="linkTo('/pages/me/withdraw/realName')">实名认证</view>
|
||||||
<!-- <view @click="linkTo('/pages/me/withdraw/alipay')">提现账号</view> -->
|
<!-- <view @click="linkTo('/pages/me/withdraw/alipay')">提现账号</view> -->
|
||||||
|
|
@ -72,34 +72,61 @@
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
|
||||||
<up-modal :show="data.ruleShow" confirm-text="知道了" title="规则说明" :title="data.rule_title" :title-style="{fontWeight:'700'}" @confirm="ruleConfirm" confirm-color="rgb(255, 117, 129)">
|
<up-modal :show="data.ruleShow" confirm-text="知道了" title="规则说明" :title="data.rule_title"
|
||||||
|
:title-style="{fontWeight:'700'}" @confirm="ruleConfirm" confirm-color="rgb(255, 117, 129)">
|
||||||
<view class="u-p-30 u-text-left">
|
<view class="u-p-30 u-text-left">
|
||||||
<scroll-view scroll-y="true" style="max-height: 50vh;" >
|
<scroll-view scroll-y="true" style="max-height: 50vh;">
|
||||||
<rich-text style="text-align: justify;font-size: 18px;color: #666;" :nodes="data.rule_content"></rich-text>
|
<rich-text style="text-align: justify;font-size: 18px;color: #666;"
|
||||||
|
:nodes="data.rule_content"></rich-text>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
</up-modal>
|
</up-modal>
|
||||||
|
|
||||||
<view style="width: 0;height: 0;overflow: hidden;">
|
<view style="width: 0;height: 0;overflow: hidden;">
|
||||||
<!-- 激励视频广告 -->
|
<!-- 激励视频广告 -->
|
||||||
<ad-rewarded-video ref="adRewardedw" :adpid="data.adpid" :loadnext="true"
|
<ad-rewarded-video ref="adRewardedw" :adpid="data.adpid" :loadnext="true" :url-callback="data.urlCallback"
|
||||||
:url-callback="data.urlCallback" @load="onadload" @close="onadclose" @error="onaderror">
|
@load="onadload" @close="onadclose" @error="onaderror">
|
||||||
</ad-rewarded-video>
|
</ad-rewarded-video>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { reactive, nextTick, ref } from 'vue';
|
import {
|
||||||
import { onReady,onLoad,onShow,onLaunch,onPullDownRefresh, onReachBottom } from '@dcloudio/uni-app'
|
reactive,
|
||||||
import { selectUserMoney, selectPayDetails, canCash, state, withdraw } from '@/api/me/withdraw.js';
|
nextTick,
|
||||||
import { selectUserById } from '@/api/user/user.js';
|
ref
|
||||||
import { announcement } from '@/api/index/index.js';
|
} from 'vue';
|
||||||
import { commonType } from '@/api/init.js';
|
import {
|
||||||
import { linkTo } from '@/utils/app.js';
|
onReady,
|
||||||
|
onLoad,
|
||||||
|
onShow,
|
||||||
|
onLaunch,
|
||||||
|
onPullDownRefresh,
|
||||||
|
onReachBottom
|
||||||
|
} from '@dcloudio/uni-app'
|
||||||
|
import {
|
||||||
|
selectUserMoney,
|
||||||
|
selectPayDetails,
|
||||||
|
canCash,
|
||||||
|
state,
|
||||||
|
withdraw
|
||||||
|
} from '@/api/me/withdraw.js';
|
||||||
|
import {
|
||||||
|
selectUserById
|
||||||
|
} from '@/api/user/user.js';
|
||||||
|
import {
|
||||||
|
announcement
|
||||||
|
} from '@/api/index/index.js';
|
||||||
|
import {
|
||||||
|
commonType
|
||||||
|
} from '@/api/init.js';
|
||||||
|
import {
|
||||||
|
linkTo
|
||||||
|
} from '@/utils/app.js';
|
||||||
|
|
||||||
let data = reactive({
|
let data = reactive({
|
||||||
ruleShow: false,
|
ruleShow: false,
|
||||||
rule_title: "",
|
rule_title: "",
|
||||||
|
|
@ -121,22 +148,24 @@
|
||||||
ruleIndex: 0,
|
ruleIndex: 0,
|
||||||
ruleList: []
|
ruleList: []
|
||||||
})
|
})
|
||||||
|
|
||||||
const adRewardedw = ref(null);
|
const adRewardedw = ref(null);
|
||||||
onLoad(() => {
|
onLoad(() => {
|
||||||
// if ( uni.getSystemInfoSync().platform == 'android' ) {
|
// if ( uni.getSystemInfoSync().platform == 'android' ) {
|
||||||
// data.adpid = 1531580352
|
// data.adpid = 1531580352
|
||||||
// }
|
// }
|
||||||
// if ( uni.getSystemInfoSync().platform == 'ios' ) {
|
// if ( uni.getSystemInfoSync().platform == 'ios' ) {
|
||||||
data.adpid = 1373604770
|
data.adpid = 1373604770
|
||||||
// }
|
// }
|
||||||
getExtractFei();
|
getExtractFei();
|
||||||
getMoneyDetail();
|
getMoneyDetail();
|
||||||
getCanCash()
|
getCanCash()
|
||||||
announcement({type: 1}).then(res=>{
|
announcement({
|
||||||
|
type: 1
|
||||||
|
}).then(res => {
|
||||||
data.ruleList = res
|
data.ruleList = res
|
||||||
ruleInit()
|
ruleInit()
|
||||||
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
onShow(() => {
|
onShow(() => {
|
||||||
|
|
@ -144,13 +173,13 @@
|
||||||
getUserInfo();
|
getUserInfo();
|
||||||
})
|
})
|
||||||
onReady(() => {
|
onReady(() => {
|
||||||
nextTick(()=>{
|
nextTick(() => {
|
||||||
data.adRewardedVideoloadNum = 0
|
data.adRewardedVideoloadNum = 0
|
||||||
adRewardedw.value.load();
|
adRewardedw.value.load();
|
||||||
data.ruleShow = true
|
data.ruleShow = true
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
onReachBottom(() => {
|
onReachBottom(() => {
|
||||||
if (data.page * data.limit < data.totalCount) {
|
if (data.page * data.limit < data.totalCount) {
|
||||||
data.page = data.page + 1;
|
data.page = data.page + 1;
|
||||||
|
|
@ -162,7 +191,8 @@
|
||||||
data.list = []
|
data.list = []
|
||||||
getMoneyDetail();
|
getMoneyDetail();
|
||||||
})
|
})
|
||||||
function ruleInit(){
|
|
||||||
|
function ruleInit() {
|
||||||
data.rule_title = data.ruleList[data.ruleIndex].title
|
data.rule_title = data.ruleList[data.ruleIndex].title
|
||||||
data.rule_content = data.ruleList[data.ruleIndex].content
|
data.rule_content = data.ruleList[data.ruleIndex].content
|
||||||
}
|
}
|
||||||
|
|
@ -170,7 +200,7 @@
|
||||||
* 规则弹窗打开
|
* 规则弹窗打开
|
||||||
*/
|
*/
|
||||||
function showRule() {
|
function showRule() {
|
||||||
if( data.ruleList.length <= 0) {
|
if (data.ruleList.length <= 0) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: "暂未配置规则",
|
title: "暂未配置规则",
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
|
|
@ -186,21 +216,57 @@
|
||||||
function ruleConfirm() {
|
function ruleConfirm() {
|
||||||
data.ruleShow = false
|
data.ruleShow = false
|
||||||
data.ruleIndex++
|
data.ruleIndex++
|
||||||
if( data.ruleIndex >= data.ruleList.length) {
|
if (data.ruleIndex >= data.ruleList.length) {
|
||||||
data.ruleIndex = 0
|
data.ruleIndex = 0
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
setTimeout(res=>{
|
setTimeout(res => {
|
||||||
ruleInit()
|
ruleInit()
|
||||||
data.ruleShow = true
|
data.ruleShow = true
|
||||||
},300)
|
}, 300)
|
||||||
}
|
}
|
||||||
|
|
||||||
function getUserInfo() {
|
function getUserInfo() {
|
||||||
selectUserById().then(res=>{
|
selectUserById().then(res => {
|
||||||
data.userInfo = res;
|
data.userInfo = res;
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function WithdrawalAlipay() {
|
||||||
|
if (data.userInfo.zhiFuBao) {
|
||||||
|
if (data.money) {
|
||||||
|
withdraw({
|
||||||
|
amount: data.money,
|
||||||
|
isAlipay: 0
|
||||||
|
}).then(res => {
|
||||||
|
data.money = ''
|
||||||
|
uni.setStorageSync('adRewardedNum', 0)
|
||||||
|
setTimeout(function() {
|
||||||
|
getcashMoney()
|
||||||
|
}, 1500)
|
||||||
|
uni.showToast({
|
||||||
|
title: res.msg,
|
||||||
|
icon: 'none'
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}else{
|
||||||
|
uni.showToast({
|
||||||
|
title: "请输入金额",
|
||||||
|
icon: 'none',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
uni.showToast({
|
||||||
|
title: "请绑定支付宝",
|
||||||
|
icon: 'none',
|
||||||
|
})
|
||||||
|
setTimeout(() => {
|
||||||
|
// 未绑定信息
|
||||||
|
linkTo('/pages/me/withdraw/alipay')
|
||||||
|
}, 1500)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function back() {
|
function back() {
|
||||||
uni.navigateBack()
|
uni.navigateBack()
|
||||||
}
|
}
|
||||||
|
|
@ -211,14 +277,14 @@
|
||||||
canCash().then(res => {
|
canCash().then(res => {
|
||||||
data.isWithdraw = res;
|
data.isWithdraw = res;
|
||||||
console.log(res)
|
console.log(res)
|
||||||
if( uni.getStorageSync('adRewardedNum') >= 3 ){
|
if (uni.getStorageSync('adRewardedNum') >= 3) {
|
||||||
data.isWithdraw = true;
|
data.isWithdraw = true;
|
||||||
// uni.setStorageSync('adRewardedNum',0)
|
// uni.setStorageSync('adRewardedNum',0)
|
||||||
} else {
|
} else {
|
||||||
uni.setStorageSync('adRewardedNum',((uni.getStorageSync('adRewardedNum')||0)+1))
|
uni.setStorageSync('adRewardedNum', ((uni.getStorageSync('adRewardedNum') || 0) + 1))
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 广告数据加载成功回调
|
* 广告数据加载成功回调
|
||||||
|
|
@ -226,25 +292,25 @@
|
||||||
*/
|
*/
|
||||||
function onadload(e) {
|
function onadload(e) {
|
||||||
data.adRewardedShow = true;
|
data.adRewardedShow = true;
|
||||||
uni.setStorageSync('adRewardedNum',0)
|
uni.setStorageSync('adRewardedNum', 0)
|
||||||
console.log('广告数据加载成功');
|
console.log('广告数据加载成功');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 广告加载失败回调
|
* 广告加载失败回调
|
||||||
* @param {Object} e
|
* @param {Object} e
|
||||||
*/
|
*/
|
||||||
function onaderror(e) {
|
function onaderror(e) {
|
||||||
if ( data.adRewardedVideoloadNum >=3 ) {
|
if (data.adRewardedVideoloadNum >= 3) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
data.adRewardedVideoloadNum++
|
data.adRewardedVideoloadNum++
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
adRewardedw.value.load();
|
adRewardedw.value.load();
|
||||||
}, 1000); // 10
|
}, 1000); // 10
|
||||||
console.log("广告加载失败",e)
|
console.log("广告加载失败", e)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 广告播放成功回调
|
* 广告播放成功回调
|
||||||
* @param {Object} e
|
* @param {Object} e
|
||||||
|
|
@ -258,24 +324,24 @@
|
||||||
extraKey: data.urlCallback.extra
|
extraKey: data.urlCallback.extra
|
||||||
})
|
})
|
||||||
console.log(res)
|
console.log(res)
|
||||||
uni.setStorageSync('adRewardedNum',0)
|
uni.setStorageSync('adRewardedNum', 0)
|
||||||
getCanCash()
|
getCanCash()
|
||||||
} else {
|
} else {
|
||||||
// 播放中途退出
|
// 播放中途退出
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function onNavigationBarButtonTap() {
|
function onNavigationBarButtonTap() {
|
||||||
console.log(1)
|
console.log(1)
|
||||||
data.ruleShow = true
|
data.ruleShow = true
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 提现触发
|
* 提现触发
|
||||||
*/
|
*/
|
||||||
function goWithdraw() {
|
function goWithdraw() {
|
||||||
if ( !data.isWithdraw ) {
|
if (!data.isWithdraw) {
|
||||||
if(!data.adRewardedShow){
|
if (!data.adRewardedShow) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
title: '广告加载失败,请稍后重试'
|
title: '广告加载失败,请稍后重试'
|
||||||
|
|
@ -284,54 +350,54 @@
|
||||||
}
|
}
|
||||||
data.urlCallback = {
|
data.urlCallback = {
|
||||||
userId: uni.getStorageSync('userInfo').userId,
|
userId: uni.getStorageSync('userInfo').userId,
|
||||||
extra: 'cash:'+uni.getStorageSync('userInfo').userId + "" + new Date().getTime(),
|
extra: 'cash:' + uni.getStorageSync('userInfo').userId + "" + new Date().getTime(),
|
||||||
}
|
}
|
||||||
adRewardedw.value.show();
|
adRewardedw.value.show();
|
||||||
} else {
|
} else {
|
||||||
getOut()
|
getOut()
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function moneyInput(e) {
|
function moneyInput(e) {
|
||||||
data.money = e.detail.value.match(/^\d*(\.?\d{0,2})/g)[0] || null;
|
data.money = e.detail.value.match(/^\d*(\.?\d{0,2})/g)[0] || null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 全部提现赋值
|
* 全部提现赋值
|
||||||
*/
|
*/
|
||||||
function setAllMoney() {
|
function setAllMoney() {
|
||||||
data.money = getMoneys(data.mayMoney)
|
data.money = getMoneys(data.mayMoney)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* 金额格式化
|
* 金额格式化
|
||||||
* money:金额
|
* money:金额
|
||||||
* 保留两位小数&不四舍五入
|
* 保留两位小数&不四舍五入
|
||||||
*/
|
*/
|
||||||
function getMoneys (money) {
|
function getMoneys(money) {
|
||||||
if (!money || isNaN(money)) return "0.00";
|
if (!money || isNaN(money)) return "0.00";
|
||||||
let num = parseFloat(money + '') + '';
|
let num = parseFloat(money + '') + '';
|
||||||
num = parseInt(money * 100 + '') / 100 + ''
|
num = parseInt(money * 100 + '') / 100 + ''
|
||||||
|
|
||||||
let reg = /(-?\d+)(\d{4})/;
|
let reg = /(-?\d+)(\d{4})/;
|
||||||
while (reg.test(num)) {
|
while (reg.test(num)) {
|
||||||
num = num.replace(reg, "$1,$2");
|
num = num.replace(reg, "$1,$2");
|
||||||
}
|
}
|
||||||
|
|
||||||
let idx = num.indexOf('.')
|
let idx = num.indexOf('.')
|
||||||
if (idx === -1) {
|
if (idx === -1) {
|
||||||
num = num + '.00'
|
num = num + '.00'
|
||||||
}
|
}
|
||||||
|
|
||||||
if (idx > 0) {
|
if (idx > 0) {
|
||||||
let num_per = num.substring(0, idx) + '.'
|
let num_per = num.substring(0, idx) + '.'
|
||||||
let num_next = num.substring(idx + 1).padEnd(2, '0')
|
let num_next = num.substring(idx + 1).padEnd(2, '0')
|
||||||
num = num_per + num_next
|
num = num_per + num_next
|
||||||
}
|
}
|
||||||
|
|
||||||
return num;
|
return num;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -351,7 +417,7 @@
|
||||||
}, 500);
|
}, 500);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取最低提现金额
|
* 获取最低提现金额
|
||||||
*/
|
*/
|
||||||
|
|
@ -362,7 +428,7 @@
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 可提现金额
|
* 可提现金额
|
||||||
*/
|
*/
|
||||||
|
|
@ -371,7 +437,7 @@
|
||||||
data.mayMoney = getMoneys(res.amount) || 0
|
data.mayMoney = getMoneys(res.amount) || 0
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 跳转
|
* 跳转
|
||||||
* @param {Object} url
|
* @param {Object} url
|
||||||
|
|
@ -381,7 +447,7 @@
|
||||||
url: url
|
url: url
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function getMoney() {
|
function getMoney() {
|
||||||
uni.showLoading({
|
uni.showLoading({
|
||||||
title: '提现中'
|
title: '提现中'
|
||||||
|
|
@ -391,7 +457,7 @@
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
console.log(res)
|
console.log(res)
|
||||||
data.money = ''
|
data.money = ''
|
||||||
uni.setStorageSync('adRewardedNum',0)
|
uni.setStorageSync('adRewardedNum', 0)
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
getcashMoney()
|
getcashMoney()
|
||||||
}, 1500)
|
}, 1500)
|
||||||
|
|
@ -399,7 +465,7 @@
|
||||||
title: res.msg,
|
title: res.msg,
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
})
|
})
|
||||||
}).catch(res =>{
|
}).catch(res => {
|
||||||
if (res.code == 9991) {
|
if (res.code == 9991) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.msg,
|
title: res.msg,
|
||||||
|
|
@ -408,14 +474,14 @@
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
linkTo('/pages/me/withdraw/alipay')
|
linkTo('/pages/me/withdraw/alipay')
|
||||||
}, 1500)
|
}, 1500)
|
||||||
}else{
|
} else {
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
function getOut() {
|
function getOut() {
|
||||||
|
|
||||||
if (!/^\d+(\.\d{1,2})?$/.test(data.money)) {
|
if (!/^\d+(\.\d{1,2})?$/.test(data.money)) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
|
|
@ -424,13 +490,16 @@
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!data.userInfo.accountNo) {
|
if (!data.userInfo.accountNo) {
|
||||||
uni.showToast({ icon: 'none', title: "请先实名认证" });
|
uni.showToast({
|
||||||
setTimeout(()=>{
|
icon: 'none',
|
||||||
|
title: "请先实名认证"
|
||||||
|
});
|
||||||
|
setTimeout(() => {
|
||||||
linkTo('/pages/me/withdraw/realName')
|
linkTo('/pages/me/withdraw/realName')
|
||||||
},1500)
|
}, 1500)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (parseFloat(data.mayMoney).toFixed(2) >= parseFloat(data.money)) {
|
if (parseFloat(data.mayMoney).toFixed(2) >= parseFloat(data.money)) {
|
||||||
if (parseFloat(data.money).toFixed(2) >= parseFloat(data.cashMoney)) {
|
if (parseFloat(data.money).toFixed(2) >= parseFloat(data.cashMoney)) {
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
|
|
@ -438,12 +507,13 @@
|
||||||
content: '每日只可提现一次',
|
content: '每日只可提现一次',
|
||||||
success: (e) => {
|
success: (e) => {
|
||||||
if (e.confirm) {
|
if (e.confirm) {
|
||||||
setTimeout(()=>{
|
setTimeout(() => {
|
||||||
uni.showModal({
|
uni.showModal({
|
||||||
title: "提现申请提示",
|
title: "提现申请提示",
|
||||||
content: '请仔细确认收款人信息\n\n收款人姓名:' + data.userInfo.certName + '\n\n提现金额:' + data
|
content: '请仔细确认收款人信息\n\n收款人姓名:' + data.userInfo.certName +
|
||||||
|
'\n\n提现金额:' + data
|
||||||
.money + '元\n\n收款人账号:' + data.userInfo.accountNo + '',
|
.money + '元\n\n收款人账号:' + data.userInfo.accountNo + '',
|
||||||
|
|
||||||
success: (e) => {
|
success: (e) => {
|
||||||
if (e.confirm) {
|
if (e.confirm) {
|
||||||
console.log(data.money)
|
console.log(data.money)
|
||||||
|
|
@ -452,12 +522,12 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},200)
|
}, 200)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
|
|
@ -471,7 +541,6 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
@ -480,9 +549,10 @@
|
||||||
background: white;
|
background: white;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
.nav{
|
|
||||||
|
.nav {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|
||||||
position: fixed;
|
position: fixed;
|
||||||
background-color: #ff7581;
|
background-color: #ff7581;
|
||||||
left: 0;
|
left: 0;
|
||||||
|
|
@ -491,46 +561,54 @@
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
padding: 100rpx 30rpx 15rpx 30rpx;
|
padding: 100rpx 30rpx 15rpx 30rpx;
|
||||||
.navTitle{
|
|
||||||
|
.navTitle {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
.ruleBtn{
|
|
||||||
|
.ruleBtn {
|
||||||
font-size: 30rpx;
|
font-size: 30rpx;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.content{
|
|
||||||
|
.content {
|
||||||
background-color: #ff7581;
|
background-color: #ff7581;
|
||||||
height: 500rpx;
|
height: 500rpx;
|
||||||
border-bottom-right-radius: 40rpx;
|
border-bottom-right-radius: 40rpx;
|
||||||
border-bottom-left-radius: 40rpx;
|
border-bottom-left-radius: 40rpx;
|
||||||
.title{
|
|
||||||
|
.title {
|
||||||
font-size: 32rpx;
|
font-size: 32rpx;
|
||||||
color: #FFFFFF;
|
color: #FFFFFF;
|
||||||
padding-top: 230rpx;
|
padding-top: 230rpx;
|
||||||
}
|
}
|
||||||
.mayMoney{
|
|
||||||
|
.mayMoney {
|
||||||
font-size: 40rpx;
|
font-size: 40rpx;
|
||||||
color: #FFFFFF;
|
color: #FFFFFF;
|
||||||
padding-top: 20rpx;
|
padding-top: 20rpx;
|
||||||
}
|
}
|
||||||
.val{
|
|
||||||
|
.val {
|
||||||
width: 90%;
|
width: 90%;
|
||||||
height: max-content
|
height: max-content;
|
||||||
;margin-left: 40rpx;
|
margin-left: 40rpx;
|
||||||
background-color: #FFFFFF;
|
background-color: #FFFFFF;
|
||||||
box-shadow: rgba(183, 183, 183, 0.3) 0px 1px 10px;
|
box-shadow: rgba(183, 183, 183, 0.3) 0px 1px 10px;
|
||||||
margin-top: 50rpx;
|
margin-top: 50rpx;
|
||||||
border-radius: 20rpx;
|
border-radius: 20rpx;
|
||||||
.input{
|
|
||||||
|
.input {
|
||||||
display: flex;
|
display: flex;
|
||||||
padding: 20rpx;
|
padding: 20rpx;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
.allbtn{
|
|
||||||
|
.allbtn {
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #333333;
|
color: #333333;
|
||||||
background: #ff7581;
|
background: #ff7581;
|
||||||
|
|
@ -540,7 +618,8 @@
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.witBtn{
|
|
||||||
|
.witBtn {
|
||||||
margin: 32rpx;
|
margin: 32rpx;
|
||||||
font-size: 36rpx;
|
font-size: 36rpx;
|
||||||
background: #ff7581;
|
background: #ff7581;
|
||||||
|
|
@ -549,36 +628,39 @@
|
||||||
height: 80rpx;
|
height: 80rpx;
|
||||||
line-height: 80rpx;
|
line-height: 80rpx;
|
||||||
}
|
}
|
||||||
.tab{
|
|
||||||
|
.tab {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
justify-content: space-around;
|
justify-content: space-around;
|
||||||
>view{
|
|
||||||
|
>view {
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
color: #666;
|
color: #666;
|
||||||
padding-bottom: 60rpx;
|
padding-bottom: 60rpx;
|
||||||
padding-top: 20rpx;
|
padding-top: 20rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.moneyList{
|
|
||||||
|
.moneyList {
|
||||||
text-align: left
|
text-align: left
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.cash-top {
|
.cash-top {
|
||||||
padding: 32upx 32upx 50upx 32upx;
|
padding: 32upx 32upx 50upx 32upx;
|
||||||
/* border-bottom: 1px solid gainsboro; */
|
/* border-bottom: 1px solid gainsboro; */
|
||||||
background: #5074FF;
|
background: #5074FF;
|
||||||
}
|
}
|
||||||
|
|
||||||
.leiji {
|
.leiji {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.rule-btn {
|
.rule-btn {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
// padding: 2rpx 10rpx;
|
// padding: 2rpx 10rpx;
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@
|
||||||
moneyType : data.moneyType,
|
moneyType : data.moneyType,
|
||||||
viewType: data.viewType,
|
viewType: data.viewType,
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
data.totalCount = res.total;
|
data.totalCount = res.totalCount;
|
||||||
if ( res.records.length > 0) {
|
if ( res.records.length > 0) {
|
||||||
data.list = [...data.list,...res.records];
|
data.list = [...data.list,...res.records];
|
||||||
}
|
}
|
||||||
|
|
@ -65,6 +65,7 @@
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
onReachBottom(() => {
|
onReachBottom(() => {
|
||||||
|
console.log(1)
|
||||||
if (data.page*data.limit < data.totalCount) {
|
if (data.page*data.limit < data.totalCount) {
|
||||||
data.page = data.page + 1;
|
data.page = data.page + 1;
|
||||||
getMoney();
|
getMoney();
|
||||||
|
|
|
||||||
|
Before Width: | Height: | Size: 258 KiB After Width: | Height: | Size: 129 KiB |
BIN
static/logo.png
|
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.2 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 19 KiB After Width: | Height: | Size: 29 KiB |