首次提交

This commit is contained in:
duan
2024-06-06 11:48:06 +08:00
parent 7d3ace3cd2
commit 3fe43d0841
270 changed files with 51481 additions and 1 deletions

View File

@@ -0,0 +1,583 @@
<template>
<view class="content">
<view class="acont_part1">
<view class="part1_bg">
<image src="../../../../static/rider/image-bg.png"></image>
</view>
<view class="part1_box">
<view class="text-right margin-top-sm margin-right-sm" @click="goDet">查看明细</view>
<view class="balance">
<view class="balance_name">保证金余额()</view>
<view class="balance_price">{{mayMoney?mayMoney:0}}</view>
</view>
<view class="part1_btn">
<view class="btn_left" @click="tuiBtn()">退保证金</view>
<view class="btn_right" @click="openPay()">缴纳保证金</view>
</view>
</view>
</view>
<view class="acont_part2">
<view class="acount_type">保证金规则</view>
<view class="acount_box" v-for="(item,index) in list" :key="item.id">
<view class="name">{{item.name}}</view>
<view class="tit">{{item.tit}}</view>
</view>
</view>
<!-- 支付方式 -->
<u-popup v-model="shows" mode="center" width="640rpx" height="640rpx" border-radius="14" :closeable="true"
close-icon="close-circle" close-icon-size="50" close-icon-color="#CCCCCC" @close="closePopup()">
<view style="width: 100%;height: 300upx;background: #FFFFFF;">
<view class="receipt_code">
<view class="code_title">请输入支付金额</view>
<u-input v-model="earnestMoney" type="text" placeholder="请输入支付金额" :border="true" />
<view class="margin-tb padding-lr radius bg-white" style="height: 220upx;">
<view class="flex align-center justify-between padding-tb-sm" v-for="(item,index) in payList"
:key='index'>
<image :src="item.image" style="width: 80upx;height: 80upx;border-radius: 50upx;"></image>
<view class="flex-sub text-xl text-bold margin-left">{{item.name}}</view>
<radio-group name="openWay" style="margin-left: 20upx;" @change='selectWay(item)'>
<label class="tui-radio">
<radio class="red" :checked="openWay === item.id ? true : false" />
</label>
</radio-group>
</view>
</view>
<view class="sure" @click="jiaoBtn">确定</view>
</view>
</view>
</u-popup>
</view>
</template>
<script>
export default {
data() {
return {
shows: false,
baozhengjin: 0,
disabled: true,
moneys: '',
list: [{
id: 1,
name: '保证金退款',
tit: '48小时内无订单记录即可申请退保证金保证金统一退款至账户余额实时到账。'
}, {
id: 2,
name: '保证金缴纳',
tit: '所有跑腿专人直送订单需缴纳保证金,没有缴纳者将无法接订单,建议您及时缴纳。'
}],
mayMoney: 0,
openWay: 1,
payList: [],
earnestMoney: ''
}
},
onLoad() {
//获取保证金
this.$Request.getT('/app/common/type/273').then(res => {
if (res.code === 0) {
this.baozhengjin = res.data.value;
}
});
// #ifdef MP-WEIXIN
this.payList = [{
id: 1,
image: '../../../../static/my/weixin.png',
name: '微信'
}]
this.openWay = 1
// #endif
// #ifdef H5
this.payList = [{
id: 2,
image: '../../../../static/my/zhifubao.png',
name: '支付宝'
}]
this.openWay = 2
// #endif
// #ifdef APP-PLUS
this.payList = [{
id: 1,
image: '../../../../static/my/weixin.png',
name: '微信'
},
{
id: 2,
image: '../../../../static/my/zhifubao.png',
name: '支付宝'
}
]
// #endif
},
onShow() {
this.taskData()
},
methods: {
openPay() {
this.$Request.getT("/app/wxPayErrRider/selectCertificationFlag").then(res => {
if (res.code == 0) {
this.shows = true
} else {
uni.showToast({
title: res.msg,
icon: 'none'
})
}
});
},
// 跳转保证金明细
goDet() {
uni.navigateTo({
url: '/pages/riderMy/myAccount/AcontMoney/Acontlist'
})
},
selectWay: function(item) {
this.openWay = item.id;
},
zhifu() {
this.shows = true
},
// 关闭底部弹出层
closePopup() {
this.shows = false
},
// 获取任务数据
taskData() {
let that = this;
let token = this.$queue.getData('token');
let userId = this.$queue.getData('userId');
if (token) {
//this.$queue.showLoading("加载中...");
//可以提现金额查询预估收入查询
this.$Request.getT("/app/userinfo/findUserInfoById").then(res => {
uni.hideLoading();
if (res.code === 0 && res.data) {
that.mayMoney = res.data.cashDeposit;
if (!res.data.cashDeposit) {
// this.earnestMoney=this.baozhengjin;
// this.disabled=true;
} else {
// this.disabled=false;
}
} else if (res.code === -102) {
this.$queue.showToast(res.msg);
this.$queue.logout();
} else {
that.mayMoney = '0';
}
});
}
},
// 缴纳
jiaoBtn() {
let that = this;
if (!that.earnestMoney) {
that.$queue.showToast('请输入支付金额');
return;
}
uni.showLoading({
title: '支付中'
});
// 微信支付
if (that.openWay == 1) {
// #ifdef APP-PLUS
uni.hideLoading();
// 微信APP支付 根据订单id获取支付信息
that.$Request.postT('/app/wxPayErrRider/wxPayCashDeposit?money=' + that.earnestMoney + '&type=1').then(
ret => {
// console.log(JSON.stringify(ret), '支付信息')
if (ret.code == 0) {
console.log(JSON.stringify(ret), '支付信息')
that.isCheckPay(ret.code, 'wxpay', JSON.stringify(ret.data));
} else {
that.shows = false
that.earnestMoney = ''
that.$queue.showToast(res.msg);
}
});
// #endif
// #ifdef H5
let ua = navigator.userAgent.toLowerCase();
console.log(ua.indexOf('micromessenger'))
if (ua.indexOf('micromessenger') !== -1) {
let openId = that.$queue.getData('openid') ? that.$queue.getData('openid') : '';
that.$Request.postT('/app/wxPayErrRider/wxPayCashDeposit?money=' + that.earnestMoney + '&type=2')
.then(
res => {
if (res.code == 0) {
that.callPay(res);
} else {
that.shows = false
that.earnestMoney = ''
that.$queue.showToast(res.msg);
}
});
}
// #endif
// #ifdef MP-WEIXIN
that.$Request.postT('/app/wxPayErrRider/wxPayCashDeposit?money=' + that.earnestMoney + '&type=3').then(
res => {
console.log('res', res)
if (res.code == 0) {
uni.requestPayment({
provider: 'wxpay',
timeStamp: res.data.timestamp,
nonceStr: res.data.noncestr,
package: res.data.package,
signType: res.data.signType,
paySign: res.data.sign,
success: function(res) {
that.shows = false
that.earnestMoney = ''
uni.hideLoading();
that.taskData()
that.$queue.showToast('支付成功');
setTimeout(function() {
uni.hideLoading();
}, 1000);
},
fail: function(err) {
that.shows = false
that.earnestMoney = ''
console.log('fail:' + JSON.stringify(err));
uni.hideLoading();
that.$queue.showToast('支付失败');
}
});
} else {
that.shows = false
that.earnestMoney = ''
that.$queue.showToast(res.msg);
}
});
// #endif
} else if (that.openWay == 2) { //支付宝支付
uni.hideLoading();
// #ifdef H5
let userId = this.$queue.getData('userId');
that.$Request.postT('/app/wxPayErrRider/wxPayCashDeposit?money=' + that.earnestMoney + '&type=5')
.then(res => {
if (res.code == 0) {
const div = document.createElement('div')
div.innerHTML = res.data //此处form就是后台返回接收到的数据
document.body.appendChild(div)
document.forms[0].submit()
that.earnestMoney = ''
that.shows = false
} else {
uni.hideLoading();
that.$queue.showToast(res.msg);
}
});
// #endif
// #ifdef APP-PLUS
that.$Request.postT('/app/wxPayErrRider/wxPayCashDeposit?money=' + that.earnestMoney + '&type=4').then(
ret => {
uni.hideLoading();
// console.log(JSON.stringify(ret), '支付信息')
if (ret.code == 0) {
that.setPayment('alipay', ret.data);
that.shows = false
// that.isCheckPay(ret.code, 'alipay', ret.data);
} else {
that.shows = false
that.earnestMoney = ''
that.$queue.showToast(res.msg);
}
});
// #endif
}
},
callPay: function(response) {
if (typeof WeixinJSBridge === "undefined") {
if (document.addEventListener) {
document.addEventListener('WeixinJSBridgeReady', that.onBridgeReady(response), false);
} else if (document.attachEvent) {
document.attachEvent('WeixinJSBridgeReady', that.onBridgeReady(response));
document.attachEvent('onWeixinJSBridgeReady', that.onBridgeReady(response));
}
} else {
that.onBridgeReady(response);
}
},
onBridgeReady: function(response) {
let that = this;
console.log(!response.package, '2222222')
// if (!response.package) {
// return;
// }
that.earnestMoney = ''
that.shows = false
console.log(response, '1111111111')
WeixinJSBridge.invoke(
'getBrandWCPayRequest', {
"appId": response.data.appid, //公众号名称,由商户传入
"timeStamp": response.data.timestamp, //时间戳自1970年以来的秒数
"nonceStr": response.data.noncestr, //随机串
"package": response.data.package,
"signType": response.data.signType, //微信签名方式:
"paySign": response.data.sign //微信签名
},
function(res) {
console.log(res, '/*-/*-/*-')
if (res.err_msg === "get_brand_wcpay_request:ok") {
// 使用以上方式判断前端返回,微信团队郑重提示:
//res.err_msg将在用户支付成功后返回ok但并不保证它绝对可靠。
that.taskData()
uni.showLoading({
title: '支付成功'
});
setTimeout(function() {
uni.hideLoading();
}, 1000);
} else {
uni.hideLoading();
}
WeixinJSBridge.log(response.err_msg);
}
);
},
isCheckPay(status, name, order) {
console.log(status, name, order, '111111')
this.earnestMoney = ''
this.shows = false
if (status == 0) {
this.setPayment(name, order);
} else {
uni.hideLoading();
uni.showToast({
title: '支付信息有误',
icon: 'none'
});
}
},
setPayment(name, order) {
let that = this
console.log(name, '*-*-*', order)
uni.requestPayment({
provider: name,
orderInfo: order, //微信、支付宝订单数据
success: function(res) {
console.log(res)
that.taskData()
uni.hideLoading();
that.earnestMoney = ''
that.shows = false
uni.showLoading({
title: '支付成功'
});
},
fail: function(err) {
console.log(err)
uni.hideLoading();
},
complete() {
uni.hideLoading();
}
});
},
// 退保证金
tuiBtn() {
let that = this
if (that.mayMoney == 0) {
uni.showToast({
icon: 'none',
title: '暂无保证金'
})
return
}
uni.showModal({
title: '提示',
content: '确认退还保证金吗?如果存在未完成订单和未处理完成的投诉无法退还,需要先处理完毕后再申请',
success: function(res) {
if (res.confirm) {
that.$Request.getT('/app/cash/cashDepositMoney').then(res => {
console.log(res)
if (res.code == 0) {
uni.showToast({
title: '申请成功'
})
} else {
uni.showToast({
title: res.msg,
icon: 'none'
})
}
setTimeout(function() {
that.taskData()
}, 1000)
});
}
},
})
}
}
}
</script>
<style>
/* 支付金额弹框 */
.receipt_code {
width: 90%;
margin: 0 auto;
}
.code_title {
width: 100%;
line-height: 100rpx;
font-size: 31rpx;
font-weight: bold;
text-align: center;
letter-spacing: 2rpx;
margin-top: 21rpx;
margin-bottom: 25rpx;
}
.u-input--border {
border: 1px solid #F2F2F2 !important;
background: #F2F2F2 !important;
color: #999999 !important;
font-weight: 500 !important;
letter-spacing: 2rpx !important;
}
.u-input__input {
font-size: 30rpx;
font-weight: bold;
flex: 1;
color: #999999 !important;
min-height: 85rpx !important;
margin-top: 7rpx;
}
.sure {
width: 100%;
height: 80rpx;
background: #FF7F00;
color: white;
border-radius: 46rpx;
text-align: center;
line-height: 80rpx;
margin-top: 30rpx;
letter-spacing: 2rpx;
}
.content {
width: 100%;
position: relative;
}
.acont_part1 {
width: 100%;
}
.part1_bg image {
width: 100%;
height: 730rpx;
}
.part1_box {
width: 90%;
height: 400rpx;
background: #ffffff;
position: absolute;
top: 70rpx;
left: 37rpx;
border-radius: 25rpx;
}
.balance {
width: 90%;
margin: 0 auto;
text-align: center;
/* margin-top: 50rpx; */
line-height: 55rpx;
}
.balance_name {
font-size: 26rpx;
letter-spacing: 2rpx;
}
.balance_price {
margin-top: 10rpx;
font-weight: bold;
font-size: 60rpx;
}
.part1_btn {
width: 90%;
margin: 0 auto;
margin-top: 80rpx;
display: flex;
}
.btn_left {
flex: 1;
border: 1rpx solid #CCCCCC;
text-align: center;
line-height: 80rpx;
color: black;
font-size: 24rpx;
border-radius: 12rpx;
margin-right: 10rpx;
}
.btn_right {
flex: 1;
border: 1rpx solid #CCCCCC;
text-align: center;
line-height: 80rpx;
background: #FF7F00;
color: white;
font-size: 24rpx;
border-radius: 12rpx;
margin-left: 10rpx;
}
.acont_part2 {
width: 90%;
position: absolute;
bottom: -100rpx;
left: 37rpx;
}
.acount_type {
font-size: 32rpx;
font-weight: bold;
letter-spacing: 2rpx;
line-height: 75rpx;
}
.name {
font-size: 26rpx;
font-weight: bold;
letter-spacing: 2rpx;
line-height: 70rpx;
}
.tit {
color: #666666;
font-size: 25rpx;
}
</style>

