From af1b1d4e191178b75c5fbd12f9994fa4c7071dc1 Mon Sep 17 00:00:00 2001 From: sa0ChunLuyu Date: Wed, 12 Oct 2022 11:28:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=20=20=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E6=A3=80=E6=B5=8B=20=20=E5=92=8C=20=E5=9B=BE=E7=89=87=E9=93=BE?= =?UTF-8?q?=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/index.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/api/index.js b/api/index.js index 07aefdf..7517c3a 100644 --- a/api/index.js +++ b/api/index.js @@ -6,3 +6,18 @@ export const yo = async (data) => await $post({ url: 'YO', data }) + +export const $image = (path) => { + return `${url_}${path}` +} + +export const $response = (response, then, error = () => {}) => { + if (response) { + if (response.code != 200) { + uni.$lu.toast(response.message); + error() + return + } + then() + } +}