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.
 
 
 
 
 
huazhiyu/unpackage/dist/build/h5/static/js/pages-Information-Informati...

1 lines
6.5 KiB

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-Information-Information"],{1285:function(t,a,e){"use strict";e.r(a);var n=e("8076"),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},"3d58":function(t,a,e){"use strict";var n=e("a97f"),i=e.n(n);i.a},5044:function(t,a,e){var n=e("24fb");a=n(!1),a.push([t.i,'@charset "UTF-8";\r\n/**\r\n * 这里是uni-app内置的常用样式变量\r\n *\r\n * uni-app 官方扩展插件及插件市场(https://ext.dcloud.net.cn)上很多三方插件均使用了这些样式变量\r\n * 如果你是插件开发者,建议你使用scss预处理,并在插件代码中直接使用这些变量(无需 import 这个文件),方便用户通过搭积木的方式开发整体风格一致的App\r\n *\r\n */\r\n/**\r\n * 如果你是App开发者(插件使用者),你可以通过修改这些变量来定制自己的插件主题,实现自定义主题功能\r\n *\r\n * 如果你的项目同样使用了scss预处理,你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\r\n */\r\n/* 颜色变量 */\r\n/* 主要颜色 */\r\n/* 行为相关颜色 */\r\n/* 文字基本颜色 */\r\n/* 背景颜色 */\r\n/* 边框颜色 */\r\n/* 尺寸变量 */\r\n/* 文字尺寸 */\r\n/* 图片尺寸 */\r\n/* Border Radius */\r\n/* 水平间距 */\r\n/* 垂直间距 */\r\n/* 透明度 */\r\n/* 文章场景相关 */.page[data-v-19af110d]{position:absolute;left:0;bottom:0;width:100%;height:100%;background-color:#f6f6f6;padding:0 %?24?%}\r\n/* 用户信息列表 */.user-list[data-v-19af110d]{padding:0 4%;background-color:#fff;border-radius:%?20?%;margin:%?20?% auto}.user-list .list[data-v-19af110d]{position:relative;display:flex;align-items:center;justify-content:space-between;width:100%;height:%?100?%;border-bottom:%?2?% solid #f6f6f6}.user-list .list .title[data-v-19af110d]{display:flex;align-items:center}.user-list .list .title uni-text[data-v-19af110d]{font-size:%?28?%;color:#222}.user-list .list .more-content[data-v-19af110d]{display:flex;align-items:center}.user-list .list .more-content uni-image[data-v-19af110d]{width:%?100?%;height:%?100?%;border-radius:100%}.user-list .list .more-content .content[data-v-19af110d]{font-size:%?28?%;color:#959595}.user-list .list .more-content .more[data-v-19af110d]{font-size:%?24?%;color:#959595;margin-left:%?20?%}.user-list .list .picker[data-v-19af110d]{position:absolute;width:100%;height:100%;opacity:0}[data-v-19af110d] .u-upload__deletable{display:none}',""]),t.exports=a},8076: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("e623"),l=e("afca"),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},a97f:function(t,a,e){var n=e("5044");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var i=e("4f06").default;i("9cb94928",n,!0,{sourceMap:!1,shadowMode:!1})},f8ed:function(t,a,e){"use strict";e.r(a);var n=e("fcf8"),i=e("1285");for(var s in i)["default"].indexOf(s)<0&&function(t){e.d(a,t,(function(){return i[t]}))}(s);e("3d58");var r=e("f0c5"),o=Object(r["a"])(i["default"],n["b"],n["c"],!1,null,"19af110d",null,!1,n["a"],void 0);a["default"]=o.exports},fcf8: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("14ce").default,DialogBox:e("9057").default,uToast:e("cdc1").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=[]}}]);