|  |  |  | 
|---|
|  |  |  | 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; | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | 
|---|
|  |  |  | 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; | 
|---|
|  |  |  | 
|---|
|  |  |  | }); | 
|---|
|  |  |  | }, | 
|---|
|  |  |  | 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", | 
|---|