Browse Source

feat: 我的钱包页面;

pull/1/head
Fox-33 1 month ago
parent
commit
62da0a23c3
12 changed files with 462 additions and 2 deletions
  1. +3
    -0
      pages.json
  2. +292
    -1
      pages_order/mine/wallet.vue
  3. +166
    -0
      pages_order/mine/withdraw.vue
  4. +1
    -1
      pages_order/sharing/personal.vue
  5. BIN
      pages_order/static/center/arrow.png
  6. BIN
      pages_order/static/center/down.png
  7. BIN
      pages_order/static/center/overview-bg.png
  8. BIN
      pages_order/static/center/title-bg.png
  9. BIN
      pages_order/static/center/wx.png
  10. +0
    -0
      pages_order/static/temp-avatar.png
  11. BIN
      static/image/tabbar/home-a.png
  12. BIN
      static/image/tabbar/home.png

+ 3
- 0
pages.json View File

@ -60,6 +60,9 @@
{
"path": "mine/wallet"
},
{
"path": "mine/withdraw"
},
{
"path": "mine/team"
},


+ 292
- 1
pages_order/mine/wallet.vue View File

@ -2,6 +2,72 @@
<view>
<navbar title="我的钱包" leftClick @leftClick="$utils.navigateBack" />
<view class="content">
<view class="card overview">
<image class="bg" src="../static/center/overview-bg.png"></image>
<view class="overview-info">
<view class="flex user-info">
<!-- todo: 换回接口提供的 -->
<image class="avatar" src="../static/temp-avatar.png"></image>
<!-- todo: 换回接口提供的 -->
<text class="nick-name">裂变星1号</text>
</view>
<view class="account">
<!-- todo: 换回接口提供的 -->
<view class="account-count">{{ `${100.0}` }}</view>
<view class="account-desc">可提现余额</view>
</view>
</view>
<button class="flex btn-withdraw" @click="$utils.navigateTo('/pages_order/mine/withdraw')">
<text>去提现</text>
<image class="btn-withdraw-arrow" src="../static/center/arrow.png"></image>
</button>
<view class="flex overview-summary">
<!-- todo: 换回接口提供的 -->
<view>总收益<text class="highlight">{{ `${276.0}` }}</text></view>
<view>已提现<text class="highlight">{{ `${176.0}` }}</text></view>
</view>
</view>
<view class="detail">
<view class="flex detail-header">
<view class="detail-title">
<image class="bg" src="../static/center/title-bg.png"></image>
<text class="text">收支明细</text>
</view>
<view class="detail-tools">
<uv-calendars ref="calendars" @confirm="onSelectDate" />
<button class="flex btn-calendar" @click="openCalendars">
<text>日期选择</text>
<image class="btn-calendar-arrow" src="../static/center/down.png"></image>
</button>
</view>
</view>
<view class="detail-list">
<view class="card detail-list-item"
v-for="item in detailList"
:key="item.id"
>
<view class="flex detail-list-item-row highlight">
<text>{{ item.title }}</text>
<template v-if="item.type === 'in'">
<text class="count count-in">{{ `+${item.count}` }}</text>
</template>
<template v-else>
<text class="count count-out">{{ `-${item.count}` }}</text>
</template>
</view>
<view class="flex detail-list-item-row">
<text>{{ item.createTime }}</text>
<text>{{ `余额:${item.account}` }}</text>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
@ -9,10 +75,235 @@
export default {
data() {
return {
detailList: [
{
id: '001',
title: '提现-微信',
type: 'out',
count: '88.0',
account: '100.0',
createTime: '2025年2月15日 12:56:48',
},
{
id: '002',
title: '活动奖励',
type: 'in',
count: '12.8',
account: '188.0',
createTime: '2025年2月14日 12:56:48',
},
{
id: '003',
title: '提现-微信',
type: 'out',
count: '88.0',
account: '263.2',
createTime: '2025年2月13日 12:56:48',
},
]
}
}
},
onShow() {
// todo
// fetch user-info
// fetch detail
},
onReachBottom() {
// todo
// fetch more detail
},
methods: {
openCalendars() {
this.$refs.calendars.open();
},
onSelectDate(e) {
console.log('--onSelectDate', e)
// todo
// fetch detail
}
},
}
</script>
<style scoped lang="scss">
.content {
padding: 20rpx;
}
.overview {
position: relative;
border-radius: 14rpx;
padding: 0;
height: 462rpx;
width: 100%;
color: #04D6A3;
.bg {
width: 100%;
height: 374rpx;
}
&-info {
position: absolute;
width: 100%;
top: 0;
left: 0;
padding: 43rpx 0 0 54rpx;
}
.user-info {
justify-content: flex-start;
}
.avatar {
width: 80rpx;
height: 80rpx;
border-radius: 40rpx;
}
.nick-name {
font-size: 32rpx;
font-weight: 700;
margin-left: 20rpx;
}
.account {
margin-top: 44rpx;
&-count {
font-size: 78rpx;
font-weight: 900;
margin-left: -8rpx;
}
&-desc {
font-size: 24rpx;
}
}
.btn-withdraw {
position: absolute;
top: 223rpx;
right: 0;
background-color: #04D6A3;
line-height: 1;
font-size: 32rpx;
padding: 20rpx 6rpx 20rpx 30rpx;
border-top-left-radius: 42rpx;
border-bottom-left-radius: 42rpx;
&-arrow {
width: 28rpx;
height: 28rpx;
margin-left: 22rpx;
}
}
&-summary {
position: absolute;
left: 0;
bottom: 0;
width: 100%;
padding: 28rpx 48rpx;
box-sizing: border-box;
justify-content: space-between;
color: #1B1B1B;
font-size: 24rpx;
.highlight {
color: #04D6A3;
}
}
}
.detail {
&-header {
align-items: flex-start;
justify-content: space-between;
margin-top: 20rpx;
}
&-title {
position: relative;
.bg {
width: 139rpx;
height: 13rpx;
vertical-align: text-bottom;
}
.text {
color: #1B1B1B;
font-size: 36rpx;
font-weight: 900;
position: absolute;
top: 0;
left: 0;
}
}
&-tools {
.btn-calendar {
display: inline-block;
width: auto;
height: auto;
background-color: #FFFFFF;
border: none;
padding: 21rpx 19rpx;
box-sizing: border-box;
margin: 0;
line-height: 1;
font-size: 24rpx;
color: #999999;
border-radius: 33rpx;
&-arrow {
width: 26rpx;
height: 12rpx;
margin-left: 10rpx;
}
}
}
&-list {
margin-top: 25rpx;
&-item {
color: #999999;
font-size: 24rpx;
& + & {
margin-top: 11rpx;
}
.highlight {
color: #1B1B1B;
font-size: 32rpx;
font-weight: 700;
}
&-row {
justify-content: space-between;
}
.count {
&-in {
color: #FF2020;
}
}
}
}
}
</style>

