(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-mail-add-friend-add-friend"],{"00d2":function(t,e){},"4fca":function(t,e,n){"use strict";n.r(e);var i=n("a4d3a"),o=n("55d4");for(var r in o)"default"!==r&&function(t){n.d(e,t,(function(){return o[t]}))}(r);var a,c=n("f0c5"),s=Object(c["a"])(o["default"],i["b"],i["c"],!1,null,"dadf8cc0",null,!1,i["a"],a);e["default"]=s.exports},"55d4":function(t,e,n){"use strict";n.r(e);var i=n("ee49"),o=n.n(i);for(var r in i)"default"!==r&&function(t){n.d(e,t,(function(){return i[t]}))}(r);e["default"]=o.a},"76ba":function(t,e,n){"use strict";n.r(e);var i=n("00d2"),o=n.n(i);for(var r in i)"default"!==r&&function(t){n.d(e,t,(function(){return i[t]}))}(r);e["default"]=o.a},8406:function(t,e,n){"use strict";n.r(e);var i=n("840b"),o=n("76ba");for(var r in o)"default"!==r&&function(t){n.d(e,t,(function(){return o[t]}))}(r);var a,c=n("f0c5"),s=Object(c["a"])(o["default"],i["b"],i["c"],!1,null,"d2edf0b6",null,!1,i["a"],a);e["default"]=s.exports},"840b":function(t,e,n){"use strict";var i;n.d(e,"b",(function(){return o})),n.d(e,"c",(function(){return r})),n.d(e,"a",(function(){return i}));var o=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-uni-view",{staticStyle:{height:"18rpx","background-color":"#EFEDE9"}})},r=[]},a4d3a:function(t,e,n){"use strict";n.d(e,"b",(function(){return o})),n.d(e,"c",(function(){return r})),n.d(e,"a",(function(){return i}));var i={freeNavBar:n("3e12").default,freeDivider:n("8406").default,freeListItem:n("7474").default},o=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-uni-view",{staticClass:"page"},[n("free-nav-bar",{attrs:{title:"添加好友",showBack:!0,showRight:!1}}),n("v-uni-view",{staticClass:"flex flex-column"},[n("v-uni-text",{staticClass:"font-sm text-secondary px-3 py-2"},[t._v("备注名")]),n("v-uni-input",{staticClass:"font-md border bg-white px-3",staticStyle:{height:"100rpx"},attrs:{type:"text",placeholder:"请填写备注名"},model:{value:t.form.nickname,callback:function(e){t.$set(t.form,"nickname",e)},expression:"form.nickname"}})],1),n("free-divider"),n("free-list-item",{attrs:{title:"让其看康友圈",showLeftIcon:!1,showRight:!0,showRightIcon:!1}},[n("v-uni-switch",{attrs:{slot:"right",checked:!!t.form.lookme,color:"#08C060"},on:{change:function(e){arguments[0]=e=t.$handleEvent(e),t.form.lookme=!t.form.lookme}},slot:"right"})],1),n("free-list-item",{attrs:{title:"看其康友圈",showLeftIcon:!1,showRight:!0,showRightIcon:!1}},[n("v-uni-switch",{attrs:{slot:"right",checked:!!t.form.lookhim,color:"#08C060"},on:{change:function(e){arguments[0]=e=t.$handleEvent(e),t.form.lookhim=!!t.form.lookhim}},slot:"right"})],1),n("free-list-item",{attrs:{title:"让其看健康信息",showLeftIcon:!1,showRight:!0,showRightIcon:!1}},[n("v-uni-switch",{attrs:{slot:"right",checked:!!t.form.healthInfo,color:"#08C060"},on:{change:function(e){arguments[0]=e=t.$handleEvent(e),t.form.healthInfo=!!t.form.healthInfo}},slot:"right"})],1),n("free-divider"),n("v-uni-view",{staticClass:"py-3 flex align-center justify-center bg-white",attrs:{"hover-class":"bg-light"},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.submit.apply(void 0,arguments)}}},[n("v-uni-text",{staticClass:"font-md text-primary"},[t._v(t._s(t.id>0?"同意":"点击添加"))])],1)],1)},r=[]},ee49:function(t,e,n){"use strict";(function(t){n("a9e3"),n("25eb"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n("ef0c"),o={data:function(){return{form:{friend_id:0,nickname:"",lookme:!0,lookhim:!0,healthInfo:!1},id:0}},onLoad:function(e){if(e.params){var n=JSON.parse(e.params);for(var i in n)this.form[i]=n[i]}e.id&&(this.id=Number.parseInt(e.id)),t.log("this.id：",this.id)},methods:{submit:function(){var e=this;if(0==this.id)return(0,i.addFriend)({userId:this.form.friend_id,nickname:this.form.nickname,lookme:this.form.lookme,lookhim:this.form.lookhim}).then((function(t){uni.showToast({title:"申请成功",icon:"none"}),uni.navigateBack({delta:1})})).catch((function(e){t.log(e)}));(0,i.handle)({id:this.id,nickname:this.form.nickname,lookme:this.form.lookme,lookhim:this.form.lookhim,status:"agree"}).then((function(t){uni.showToast({title:"处理成功",icon:"none"}),uni.navigateBack({delta:1}),e.$store.dispatch("getMailList")})).catch((function(e){t.log(e)}))}}};e.default=o}).call(this,n("5a52")["default"])}}]);