import user from './user.js'; import ads from './ads.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, order, orderpre, notice, news, vcode, sync, fab, constant, cache } export default ctms;