jiangping
2025-07-17 6b96f204e4083d32996c2943a25e36c15d668bd1
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",