<template>
|
<view class="wallet">
|
<view class="startBar" style="background-color: #37AA25;"></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>
|