第一次提交

This commit is contained in:
wangxiaowei
2025-06-11 10:21:51 +08:00
commit 52932d54b1
2341 changed files with 185283 additions and 0 deletions

View File

@ -0,0 +1,104 @@
<template>
<view class="p-0-30 bg-white">
<!--列表-->
<view class="d-b-c border-b p-30-0" v-for="(item, index) in tableData" :key="index">
<view class="d-s-s f-w d-c flex-1">
<text class="30">{{ item.scene.text }}</text>
<text class="pt10 gray9 f22">{{ item.create_time }}</text>
</view>
<view class="red" v-if="item.money > 0">+{{ item.money }}元</view>
<view class="red" v-else="">{{ item.money }}元</view>
</view>
<!-- 没有记录 -->
<view class="d-c-c p30" v-if="tableData.length == 0 && !loading">
<text class="iconfont icon-wushuju"></text>
<text class="cont">亲,暂无相关记录哦</text>
</view>
<uni-load-more v-else :loadingType="loadingType"></uni-load-more>
</view>
</template>
<script>
import uniLoadMore from '@/components/uni-load-more.vue';
export default {
components: {
uniLoadMore
},
data() {
return {
/*是否加载完成*/
loading: true,
/*顶部刷新*/
topRefresh: false,
/*手机高度*/
phoneHeight: 0,
/*可滚动视图区域高度*/
scrollviewHigh: 0,
/*数据列表*/
tableData: [],
/*最后一页码数*/
last_page: 0,
/*当前页面*/
page: 1,
/*每页条数*/
list_rows: 20,
no_more: false,
type: 'all'
};
},
computed: {
/*加载中状态*/
loadingType() {
if (this.loading) {
return 1;
} else {
if (this.tableData.length != 0 && this.no_more) {
return 2;
} else {
return 0;
}
}
}
},
onLoad(e) {
this.type = e.type;
/*获取数据*/
this.getData();
},
onReachBottom() {
let self = this;
if (self.page < self.last_page) {
self.page++;
self.getData();
}
self.no_more = true;
},
methods: {
/*获取数据*/
getData() {
let self = this;
let page = self.page;
let list_rows = self.list_rows;
self.loading = true;
self._get(
'balance.log/lists', {
page: page || 1,
list_rows: list_rows,
type: self.type
},
function(data) {
self.loading = false;
self.tableData = self.tableData.concat(data.data.list.data);
self.last_page = data.data.list.last_page;
if (data.data.list.last_page <= 1) {
self.no_more = true;
return false;
}
}
);
}
}
};
</script>
<style></style>

View File

