import store from '@/store/index'; const fullPath = store.getters['finance/fullPath']; console.log('fullPath: ', fullPath); export function setupFinance(app) { uni.$u.api = { ...uni.$u.api } || {}; // 根据任务id获取财务条信息 // uni.$u.api.getFinanceByTask = taskDetailId => uni.$u.post(`${fullPath}/getByTask`, { taskDetailId }); uni.$u.api.getFinanceByTask = taskDetailId => { return new Promise((resolve, reject) => { setTimeout(() => { resolve({ financeId: '123', budget: 10000 * 1000, bonus: 200 * 1000, projectExpend: 500 * 1000, dailyExpend: 500 * 1000, }); }, 100); }); }; }