源文件
This commit is contained in:
33
jeepay-ui-uapp-cashier/util/storageManage.js
Normal file
33
jeepay-ui-uapp-cashier/util/storageManage.js
Normal file
@@ -0,0 +1,33 @@
|
||||
/**
|
||||
* 存储管理对象
|
||||
* 目标:将现有系统的所有需要存储的数据,统一管理
|
||||
*
|
||||
* @author terrfly
|
||||
* @site https://www.jeequan.com
|
||||
* @date 2022/04/13 07:18
|
||||
*/
|
||||
|
||||
const model = {
|
||||
|
||||
// 渠道用户ID
|
||||
channelUserId: (key, channelUserId) => {
|
||||
if (channelUserId) {
|
||||
uni.setStorageSync(key, channelUserId) // 改变存储
|
||||
}
|
||||
return uni.getStorageSync(key)
|
||||
},
|
||||
iToken: (iToken) => {
|
||||
if (iToken) {
|
||||
uni.setStorageSync('iToken', iToken) // 改变存储
|
||||
}
|
||||
return uni.getStorageSync('iToken')
|
||||
},
|
||||
channelUniId:(key,channelUniId)=>{
|
||||
if (channelUniId) {
|
||||
uni.setStorageSync(key, channelUniId) // 改变存储
|
||||
}
|
||||
return uni.getStorageSync(key)
|
||||
}
|
||||
}
|
||||
|
||||
export default model
|
||||
Reference in New Issue
Block a user