You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
1005 B

1 month ago
// app.js
import { setStorage, getStorage, removeStorage, clearStorage} from './utils/storage'
// import { asyncSetStorage, asyncGetStorage, asyncRemoveStorage, asyncClearStorage} from './utils/storage'
// import { toast} from './utils/extendApi'
App({
async onShow(){
//测试封装函数
// toast({toast:'o( ̄▽ ̄)',icon:'error'})
// setStorage('id',1)
// setStorage('identify',1)
// const name = getStorage('name')
// console.log(name)
// removeStorage('name')
// clearStorage()
// asyncSetStorage('name','Jerry').then((res) =>{
// console.log(res)
// })
// asyncSetStorage('age','28').then((res) =>{
// console.log(res)
// })
// asyncGetStorage('name').then((res) =>{
// console.log(res)
// })
// asyncRemoveStorage('name').then((res) =>{
// console.log(res)
// })
// asyncClearStorage().then((res) =>{
// console.log(res)
// })
},
globalData: {
userInfo: null
}
})