View File

@@ -0,0 +1,119 @@
<template>
<view>
<view class="content" v-if="list.length" >
<view class="list_box" v-for="(item,index) in list" :key="index">
<view class="list_left">
<view class="name">{{item.title}}</view>
<view class="flex justify-between align-center">
<view style="color: red;">{{item.type==1?'+':'-'}} {{item.money}}</view>
<view class="data">{{item.createTime}}</view>
</view>
</view>
<!-- <view class="list_right" style="color: red;" v-if="item.type==2">- {{item.money}}</view> -->
<!-- <view class="list_right" style="color: #33D442;" v-if="item.type==1">+ {{item.money}}</view> -->
</view>
</view>
<empty v-else></empty>
</view>
</template>
<script>
import empty from '@/components/empty'
export default {
components: {
empty
},
data() {
return {
list: [],
page: 1,
totalCount: 0
}
},
onLoad() {
this.taskData()
},
methods: {
// 获取任务数据
taskData() {
this.$Request.getT('/app/userinfo/selectCashDeposit?classify=1&page='+this.page+'&limit=15').then(res => {
if(res.code==0){
// this.list = res.data.list
if (this.page == 1) {
this.list = res.data.list
} else {
this.list = this.list.concat(res.data.list)
}
this.totalCount = res.data.totalPage
}
console.log('res',res)
uni.stopPullDownRefresh();
});
},
},
// 上拉加载
onReachBottom: function() {
if (this.page < this.totalCount) {
this.page += 1;
this.taskData();
} else {
uni.showToast({
title: '已经最后一页啦',
icon: 'none'
})
}
},
onPullDownRefresh: function() {
this.page = 1;
this.taskData();
},
}
</script>
<style>
body {
background: #F5F5F5;
}
.content {
width: 100%;
background: #FFFFFF;
/* margin-top: 20rpx; */
padding-bottom: 50rpx;
padding-top: 20rpx;
}
.list_box {
width: 90%;
margin: 0 auto;
display: flex;
line-height: 45rpx;
padding-top: 20rpx;
}
.list_left {
flex: 2;
}
.name {
font-size: 26rpx;
color: #333333;
font-weight: bold;
letter-spacing: 2rpx;
}
.data {
color: #999999;
font-size: 24rpx;
}
.list_right {
flex: 1;
display: flex;
justify-content: flex-end;
align-items: center;
font-size: 31rpx;
}
</style>

