lin
2026-05-11 2446c063b48f49650d14dd211719a6f08429eb87
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<template>
    <view class="wallet">
        <view class="startBar" style="background-color: #e3b400;"></view>
        <view class="wallet-header">
            <view class="wallet-header-edu" v-if="userInfo == null">
                <view class="wallet-header-price">预估额度<text v-if="Config">{{Config.edu}}</text></view>
                <view class="" v-if="Config && Config.put_open == 2">年利率(单利)18.00%,1000元用一天需0.50元</view>
            </view>
            <view class="wallet-header-edu" v-else>
                <view class="wallet-header-price">可用额度<text>{{userInfo.const}}</text></view>
                <view class="" v-if="Config && Config.put_open == 2">年利率(单利)18.00%,1000元用一天需0.50元</view>
            </view>
            <view class="wallet-header-apply" @tap="$util.checkGoPages('../cates/cates')">立即使用</view>
        </view>
        <view class="wallet-goods">
            <view class="wallet-goods-title">热门商品</view>
            <view class="goods-list">
                <view class="goods-item" v-for="(itm, idx) in goodsData" @click="$util.goPages('/pages/ginfo/ginfo?id=' + itm.id)">
                    <image lazy-load class="goods-icon" :src="itm.icon" mode=""></image>
                    <view class="goods-title">{{itm.title}}</view>
                    <view class="goods-price">
                        <view>¥</view>
                        <view class="red">{{itm.price}}</view>
                    </view>
                </view>
            </view>
        </view>
    </view>
</template>
 
<script>
    export default {
        data() {
            return {
                goodsData: [],
                userInfo: null,
                Config: null,
            }
        },
        onShow() {
            this.getUserInfo()
            this.getData()
            this.getConfig()
        },
        methods: {
            getUserInfo () {
                let t = this
                t.$util.post('User/getUser').then(res => {
                    if(res.code == 1){
                        this.userInfo = res.data
                    }
                })
            },
            getConfig () {
                let t = this
                t.$util.post('Index/getConfig').then(res => {
                    t.Config = res.data
                })
            },
            getData () {
                this.$util.post('Goods/getWalletGoods').then(res => {
                    this.goodsData = res.data
                })
            },
        }
    }
</script>
 
<style>
    @import url(@/static/css/wallet.css);
</style>