After Width: | Height: | Size: 994 B |
After Width: | Height: | Size: 157 KiB |
After Width: | Height: | Size: 162 KiB |
After Width: | Height: | Size: 151 KiB |
After Width: | Height: | Size: 161 KiB |
After Width: | Height: | Size: 165 KiB |
After Width: | Height: | Size: 149 KiB |
After Width: | Height: | Size: 161 KiB |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 4.1 KiB |
After Width: | Height: | Size: 3.5 KiB |
After Width: | Height: | Size: 3.9 KiB |
After Width: | Height: | Size: 3.7 KiB |
After Width: | Height: | Size: 4.1 KiB |
@ -0,0 +1,66 @@ |
|||
// pages/member/member.js
|
|||
Page({ |
|||
|
|||
/** |
|||
* 页面的初始数据 |
|||
*/ |
|||
data: { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面加载 |
|||
*/ |
|||
onLoad(options) { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面初次渲染完成 |
|||
*/ |
|||
onReady() { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面显示 |
|||
*/ |
|||
onShow() { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面隐藏 |
|||
*/ |
|||
onHide() { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 生命周期函数--监听页面卸载 |
|||
*/ |
|||
onUnload() { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 页面相关事件处理函数--监听用户下拉动作 |
|||
*/ |
|||
onPullDownRefresh() { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 页面上拉触底事件的处理函数 |
|||
*/ |
|||
onReachBottom() { |
|||
|
|||
}, |
|||
|
|||
/** |
|||
* 用户点击右上角分享 |
|||
*/ |
|||
onShareAppMessage() { |
|||
|
|||
} |
|||
}) |
@ -0,0 +1,4 @@ |
|||
{ |
|||
"usingComponents": {}, |
|||
"navigationBarTitleText": "会员中心" |
|||
} |
@ -0,0 +1,2 @@ |
|||
<!--pages/member/member.wxml--> |
|||
<text>pages/member/member.wxml</text> |
@ -0,0 +1 @@ |
|||
/* pages/member/member.wxss */ |
@ -1,2 +1,23 @@ |
|||
<!--pages/set/password.wxml--> |
|||
<text>pages/set/password.wxml</text> |
|||
<view class="page"> |
|||
|
|||
<!--密码登录--> |
|||
<view class='password'> |
|||
<!-- 旧密码 --> |
|||
<view class="userCs"> |
|||
<!-- <image src="/images/user.png" class="user"></image> --> |
|||
<input placeholder="请输入原密码" type="password" value="{{address}}" bindinput="originalInput" /> |
|||
</view> |
|||
<!-- 新密码 --> |
|||
<view class=passwordCs"> |
|||
<!-- <image src="/images/pass.png" class="pass"></image> --> |
|||
<input placeholder="请输入新密码" type="password" value="{{newPwd}}" bindinput="passwordInput" /> |
|||
</view> |
|||
<!-- 密码 --> |
|||
<view class=passwordCs"> |
|||
<!-- <image src="/images/pass.png" class="pass"></image> --> |
|||
<input placeholder="请确认新密码" type="password" value="{{confirmpwd}}" bindinput="confirmInput" /> |
|||
</view> |
|||
<view class="loginView" bindtap="confirmAct">确认</view> |
|||
</view> |
|||
</view> |
|||
|
@ -1 +1,79 @@ |
|||
/* pages/set/password.wxss */ |
|||
page{ |
|||
background-color: #F4F5F6; |
|||
} |
|||
.password{ |
|||
display: flex; |
|||
flex-direction:column; |
|||
} |
|||
/* 图片+输入框+下划线的父容器view */ |
|||
.userCs{ |
|||
margin-top: 50rpx; |
|||
margin-left: 30rpx; |
|||
display: flex; |
|||
width:690rpx ; |
|||
height: 110rpx ; |
|||
background-color: white; |
|||
border-radius: 20rpx; |
|||
} |
|||
/* 用户名图标 */ |
|||
.userCs .user{ |
|||
margin-top: 25rpx; |
|||
margin-left: 30rpx; |
|||
width: 55rpx; |
|||
height: 55rpx; |
|||
} |
|||
/* 用户名输入框 */ |
|||
.userCs input{ |
|||
width: 500rpx; |
|||
font-size: 30rpx ; |
|||
margin-top: 35rpx; |
|||
margin-left: 30rpx; |
|||
line-height: 55rpx; |
|||
} |
|||
/* 密码图标+输入框+小眼睛图标+下划线父容器view */ |
|||
.passwordCs{ |
|||
margin-top: 30rpx; |
|||
margin-left: 30rpx; |
|||
display: flex; |
|||
width:690rpx ; |
|||
height: 110rpx ; |
|||
background-color: white; |
|||
border-radius: 20rpx; |
|||
} |
|||
/* 密码图标 */ |
|||
.passwordCs .pass{ |
|||
margin-top: 25rpx; |
|||
margin-left: 30rpx; |
|||
width: 55rpx; |
|||
height: 55rpx; |
|||
} |
|||
/* 眼睛 图标*/ |
|||
.passwordCs .eye{ |
|||
margin-top: 5rpx; |
|||
margin-left: 65rpx; |
|||
width: 55rpx; |
|||
height: 55rpx; |
|||
} |
|||
/* 密码输入框 */ |
|||
.passwordCs input{ |
|||
width: 500rpx; |
|||
font-size: 30rpx ; |
|||
margin-top: 35rpx; |
|||
margin-left: 30rpx; |
|||
line-height: 55rpx; |
|||
} |
|||
.loginView{ |
|||
/* margin: 300rpx 90rpx 25rpx; */ |
|||
margin-top: 100rpx; |
|||
margin-left: 30rpx; |
|||
width: 690rpx; |
|||
height: 80rpx; |
|||
background-color:#F95B43; |
|||
border-radius: 20rpx; |
|||
font-size: 32rpx; |
|||
color: white; |
|||
display: flex; |
|||
align-items: center; |
|||
justify-content: center; |
|||
} |
|||
|
@ -1 +1,4 @@ |
|||
{} |
|||
{ |
|||
"usingComponents": {}, |
|||
"navigationBarTitleText": "我的积分" |
|||
} |
@ -1,65 +0,0 @@ |
|||
// pages/user/transfer.js
|
|||
var app = getApp() |
|||
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) { |
|||
console.log(e) |
|||
console.log('session_key 未过期' + app.globalData.userInfo.session_key) |
|||
//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 that = this; |
|||
var user_id = e.detail.value.user_id; |
|||
|
|||
wx.redirectTo({//跳转
|
|||
url: "../user/transfer1?user_id=" + user_id, |
|||
}) |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
}) |
@ -1,3 +0,0 @@ |
|||
{ |
|||
"navigationBarTitleText": "转账给好友" |
|||
} |
@ -1,44 +0,0 @@ |
|||
<!--pages/user/transfer.wxml--> |
|||
<view class="body" wx:if="{{remind}}"> |
|||
<view class='zong'> |
|||
<view class="spinner" > |
|||
<view class="spinner-container container1"> |
|||
<view class="circle1"></view> |
|||
<view class="circle2"></view> |
|||
<view class="circle3"></view> |
|||
<view class="circle4"></view> |
|||
</view> |
|||
<view class="spinner-container container2"> |
|||
<view class="circle1"></view> |
|||
<view class="circle2"></view> |
|||
<view class="circle3"></view> |
|||
<view class="circle4"></view> |
|||
</view> |
|||
<view class="spinner-container container3"> |
|||
<view class="circle1"></view> |
|||
<view class="circle2"></view> |
|||
<view class="circle3"></view> |
|||
<view class="circle4"></view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<!-- 加载页面结束 --> |
|||
<block wx:else> |
|||
<form bindsubmit="withdrawals"> |
|||
<view class="page"> |
|||
<view class="section"> |
|||
<view class="text" > |
|||
<text class='t_3' >对方ID: </text> |
|||
</view> |
|||
<view class='inp'> |
|||
<input name="user_id" style='font-size:13px;width:100%;' name='user_id' placeholder="请输入要转账的好友ID" type='text' /> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<view> |
|||
<button form-type='submit' class="tx" style='background-color:{{bgcolor}};border-radius:0px;'> 下一步 </button> |
|||
</view> |
|||
</form> |
|||
</block> |
|||
|
@ -1,97 +0,0 @@ |
|||
/* pages/user/transfer.wxss */ |
|||
page{ |
|||
background-color: rgb(240, 239, 245); |
|||
} |
|||
.page{ |
|||
width:95%; |
|||
margin:20px auto; |
|||
background-color:#fff; |
|||
border-radius:25rpx; |
|||
|
|||
} |
|||
|
|||
.balance{ |
|||
text-align: center; |
|||
padding:10px 20px; |
|||
font-size: 18px; |
|||
} |
|||
.bb{ |
|||
text-align: center; |
|||
font-size: 12px; |
|||
} |
|||
.Withdraw{ |
|||
padding: 10px 20px; |
|||
} |
|||
|
|||
.cash{ |
|||
border: 1px solid #ddd; |
|||
flex: 1; |
|||
margin-left: -1px; |
|||
font-size: 12px; |
|||
padding: 0 10px; |
|||
line-height: 30px; |
|||
height: 30px; |
|||
} |
|||
|
|||
.tx{ |
|||
/* background-color: #836FFF; */ |
|||
background-color: #48474c; |
|||
color: #fff; |
|||
text-align: center; |
|||
height: 45px; |
|||
line-height: 45px; |
|||
bottom: 0; |
|||
width: 100%; |
|||
position: fixed; |
|||
} |
|||
.Phone{ |
|||
/* border: 1px solid #ddd; |
|||
height: 40px; |
|||
line-height: 40px; |
|||
text-align: center; |
|||
border-radius:5px; */ |
|||
font-size: 28rpx; |
|||
width: 30%; |
|||
padding-left:2%; |
|||
margin-top:5px; |
|||
|
|||
} |
|||
|
|||
.section{ |
|||
padding: 12px 0; |
|||
width: 100%; |
|||
display:flex; |
|||
flex-direction:row; |
|||
font-size: 16px; |
|||
/* justify-content: center; */ |
|||
} |
|||
.inp{ |
|||
display:flex; |
|||
align-items:center; |
|||
width: 70%; |
|||
margin-top:2px; |
|||
|
|||
} |
|||
.t_3{ |
|||
margin-left: 15px; |
|||
font-size:13px; |
|||
} |
|||
.text{ |
|||
width: 27%; |
|||
text-align:center; |
|||
} |
|||
.xt{ |
|||
height:1px; |
|||
width:87%; |
|||
background:#eee; |
|||
margin:auto; |
|||
|
|||
} |
|||
.sj_btn{ |
|||
background:#FF6347; |
|||
color:#fff; |
|||
|
|||
font-size:26rpx; |
|||
margin-left:250rpx; |
|||
|
|||
} |
@ -1,175 +0,0 @@ |
|||
// pages/user/transfer1.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) { |
|||
console.log(e) |
|||
console.log('session_key 未过期' + app.globalData.userInfo.session_key) |
|||
//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 |
|||
}); |
|||
var that = this; |
|||
var user_id = options.user_id; |
|||
var colo = options.user_id; |
|||
var num = colo.substring(4) |
|||
var cor = num.replace(/\b(0+)/gi, "") |
|||
if (num == 0) { |
|||
user_id = "user" + 0 |
|||
} else { |
|||
user_id = "user" + cor |
|||
} |
|||
|
|||
|
|||
wx.request({ |
|||
url: app.d.ceshiUrl + '&action=user&m=selectuser', |
|||
method: 'post', |
|||
data: { |
|||
user_id: user_id, |
|||
openid: app.globalData.userInfo.openid |
|||
}, |
|||
header: { |
|||
'Content-Type': 'application/x-www-form-urlencoded' |
|||
}, |
|||
success: function (res) { |
|||
var status = res.data.status; |
|||
if (status == 1) { |
|||
var wx_name = res.data.user.wx_name; |
|||
var headimgurl = res.data.user.headimgurl; |
|||
var money = res.data.user.money; |
|||
that.setData({ |
|||
wx_name: wx_name, |
|||
headimgurl: headimgurl, |
|||
money: money, |
|||
transfer_multiple: res.data.user.transfer_multiple, |
|||
}); |
|||
|
|||
} else { |
|||
wx.showToast({ |
|||
title: res.data.err, |
|||
icon: 'loading', |
|||
duration: 1500 |
|||
}); |
|||
wx.redirectTo({ |
|||
url: "../user/transfer", |
|||
}) |
|||
} |
|||
}, |
|||
error: function (e) { |
|||
wx.showToast({ |
|||
title: '网络异常!', |
|||
duration: 2000 |
|||
}); |
|||
} |
|||
}); |
|||
}, |
|||
//转账给好友
|
|||
withdrawals1: function (e) { |
|||
console.log(this); |
|||
var that = this; |
|||
console.log(6666) |
|||
var money = Number(e.detail.value.money); |
|||
var user_id = that.options.user_id; |
|||
var mon = Number(that.data.money);//账户余额
|
|||
console.log(mon); |
|||
console.log(money); |
|||
if (money > mon) { |
|||
wx.showToast({ |
|||
title: '余额不足', |
|||
duration: 2000 |
|||
}); |
|||
} |
|||
if (money < 0 || money == '') { |
|||
wx.showToast({ |
|||
title: '正确填写转账金额', |
|||
duration: 2000 |
|||
}); |
|||
} |
|||
if (mon >= money && money > 0) { |
|||
wx.request({ |
|||
url: app.d.ceshiUrl + '&action=user&m=transfer', |
|||
method: 'post', |
|||
data: { |
|||
user_id: user_id, |
|||
openid: app.globalData.userInfo.openid, |
|||
money: money |
|||
}, |
|||
header: { |
|||
'Content-Type': 'application/x-www-form-urlencoded' |
|||
}, |
|||
success: function (res) { |
|||
var status = res.data.status; |
|||
if (status == 1) { |
|||
wx.showToast({ |
|||
title: res.data.err, |
|||
icon: 'loading', |
|||
duration: 1500 |
|||
}); |
|||
|
|||
wx.redirectTo({ |
|||
url: "../user/wallet", |
|||
}); |
|||
|
|||
} else { |
|||
wx.showToast({ |
|||
title: res.data.err, |
|||
icon: 'none', |
|||
duration: 1500 |
|||
}); |
|||
} |
|||
|
|||
}, |
|||
error: function (e) { |
|||
wx.showToast({ |
|||
title: '网络异常!', |
|||
duration: 2000 |
|||
}); |
|||
} |
|||
}); |
|||
} |
|||
|
|||
} |
|||
|
|||
|
|||
|
|||
}) |
@ -1,3 +0,0 @@ |
|||
{ |
|||
"navigationBarTitleText": "转账给好友" |
|||
} |
@ -1,61 +0,0 @@ |
|||
<!--pages/user/transfer1.wxml--> |
|||
<!--pages/user/transfer.wxml--> |
|||
<view class="body" wx:if="{{remind}}"> |
|||
<view class='zong'> |
|||
<view class="spinner" > |
|||
<view class="spinner-container container1"> |
|||
<view class="circle1"></view> |
|||
<view class="circle2"></view> |
|||
<view class="circle3"></view> |
|||
<view class="circle4"></view> |
|||
</view> |
|||
<view class="spinner-container container2"> |
|||
<view class="circle1"></view> |
|||
<view class="circle2"></view> |
|||
<view class="circle3"></view> |
|||
<view class="circle4"></view> |
|||
</view> |
|||
<view class="spinner-container container3"> |
|||
<view class="circle1"></view> |
|||
<view class="circle2"></view> |
|||
<view class="circle3"></view> |
|||
<view class="circle4"></view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
<!-- 加载页面结束 --> |
|||
<block wx:else> |
|||
<form bindsubmit="withdrawals1"> |
|||
<view class="page"> |
|||
<view class='user_top' style="background-color:{{bgcolor}}"> |
|||
<view class='user_top_two'> |
|||
<image src="{{headimgurl ? headimgurl:'../../images/users.png'}}" /> |
|||
<text class='user_mc'>{{wx_name}}</text> |
|||
</view> |
|||
</view> |
|||
<view class="section"> |
|||
<view class="text"> |
|||
<text class='t_3' >转账金额: </text> |
|||
</view> |
|||
<view class='inp'> |
|||
<input name="money" style='font-size:13px;width:100%;' placeholder="请输入转账金额" type='digit' /> |
|||
<!-- <input name="money" value='{{user}}' name='money' /> --> |
|||
</view> |
|||
</view> |
|||
</view> |
|||
|
|||
<view> |
|||
<text style='margin-left:13px;font-size:12px;color:gray;'>1. 最多可转金额为{{money}}</text> |
|||
</view> |
|||
<view> |
|||
<text style='margin-left:13px;font-size:12px;color:gray;'>2. 转账金额必须为{{transfer_multiple}}的倍数</text> |
|||
</view> |
|||
|
|||
<view> |
|||
<button form-type='submit' class="tx" style='background-color:{{bgcolor}};border-radius:0px;'> 下一步 </button> |
|||
</view> |
|||
</form> |
|||
</block> |
|||
|
|||
|
@ -1,124 +0,0 @@ |
|||
/* pages/user/transfer1.wxss */ |
|||
/* pages/user/transfer.wxss */ |
|||
page{ |
|||
background-color: rgb(240, 239, 245); |
|||
} |
|||
.page{ |
|||
width:95%; |
|||
margin:20px auto; |
|||
background-color:#fff; |
|||
border-radius:25rpx; |
|||
margin-bottom:10px; |
|||
|
|||
|
|||
} |
|||
|
|||
.balance{ |
|||
text-align: center; |
|||
padding:10px 20px; |
|||
font-size: 18px; |
|||
} |
|||
.bb{ |
|||
text-align: center; |
|||
font-size: 12px; |
|||
} |
|||
.Withdraw{ |
|||
padding: 10px 20px; |
|||
} |
|||
.user_mc{ |
|||
margin-top:15px; |
|||
font-size:32px; |
|||
margin-left:35px; |
|||
color: #fff; |
|||
} |
|||
.user_top{ |
|||
height:320rpx; |
|||
} |
|||
.user_top_two{ |
|||
display: -webkit-flex; |
|||
display: flex; |
|||
flex-direction: row; |
|||
justify-content: flex-start; |
|||
padding-left:40px; |
|||
padding-bottom:10px; |
|||
padding-top:25px; |
|||
|
|||
} |
|||
.user_top image{ |
|||
width:80px; |
|||
height: 80px; |
|||
border-radius:100px; |
|||
border:2px solid #fff; |
|||
} |
|||
.cash{ |
|||
border: 1px solid #ddd; |
|||
flex: 1; |
|||
margin-left: -1px; |
|||
font-size: 12px; |
|||
padding: 0 10px; |
|||
line-height: 30px; |
|||
height: 30px; |
|||
} |
|||
|
|||
.tx{ |
|||
/* background-color: #836FFF; */ |
|||
background-color: #48474c; |
|||
color: #fff; |
|||
text-align: center; |
|||
height: 45px; |
|||
line-height: 45px; |
|||
bottom: 0; |
|||
width: 100%; |
|||
position: fixed; |
|||
} |
|||
.Phone{ |
|||
/* border: 1px solid #ddd; |
|||
height: 40px; |
|||
line-height: 40px; |
|||
text-align: center; |
|||
border-radius:5px; */ |
|||
font-size: 28rpx; |
|||
width: 30%; |
|||
padding-left:2%; |
|||
margin-top:5px; |
|||
|
|||
} |
|||
|
|||
.section{ |
|||
padding: 12px 0; |
|||
width: 100%; |
|||
display:flex; |
|||
flex-direction:row; |
|||
font-size: 16px; |
|||
/* justify-content: center; */ |
|||
} |
|||
.inp{ |
|||
display:flex; |
|||
align-items:center; |
|||
width: 70%; |
|||
margin-top:2px; |
|||
|
|||
} |
|||
.t_3{ |
|||
margin-left: 15px; |
|||
font-size:13px; |
|||
} |
|||
.text{ |
|||
width: 27%; |
|||
text-align:center; |
|||
} |
|||
.xt{ |
|||
height:1px; |
|||
width:87%; |
|||
background:#eee; |
|||
margin:auto; |
|||
|
|||
} |
|||
.sj_btn{ |
|||
background:#FF6347; |
|||
color:#fff; |
|||
|
|||
font-size:26rpx; |
|||
margin-left:250rpx; |
|||
|
|||
} |
@ -1,61 +0,0 @@ |
|||
// 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, |
|||
}) |
|||
} |
|||
|
|||
|
|||
|
|||
}) |
@ -1,3 +1,4 @@ |
|||
{ |
|||
"usingComponents": {}, |
|||
"navigationBarTitleText": "我的钱包" |
|||
} |