Initial Commit

This commit is contained in:
quantulr
2024-05-06 15:34:15 +08:00
commit e3a0666d5a
307 changed files with 28969 additions and 0 deletions

View File

@ -0,0 +1,224 @@
// pages/my/my_bill/my_bill.js
const app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
bgImg: app.globalData.bgImg,
typeActive: 0,
active:1, //1提现 2分销分润
state: 0,//0全部 1套餐券 2折扣券 3现金券 4积分 5微信支付
typeShow: false,
name: '全部',
type: [
{ name: '全部', state: 0 },
{ name: '审核中', state: 1 },
{ name: '已完成', state: 2 },
{ name: '提现失败', state: 3 },
],
page: 1,
num: 10,
dataList: [],
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function () {
//个人信息
wx.showLoading({
title: '加载中..',
})
wx.request({
url: app.globalData.ip + '/wisdommining/api/user/getTwoGoodsType',
method: 'GET',
header: {
"content-type": "application/x-www-form-urlencoded",
},
data: {
userId: app.globalData.userId
},
success: res => {
wx.hideLoading()
console.log(res)
if (res.data.code == 1) {
this.setData({
user: res.data.value,
dataList: [],
page: 1
})
this.dataList()
} else {
wx.showModal({
title: '提示!',
content: res.data.message,
showCancel: false,
})
}
}
})
},
//选择分类
active(e){
var active = e.currentTarget.dataset.act;
if(active==1){
this.setData({
active:active,
dataList: [],
page: 1
})
this.dataList()
}else{
this.setData({
active:active
})
this.dataList2()
}
},
//分类显示
typeShow() {
this.setData({
typeShow: true
})
},
typeActive(e) {
let index = e.currentTarget.dataset.index;
let name = e.currentTarget.dataset.name;
let state = e.currentTarget.dataset.state;
this.setData({
typeActive: index,
name: name,
typeShow: false,
state: state,
dataList: [],
page: 1
})
this.dataList()
},
//提现
dataList(e) {
wx.showLoading({
title: '加载中..',
})
wx.request({
url: app.globalData.ip + '/wisdommining/api/user/getWisdWithdrawal',
method: 'GET',
header: {
"content-type": "application/x-www-form-urlencoded",
},
data: {
userId: app.globalData.userId,
status: this.data.state,
page: this.data.page,
num: this.data.num,
},
success: res => {
wx.hideLoading()
console.log(res)
if (res.data.code == 1) {
let data = res.data.value.records;
let dataList = this.data.dataList;
for (let i = 0; i < data.length; i++) {
dataList.push(data[i])
}
this.setData({
dataList: dataList,
page: this.data.page + 1
})
} else {
wx.showModal({
title: '提示!',
content: res.data.message,
showCancel: false,
})
}
}
})
},
//分销
dataList2(e) {
wx.showLoading({
title: '加载中..',
})
wx.request({
url: app.globalData.ip + '/wisdommining/api/user/getBill',
method: 'GET',
header: {
"content-type": "application/x-www-form-urlencoded",
},
data: {
userId: app.globalData.userId,
category: 6,
},
success: res => {
wx.hideLoading()
console.log(res)
if (res.data.code == 1) {
let dataList = res.data.value;
this.setData({
dataList2: dataList,
})
} else {
wx.showModal({
title: '提示!',
content: res.data.message,
showCancel: false,
})
}
}
})
},
cash() {
wx.navigateTo({
url: '/pages/my/my_cash/my_cash?moneyCan=' + this.data.user.userBalance,
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function () {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function () {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function () {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function () {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
this.dataList()
},
})

View File

@ -0,0 +1,6 @@
{
"usingComponents": {},
"navigationBarTitleText": "我的钱包",
"navigationBarBackgroundColor":"#f36e17",
"navigationBarTextStyle":"white"
}

View File

@ -0,0 +1,70 @@
<view class="top" style="background: url({{bgImg}}my_wallettop.png) no-repeat;background-size: 100%;">
<view class="top-c" style="background: url({{bgImg}}my_wallettop2.png) no-repeat;background-size: 100%;">
<view class="c-1">余额</view>
<view class="c-2">{{user.userBalance}}</view>
<view class="c-3" catchtap="cash" wx:if="{{user.userBalance > 1}}" >提 现</view>
<view class="c-4" wx:if="{{user.userBalance <= 1}}" >提 现</view>
</view>
</view>
<view style="height:30rpx;background:#f5f5f5;"></view>
<view class="type_tf display_J_B" >
<view class="type_tf1 {{active==1?'type__xz':''}}" catchtap="active" data-act='1'>
提现
<view wx:if="{{active==1}}" class="type_tf_xz"></view>
</view>
<view class="type_tf1 {{active==2?'type__xz':''}}" catchtap="active" data-act='2'>
分销分润
<view class="type_tf_xz" wx:if="{{active==2}}"></view>
</view>
</view>
<view style="height:30rpx;background:#f5f5f5;"></view>
<!-- 提现 -->
<view class="all" wx:if="{{active==1}}">
<view class="title display_J_B display_A_C">
<view class="title-l">提现进度</view>
<view class="title-r display_A_C" catchtap="typeShow">{{name}} <image src="/icon/right.png"></image>
</view>
<view class="t-type__all" wx:if='{{typeShow}}'>
<view class="t-type {{typeActive==index?'t-type__active':''}}" catchtap="typeActive" data-index='{{index}}'
data-name='{{item.name}}' data-state='{{item.state}}' wx:for='{{type}}' wx:key='index'>{{item.name}}</view>
</view>
</view>
<view class="cont display_J_B" wx:for='{{dataList}}' wx:key='index'>
<view class="cont-l">
<view class="content GStitleOne">{{item.withdrawalCard}}</view>
<view class="number">卡号:{{item.withdrawalCardNumber}}</view>
<view class="time">{{item.createTime}}</view>
</view>
<view class="cont-r">
<view class="type">{{item.status==1?'-':item.status==2?'':'+'}}{{item.withdrawalMoney}}</view>
<view class="state {{item.status==1?'state_2':''}}">{{item.status==1?'审核中':item.status==2?'已完成':'提现失败'}}</view>
</view>
</view>
<view class="empty" wx:if="{{dataList.length==0}}">暂无记录~</view>
</view>
<!-- 分销 -->
<view class="fx" wx:if="{{active==2}}">
<view class="fx_title">分销分润</view>
<view class="fx_cont" wx:for="{{dataList2}}" wx:key='index'>
<view class="fxc_title">{{item.billIntroduction}}</view>
<view class="display_J_B">
<view class="fxc_l">
<view class="fxc_num">订单编号:{{item.billOrderNumber}}</view>
<view class="fxc_time">{{item.createTime}}</view>
</view>
<view class="fxc_r">
<view class="fxc_fr">获得分润</view>
<view class="fxc_price"><text>+¥</text>{{item.billBalance}}</view>
</view>
</view>
</view>
<view class="empty" wx:if="{{dataList.length==0}}">暂无记录~</view>
</view>

View File

@ -0,0 +1,246 @@
/* pages/my/my_bill/my_bill.wxss */
.all {
width: 690rpx;
padding: 0 30rpx;
border-radius: 20rpx;
}
.title {
width: 100%;
height: 90rpx;
position: relative;
}
.title-l {
font-size: 32rpx;
color: #333333;
}
.title-r {
font-size: 24rpx;
letter-spacing: 1rpx;
color: #333333;
}
.title-r image {
width: 30rpx;
height: 30rpx;
}
.t-type__all {
width: 150rpx;
border-radius: 10rpx;
border: solid 1rpx #e5e5e5;
position: absolute;
right: 0;
top: 90rpx;
background-color: #ffffff;
}
.t-type {
height: 54rpx;
line-height: 54rpx;
text-align: center;
font-size: 24rpx;
letter-spacing: 1rpx;
color: #333333;
border-bottom: solid 1rpx #e5e5e5;
}
.t-type__active{
color: #ee7b1e;
}
.t-type:first-child {
border-radius: 10rpx 10rpx 0 0;
}
.t-type:last-child {
border-radius: 0 0 10rpx 10rpx;
border-bottom: none;
}
.cont{
margin: 0 auto 30rpx;
width: 690rpx;
border-radius: 40rpx;
border: solid 1rpx #eeeeee;
padding: 30rpx 30rpx 40rpx 30rpx;
box-sizing: border-box;
}
.cont-l{
width: 380rpx;
}
.content{
font-size:30rpx;
color: #333333;
margin: 0rpx 0 20rpx;
width: 400rpx;
}
.number{
margin-bottom: 15rpx;
font-size: 20rpx;
color: #999999;
}
.time{
font-size: 20rpx;
color: #999999;
}
.cont-r{
width:250rpx;
display: flex;
flex-wrap: wrap;
align-content: flex-end;
text-align: right;
}
.type{
font-size:36rpx;
color: #333333;
width:250rpx;
}
.type_1{
color: #f31717;
font-size: 28rpx;
}
.state{
font-size: 24rpx;
color: #999999;
margin-top: 30rpx;
width:250rpx;
}
.cont-r .state_2{
color: #f31717;
}
.empty{
font-size: 28rpx;
letter-spacing: 3rpx;
color: #999;
text-align: center;
margin: 150rpx 0;
}
.top{
width: 750rpx;
padding: 50rpx 0rpx 0rpx;
}
.top-c{
margin: 0 30rpx;
width: 690rpx;
height: 242rpx;
border-radius: 20rpx;
margin: 0 auto;
padding-top: 50rpx;
text-align: center;
}
.c-1{
font-size: 32rpx;
color: #333333;
}
.c-2{
font-size: 60rpx;
color: #333333;
margin-top: 10rpx;
}
.c-3{
width: 160rpx;
height: 56rpx;
line-height: 56rpx;
background-color: #f36e17;
border-radius: 28rpx;
font-size: 32rpx;
color: #ffffff;
margin: 20rpx auto 0;
}
.c-4{
width: 160rpx;
height: 56rpx;
line-height: 56rpx;
background-color: #999999;
border-radius: 28rpx;
font-size: 32rpx;
color: #ffffff;
margin: 20rpx auto 0;
}
.type_tf{
width: 750rpx;
height: 100rpx;
background-image: linear-gradient(267deg,
#ffffff 50%,
#fefefe 100%);
border-radius: 20rpx;
padding: 0 50rpx;
box-sizing: border-box;
}
.type_tf1{
font-size: 30rpx;
color: #999999;
line-height: 100rpx;
position: relative;
width: 170rpx;
text-align: center;
}
.type_tf_xz{
position: absolute;
width: 140rpx;
height: 4rpx;
background-color: #ee7b1e;
bottom: 0;
left: 15rpx;
}
.type__xz{
font-size: 36rpx;
color: #ee7b1e;
}
.fx{
width: 690rpx;
padding: 0 30rpx;
border-radius: 20rpx;
}
.fx_title{
width: 100%;
height: 100rpx;
line-height: 100rpx;
font-size: 32rpx;
color: #333333;
}
.fx_cont{
margin: 0 auto 30rpx;
width: 690rpx;
border-radius: 40rpx;
border: solid 1rpx #eeeeee;
padding: 30rpx 30rpx 40rpx 30rpx;
box-sizing: border-box;
}
.fxc_title{
font-size: 30rpx;
color: #333333;
margin-bottom: 45rpx;
}
.fxc_l{
font-size: 24rpx;
color: #999999;
}
.fxc_time{
margin-top: 20rpx;
}
.fxc_fr{
font-size: 24rpx;
color: #999999;
text-align: right;
}
.fxc_price{
font-size: 36rpx;
color: #ee7b1e;
text-align: right;
margin-top: 20rpx;
}
.fxc_price text{
font-size: 24rpx;
}