From 7db8a995b2490c7a828ee6c93aebaee148eab92b Mon Sep 17 00:00:00 2001
From: chris <510148846@qq.com>
Date: Thu, 28 Mar 2024 11:34:19 +0800
Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E5=A2=9E=E5=8A=A0=E2=80=98=E2=80=98?=
=?UTF-8?q?=E8=AE=BE=E7=BD=AE=E2=80=94=E2=80=94=E5=AE=B6=E9=95=BF=E4=BA=8C?=
=?UTF-8?q?=E7=BB=B4=E7=A0=81=E2=80=99=E2=80=99=E5=8A=9F=E8=83=BD=202?=
=?UTF-8?q?=E3=80=81=E4=BF=AE=E5=A4=8D=E5=9B=BE=E7=89=87=E4=B8=8A=E4=BC=A0?=
=?UTF-8?q?=E7=BB=84=E4=BB=B6=E5=9C=A8app=E7=AB=AF=E5=88=A0=E9=99=A4?=
=?UTF-8?q?=E5=9B=BE=E7=89=87=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../ch-image-uploader/ch-image-uploader.vue | 12 ++++++-----
pages/setting/setting.vue | 20 +++++++++++++++----
2 files changed, 23 insertions(+), 9 deletions(-)
diff --git a/components/ch-image-uploader/ch-image-uploader.vue b/components/ch-image-uploader/ch-image-uploader.vue
index b402047..499daef 100644
--- a/components/ch-image-uploader/ch-image-uploader.vue
+++ b/components/ch-image-uploader/ch-image-uploader.vue
@@ -1,9 +1,9 @@
-
+
-
+
@@ -78,6 +78,7 @@ function handleSelect (e) {
extension: props.extList,
sourceType: props.sourceType,
success: (res) => {
+ console.log(res)
if (props.limit > 1) {
const newImageList = filterImage(res.tempFiles)
imageList.value = [...imageList.value, ...newImageList]
@@ -122,8 +123,9 @@ function upload () {
})
}
-function delImg (delName) {
- imageList.value = imageList.value.filter(item => item.name !== delName)
+function delImg (path) {
+ imageList.value = imageList.value.filter(item => item.path !== path)
+ emit('update:modelValue', imageList.value)
}
// 格式化image列表
@@ -141,7 +143,7 @@ function formatImageFiles (fileList) {
// 过滤重复的图片
function filterImage (images) {
return images.filter(item => {
- const result = imageList.value.find(img => img.name === item.name );
+ const result = imageList.value.find(img => img.path === item.path );
return !result;
})
}
diff --git a/pages/setting/setting.vue b/pages/setting/setting.vue
index c812c0f..f370341 100644
--- a/pages/setting/setting.vue
+++ b/pages/setting/setting.vue
@@ -8,7 +8,12 @@
{{ appInfo.appWgtVersion }}
+
+
+
+
+
@@ -16,16 +21,19 @@
import checkUpdate from '@/uni_modules/uni-upgrade-center-app/utils/check-update';
import { reactive, ref, toRefs } from 'vue';
import { useSystemStore } from '@/store/system.js';
+import { useUserStore } from '@/store/user.js';
const sysStore = useSystemStore();
-console.log(sysStore)
+const userStore = useUserStore();
+const qrcodePopupRef = ref(null)
const data = reactive({
hadUpdate: false,
- appInfo: sysStore.appInfo
+ appInfo: sysStore.appInfo,
+ userInfo: userStore.userInfo
})
-const { hadUpdate, appInfo } = toRefs(data);
+const { hadUpdate, appInfo, userInfo } = toRefs(data);
// 检查更新
function checkAppUpdate () {
@@ -35,13 +43,17 @@ function checkAppUpdate () {
})
checkUpdate().then(res => {
console.log('检查更新结果:', res)
- }).catch(error => {
+ }).catch(error => {
console.log("检查更新错误:", error)
}).finally(() => {
uni.hideLoading()
})
// #endif
}
+
+function checkQrcode () {
+ qrcodePopupRef.value.open('center')
+}