You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

61 lines
1.5 KiB

// pages/user/transfer_jifen.js
var app = getApp()
var WXAPI = require('../../utils/server.js');
Page({
/**
* 页面的初始数据
*/
data: {
inp_money: 0,
iv: '',
encryptedData: '',
islogin: false,
remind: '加载中',
bank_name: ''
},
//页面加载完成函数
onReady: function () {
var that = this;
that.setData({
remind: ''
});
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
wx.checkSession({
success: function (e) {
//session_key 未过期,并且在本生命周期一直有效
app.globalData.userInfo['session_key'] = app.globalData.userInfo.session_key;
},
fail: function () {
// session_key 已经失效,需要重新执行登录流程
wx.login({
success: function (res) {
var code = res.code;
that.globalData.code = res.code;
//取出本地存储用户信息,解决需要每次进入小程序弹框获取用户信息
var userinfo = wx.getStorageSync('userInfo');
that.globalData.userInfo = userinfo;
app.getUserSessionKey(code, cb);
}
}); //重新登录
}
});
this.setData({
bgcolor: app.d.bf_color
});
},
//获取好友ID
withdrawals: function (e) {
var user_id = e.detail.value.user_id;
wx.redirectTo({//跳转
url: "../user/transfer_jifen1?user_id=" + user_id,
})
}
})