123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184 |
- <template>
- <view class="my_account">
- <view class="account_top">
- <view class="account_name">账户余额</view>
- <view class="account_price">{{moneys}}<text>元</text></view>
- <view class="account_btn" @click="bindTxmoney">立即充值</view>
- </view>
- <!-- 我的列表 -->
- <view class="mylist">
- <view class="list_box" v-for="(item,index) in mylist" :key="index" @click="bindTomy(item.name)">
- <view class="list_left">
- <view class="list_img">
- <image :src="item.image"></image>
- </view>
- <view class="list_name">{{item.name}}</view>
- </view>
- <view class="list_right">
- <image v-if="globalImages" :src="globalImages + 'images/static/my/icon_go.png'"></image>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- import { waitForGlobalImages } from '@/utils/globalImageLoader'
- export default {
- data() {
- return {
- moneys:0,
- mylist: [{
- id: 1,
- name: '申请发票',
- image: '../../static/image/qqq.png'
- }, {
- id: 2,
- name: '钱包明细',
- image: '../../static/image/qq.png'
- }],
- xcxSelect: '是',
- globalImages: '',
- }
- },
- onLoad() {
- waitForGlobalImages().then((path) => {
- console.log('✅ 全局图片路径:', path)
- this.globalImages = path
- })
- },
- onShow() {
- this.taskData()
- },
- methods: {
- // 获取余额
- taskData() {
- this.$Request.getT('/app/userMoney/selectMyMoney').then(res => {
- if(res.code==0){
- if(res.data){
- this.moneys = res.data.money
- }
-
- }
- });
- },
- //充值
- bindTxmoney() {
- uni.navigateTo({
- url: '/pageA/Txmoney/Txmoney'
- })
- },
- bindTomy(name) {
- console.log(name)
- if (name == '申请发票') {
- uni.navigateTo({
- url: '/pageA/invoice/invoice'
- })
- } else if (name == '钱包明细') {
- uni.navigateTo({
- url: '/pageA/mymoneydetail/mymoneydetail'
- })
- }
- }
- }
- }
- </script>
- <style>
- .my_account {
- width: 100%;
- }
- .account_top {
- width: 100%;
- height: 280rpx;
- background: #FF7F00;
- position: relative;
- }
- .account_name {
- position: absolute;
- top: 80rpx;
- left: 80rpx;
- color: white;
- font-size: 30rpx;
- letter-spacing: 2rpx;
- }
- .account_price {
- position: absolute;
- top: 140rpx;
- left: 80rpx;
- color: white;
- font-size: 50rpx;
- letter-spacing: 2rpx;
- }
- .account_price text {
- font-size: 25rpx;
- margin-left: 10rpx;
- }
- .account_btn {
- width: 190rpx;
- height: 66rpx;
- background: #ffffff;
- color: #FF7F00;
- border-radius: 66rpx;
- text-align: center;
- line-height: 66rpx;
- position: absolute;
- top: 140rpx;
- right: 40rpx;
- font-size: 24rpx;
- }
- /* 我的列表 */
- .mylist {
- width: 93%;
- margin: 0 auto;
- background-color: #FFFFFF;
- margin-top: 10rpx;
- border-radius: 23rpx;
- }
- .list_box {
- width: 90%;
- margin: 0 auto;
- display: flex;
- height: 95rpx;
- }
- .list_left {
- flex: 1;
- display: flex;
- justify-content: left;
- align-items: center;
- }
- .list_img {
- margin-right: 10rpx;
- }
- .list_img image {
- width: 50rpx;
- height: 50rpx;
- }
- .list_name {
- font-size: 25rpx;
- letter-spacing: 2rpx;
- }
- .list_right {
- flex: 1;
- display: flex;
- justify-content: flex-end;
- align-items: center;
- }
- .list_right image {
- width: 12rpx;
- height: 20rpx;
- }
- </style>
|