@ -0,0 +1,301 @@
<template>
<view class="index">
<view class="top_bg" :style="'height:'+(368+topBarHeight()*2+topBarTop()*2)+'rpx;'">
<!-- #ifdef MP-WEIXIN || APP-PLUS -->
<view class="ww100" :style="'height:'+topBarTop()+'px;'"></view>
<view class="tc head_top" :style="topBarHeight() == 0 ? '': 'height:'+topBarHeight()+'px;'">
<view class="reg180" @click="goback"><text class="icon iconfont icon-jiantou"></text></view>
<view class="fb">我的钱包</view>
</view>
<!-- #endif -->
<view class="card-top">
<view class="f60 white"><text class="f36"></text>{{balance}}</view>
<view class="f26 white pr">账户余额() <text v-if="cash_open" class="cash_btn ml20 f22" @click="gotoPage('/pages/user/cash/apply')">提现</text></view>
</view>
</view>
<view class="wallet-content">
<view class="index-head" v-if="balance_open">
<view class="card-bottom">
<view class="width-150 font-30 pr flex-1" @click="gotoPay">
<view>
<image class="wallet_img" src="../../../static/icon/chongzhijiaofei.png" mode=""></image>
</view>
<view class="f26 gray6">充值</view>
<view class="icon iconfont icon-jiantou"></view>
</view>
<view class="none_line"></view>
<view class="width-150 font-30 pr flex-1" @click="gotoList('rechange')">
<view>
<image class="wallet_img" src="../../../static/icon/chongzhijilu.png" mode=""></image>
</view>
<view class="f26 gray6">充值记录</view>
<view class="icon iconfont icon-jiantou"></view>
</view>
</view>
</view>
<view class="index-body">
<view class="body-head">
<view class="f30">余额提现明细</view>
<view class="f26 gray9" @click="gotoPage('/pages/user/cash/list')">更多明细 <text class="icon iconfont icon-jiantou" style="color: #999999;font-size: 22rpx;"></text></view>
</view>
</view>
<view class="index-body">
<view class="body-head">
<view class="f30">钱包明细</view>
<view class="f26 gray9" @click="gotoList('all')">更多明细 <text class="icon iconfont icon-jiantou" style="color: #999999;font-size: 22rpx;"></text></view>
</view>
<view class="body-item" v-for="(item,index) in dataList" :key="index">
<view class="body-item-top">
<view class="body-item-top-left f32 ">{{ item.scene.text }}</view>
<view class="body-item-top-right f36" v-if="item.money > 0">+{{ item.money }}</view>
<view class="body-item-top-right f36" v-else="">{{ item.money }}</view>
</view>
<view class="body-item-bottom">
<view class="body-item-bottom-left font-24 gray9">{{ item.create_time }}</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
dataList: [],
balance: '',
balance_open: 0,
cash_open:0
}
},
onShow() {
/*获取数据*/
this.getData();
},
methods: {
/*获取数据*/
getData() {
let self = this;
self.loading = true;
self._get(
'balance.log/index', {},
function(res) {
self.loading = false;
self.dataList = res.data.list;
self.balance = res.data.balance;
self.balance_open = res.data.balance_open;
self.cash_open = res.data.cash_open;
}
);
},
gotoList(type) {
this.gotoPage('/pages/user/my-wallet/my-balance?type=' + type);
},
goback() {
uni.navigateBack();
},
gotoPay() {
this.gotoPage('/pages/order/recharge');
},
}
}
</script>
<style lang="scss">
page {
background: #f2f2f2;
}
.font-color-ccc {
color: #CCCCCC;
}
.icon-jiantou::before {
font-size: 24rpx;
}
.font-24 {
font-size: 24rpx;
}
.font-28 {
font-size: 28rpx;
}
.font-32 {
font-size: 32rpx;
}
.font-72 {
font-size: 72rpx;
}
.width-150 {
width: 150rpx;
text-align: center;
}
.index {
width: 750rpx;
}
.wallet-content{
margin-top: -93rpx;
}
.index-head {
width: 710rpx;
margin: 0 auto;
height: 160rpx;
background: #FFFFFF;
border-radius: 12rpx;
margin-bottom: 50rpx;
}
.bg-image {
width: 660rpx;
height: 340rpx;
background-image: url('../../../static/card.png');
background-size: 100% 100%;
margin: 0 auto;
margin-top: 50rpx;
display: flex;
flex-direction: column;
}
.card-top {
width: 750rpx;
height: 290rpx;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}
.card-bottom {
/* width: 660rpx; */
height: 160rpx;
display: flex;
justify-content: space-around;
align-items: center;
}
.index-body {
width: 710rpx;
/* background-color: rgba(0, 0, 0, 0.1); */
background-color: white;
margin: 0 auto;
padding: 30rpx;
box-sizing: border-box;
border-radius: 12rpx;
padding-top: 0;
}
.body-head {
height: 80rpx;
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 1rpx #f2f2f2 solid;
}
.body-item {
display: flex;
flex-direction: column;
justify-content: center;
height: 126rpx;
border-bottom: 1rpx #f2f2f2 solid;
}
.body-item-top {
display: flex;
justify-content: space-between;
align-items: center;
color: #333333;
margin-bottom: 10rpx;
}
.body-item-bottom {
display: flex;
justify-content: space-between;
align-items: center;
}
.reg180 {
padding:0 20rpx;
text-align: right;
transform: rotateY(180deg);
position: absolute;
bottom: 0;
}
.icon-jiantou {
color: #FFFFFF;
font-size: 30rpx;
}
.head_top {
position: relative;
height: 30px;
line-height: 30px;
color: #FFFFFF;
font-size: 32rpx;
}
.bg_topimg {
position: absolute;
top: 0;
width: 100%;
height: 400rpx;
z-index: -1;
}
.top_bg {
width: 750rpx;
height: 368rpx;
background: linear-gradient(180deg, #FF774D 0%, #FF422E 100%);
}
.wallet_img {
width: 48rpx;
height: 48rpx;
margin: 0 auto;
margin-bottom: 14rpx;
}
.index-head .card-bottom .pr .icon-jiantou {
position: absolute;
right: 95rpx;
color: #999999;
font-size: 26rpx;
top: 24rpx;
}
.none_line {
width: 1rpx;
height: 80rpx;
background-color: #D9D9D9;
}
.body-item-top-right {
margin-bottom: -30rpx;
}
.cash_btn{
position: absolute;
top: 0;
bottom: 0;
right: -100rpx;
display: block;
padding: 4px 16rpx;
font-size: 22rpx;
height: 36rpx;
line-height: 36rpx;
border-radius: 40rpx;
text-align: center;
background-color:rgba($color: #000000, $alpha: 0.1);
color: #ffffff;
font-family: PingFang SC;
}
</style>