From 9f49c8292d451e9ef554332d939fefdf945429af Mon Sep 17 00:00:00 2001 From: XiaoXinPro 14 IAH5R <568170040@qq.com> Date: Thu, 31 Aug 2023 13:57:55 +0800 Subject: [PATCH 1/2] upload --- src/pages/index/index.vue | 6 ++++++ src/pages/lookPhoto/index.vue | 6 +++--- src/pages/uploadPhoto/uploadPhoto.vue | 15 +++++++++++++-- 3 files changed, 22 insertions(+), 5 deletions(-) diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue index df019c0..9ce8b24 100644 --- a/src/pages/index/index.vue +++ b/src/pages/index/index.vue @@ -241,6 +241,7 @@ const pageClass = computed(() => { //#region 头像 const avatarUrl = ref(null); function chooseAvatar() { + uni.setStorageSync("action", 1); uni.switchTab({ url: "/pages/uploadPhoto/uploadPhoto", }); @@ -308,8 +309,13 @@ const tabList = ref([ ]); const showListActive = ref(1); function clickTabHandle(e) { + if (!userInfoModulesPinia.token) { + return; + } + showListActive.value = e.id; console.log(e.id, "id"); + if (e.id == 1) { getPhotoList(pageSize1.value, pageNum1.value); } else if (e.id == 2) { diff --git a/src/pages/lookPhoto/index.vue b/src/pages/lookPhoto/index.vue index 694a137..2ec4e00 100644 --- a/src/pages/lookPhoto/index.vue +++ b/src/pages/lookPhoto/index.vue @@ -111,9 +111,9 @@ function downloadImg() { success: () => { //提示保存成功 uni.showToast({ - mask: true, title: "保存成功", - duration: 3000, + iconL: "success", + duration: 2000, }); }, fail: (res2) => { @@ -127,7 +127,7 @@ function downloadImg() { }, complete: function () { //隐藏提示 - uni.hideLoading(); + // uni.hideLoading(); }, }); } diff --git a/src/pages/uploadPhoto/uploadPhoto.vue b/src/pages/uploadPhoto/uploadPhoto.vue index 50f4519..e310d79 100644 --- a/src/pages/uploadPhoto/uploadPhoto.vue +++ b/src/pages/uploadPhoto/uploadPhoto.vue @@ -81,8 +81,8 @@