You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
6.5 KiB
1 line
6.5 KiB
1 year ago
|
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-Information-Information"],{"0317":function(t,a,e){"use strict";var n=e("c8da"),i=e.n(n);i.a},"25eb":function(t,a,e){"use strict";e.d(a,"b",(function(){return i})),e.d(a,"c",(function(){return s})),e.d(a,"a",(function(){return n}));var n={uUpload:e("1ec1").default,DialogBox:e("a48d").default,uToast:e("2ce2").default},i=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("v-uni-view",{staticClass:"page"},[e("v-uni-view",{staticClass:"user-list"},[e("v-uni-view",{staticClass:"list",staticStyle:{height:"160rpx"}},[e("v-uni-view",{staticClass:"title"},[e("v-uni-text",[t._v("头像")])],1),e("v-uni-view",{staticClass:"more-content"},[e("u-upload",{ref:"upload",staticStyle:{display:"none"},attrs:{fileList:t.finishImageList,previewFullImage:!1,width:"50",height:"50",name:"1"},on:{afterRead:function(a){arguments[0]=a=t.$handleEvent(a),t.afterRead.apply(void 0,arguments)}}}),e("v-uni-image",{attrs:{src:t.avatarUrl,mode:"aspectFill"},on:{click:function(a){arguments[0]=a=t.$handleEvent(a),t.uploadAvatar.apply(void 0,arguments)}}}),e("v-uni-text",{staticClass:"iconfont icon-more more"})],1)],1),e("v-uni-view",{staticClass:"list",on:{click:function(a){arguments[0]=a=t.$handleEvent(a),t.onNickname.apply(void 0,arguments)}}},[e("v-uni-view",{staticClass:"title"},[e("v-uni-text",[t._v("昵称")])],1),e("v-uni-view",{staticClass:"more-content"},[e("v-uni-text",{staticClass:"content"},[t._v(t._s(t.nickname))]),e("v-uni-text",{staticClass:"iconfont icon-more more"})],1)],1)],1),e("DialogBox",{ref:"DialogBox"}),e("u-toast",{ref:"uToast"})],1)},s=[]},3375:function(t,a,e){"use strict";e.r(a);var n=e("57de"),i=e.n(n);for(var s in n)["default"].indexOf(s)<0&&function(t){e.d(a,t,(function(){return n[t]}))}(s);a["default"]=i.a},"57de":function(t,a,e){"use strict";e("7a82");var n=e("4ea4").default;Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,e("99af"),e("d81d"),e("14d9"),e("d3b7");var i=n(e("c7eb")),s=n(e("5530")),r=n(e("1da1")),o=e("7e40"),l=e("5af7"),u={data:function(){return{finishImageList:[],fileList1:[],DialogBox:{},nickname:"",finishName:"",avatarUrl:"",avatarUrl_short:""}},onLoad:function(t){this.nickname=t.name,this.avatarUrl=t.avatar},methods:{uploadAvatar:function(){this.$refs.upload.chooseFile()},afterRead:function(t){var a=this;return(0,r.default)((0,i.default)().mark((function e(){var n,r,o;return(0,i.default)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:n=[].concat(t.file),a["fileList".concat(t.name)].length,n.map((function(e){a["fileList".concat(t.name)].push((0,s.default)((0,s.default)({},e),{},{status:"uploading",message:"上传中"}))})),r=0;case 4:if(!(r<n.length)){e.next=14;break}return e.next=7,a.uploadFilePromise(n[r].url);case 7:o=e.sent,a.avatarUrl=JSON.parse(o).data.fullurl,a.avatarUrl_short=JSON.parse(o).data.url,(0,l.updateUserInfo)({avatar:a.avatarUrl}).then((function(t){a.$refs.uToast.show({message:"修改头像成功"})}));case 11:r++,e.next=4;break;case 14:case"end":return e.stop()}}),e)})))()},uploadFilePromise:function(t){var a=this;return new Promise((function(e,n){uni.uploadFile({url:a.baseUrl+"api/common/upload",filePath:t,name:"file",header:{token:(0,o.getToken)()},formData:{},success:function(t){1==JSON.parse(t.data).code?setTimeout((function(){a.finishImageList.push({url:JSON.parse(t.data).data.fullurl,path:JSON.parse(t.data).data.url}),e(t.data)}),1e3):(uni.$u.toast(JSON.parse(t.data).msg),e(t.data))},fail:function(t){console.log(t,"rrr")}})}))},onNickname:function(){var t=this;this.finishName=this.nickname,this.$refs["DialogBox"].confirm({title:"更改昵称",placeholder:"请输入修改的昵称",value:this.finishName,DialogType:"input",animation:0}).then((function(a){t.nickname=a.value,(0,l.updateUserInfo)({nickname:a.value}).then((function(a){t.$refs.uToast.show({message:"修改成功"})}))}))}}};a.default=u},"63f6":function(t,a,e){"use strict";e.r(a);var n=e("25eb"),i=e("3375");for(var s in i)["default"].indexOf(s)<0&&function(t){e.d(a,t,(function(){return i[t]}))}(s);e("0317");var r=e("f0c5
|