|
@@ -1,4 +1,4 @@
|
|
|
-import APIClient from '../../utils/httpUtil.js'
|
|
|
+// import APIClient from '../../utils/httpUtil.js'
|
|
|
export const myInit = (that) => {
|
|
|
that.setData({
|
|
|
myData: {
|
|
@@ -33,23 +33,23 @@ export const myInit = (that) => {
|
|
|
}
|
|
|
|
|
|
that.userInfo = function () {
|
|
|
- // const userInfo = wx.getStorageSync('user');
|
|
|
- // console.log(userInfo.data.data.data);
|
|
|
- // that.data.myData.user = userInfo.data.data.data;//直接赋值 给 myData的user对象。
|
|
|
- // that.setData({
|
|
|
- // myData: that.data.myData,
|
|
|
- // },()=>{
|
|
|
- // console.log('myData的user对象,赋值成功')
|
|
|
- // console.log(that.data.myData);
|
|
|
- // });
|
|
|
- APIClient.getOpenidSessionKey(res => {
|
|
|
- console.log(res.data.data.data);
|
|
|
- that.data.myData.user = res.data.data.data;//挂载user对象。
|
|
|
+ const userInfo = wx.getStorageSync('user');
|
|
|
+ console.log(userInfo.data.data.data);
|
|
|
+ that.data.myData.user = userInfo.data.data.data;//直接赋值 给 myData的user对象。
|
|
|
that.setData({
|
|
|
- myData: that.data.myData
|
|
|
- },() => {
|
|
|
- console.log(that.data.myData)
|
|
|
+ myData: that.data.myData,
|
|
|
+ },()=>{
|
|
|
+ console.log('myData的user对象,赋值成功')
|
|
|
+ console.log(that.data.myData);
|
|
|
});
|
|
|
- });
|
|
|
+ // APIClient.getOpenidSessionKey(res => {
|
|
|
+ // console.log(res.data.data.data);
|
|
|
+ // that.data.myData.user = res.data.data.data;//挂载user对象。
|
|
|
+ // that.setData({
|
|
|
+ // myData: that.data.myData
|
|
|
+ // },() => {
|
|
|
+ // console.log(that.data.myData)
|
|
|
+ // });
|
|
|
+ // });
|
|
|
}()
|
|
|
}
|