pages-set-set.076bd450.js 5.8 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-set-set"],{"4b22":function(t,n,e){"use strict";var a=e("4ea4");Object.defineProperty(n,"__esModule",{value:!0}),n.userEdit=o,n.logout=u,n.registerReset=r,n.binding=s;var i=a(e("bc58"));function o(t){return(0,i.default)({url:"/api/user/edit",method:"post",data:t})}function u(t){return(0,i.default)({url:"/api/logout",method:"get",data:t})}function r(t){return(0,i.default)({url:"/api/register/reset",method:"post",data:t})}function s(t){return(0,i.default)({url:"/api/binding",method:"post",data:t})}},"69ed":function(t,n,e){var a=e("7082");"string"===typeof a&&(a=[[t.i,a,""]]),a.locals&&(t.exports=a.locals);var i=e("4f06").default;i("f2f40c30",a,!0,{sourceMap:!1,shadowMode:!1})},7082:function(t,n,e){var a=e("24fb");n=a(!1),n.push([t.i,'@charset "UTF-8";\n/* 页面左右间距 */\n/* 文字尺寸 */\n/*文字颜色*/\n/* 边框颜色 */\n/*颜色*/\n/* 图片加载中颜色 */\n/* 行为相关颜色 */\n/* 功能栏字体大小 */\n/*功能栏左侧小图标*/\n/* page{\n\t\tbackground: $page-color-base;\n\t}\n\t.list-cell{\n\t\tdisplay:flex;\n\t\talign-items:baseline;\n\t\tpadding: 20rpx $page-row-spacing;\n\t\tline-height:60rpx;\n\t\tposition:relative;\n\t\tbackground: #fff;\n\t\tjustify-content: center;\n\t\t&.log-out-btn{\n\t\t\tmargin-top: 40rpx;\n\t\t\t.cell-tit{\n\t\t\t\tcolor: $uni-color-primary;\n\t\t\t\ttext-align: center;\n\t\t\t\tmargin-right: 0;\n\t\t\t}\n\t\t}\n\t\t.cell-tit{\n\t\t\tflex: 1;\n\t\t\tfont-size: $font-base + 2rpx;\n\t\t\tcolor: $font-color-dark;\n\t\t\tmargin-right:10rpx;\n\t\t}\n\t\t.cell-tip{\n\t\t\tfont-size: $font-base;\n\t\t\tcolor: $font-color-light;\n\t\t}\n\t\tswitch{\n\t\t\ttransform: translateX(16rpx) scale(.84);\n\t\t}\n\t} */uni-page-body[data-v-7cced3f0]{background-color:#f3f3f3;min-height:100%}uni-page-body .container[data-v-7cced3f0]{height:100%}.row[data-v-7cced3f0]{background-color:#fff;padding:%?42?% %?25?%;font-size:%?30?%;color:#333}.row uni-image[data-v-7cced3f0]{width:%?80?%;height:%?80?%;border-radius:50%}.row .input[data-v-7cced3f0]{text-align:right;color:#333}.submit-box[data-v-7cced3f0]{padding-top:%?157?%}.submit-box .submit[data-v-7cced3f0]{margin:%?40?% auto;width:%?560?%;background-color:#901b21;color:#fff;text-align:center;padding:%?26?% %?0?%;border-radius:%?50?%}.jg[data-v-7cced3f0]{margin-bottom:%?20?%}body.?%PAGE?%[data-v-7cced3f0]{background-color:#f3f3f3}',""]),t.exports=n},"71f4":function(t,n,e){"use strict";e.r(n);var a=e("a0ca"),i=e("9a97");for(var o in i)"default"!==o&&function(t){e.d(n,t,(function(){return i[t]}))}(o);e("c623");var u,r=e("f0c5"),s=Object(r["a"])(i["default"],a["b"],a["c"],!1,null,"7cced3f0",null,!1,a["a"],u);n["default"]=s.exports},"9a97":function(t,n,e){"use strict";e.r(n);var a=e("9bdf"),i=e.n(a);for(var o in a)"default"!==o&&function(t){e.d(n,t,(function(){return a[t]}))}(o);n["default"]=i.a},"9bdf":function(t,n,e){"use strict";var a=e("4ea4");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=a(e("5530")),o=a(e("908e")),u=a(e("76e6")),r=e("2f62"),s=e("4b22"),c=e("735f"),l={components:{uniList:o.default,uniListItem:u.default},data:function(){return{userInfo:{},pics:[]}},onLoad:function(){this.userInfo=uni.getStorageSync("userInfo")||"",console.log(this.userInfo)},methods:(0,i.default)((0,i.default)({},(0,r.mapMutations)("user",["logout"])),{},{toLogout:function(){var t=this;uni.showModal({content:"确定要退出登录么",success:function(n){n.confirm&&(0,s.logout)({}).then((function(n){t.logout(),uni.navigateTo({url:"/pages/public/login"})})).catch((function(t){console.log(t)}))}})},imgsub:function(){var t=this;(0,c.upload)({filename:""}).then((function(n){console.log(n[0].url),t.userInfo.avatar=n[0].url}))},edit:function(){var t=this;uni.showLoading({title:"提交中...",mask:!0}),(0,c.edit)({avatar:this.userInfo.avatar,nickname:this.userInfo.nickname}).then((function(n){uni.hideLoading(),t.$api.msg("修改成功"),setTimeout((function(){uni.switchTab({url:"/pages/user/user"})}),1e3)})).catch((function(n){console.log(n),t.$api.msg("修改失败")}))}})};n.default=l},a0ca:function(t,n,e){"use strict";var a;e.d(n,"b",(function(){return i})),e.d(n,"c",(function(){return o})),e.d(n,"a",(function(){return a}));var i=function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("v-uni-view",{staticClass:"container"},[e("v-uni-view",{staticClass:"row b-b flex jg"},[e("v-uni-text",{staticClass:"tit"},[t._v("头像")]),e("v-uni-image",{attrs:{src:t.userInfo.avatar},on:{click:function(n){n.stopPropagation(),arguments[0]=n=t.$handleEvent(n),t.imgsub.apply(void 0,arguments)}}})],1),e("v-uni-view",{staticClass:"row b-b flex"},[e("v-uni-text",{staticClass:"tit"},[t._v("昵称")]),e("v-uni-input",{staticClass:"input",attrs:{type:"text","placeholder-class":"placeholder"},model:{value:t.userInfo.nickname,callback:function(n){t.$set(t.userInfo,"nickname",n)},expression:"userInfo.nickname"}})],1),e("v-uni-view",{staticClass:"row b-b flex"},[e("v-uni-text",{staticClass:"tit"},[t._v("ID")]),e("v-uni-input",{staticClass:"input",attrs:{type:"text",disabled:"true","placeholder-class":"placeholder"},model:{value:t.userInfo.uid,callback:function(n){t.$set(t.userInfo,"uid",n)},expression:"userInfo.uid"}})],1),e("v-uni-view",{staticClass:"row b-b flex"},[e("v-uni-text",{staticClass:"tit"},[t._v("用户账号")]),e("v-uni-input",{staticClass:"input",attrs:{type:"number",disabled:"true","placeholder-class":"placeholder"},model:{value:t.userInfo.account||t.userInfo.phone,callback:function(n){t.$set(t.userInfo.account||t.userInfo,"phone",n)},expression:"userInfo.account || userInfo.phone"}})],1),e("v-uni-view",{staticClass:"submit-box flex"},[e("v-uni-view",{staticClass:"submit",on:{click:function(n){arguments[0]=n=t.$handleEvent(n),t.edit.apply(void 0,arguments)}}},[t._v("确认修改")])],1)],1)},o=[]},c623:function(t,n,e){"use strict";var a=e("69ed"),i=e.n(a);i.a}}]);