Commit 93c50a4a by wangyalan-git

小程序码/余额明细/余额提现回显银行卡信息

parent 7a9e218b
......@@ -26,6 +26,7 @@
"pages/orderFlow/orderFlow",
"pages/distribution/index",
"pages/orderWithdrawal/orderWithdrawal",
"pages/balanceRecord/index",
"pages/userAccount/comDetails/index",
"pages/userAccount/distributionOrder/index",
"pages/userAccount/myTeam/index",
......
var http = require("../../utils/http.js")
var app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
tabs: [
{ name: '全部', type: '' },
{ name: '待审核', type: 0 },
{ name: '已审核', type: 1 },
{ name: '未通过', type: 2 }
],
applyStatus: '',
pageNum: 1,
list: [],
total: 0,
},
// 选项卡切换
tabsGet(data) {
let id = data.currentTarget.dataset.type
this.setData({
applyStatus: id,
list: [],
pageNum: 1,
total: 0
})
this.getList()
},
getList() {
var that = this
var params = {
url: "/balanceRecord/getBalanceRecordList",
method: "GET",
data: {
userId: app.globalData.userInfo.userId,
// userId: '3d79cbae35cd42ee8906839004335c18',
pageNum: this.data.pageNum,
pageSize: 10
},
callBack: (res) => {
let list = res.result.list
// list.forEach(item => {
// if (item.applyStatus == 1) {
// item.showStatus = '已审核'
// } else if (item.applyStatus == 2) {
// item.showStatus = '未通过'
// } else {
// item.showStatus = '待审核'
// }
// })
if (that.data.pageNum > 1) {
list = that.data.list.concat(list)
}
that.setData({
list: list,
total: res.result.total
})
console.log('list', that.data.list)
}
};
http.request(params);
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
// this.getList(0);
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
this.setData({
list: [],
pageNum: 1,
total: 0
})
this.getList()
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
if (this.data.total > this.data.list.length) {
this.data.pageNum++
this.getList()
}
},
/**
* 用户点击右上角分享
*/
onShareAppMessage: function () {
}
})
\ No newline at end of file
{
"usingComponents": {},
"navigationBarTitleText": "余额明细"
}
\ No newline at end of file
<view class="page">
<!-- 选项卡 -->
<!-- <view class="tabs">{{item.type}}
<view wx:for="{{tabs}}" wx:key="index" bindtap="tabsGet" data-type="{{item.type}}"
class="{{applyStatus === item.type ? 'tabsTrue' : 'tabsFalse'}}">{{item.name}}</view>
</view> -->
<!-- 列表展示 -->
<view class="list-box">
<!-- 列表展示 -->
<view class="li-box" wx:for="{{list}}" wx:key="index">
<view class="li-head">
<text>{{item.title}}</text>
<!-- 余额类型 1订单佣金 2订单收益 3退单 4提现5余额购买6订单转让7余额审核不通过8余额审核提现 -->
<view class="time">{{item.balanceType == 1? '订单佣金':(item.balanceType == 2? '订单收益':(item.balanceType == 3? '退单':(item.balanceType == 4? '提现':(item.balanceType == 5? '余额购买':(item.balanceType == 6? '订单转让':(item.balanceType == 7? '余额审核不通过':(item.balanceType == 8? '余额审核提现':'')))))))}}</view>
</view>
<view class="li-head">
<text>¥{{item.amount}}</text>
<view class="time">{{item.createTime}}</view>
</view>
</view>
<!-- 暂无内容 -->
<view class="offList" wx:if="{{list.length == 0}}">—— 暂无内容 ——</view>
</view>
</view>
\ No newline at end of file
page {
background: #f4f4f4;
}
.tabs {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
height: 80rpx;
background: white;
position: fixed;
top: 0;
}
.tabs view {
width: 100%;
text-align: center;
}
.tabsTrue {
font-size: 32rpx;
font-weight: bold;
}
.tabsFalse {
font-size: 28rpx;
color: #999999;
}
.list-box {
/* margin-top: 90rpx; */
display: flex;
align-items: center;
flex-direction: column;
min-height: 80vh;
}
.li-box {
display: flex;
align-items: center;
flex-direction: column;
box-shadow: 0rpx 1rpx 15rpx #bababa;
width: 690rpx;
background: white;
border-radius: 20rpx;
margin: 20rpx 0;
}
.li-box image {
width: 90rpx;
height: 90rpx;
border-radius: 50%;
margin: 0 20rpx 0 20rpx;
}
.li-body {
display: flex;
align-items: center;
flex-direction: row;
justify-content: space-between;
width: 100%;
padding: 20rpx 0;
}
.li-body>view {
width: 50%;
/* text-align: center; */
margin-left: 20rpx;
}
.li-num {
color: #333;
font-size: 32rpx;
}
.li-body .notice{
color: #999;
font-size: 24rpx;
}
.offList {
font-size: 28rpx;
color: #999999;
margin-top: 20rpx;
}
.li-head {
width: 100%;
display: flex;
justify-content: space-between;
align-items: baseline;
flex-direction: row;
border-bottom: 1rpx solid #F2F2F2;
padding: 20rpx 0;
}
.li-head text:nth-child(1) {
flex: 1;
font-size: 30rpx;
margin-left: 20rpx;
}
.li-head text:nth-child(2) {
font-size: 30rpx;
margin-right: 20rpx;
color: #3a86b9;
}
.li-head .time {
font-size: 24rpx;
color: #999;
margin-right: 20rpx;
}
\ No newline at end of file
......@@ -45,8 +45,11 @@ Page({
method: "GET",
data: {},
callBack: (res) => {
let img = 'data:image/png;base64,' + res.result
that.send_code(img)
this.setData({
code: res.result
})
//写入成功了的话,新的图片路径就能用了
this.drawImage()
}
};
http.request(params);
......@@ -73,37 +76,7 @@ Page({
}
});
},
sendCode() {
const fsm = wx.getFileSystemManager();
const FILE_BASE_NAME = 'tmp_base64src';
const [, format, bodyData] = /data:image\/(\w+);base64,(.*)/.exec(img) || [];
if (!format) {
reject(new Error('ERROR_BASE64SRC_PARSE'));
}
const filePath = `${wx.env.USER_DATA_PATH}/${FILE_BASE_NAME}.${format}`;
const buffer = wx.base64ToArrayBuffer(bodyData);
console.log('执行')
fsm.writeFile({
filePath,
data: buffer,
encoding: 'binary',
success() {
console.log('filePath', filePath)
that.setData({
code: filePath
})
that.drawImage()
},
fail() {
console.log('图片转换失败')
reject(new Error('ERROR_BASE64SRC_WRITE'));
},
complete() {
console.log('无论图片转换失败')
}
})
console.log('二维码', res)
},
// 保存图片
saveImage(imagePath = '') {
if (!this.isSave) {
......
......@@ -3,6 +3,6 @@
<canvas style="width: {{canvasWidth}}px; height: {{canvasHeight}}px;" canvas-id="firstCanvas"></canvas>
<view class="bomBtn">
<button class='btn' bindtap='save'>保存图片</button>
<!-- <button class='btn' open-type="share">邀请好友</button> -->
<button class='btn' open-type="share">邀请好友</button>
</view>
</view>
\ No newline at end of file
......@@ -20,8 +20,8 @@ canvas{
flex-direction: row;
}
.bomBtn .btn{
/* width: 50%; */
width: 100%;
width: 50%;
/* width: 100%; */
font-size: 28rpx;
color: #fff;
background: #FC9F48;
......
......@@ -14,7 +14,7 @@ Page({
userAccount: '',
userCount: ''
},
goLogin(){
goLogin() {
wx.navigateTo({
url: '/pages/login/login',
})
......@@ -57,10 +57,10 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
console.log(wx.getStorageSync('token')? true: false,wx.getStorageSync('token'))
console.log(wx.getStorageSync('token') ? true : false, wx.getStorageSync('token'))
this.setData({
userInfo: app.globalData.userInfo,
isLogin: wx.getStorageSync('token')? true: false
isLogin: wx.getStorageSync('token') ? true : false
})
//加载订单数字
var ths = this;
......@@ -135,7 +135,7 @@ Page({
title: '正在开发中'
})
},
toOrderFlow: function(){
toOrderFlow: function () {
wx.navigateTo({
url: '/pages/orderFlow/orderFlow',
})
......@@ -164,7 +164,11 @@ Page({
url: '/pages/orderList/orderList?sts=' + sts,
})
},
toBalanceRecord: function (e) {
wx.navigateTo({
url: '/pages/balanceRecord/index',
})
},
// 用户余额/积分
getUserAccount: function () {
var params = {
......
......@@ -12,7 +12,7 @@
</view>
</view>
<view class="prod-col" style="margin-top: 0;padding-top: 0;">
<view class="col-item" bindtap=''>
<view class="col-item" bindtap='toBalanceRecord'>
<view class="num">{{(userAccount.amount + userAccount.waitAmount) || 0}}</view>
<view class="tit">总额</view>
</view>
......
......@@ -36,6 +36,24 @@ Page({
};
http.request(params);
},
// 体现最后数据
getLastData() {
var params = {
url: "/cashApplyRecord/selectLastData",
method: "GET",
data: {},
callBack: (res) => {
if(res.result){
this.setData({
bankCard: res.result.bankCard,
bankName: res.result.bankName,
name: res.result.name
});
}
}
};
http.request(params);
},
uploadImage(item) {
console.log('ite',item)
var that = this
......@@ -71,7 +89,7 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
this.getData();
this.getLastData()
this.setData({
amount: this.options.balance
})
......@@ -111,9 +129,6 @@ Page({
onShareAppMessage: function () {
},
getData() {
},
gotoShow: function () {
var that = this
wx.chooseImage({
......
......@@ -39,7 +39,8 @@
</view>
<view class="botton-container">
<view class="{{!buttonClicked?'inputimg':'disabledBtn'}}" type="default" bindtap="{{!buttonClicked?'inputimg':''}}">48小时内到账,确认提现</view>
<view class="{{!buttonClicked?'inputimg':'disabledBtn'}}" type="default" bindtap="{{!buttonClicked?'inputimg':''}}">
48小时内到账,确认提现</view>
<view class='how-container' bindtap="showHow">
<image class='how-img' src="/images/newly/notice.png"></image>
<text class='how-txt'>如何上传收款码?</text>
......@@ -49,8 +50,7 @@
<view class="notice-container">
<text class='txt-notice-title'>【温馨提醒】</text>
<text class='txt-notice'></text>
<text class='txt-notice'>
1、单次提现申请需满¥100\n2、申请提现需要扣除6%的手续费</text>
<text class='txt-notice'>1、单次提现申请需满¥100\n2、申请提现需要扣除6%的手续费 \n 3.银行开户行: 所办理银行卡的卡户支行 \n4.请仔细核对数据是否正确,不正确的数据会导致审核将不通过或者汇款失败。</text>
</view>
<view class="coupon-notice-window" wx:if="{{how}}">
......
......@@ -61,14 +61,17 @@ page {
line-height: 120rpx;
font-size: 30rpx;
}
.top .li.no-height{
.top .li.no-height {
height: unset;
line-height: unset;
}
.top .li .upload-image{
.top .li .upload-image {
width: 150rpx;
height: 150rpx;
}
.phcolor {
font-size: 30rpx;
color: #C4C4C4;
......@@ -79,7 +82,7 @@ page {
width: 100%;
}
.botton-container{
.botton-container {
width: 100%;
margin-top: 30rpx;
display: flex;
......@@ -99,7 +102,8 @@ page {
border-radius: 15rpx;
color: rgb(83, 37, 3);
}
.disabledBtn{
.disabledBtn {
width: 95%;
font-size: 30rpx;
height: 76rpx;
......@@ -110,6 +114,7 @@ page {
border-radius: 15rpx;
color: rgb(83, 37, 3);
}
.botton-container .inputimg2 {
width: 95%;
font-size: 30rpx;
......@@ -122,7 +127,7 @@ page {
border-radius: 15rpx;
}
.how-container{
.how-container {
display: flex;
flex-direction: row;
justify-content: center;
......@@ -130,38 +135,38 @@ page {
margin-top: 30rpx;
}
.how-container .how-img{
.how-container .how-img {
width: 30rpx;
height: 30rpx;
}
.how-container .how-txt{
.how-container .how-txt {
color: black;
font-size: 28rpx;
margin-left: 10rpx;
}
.notice-container{
width: 100%;
.notice-container {
display: flex;
flex-direction: column;
margin-left: 100rpx;
padding: 0 30rpx;
margin-top: 50rpx;
margin-bottom: 50rpx;
}
.txt-notice{
.txt-notice {
font-size: 26rpx;
line-height: 50rpx;
color: rgba(0, 0, 0, 1);
}
.txt-notice-title{
.txt-notice-title {
font-size: 26rpx;
line-height: 50rpx;
color: rgb(235, 84, 1);
}
.coupon-notice-window{
.coupon-notice-window {
position: fixed;
z-index: 998;
width: 100%;
......@@ -170,7 +175,8 @@ page {
top: 0;
background-color: rgba(0, 0, 0, 0.6);
}
.coupon-notice-window .container{
.coupon-notice-window .container {
background-color: rgba(0, 0, 0, 0);
position: relative;
display: flex;
......@@ -178,7 +184,8 @@ page {
align-items: center;
justify-content: center;
}
.coupon-notice-window .container .root-corner{
.coupon-notice-window .container .root-corner {
position: absolute;
z-index: 666;
width: 600rpx;
......@@ -187,14 +194,15 @@ page {
border-radius: 25rpx;
background-color: white;
}
.coupon-notice-window .container .root{
.coupon-notice-window .container .root {
position: absolute;
z-index: 667;
width: 600rpx;
height: 800rpx;
}
.coupon-notice-window .container .content-container{
.coupon-notice-window .container .content-container {
display: flex;
flex-direction: column;
justify-content: center;
......@@ -202,7 +210,7 @@ page {
margin-right: 10rpx;
}
.coupon-notice-window .container .content-container .title{
.coupon-notice-window .container .content-container .title {
color: black;
font-size: 40rpx;
width: 100%;
......@@ -212,13 +220,13 @@ page {
font-weight: bold;
}
.coupon-notice-window .container .content-container .row-container{
.coupon-notice-window .container .content-container .row-container {
display: flex;
flex-direction: row;
align-items: center
}
.margin-top{
.margin-top {
margin-top: 20rpx;
}
......@@ -227,21 +235,21 @@ page {
height: 50rpx;
}
.logo-text{
.logo-text {
margin-left: 15rpx;
color: black;
font-size: 35rpx;
font-weight: bold;
}
.logo-desc{
.logo-desc {
font-size: 33rpx;
color: rgb(62, 62, 62);
margin-top: 20rpx;
margin-bottom: 40rpx;
}
.coupon-notice-window .container .btn{
.coupon-notice-window .container .btn {
width: 450rpx;
height: 70rpx;
margin-top: 20rpx;
......@@ -254,7 +262,7 @@ page {
justify-content: center;
}
.coupon-notice-window .container .btn .btn-text{
.coupon-notice-window .container .btn .btn-text {
font-size: 34rpx;
color: white;
}
\ No newline at end of file
......@@ -11,7 +11,8 @@
<view class="li-box" wx:for="{{list}}" wx:key="index">
<view class="li-head">
<view>
<text>{{item.nickName}}</text>
<!-- 0余额提现申请 1订单收益提现申请 2退单申请 -->
<text>{{item.applyType == 1?'订单收益提现申请':(item.applyType == 2? '退单申请':(item.applyType == 0? '余额提现申请':'提现申请'))}}</text>
<view class="time">{{item.createTime}}</view>
</view>
<text>{{item.showStatus}}</text>
......
var domain = "https://zhqg.jsonpro.cn/capi"; //统一接口域名,测试环境
// var domain = "http://192.168.31.118:8086/capi"; //统一接口域名,测试环境
// var domain = "http://192.168.31.146:8086/capi"; //统一接口域名,测试环境
exports.domain = domain;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment