Files
ctms-client/apis/ctms/index.js

65 lines
1.4 KiB
JavaScript

/**
* @Author: 嗨噜客(三亚)<fm453>
* @Date: 2023-07-19 16:03:07
* @FilePath: apis/ctms/index.js
* @Description:
* @Email: 393213759@qq.com
* Copyright (c) 2025 by www.hiluker.cn, All Rights Reserved.
*/
import user from './user.js';
import ads from './ads.js';
import datas from './datas.js';
import order from './order.js';
import orderpre from './orderpre.js';
import notice from './notice.js';
import news from './news.js';
import vcode from './vcode.js';
import sync from './sync.js';
import fab from './fab.js';
import constant from "./_utils/constant.js";
import storage from './_utils/storage.js';
//处理缓存
const cache = {
size: function() {
var info = storage.info();
var size = info.currentSize,
kb, m;
kb = size % 1000;
m = size / 1000 - kb;
return {
'm': m,
'kb': kb
}
},
clear: function() {
uni.showModal({
title: '您在本机上存储的数据将被抹除,请确认',
cancelText: '我再想想',
confirmText: '确认',
success() {
storage.clean();
return true;
},
fail() {
return false;
}
})
}
}
const ctms = {
user,
ads,
datas,
order,
orderpre,
notice,
news,
vcode,
sync,
fab,
constant,
cache
}
export default ctms;