From 6b96f204e4083d32996c2943a25e36c15d668bd1 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期四, 17 七月 2025 15:33:20 +0800
Subject: [PATCH] 前端

---
 small-program/unpackage/dist/dev/mp-weixin/pages/set-up/set-up.js |   30 ++++++++++++++++++++++++------
 1 files changed, 24 insertions(+), 6 deletions(-)

diff --git a/small-program/unpackage/dist/dev/mp-weixin/pages/set-up/set-up.js b/small-program/unpackage/dist/dev/mp-weixin/pages/set-up/set-up.js
index 19cc6be..d6c3195 100644
--- a/small-program/unpackage/dist/dev/mp-weixin/pages/set-up/set-up.js
+++ b/small-program/unpackage/dist/dev/mp-weixin/pages/set-up/set-up.js
@@ -152,13 +152,14 @@
     return {
       name: null,
       coverImage: null,
-      nickname: null,
+      nickName: null,
       fullCoverImage: null
     };
   },
   onShow: function onShow(options) {
+    console.log(this.userInfo);
     this.coverImage = this.userInfo.coverImage;
-    this.nickname = this.userInfo.nickname;
+    this.nickName = this.userInfo.nickName;
     this.fullCoverImage = this.userInfo.fullCoverImage;
     this.name = this.userInfo.name;
   },
@@ -178,9 +179,12 @@
       var that = this;
       console.log(fileUrl, 'fileUrl');
       uni.uploadFile({
-        url: "web/public/upload?folder=member",
+        url: this.$baseUrl + 'web/public/upload',
         filePath: fileUrl,
         name: 'file',
+        formData: {
+          'folder': 'member'
+        },
         success: function success(data) {
           var res = JSON.parse(data.data);
           that.coverImage = res.data.imgaddr;
@@ -197,11 +201,25 @@
       });
     },
     updateMemberInfo: function updateMemberInfo() {
+      var _this = this;
+      if ((!this.name || this.name.trim() == '') && (!this.nickName || this.nickName.trim() == '') && (!this.coverImage || this.coverImage.trim() == '')) {
+        uni.showToast({
+          title: '瀵逛笉璧凤紝璇锋寜瑕佹眰濉啓淇℃伅锛�',
+          icon: "none",
+          duration: 2000
+        });
+        return;
+      }
       var that = this;
-      this.$u.api.editMemberInfo((0, _defineProperty2.default)({
+      this.$u.api.editMemberInfo({
         name: that.name,
-        coverImage: that.nickname
-      }, "coverImage", that.coverImage)).then(function (res) {
+        nickName: that.nickName,
+        coverImage: that.coverImage
+      }).then(function (res) {
+        that.userInfo.name = _this.name;
+        that.userInfo.nickName = _this.nickName;
+        that.userInfo.coverImage = _this.coverImage;
+        that.userInfo.fullCoverImage = _this.fullCoverImage;
         uni.showToast({
           title: '鏇存柊鎴愬姛',
           icon: "none",

--
Gitblit v1.9.3