2024-05-11 16:43:09 +08:00
|
|
|
<template>
|
|
|
|
<view class="content">
|
2024-06-08 22:50:09 +08:00
|
|
|
<view class="head">
|
|
|
|
<view class="user-info">
|
|
|
|
<up-image :show-loading="true" :src="src" width="100rpx" height="100rpx" shape="circle"></up-image>
|
|
|
|
<text style="margin-left: 42rpx;font-size: 32rpx;font-weight: bold;">{{mobile}}</text>
|
2024-05-11 16:43:09 +08:00
|
|
|
</view>
|
2024-06-08 22:50:09 +08:00
|
|
|
|
|
|
|
<view class='money'>
|
|
|
|
<view style="color: #7B5232;font-size:24rpx;display: flex;align-items: center;width: 90vw;">
|
|
|
|
<text>账户余额(元)</text>
|
|
|
|
<text style="font-size:52rpx;margin-left: 20rpx;">{{now_money}}</text>
|
|
|
|
</view>
|
|
|
|
<view @click="navgo('/pages/gift/index')" class=""
|
|
|
|
style='height: 52rpx;width: 148rpx;color: white;background-color: #7B5232;border-radius: 30rpx;line-height: 52rpx;text-align: center;'>
|
|
|
|
购买
|
|
|
|
</view>
|
2024-05-11 16:43:09 +08:00
|
|
|
</view>
|
|
|
|
</view>
|
2024-06-08 22:50:09 +08:00
|
|
|
<view class="detail">
|
|
|
|
<view style="font-weight: bold;font-size: 32rpx;">
|
|
|
|
账户详情
|
2024-05-11 16:43:09 +08:00
|
|
|
</view>
|
2024-06-08 22:50:09 +08:00
|
|
|
<view style="margin:16rpx 0 30rpx 0;color: #777777;">
|
|
|
|
<text>
|
|
|
|
累计消费 <text style="font-weight: bold;color: black;">¥{{order}}</text>
|
2024-05-13 18:05:23 +08:00
|
|
|
</text>
|
2024-06-08 22:50:09 +08:00
|
|
|
<text style="margin-left:68rpx ;">
|
|
|
|
累计购买 <text style="font-weight: bold;color: black;">¥{{recharge}}</text>
|
|
|
|
</text>
|
|
|
|
</view>
|
|
|
|
|
|
|
|
<view class="detail-card">
|
|
|
|
<view class="" v-for="item in orderLists.reverse()">
|
|
|
|
<view class="detail-li">
|
|
|
|
<up-image :show-loading="true"
|
|
|
|
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/attach/b6932202406082138255928.png"
|
|
|
|
width="60rpx" height="60rpx" shape="circle" v-if='(+item.amount) >0'></up-image>
|
|
|
|
|
|
|
|
<up-image :show-loading="true" v-else
|
|
|
|
src="https://lihai001.oss-cn-chengdu.aliyuncs.com/attach/28097202406082141549267.png"
|
|
|
|
width="60rpx" height="60rpx" shape="circle"></up-image>
|
|
|
|
|
|
|
|
<view class="detail-li-r">
|
|
|
|
<view class="top" style="margin-bottom: 14rpx;">
|
2024-06-09 20:32:49 +08:00
|
|
|
<text>{{item.title}}</text>
|
|
|
|
<text style='font-size: 32rpx;font-weight: bold;' v-if="item.type=='in'">+{{item.amount}}</text>
|
|
|
|
<text style='font-size: 32rpx;font-weight: bold;' v-else>-{{item.amount}}</text>
|
|
|
|
|
2024-06-08 22:50:09 +08:00
|
|
|
</view>
|
|
|
|
<view class="top">
|
|
|
|
<text style='font-size: 24rpx;'>{{item.create_time}}</text>
|
|
|
|
<text style='font-size: 24rpx;'>余额{{item.balance}}元</text>
|
|
|
|
</view>
|
|
|
|
</view>
|
2024-05-14 22:36:29 +08:00
|
|
|
</view>
|
2024-06-08 22:50:09 +08:00
|
|
|
<view style="margin: 20rpx 0;">
|
|
|
|
<up-line color="#F3F3F3"></up-line>
|
2024-05-14 22:36:29 +08:00
|
|
|
</view>
|
|
|
|
</view>
|
2024-06-08 22:50:09 +08:00
|
|
|
|
2024-05-14 22:36:29 +08:00
|
|
|
</view>
|
2024-06-08 22:50:09 +08:00
|
|
|
</view>
|
|
|
|
|
2024-05-11 16:43:09 +08:00
|
|
|
</view>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script setup>
|
2024-05-14 15:18:50 +08:00
|
|
|
import {
|
2024-06-08 22:50:09 +08:00
|
|
|
userInfoApi,
|
|
|
|
chargeListApi,
|
|
|
|
capitalCountAPi
|
|
|
|
} from "@/api/user.js"
|
2024-05-11 16:43:09 +08:00
|
|
|
import {
|
2024-06-08 22:50:09 +08:00
|
|
|
ref
|
|
|
|
} from "vue"
|
|
|
|
const src = ref('https://lihai001.oss-cn-chengdu.aliyuncs.com/attach/841c0202406081905268790.png') //
|
|
|
|
const now_money = ref(0)
|
|
|
|
const mobile = ref('')
|
|
|
|
const order = ref(0)
|
|
|
|
const recharge = ref(0)
|
|
|
|
// https://lihai001.oss-cn-chengdu.aliyuncs.com/attach/b6932202406082138255928.png
|
|
|
|
|
|
|
|
const getUser = () => {
|
|
|
|
userInfoApi().then(res => {
|
|
|
|
now_money.value = res.data.now_money
|
|
|
|
src.value = res.data.avatar
|
|
|
|
mobile.value = res.data.mobile
|
2024-05-11 16:43:09 +08:00
|
|
|
})
|
|
|
|
}
|
2024-05-14 15:18:50 +08:00
|
|
|
|
2024-06-08 22:50:09 +08:00
|
|
|
const orderLists = ref([])
|
|
|
|
const getLists = () => {
|
|
|
|
chargeListApi().then(res => {
|
|
|
|
orderLists.value = res.data.data
|
|
|
|
})
|
2024-05-14 15:18:50 +08:00
|
|
|
}
|
|
|
|
|
2024-05-11 16:43:09 +08:00
|
|
|
|
2024-06-08 22:50:09 +08:00
|
|
|
const getShop = () => {
|
|
|
|
capitalCountAPi().then(res => {
|
|
|
|
order.value = res.data.order
|
|
|
|
recharge.value = res.data.recharge
|
2024-05-14 18:44:55 +08:00
|
|
|
})
|
|
|
|
}
|
2024-05-14 15:18:50 +08:00
|
|
|
|
2024-06-08 22:50:09 +08:00
|
|
|
const navgo = (url) => {
|
|
|
|
uni.navigateTo({
|
|
|
|
url
|
2024-05-14 18:44:55 +08:00
|
|
|
})
|
|
|
|
}
|
2024-05-16 18:03:25 +08:00
|
|
|
|
2024-06-08 22:50:09 +08:00
|
|
|
getUser()
|
|
|
|
getLists()
|
|
|
|
getShop()
|
2024-05-11 16:43:09 +08:00
|
|
|
</script>
|
|
|
|
|
2024-06-08 22:50:09 +08:00
|
|
|
<style lang='scss'>
|
2024-05-11 16:43:09 +08:00
|
|
|
.content {
|
2024-06-08 22:50:09 +08:00
|
|
|
width: 710rpx;
|
|
|
|
margin: 20rpx auto;
|
|
|
|
box-sizing: border-box;
|
|
|
|
min-height: 100vh;
|
|
|
|
|
|
|
|
.head {
|
|
|
|
height: 272rpx;
|
|
|
|
background-size: 100% 100%;
|
|
|
|
background-image: url('https://lihai001.oss-cn-chengdu.aliyuncs.com/attach/841c0202406081905268790.png');
|
|
|
|
box-sizing: border-box;
|
|
|
|
padding: 20rpx;
|
2024-05-11 16:43:09 +08:00
|
|
|
display: flex;
|
2024-06-08 22:50:09 +08:00
|
|
|
flex-direction: column;
|
2024-05-11 16:43:09 +08:00
|
|
|
justify-content: space-between;
|
|
|
|
|
2024-06-08 22:50:09 +08:00
|
|
|
.user-info {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
}
|
2024-05-11 16:43:09 +08:00
|
|
|
|
|
|
|
|
2024-06-08 22:50:09 +08:00
|
|
|
.money {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
2024-05-11 16:43:09 +08:00
|
|
|
|
2024-05-13 18:05:23 +08:00
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-06-08 22:50:09 +08:00
|
|
|
.detail {
|
|
|
|
margin-top: 50rpx;
|
2024-05-13 18:05:23 +08:00
|
|
|
|
|
|
|
|
2024-06-08 22:50:09 +08:00
|
|
|
.detail-card {
|
|
|
|
background-color: white;
|
|
|
|
padding: 34rpx 20rpx;
|
|
|
|
border-radius: 12rpx 12rpx 0rpx 0rpx;
|
|
|
|
|
|
|
|
|
|
|
|
.detail-li {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
color: #333333;
|
|
|
|
font-size: 30rpx;
|
|
|
|
|
|
|
|
.top {
|
|
|
|
display: flex;
|
|
|
|
justify-content: space-between;
|
|
|
|
}
|
|
|
|
|
|
|
|
.detail-li-r {
|
|
|
|
margin-left: 30rpx;
|
|
|
|
width: 100%;
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
justify-content: space-between;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-05-11 16:43:09 +08:00
|
|
|
|
|
|
|
}
|
|
|
|
</style>
|