From 7737d2289fe1b194fd652409f507d91d3f275ce4 Mon Sep 17 00:00:00 2001 From: chenxuhui Date: Thu, 3 Jan 2019 16:42:48 +0800 Subject: [PATCH] =?UTF-8?q?=E6=88=91=E7=9A=84=E9=A1=B5=E9=9D=A2=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E6=8E=A5=E5=8F=A3=E8=AF=B7=E6=B1=82=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/my/my.js | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/pages/my/my.js b/pages/my/my.js index 698e60b..e3d787b 100644 --- a/pages/my/my.js +++ b/pages/my/my.js @@ -1,6 +1,9 @@ // pages/my/my.js -Page({ +var app = getApp(); +var network = require("../../utils/net.js"); +var timechage = require("../../utils/dateTimeUtil.js"); +Page({ /** * 页面的初始数据 */ @@ -15,7 +18,24 @@ Page({ * 生命周期函数--监听页面加载 */ onLoad: function (options) { - + var that = this; + // 获取用户信息 + var method = '/MainSystem/B3MiniProgramRpc/XuRpcs/Employee/AccountRpc/GetWeiUserInfo'; + var params = [ + app.globalData.appID, + app.globalData.openID, + ]; + + network.transfer_request(method, params, function (res) { + //res就是我们请求接口返回的数据 + that.setData({ + meName: res.result.Bind_Name, + mePhone: res.result.Phone, + avatarUrl: res.result.HeadImgUrl + + }) + + }) }, /**