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.
shop-app/common/utils/sotrageSync.js

22 lines
394 B

/*
* @Author: ch
* @Date: 2022-03-23 14:07:07
* @LastEditors: ch
* @LastEditTime: 2022-03-23 14:14:37
* @Description: file content
*/
import { ToAsyncAwait } from '@/common/utils';
const getStorageSync = (key )=> ToAsyncAwait(async ()=>{
return Promise((resolve, reject)=>{
try{
cosnt val = await uni.getStorageSync(key);
resolve(val)
}catch (e){
reject(e)
}
})
})