View File

@@ -0,0 +1,133 @@
<template>
<view style="text-align: left">
<view v-for="(item, index) in list" :key="index" class="item">
<view>
<view style="margin-bottom: 8upx;text-align: right;">
<text style="margin-bottom: 8upx;color: #0e80d2" v-if="item.state==1"> 提现成功</text>
<text style="margin-bottom: 8upx;color: #0e80d2" v-if="item.state==0"> 提现中</text>
<text style="margin-bottom: 8upx;color: #FF332F" v-if="item.state==-1"> 提现失败</text>
</view>
<view style="color: #999999;font-size: 28upx;">
<view v-if="item.classify == 1">
<view style="margin-bottom: 8upx">支付宝账号 {{ item.zhifubao }}</view>
<view style="margin-bottom: 8upx">支付宝姓名 {{ item.zhifubaoName }}</view>
<view style="margin-bottom: 8upx">发起时间 {{ item.createAt }}</view>
</view>
<view v-if="item.classify == 2">
<view>微信提现</view>
<view style="margin-bottom: 8upx">发起时间 {{ item.createAt }}</view>
</view>
<view style="margin-bottom: 8upx" v-if="item.state==1">成功时间 {{ item.outAt }}</view>
<view style="margin-bottom: 8upx;color: #FF2638" v-if="item.state==-1">失败原因{{item.refund}}</view>
<view style="margin-bottom: 8upx;text-align: right;">
<!-- 提现金额 -->
<text style="color: #FF332F;font-size: 32upx;font-weight: 600">{{ item.money }}</text>
</view>
</view>
</view>
</view>
<!-- 加载更多提示 -->
<view class="s-col is-col-24" v-if="list.length > 0">
<load-more :loadingType="loadingType" :contentText="contentText"></load-more>
</view>
<!-- 加载更多提示 -->
<empty v-if="list.length == 0" des="暂无数据"></empty>
</view>
</template>
<script>
import empty from '@/components/empty.vue'
export default {
components: {
empty
},
data() {
return {
page: 1,
size: 10,
list: [],
loadingType: 0,
scrollTop: false,
contentText: {
contentdown: '上拉显示更多',
contentrefresh: '正在加载...',
contentnomore: '没有更多数据了'
}
};
},
onLoad: function(e) {
this.$queue.showLoading('加载中...');
this.getMoney();
},
onPageScroll: function(e) {
this.scrollTop = e.scrollTop > 200;
},
methods: {
getMoney(type) {
this.loadingType = 1;
let userId = this.$queue.getData('userId');
let data = {
page: this.page,
limit: this.size,
userId: userId
};
this.$Request.getT('/app/cash/selectPayDetails', data).then(res => {
if (res.code === 0) {
if (this.page === 1) {
this.list = [];
}
res.data.list.forEach(d => {
// if (d.state === -1) {
// d.state = '已退款';
// } else if (d.state === 0) {
// d.state = '提现中';
// } else if (d.state === 1) {
// d.state = '提现成功';
// }
this.list.push(d);
});
if (res.data.list.length === this.size) {
this.loadingType = 0;
} else {
this.loadingType = 3;
}
} else {
this.loadingType = 2;
}
uni.hideLoading();
if (type === 'Refresh') {
uni.stopPullDownRefresh(); // 停止刷新
}
});
}
},
onLoad: function(e) {
this.getMoney();
},
onReachBottom: function() {
this.page = this.page + 1;
this.getMoney();
},
onPullDownRefresh: function() {
this.page = 1;
this.getMoney('Refresh');
}
};
</script>
<style lang="scss" scoped>
// @import '../../static/css/index.css';
page {
background: #ffffff;
}
.item {
background: white;
padding: 32rpx;
margin: 32rpx;
font-size: 28rpx;
box-shadow: 7px 9px 34px rgba(0, 0, 0, 0.1);
border-radius: 16upx;
}
</style>

