|
@@ -5,9 +5,8 @@ const app = getApp()
|
|
|
Page({
|
|
|
data: {
|
|
|
// 个人信息
|
|
|
- userInfo: {
|
|
|
-
|
|
|
- }
|
|
|
+ videoUrl: 'https://vd3.bdstatic.com/mda-kar9n2ip1u508ewq/hd/mda-kar9n2ip1u508ewq.mp4?pd=20',
|
|
|
+ userInfo: {}
|
|
|
},
|
|
|
//事件处理函数
|
|
|
// 统计信息
|
|
@@ -97,16 +96,13 @@ Page({
|
|
|
url: '../user/user'
|
|
|
})
|
|
|
},
|
|
|
-
|
|
|
onLoad: function () {
|
|
|
+ let data = app.globalData.userInfo;
|
|
|
+ this.setData({ userInfo: data })
|
|
|
wx.getUserInfo({
|
|
|
success: res => {
|
|
|
var data = res.userInfo;
|
|
|
- data.phone = '17319450324',
|
|
|
- data.grade = '业务员',
|
|
|
- this.setData({
|
|
|
- userInfo: data,
|
|
|
- })
|
|
|
+ this.setData({ "userInfo.avatarUrl": data.avatarUrl })
|
|
|
},
|
|
|
fail: err => {
|
|
|
wx.showToast({
|
|
@@ -114,30 +110,7 @@ Page({
|
|
|
icon: 'error',
|
|
|
duration: 2000
|
|
|
})
|
|
|
- wx.redirectTo({
|
|
|
- url: '/pages/index/index',
|
|
|
- })
|
|
|
}
|
|
|
- }),
|
|
|
- wx.request({
|
|
|
- url: app.globalData.publicUrl + '/api/market/product/newquery',
|
|
|
- method: "get",
|
|
|
- data: { skip: 0, limit: 10 },
|
|
|
- success: (res) => {
|
|
|
- if (res.data.errcode == '0') {
|
|
|
- wx.showToast({
|
|
|
- title: '搜索成功',
|
|
|
- icon: 'success',
|
|
|
- duration: 2000
|
|
|
- })
|
|
|
- } else {
|
|
|
- wx.showToast({
|
|
|
- title: '查询失败',
|
|
|
- icon: 'error',
|
|
|
- duration: 2000
|
|
|
- })
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
+ })
|
|
|
},
|
|
|
})
|