场景
page文件里:
mixins:[Reflux.connect(Store)],getInitialState: function () { Action.getInitData(); },
store文件里:
var Store = Reflux.createStore({ listenables: [Action],data: {},onGetInitData : function(){ var t = this; DB.Gate.getInitData().then(function (data) { t.updateComponent(); }); },updateComponent: function () { this.trigger(this.data); },getInitialState: function() { var t = this; this.data = { }; return this.data; } }); module.exports = Store;