/**
 * 存储管理对象
 * 目标：将现有系统的所有需要存储的数据，统一管理
 *
 * @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
