fix: 微信登录补充保存username和role
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Agent
2026-04-04 07:35:21 +00:00
parent 756444ef2b
commit d12eea7693
10597 changed files with 817047 additions and 3 deletions

45
node_modules/licia/State.js generated vendored Normal file
View File

@@ -0,0 +1,45 @@
var Emitter = require('./Emitter');
var each = require('./each');
var some = require('./some');
var toArr = require('./toArr');
exports = Emitter.extend({
className: 'State',
initialize: function(initial, events) {
this.callSuper(Emitter, 'initialize');
this.current = initial;
var self = this;
each(events, function(event, key) {
self[key] = buildEvent(key, event);
});
},
is: function(state) {
return this.current === state;
}
});
function buildEvent(name, event) {
var from = toArr(event.from);
var to = event.to;
return function() {
var args = toArr(arguments);
args.unshift(name);
var hasEvent = some(
from,
function(val) {
return this.current === val;
},
this
);
if (hasEvent) {
this.current = to;
this.emit.apply(this, args);
} else {
this.emit(
'error',
new Error(this.current + ' => ' + to + ' error'),
name
);
}
};
}
module.exports = exports;