From 13309008f04f8c32c08cfc505c5368eca625a97a Mon Sep 17 00:00:00 2001 From: heyi <806572349@qq.com> Date: Thu, 27 Jul 2023 10:41:07 +0800 Subject: [PATCH] update --- README.md | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 67c2006..fdb527f 100644 --- a/README.md +++ b/README.md @@ -21,23 +21,10 @@ npm i --save lodash 13. 开发之前请先熟悉plugins目录里面的每个js(除了auth.js)的使用类型 14. z-paging(已封装) 下拉刷新上拉加请使用这个插件 **https://ext.dcloud.net.cn/plugin?id=3935** 15. this.$ld(已封装) 已挂载全局 实用工具库(防抖动等) 文档库https://www.lodashjs.com/ -16. 上传图片接口封装 - ``` - // 用户头像上传 - export function uploadFile(data) { - return upload({ - url: 'xxxxxx', - name: data.name, - filePath: data.filePath - }) - } +16. common.js - success: function (res) { - uni.hideLoading() - let data = {name: 'avatarfile', filePath: res.tempFilePath} - uploadFile(data).then(response => { - uni.showToast({ title: "修改成功", icon: 'success' }) - uni.navigateBack() - }) - } ``` + 预览图片,并且长按保存 + toast + ``` +17. 最外面的是未登陆token拦截器 permission.js