import { $post } from '@/lu/axios.js' import $config from '@/config.js' export const yo = async (data) => await $post({ url: `${$config.url}/api/yo`, data }) export const $image = (path) => { const path_ret = ['http://', 'https://', ';base64,'] for (let i = 0; i < path_ret.length; i++) { if (path.indexOf(path_ret[i]) !== -1) { return path } } return `${$config.url}${path}` } export const $response = (response, then, error = () => {}) => { if (response) { if (response.code != 200) { uni.$lu.toast(response.message); error() return } then() } }