mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-11-29 01:31:45 +00:00
weapp-api,export wx
This commit is contained in:
Vendored
+2
@@ -1403,3 +1403,5 @@ declare function setInterval(callback: functions, delay: number, rest: any): num
|
||||
* @param timeoutID 要取消的定时器的ID
|
||||
*/
|
||||
declare function clearInterval(timeoutID: number): number;
|
||||
|
||||
export default wx
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
import wx from './index'
|
||||
App({
|
||||
onLaunch: function () {
|
||||
//调用API从本地缓存中获取数据
|
||||
var logs = wx.getStorageSync('logs') as Array<any> || []
|
||||
let logs = wx.getStorageSync('logs') as Array<any> || []
|
||||
logs.unshift(Date.now())
|
||||
wx.setStorageSync('logs', logs)
|
||||
},
|
||||
getUserInfo: function (cb: Function) {
|
||||
var that = this;
|
||||
let that = this;
|
||||
if (this.globalData.userInfo) {
|
||||
typeof cb == "function" && cb(this.globalData.userInfo)
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user