// pages/my/account/detail/detail.js
const app=getApp();
Page({

    /**
     * 页面的初始数据
     */
    data: {
        detail:""
    },

    /**
     * 生命周期函数--监听页面加载
     */
    onLoad: function (options) {
       this. getwallet(options.id) 
    },

    getwallet(id) {
        var that = this;
        app.api.useApi(app.globalData.baseAppUrl + "api/wallet/desc", {
            id:id
        }, "get").then(function (res) {
            if (res.code != 200) {
                wx.showLoading({
                    title: res.message.msg,
                })
                setTimeout(function () {
                    wx.hideLoading({
                        success: (res) => { },
                    })
                }, 2000);
    
            } else {
                console.log(res.message.data);
                that.setData({
                 
                  detail:res.message.data.wallets
                })
            }
    
        }).catch(function (err) {
            console.log(222);
        })
    
    }
})