+ 166
- 0
pages_order/mine/withdraw.vue View File

@ -0,0 +1,166 @@
<template>
<view class="page">
<navbar title="提现" leftClick @leftClick="$utils.navigateBack" />
<view class="content">
<view class="card info">
<view class="info-row">
<view class="flex">
<text class="unit"></text>
<uv-input
v-model="count"
placeholder="请输入提现金额"
:placeholderStyle="{
color: '#999999',
fontSize: '38rpx',
fontWight: 900,
}"
:customStyle="{
flex: 1,
padding: 0,
fontWight: 900,
}"
fontSize="38rpx"
color="#1B1B1B"
border="none"
focus
></uv-input>
<button plain class="btn-simple btn-withdraw">全部提现</button>
</view>
<view class="account">{{ `可用金额:¥${account}` }}</view>
</view>
<view class="info-row">
<view class="flex title">
<text>提现至</text>
<image class="icon-wx" src="../static/center/wx.png"></image>
<text>微信</text>
<!-- todo: check -->
<txt>本人已实名微信账号</txt>
</view>
<view class="flex">
<view class="desc">余额提现至微信钱包提现限额2000元/日次日00:00恢复提现额度</view>
<button plain class="btn-auth">去授权</button>
</view>
</view>
</view>
<button class="btn-submit" @click="onConfirm">确定</button>
</view>
</view>
</template>
<script>
export default {
data() {
return {
count: null,
account: null,
}
},
onShow() {
// todo
// fetch user-info
this.account = 100.0
},
methods: {
onConfirm() {
// todo
},
},
}
</script>
<style scoped lang="scss">
.page {
background-color: $uni-bg-color;
}
.content {
padding: 20rpx;
}
.info {
border-radius: 16rpx;
padding: 60rpx 24rpx 50rpx 24rpx;
color: #999999;
font-size: 28rpx;
&-row {
padding: 0 17rpx 0 19rpx;
& + & {
margin-top: 30rpx;
border-top: 1rpx solid #CCCCCC;
padding-top: 33rpx;
}
.title {
justify-content: flex-start;
color: #666666;
font-weight: 700;
margin-bottom: 15rpx;
}
.desc {
flex: 1;
font-size: 24rpx;
}
}
.unit {
color: #1B1B1B;
font-size: 38rpx;
font-weight: 900;
margin-right: 13rpx;
}
.account {
padding-left: 19rpx;
margin-top: 21rpx;
}
.icon-wx {
width: 40rpx;
height: 34rpx;
margin: 0 8rpx;
}
.btn {
&-withdraw {
color: #04D6A3;
font-weight: 700;
font-size: 28rpx;
}
&-auth {
color: #04D6A3;
border-color: #04D6A3;
font-size: 28rpx;
line-height: 1;
padding: 12rpx 34rpx;
width: auto;
height: auto;
box-sizing: border-box;
border-radius: 33rpx;
margin-left: 22rpx;
}
}
}
.btn-submit {
width: calc(100% - 40rpx);
height: 90rpx;
background-color: $uni-bg-color-highlight;
color: $uni-text-color-highlight;
font-size: 36rpx;
border-radius: 45rpx;
position: fixed;
bottom: 159rpx;
left: 20rpx;
}
</style>

