import hosts from "@/request/config";
export function up(img) {
    return new Promise((resolve, reject) => {
        uni.uploadFile({
            url: hosts.Hhost + "v1/fileUpload",
            filePath: img,
            name: "images",
            header: {
                token: uni.getStorageSync("token"),
            },
            success: function (res) {
                let da = JSON.parse(res.data)
                if (da.code === 0) {
                    resolve(da.data.images)
                } else {
                    reject(da.data.images)
                }
            },
        });
    });
}