forked from huanz/wechat-mp-hack
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
267 additions
and
171 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,13 @@ | ||
/** | ||
* @desc login decorator | ||
*/ | ||
export default function login(imgcode){ | ||
return function (target, key, descriptor) { | ||
const func = descriptor.value; | ||
descriptor.value = function () { | ||
let args = arguments; | ||
return this.login(imgcode).then(() => { | ||
return func.apply(this, args); | ||
}); | ||
}; | ||
return descriptor; | ||
export default function login(target, key, descriptor) { | ||
const func = descriptor.value; | ||
descriptor.value = function () { | ||
let args = arguments; | ||
return this.login().then(() => { | ||
return func.apply(this, args); | ||
}); | ||
}; | ||
return descriptor; | ||
} |
Oops, something went wrong.