Open wangsenyan opened 6 years ago
init: function (http) { var self = this; self.super("init", http); self.assign({ jsPath: 'http://js.lankaola.com/js/??', cssPath: 'http://js.lankaola.com/css/??', imgPath: 'http://img.lankaola.com/images/', productImgPath: productImgUrl, globalFid: 0 }); return self.session('userInfo').then(function (userInfo) { if (isEmpty(userInfo)) { self.assign({ loginStatus: 0, userInfo: {} }) } else { self.assign({ loginStatus: 1, userInfo: userInfo }) } return Promise.resolve(); }) } 改成 init(http) { var self = this; super.init( http); self.assign({ productImgPath: productImgUrl, globalFid: 0 }); return self.session('userInfo').then(function (userInfo) { if (isEmpty(userInfo)) { self.assign({ loginStatus: 0, userInfo: {} }) } else { self.assign({ loginStatus: 1, userInfo: userInfo }) } return Promise.resolve(); }) } 只有将return 前面的self.assign()中的数据传到前端,后面的不能传递了,求大神解释下啊