View File

@@ -0,0 +1,281 @@
<template>
<view class="container" v-if="XCXIsSelect!='否'">
<!-- <list-cell title="收款人姓名" type="text" placeholder="请输入支付宝收款人姓名" v-model="userName"></list-cell>
<list-cell title="支付宝账号" type="number" placeholder="请输入要绑定的支付宝手机号" v-model="mobile" :maxlength="11"></list-cell> -->
<u-form :model="form" ref="uForm">
<u-form-item label="收款人姓名" label-width="250"><u-input type="text" placeholder="请输入支付宝收款人姓名" v-model="userName" /></u-form-item>
<u-form-item label="支付宝账号" label-width="250"><u-input type="text" placeholder="请输入要绑定的支付宝手机号" v-model="mobile" /></u-form-item>
</u-form>
<button v-if="btn" class="confirm-btn" @click="toLogin" :disabled="logining">{{btn}}</button>
<view style="padding: 32upx 64upx;font-size: 24upx;color: #999999;">提示请正确填写收款人的支付宝账户和真实的收款人姓名否则将无法正常收款</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
mobile: '',
userName: '',
btn:'绑定账户',
logining: false,
form:{},
XCXIsSelect:'否'
}
},
onLoad() {
this.XCXIsSelect = this.$queue.getData('XCXIsSelect');
if(this.XCXIsSelect =='否'){
uni.setNavigationBarTitle({
title: '隐私政策'
});
}else{
uni.setNavigationBarTitle({
title: '账号绑定'
});
}
let userId = this.$queue.getData("userId");
if (userId) {
this.$Request.getT("/app/userinfo/findUserInfoById").then(res => {
if (res.code === 0 && res.data) {
if (res.data.zhiFuBao) {
this.mobile = res.data.zhiFuBao;
this.btn = '修改账户';
}else{
this.btn = '绑定账户';
}
if (res.data.zhiFuBaoName) {
this.userName = res.data.zhiFuBaoName;
}
}else{
this.btn = '绑定账户';
}
});
}
},
methods: {
inputChange(e) {
const key = e.currentTarget.dataset.key;
this[key] = e.detail.value;
},
navBack() {
uni.navigateBack();
},
toLogin() {
let userId = this.$queue.getData("userId");
let token = uni.getStorageSync("token");
const {
mobile,
userName
} = this;
if (!mobile) {
this.$queue.showToast("请设置收款人支付宝账号");
} else if (!userName) {
this.$queue.showToast("请设置收款人姓名");
} else {
this.$queue.showLoading("修改中...");
this.$Request.postJson("/app/user/updateUser",{
zhiFuBao: mobile,
zhiFuBaoName: userName
}).then(
res => {
if (res.code === 0) {
this.navBack();
} else {
this.$queue.showToast(res.msg)
}
uni.hideLoading();
});
}
},
},
}
</script>
<style lang='scss'>
page {
background: #FFFFFF;
}
.container {
padding: 32upx;
position: relative;
width: 100%;
height: 100%;
overflow: hidden;
background: #fff;
}
.confirm-btn1 {
width: 300px;
height: 42px;
line-height: 42px;
border-radius: 30px;
margin-top: 70upx;
background: whitesmoke;
color: grey;
/* font-size: $font-lg; */
&:after {
border-radius: 60px;
}
}
.wrapper {
position: relative;
z-index: 90;
background: #fff;
padding-bottom: 20px;
}
.back-btn {
position: absolute;
left: 20px;
z-index: 9999;
padding-top: var(--status-bar-height);
top: 20px;
font-size: 20px;
/* color: $font-color-dark; */
}
.left-top-sign {
font-size: 80px;
/* color: $page-color-base; */
position: relative;
}
.right-top-sign {
position: absolute;
top: 40px;
right: -15px;
z-index: 95;
&:before,
&:after {
display: block;
content: "";
width: 20px;
height: 40px;
background: -moz-linear-gradient(left, #fa4dbe 0, #fbaa58 100%);
background: -webkit-gradient(linear,
left top,
left right,
color-stop(0, #fa4dbe),
color-stop(100%, #fbaa58));
background: -webkit-linear-gradient(left, #fa4dbe 0, #fbaa58 100%);
background: -o-linear-gradient(left, #fa4dbe 0, #fbaa58 100%);
background: -ms-linear-gradient(left, #fa4dbe 0, #fbaa58 100%);
background: linear-gradient(to left, #fa4dbe 0, #fbaa58 100%);
}
&:before {
transform: rotate(50deg);
border-radius: 0 50px 0 0;
}
&:after {
position: absolute;
right: -198px;
top: 0;
transform: rotate(-50deg);
border-radius: 50px 0 0 0;
/* background: pink; */
}
}
.left-bottom-sign {
position: absolute;
left: -270px;
bottom: -320px;
/*border: 100upx solid #d0d1fd;*/
border-radius: 50%;
padding: 90px;
}
.welcome {
position: relative;
left: 30px;
top: -50px;
font-size: 23px;
color: #555;
text-shadow: 1px 0px 1px rgba(0, 0, 0, .3);
}
.input-content {
padding: 0 20px;
}
.input-item {
display: flex;
flex-direction: column;
align-items: flex-start;
justify-content: center;
padding: 0 30px;
/* background: $page-color-light; */
height: 64px;
border-radius: 4px;
margin-bottom: 30px;
&:last-child {
margin-bottom: 0;
}
.tit {
height: 30px;
line-height: 28px;
/* font-size: $font-sm+2upx;
color: $font-color-base; */
}
input {
height: 40px;
/* font-size: $font-base + 2upx;
color: $font-color-dark; */
width: 100%;
}
}
.confirm-btn {
width: 300px;
height: 42px;
line-height: 42px;
border-radius: 30px;
margin-top: 70upx;
background: #FF4701;
color: #fff;
/* font-size: $font-lg; */
&:after {
border-radius: 60px;
}
}
.forget-section {
/* font-size: $font-sm+2upx;
color: $font-color-spec; */
text-align: center;
margin-top: 40px;
}
.register-section {
position: fixed;
left: 0;
bottom: 30px;
width: 100%;
/* font-size: $font-sm+2upx;
color: $font-color-base; */
text-align: center;
text {
/* color: $font-color-spec; */
margin-left: 10px;
}
}
</style>

View File

@@ -0,0 +1,116 @@
<template>
<view>
<view class="content" v-if="list.length" >
<view class="list_box" v-for="(item,index) in list" :key="index">
<view class="list_left">
<view class="name">{{item.title}}</view>
<view class="data">{{item.createTime}}</view>
</view>
<view class="list_right" style="color: red;" v-if="item.type==2">- {{item.money}}</view>
<view class="list_right" style="color: #33D442;" v-if="item.type==1">+ {{item.money}}</view>
</view>
</view>
<empty v-else></empty>
</view>
</template>
<script>
import empty from '@/components/empty'
export default {
components: {
empty
},
data() {
return {
list: [],
page: 1,
totalCount: 0
}
},
onLoad() {
this.taskData()
},
methods: {
// 获取任务数据
taskData() {
this.$Request.getT('/app/userinfo/findMoneyDetails?classify=3&page='+this.page+'&limit=15').then(res => {
if(res.code==0){
// this.list = res.data.list
if (this.page == 1) {
this.list = res.data.list
} else {
this.list = this.list.concat(res.data.list)
}
this.totalCount = res.data.totalPage
}
console.log('res',res)
uni.stopPullDownRefresh();
});
},
},
// 上拉加载
onReachBottom: function() {
if (this.page < this.totalCount) {
this.page += 1;
this.taskData();
} else {
uni.showToast({
title: '已经最后一页啦',
icon: 'none'
})
}
},
onPullDownRefresh: function() {
this.page = 1;
this.taskData();
},
}
</script>
<style>
body {
background: #F5F5F5;
}
.content {
width: 100%;
background: #FFFFFF;
/* margin-top: 20rpx; */
padding-bottom: 50rpx;
padding-top: 20rpx;
}
.list_box {
width: 90%;
margin: 0 auto;
display: flex;
line-height: 45rpx;
padding-top: 20rpx;
}
.list_left {
flex: 2;
}
.name {
font-size: 26rpx;
color: #333333;
font-weight: bold;
letter-spacing: 2rpx;
}
.data {
color: #999999;
font-size: 24rpx;
}
.list_right {
flex: 1;
display: flex;
justify-content: flex-end;
align-items: center;
font-size: 31rpx;
}
</style>

View File

@@ -0,0 +1,632 @@
<template>
<view class="content" v-if="XCXIsSelect !='否'">
<view class="part_one">
<view class="one_title">可提现金额</view>
<view class="one_price">¥{{mayMoney}}</view>
</view>
<view class="part_two">
<view class="two_title">提现金额
<text>提现最低额度{{minMoney}}</text>
</view>
<view class="two_box">
¥
<u-input v-model="money" type="number" :clearable="false" :border="border" placeholder="请输入提现金额" />
</view>
<view class="beizhu">*注单笔限制提现最低额度{{minMoney}}最大提现额度为{{manMoney}}单笔提现手续费{{shouxufei*100}}%</view>
</view>
<view class="part_three">
<view class="three_name">兑换方式</view>
<view class="btn">
<view class="btn_left" :class="current==2?'btna':''" @click="bindToindex(2)">
<image src="../../../../static/my/weixin.png"></image>
<text>微信</text>
</view>
<view class="btn_right" :class="current==1?'btna':''" @click="bindToindex(1)">
<image src="../../../../static/my/zhifubao.png"></image>
<text>支付宝</text>
</view>
</view>
</view>
<view class="part_four">
<view class="submit" @click="getOut()">立即提现</view>
<view class="four_box">
<view class="box_left" @click="goZhifuBao">
提现账户
</view>
<view class="box_right" @click="list">
提现记录
</view>
<view class="box_right" @click="isShow">
微信收款码
</view>
</view>
</view>
<!-- 微信收款码弹框 -->
<u-popup v-model="show" mode="center">
<view class="padding">
<view class="text-center text-lg text-bold flex justify-between">
<view></view>
<view>添加微信收款码</view>
<view @click="show=false">X</view>
</view>
<!-- <view class="text-center padding-top-sm padding-bottom-lg" style="color: #999999;">请提交微信号和微信二维码
</view> -->
<view style="width: 80%;margin: 0 auto;">
<view class="margin-top" @click.stop="weixin"
style="border: 4rpx solid #010101;border-radius: 16rpx;overflow: hidden;">
<image v-if="!wximg" src="../../../../static/image/erweima.png"></image>
<image v-else :src="wximg" mode=""></image>
</view>
</view>
<!-- <view class="text-center margin-top-sm " @click="submit"
style="border-radius: 10rpx;background-color: #7E59FF;color: #fff;height: 80rpx;line-height: 80rpx;">保存</view> -->
</view>
</u-popup>
</view>
</template>
<script>
import { showToast } from '../../../../common/queue';
export default {
data() {
return {
show: false,
current: '1',
// value: 10,
money: '',
zhifubaoName: '',
zhifubao: '',
shouxufei: 0.01,
minMoney: '10',
manMoney: '200',
mayMoney: '',
XCXIsSelect: '否',
wximg: '',
values: ''
}
},
onLoad() {
this.XCXIsSelect = this.$queue.getData('XCXIsSelect');
if (this.XCXIsSelect == '否') {
uni.setNavigationBarTitle({
title: '隐私政策'
});
} else {
uni.setNavigationBarTitle({
title: '余额提现'
});
}
},
onShow() {
this.getMoney()
//最低可提现金额度
this.$Request.getT('/app/common/type/112').then(res => {
if (res.code === 0) {
this.minMoney = res.data.value
}
});
//最高可提现金额度
this.$Request.getT('/app/common/type/153').then(res => {
if (res.code === 0) {
this.manMoney = res.data.value
}
});
//手续费
this.$Request.getT('/app/common/type/114').then(res => {
if (res.code === 0) {
this.shouxufei = res.data.value
}
});
this.$Request.getT('/app/common/type/290').then(res => { //判断微信提现方式
if (res.code == 0) {
if (res.data && res.data.value) {
this.values = res.data.value
}
}
})
},
methods: {
//用户收款码弹框
isShow() {
this.getMoney()
this.show = true
},
//微信 支付宝提现选择
bindToindex(e) {
this.current = e
console.log(e, this.current)
},
list() {
uni.navigateTo({
url: '/pages/riderMy/myAccount/AcontMoney/cashList'
});
},
goZhifuBao() {
uni.navigateTo({
url: '/pages/riderMy/myAccount/AcontMoney/zhifubao'
});
},
getMoney() {
let that = this;
let token = this.$queue.getData('token');
let userId = this.$queue.getData('userId');
if (token) {
//this.$queue.showLoading("加载中...");
//可以提现金额查询预估收入查询
that.$Request.getT("/app/userinfo/findUserInfoById").then(res => {
if (res.code === 0 && res.data) {
that.mayMoney = res.data.balance;
that.zhifubao = res.data.zhiFuBao;
that.zhifubaoName = res.data.zhiFuBaoName;
that.wximg = res.data.cashQrCode
} else if (res.code === -102) {
that.$queue.showToast(res.msg);
that.$queue.logout();
// uni.navigateTo({
// url: '/pages/public/login'
// });
} else {
that.mayMoney = '0';
//this.$queue.showToast(res.msg);
}
});
}
},
getOut() {
let that = this;
let token = that.$queue.getData('token');
let userId = that.$queue.getData('userId');
if (token) {
if (that.current == 1) {
if (!that.zhifubao || !that.zhifubaoName) {
uni.navigateTo({
url: '/pages/riderMy/myAccount/AcontMoney/zhifubao'
});
return
}
if (!/^\d+$/.test(that.money)) {
// uni.showToast({
// icon: 'none',
// title: '请输入正确金额,不能包含中文,英文,特殊字符和小数'
// });
that.$queue.showToast('请输入正确金额,不能包含中文,英文,特殊字符和小数')
return;
}
if (Number(that.money) < Number(that.minMoney)) {
uni.showToast({
icon: 'none',
title: '提现金额不能小于' + that.minMoney + '元'
});
return;
}
if (Number(that.money) > Number(that.manMoney)) {
uni.showToast({
icon: 'none',
title: '提现金额不能大于' + that.manMoney + '元'
});
return;
}
uni.showModal({
title: '提现申请提示',
content: '请仔细确认收款人信息\n姓名:' + that.zhifubaoName + '\n提现金额:' + that.money + '\n提现手续费:' +
parseFloat(that.money * that.shouxufei).toFixed(2) + '元' + '\n收款账号' + that.zhifubao + '',
success: e => {
if (e.confirm) {
that.$queue.showLoading('提现中...');
that.$Request.getT('/app/cash/cashMoney?classify=' + that.current +
'&money=' + that.money).then(res => {
if (res.code === 0) {
that.$queue.showToast('提现申请成功,预计三个工作日到账');
that.getMoney();
that.mayMoney = ''
} else {
uni.showModal({
title: '温馨提示',
content: res.msg,
showCancel: false,
cancelText: '取消',
confirmText: '确认'
});
}
uni.hideLoading();
});
}
}
});
} else if (that.current == 2) {
if (!/^\d+$/.test(that.money)) {
// uni.showToast({
// icon: 'none',
// title: '请输入正确金额,不能包含中文,英文,特殊字符和小数'
// });
that.$queue.showToast('请输入正确金额,不能包含中文,英文,特殊字符和小数')
return;
}
if (Number(that.money) < Number(that.minMoney)) {
uni.showToast({
icon: 'none',
title: '提现金额不能小于' + that.minMoney + '元'
});
return;
}
if (Number(that.money) > Number(that.manMoney)) {
uni.showToast({
icon: 'none',
title: '提现金额不能大于' + that.manMoney + '元'
});
return;
}
if (that.values == 2) {
that.$Request.getT('/app/userinfo/findUserInfoById').then(res => {
if (res.code === 0) {
let wxImg = res.data.cashQrCode;
if (!wxImg) {
uni.showModal({
title: '提现提示',
content: '请上传微信收款码',
showCancel: true,
cancelText: '取消',
confirmText: '上传',
success: res => {
if (res.confirm) {
that.show = true
}
},
fail: () => {},
complete: () => {}
});
return;
}
if (that.money * 1 >= that.minMoney * 1) {
uni.showModal({
title: '提现申请提示',
content: '金额:' + that.money + '元' + ',' + '手续费:' + (that
.money * that.shouxufei).toFixed(2),
success: e => {
if (e.confirm) {
that.$queue.showLoading('提现中...');
let data = {
money: that.money,
classify: 2
}
that.$Request.getT('/app/cash/cashMoney',
data).then(
res => {
if (res.code === 0) {
setTimeout(function() {
that.$queue.showToast(
'提现申请成功,预计三个工作日到账'
);
}, 1000)
that.getMoney();
that.money = ''
} else {
uni.showModal({
title: '温馨提示',
content: res.msg,
showCancel: false,
cancelText: '取消',
confirmText: '确认'
});
}
uni.hideLoading();
});
}
}
});
} else {
setTimeout(function() {
that.$queue.showToast('提现金额必须大于或等于' + that.minMoney + '元才可提现');
}, 1000)
}
} else {
that.$queue.showToast('网络状态不好,请刷新后重试!');
}
});
} else {
if (!/^\d+$/.test(that.money)) {
// uni.showToast({
// icon: 'none',
// title: '请输入正确金额,不能包含中文,英文,特殊字符和小数'
// });
that.$queue.showToast('请输入正确金额,不能包含中文,英文,特殊字符和小数')
return;
}
if (parseFloat(that.money).toFixed(1) >= that.minMoney) {
uni.showModal({
title: '提现申请提示',
content: '金额:' + that.money + '元' + ',' + '手续费:' + parseFloat(that
.money * that.shouxufei).toFixed(2),
success: e => {
if (e.confirm) {
that.$queue.showLoading('提现中...');
let data = {
money: that.money,
classify: 2,
type: 3
}
that.$Request.getT('/shop/shopmoney/shopCashMoney', data).then(
res => {
if (res.code === 0) {
setTimeout(function() {
that.$queue.showToast(
'提现申请成功,预计三个工作日到账');
}, 1000)
that.getMoney();
that.money =''
} else {
uni.showModal({
title: '温馨提示',
content: res.msg,
showCancel: false,
cancelText: '取消',
confirmText: '确认'
});
that.getMoney();
}
uni.hideLoading();
});
}
}
});
} else {
that.$queue.showToast('提现金额必须大于或等于' + that.minMoney + '元才可提现');
}
}
}
} else {
uni.showToast({
title: '提现失败'
})
}
},
weixin() {
let that = this
uni.chooseImage({
count: 1, //默认9
sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
sourceType: ['album', 'camera'], //从相册选择
success: (res) => {
that.$queue.showLoading("上传中...");
for (let i = 0; i < 1; i++) {
uni.uploadFile({ // 上传接口
url: 'https://tcwm.xianmaxiong.com/sqx_fast/alioss/upload', //真实的接口地址
filePath: res.tempFilePaths[i],
name: 'file',
success: (uploadFileRes) => {
let img = JSON.parse(uploadFileRes.data).data
let userId = that.$queue.getData('userId');
let data = {
cashQrCode: img
}
that.$Request.postJson('/app/user/updateUser',
data).then(
res => {
if (res.code == 0) {
that.getMoney()
setTimeout(function() {
that.$queue.showToast('上传成功')
}, 1000)
}
});
uni.hideLoading();
// that.show = false
}
});
}
}
});
},
}
}
</script>
<style>
body {
background: #F5F5F5;
}
.content {
width: 100%;
}
.part_one {
width: 90%;
margin: 0 auto;
background: #FFFFFF;
margin-top: 20rpx;
border-radius: 20rpx;
height: 170rpx;
}
.one_title {
width: 90%;
margin: 0 auto;
font-size: 32rpx;
letter-spacing: 1rpx;
padding-top: 30rpx;
}
.one_price {
width: 90%;
margin: 0 auto;
margin-top: 20rpx;
font-size: 47rpx;
font-weight: bold;
}
.part_two {
width: 90%;
margin: 0 auto;
background: #FFFFFF;
margin-top: 20rpx;
border-radius: 20rpx;
}
.two_title {
width: 90%;
margin: 0 auto;
line-height: 95rpx;
font-size: 34rpx;
}
.two_title text {
font-size: 27rpx;
margin-left: 34rpx;
}
.two_box {
width: 90%;
margin: 0 auto;
display: flex;
align-items: center;
font-size: 32rpx;
font-weight: bold;
}
.u-input__input {
font-size: 50rpx !important;
color: #747474 !important;
border-bottom: 1rpx solid #cccccc;
}
.tit {
width: 90%;
margin: 0 auto;
font-size: 31rpx;
margin-top: 10rpx;
color: black;
}
.beizhu {
width: 90%;
margin: 0 auto;
line-height: 55rpx;
color: red;
letter-spacing: 1rpx;
}
.part_three {
width: 90%;
margin: 0 auto;
background: #FFFFFF;
margin-top: 20rpx;
border-radius: 20rpx;
}
.three_name {
width: 90%;
margin: 0 auto;
font-size: 33rpx;
color: black;
line-height: 80rpx;
}
.btn {
width: 96%;
margin: 0 auto;
display: flex;
padding-bottom: 30rpx;
}
.btn_left {
flex: 1;
height: 90rpx;
border: 1rpx solid #ccc;
border-radius: 20rpx;
margin-right: 10rpx;
display: flex;
justify-content: center;
align-items: center;
}
.btn_right {
flex: 1;
/* width: 240rpx; */
height: 90rpx;
border: 1rpx solid #ccc;
border-radius: 20rpx;
margin-left: 10rpx;
display: flex;
justify-content: center;
align-items: center;
}
.btna {
border: 1rpx solid #E34B21 !important;
}
.btn_left image {
width: 50rpx;
height: 50rpx;
margin-right: 12rpx;
}
.btn_right image {
width: 50rpx;
height: 50rpx;
margin-right: 12rpx;
}
.part_four {
width: 90%;
margin: 0 auto;
/* background: #FFFFFF; */
margin-top: 20rpx;
border-radius: 20rpx;
}
.submit {
width: 100%;
height: 90rpx;
background: #F8501F;
color: #F8EBD2;
text-align: center;
line-height: 90rpx;
font-size: 37rpx;
border-radius: 12rpx;
}
.four_box {
width: 90%;
margin: 0 auto;
height: 125rpx;
display: flex;
color: #838383;
}
.box_left {
flex: 1;
display: flex;
justify-content: center;
align-items: center;
}
.box_right {
flex: 1;
display: flex;
justify-content: center;
align-items: center;
}
</style>

View File

@@ -0,0 +1,176 @@
<template>
<view class="my_account">
<view class="account_top">
<view class="account_name">账户余额</view>
<view class="account_price">{{moneys}}<text></text></view>
<view class="account_btn" @click="bindTxmoney">立即提现</view>
</view>
<!-- 我的列表 -->
<view class="mylist">
<view class="list_box" v-for="(item,index) in mylist" :key="index" @click="bindTomy(item.name)">
<view class="list_left">
<view class="list_img">
<image :src="item.image"></image>
</view>
<view class="list_name">{{item.name}}</view>
</view>
<view class="list_right">
<image src="../../../static/my/icon_go.png"></image>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
moneys:0,
mylist: [{
id: 1,
name: '保证金',
image: '../../../static/rider/qqq.png'
}, {
id: 2,
name: '账户明细',
image: '../../../static/rider/qq.png'
}]
}
},
onShow() {
this.taskData()
},
methods: {
// 获取任务数据
taskData() {
this.$Request.getT('/app/userinfo/findBalance').then(res => {
if(res.code==0){
if(res.data){
this.moneys = res.data
}
}
console.log('res',res)
});
},
bindTxmoney() {
uni.navigateTo({
url: '/pages/riderMy/myAccount/Txmoney/Txmoney'
})
},
bindTomy(name) {
console.log(name)
if (name == '保证金') {
uni.navigateTo({
url: '/pages/riderMy/myAccount/AcontMoney/AcontMoney'
})
} else if (name == '账户明细') {
uni.navigateTo({
url: '/pages/riderMy/myAccount/Acontlist/Acontlist'
})
}
}
}
}
</script>
<style>
.my_account {
width: 100%;
}
.account_top {
width: 100%;
height: 280rpx;
background: #FF7F00;
position: relative;
}
.account_name {
position: absolute;
top: 80rpx;
left: 80rpx;
color: white;
font-size: 30rpx;
letter-spacing: 2rpx;
}
.account_price {
position: absolute;
top: 140rpx;
left: 80rpx;
color: white;
font-size: 50rpx;
letter-spacing: 2rpx;
}
.account_price text {
font-size: 25rpx;
margin-left: 10rpx;
}
.account_btn {
width: 190rpx;
height: 66rpx;
background: #ffffff;
color: #FF7F00;
border-radius: 66rpx;
text-align: center;
line-height: 66rpx;
position: absolute;
top: 140rpx;
right: 40rpx;
font-size: 24rpx;
}
/* 我的列表 */
.mylist {
width: 93%;
margin: 0 auto;
background-color: #FFFFFF;
margin-top: 10rpx;
border-radius: 23rpx;
}
.list_box {
width: 90%;
margin: 0 auto;
display: flex;
height: 95rpx;
}
.list_left {
flex: 1;
display: flex;
justify-content: left;
align-items: center;
}
.list_img {
margin-right: 10rpx;
}
.list_img image {
width: 50rpx;
height: 50rpx;
}
.list_name {
font-size: 25rpx;
letter-spacing: 2rpx;
}
.list_right {
flex: 1;
display: flex;
justify-content: flex-end;
align-items: center;
}
.list_right image {
width: 12rpx;
height: 20rpx;
}
</style>