+ 1
- 1
pages_order/sharing/personal.vue View File

@ -74,7 +74,7 @@
this.detail = {
id: '001',
avatarUrl: '../static/temp-avator.png',
avatarUrl: '../static/temp-avatar.png',
nickName: '裂变星官方指导客服',
imageUrl: 'http://gips3.baidu.com/it/u=70459541,3412285454&fm=3028&app=3028&f=JPEG&fmt=auto?w=960&h=1280',
times: 10,


BIN
pages_order/static/center/arrow.png View File

Before After
Width: 28  |  Height: 28  |  Size: 380 B

BIN
pages_order/static/center/down.png View File

Before After
Width: 26  |  Height: 12  |  Size: 303 B

BIN
pages_order/static/center/overview-bg.png View File

Before After
Width: 710  |  Height: 374  |  Size: 16 KiB

BIN
pages_order/static/center/title-bg.png View File

Before After
Width: 139  |  Height: 13  |  Size: 466 B

BIN
pages_order/static/center/wx.png View File

Before After
Width: 40  |  Height: 34  |  Size: 848 B

pages_order/static/temp-avator.png → pages_order/static/temp-avatar.png View File


BIN
static/image/tabbar/home-a.png View File

Before After
Width: 34  |  Height: 35  |  Size: 744 B Width: 34  |  Height: 35  |  Size: 671 B

BIN
static/image/tabbar/home.png View File

Before After
Width: 34  |  Height: 35  |  Size: 671 B Width: 34  |  Height: 35  |  Size: 744 B

Loading…
Cancel
Save