chunk-4db49ad4.4f6d8de3.js 18 KB

1
  1. (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-4db49ad4"],{"265f":function(e,t,r){"use strict";r.r(t);var n=r("5d39"),a=r("c24f"),o=r("b0e7"),c=r("2f62"),u=r("d708"),i=r("bc3a"),s=r.n(i);function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function d(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}r("c276");var m={name:"setting_user",components:{uploadPictures:o.a,Verify:n.a},computed:function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?l(r,!0).forEach((function(t){d(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):l(r).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},Object(c.e)("admin/layout",["isMobile"]),{},Object(c.e)("admin/userLevel",["categoryId"]),{labelWidth:function(){return this.isMobile?void 0:75},labelPosition:function(){return this.isMobile?"top":"left"}}),data:function(){return{modalPic:!1,isChoice:"单选",account:"",formValidate:{head_pic:"",real_name:"",pwd:"",new_pwd:"",conf_pwd:"",phone:""},formPhone:{phone:"",code:""},rulesPhone:{phone:[{required:!0,message:"手机号不能为空",trigger:"blur"}],code:[{required:!0,message:"验证码不能为空",trigger:"blur"}]},formPwd:{pwd:"",new_pwd:"",conf_pwd:""},rulesPwd:{pwd:[{required:!0,message:"原密码不能为空",trigger:"blur"}],new_pwd:[{required:!0,message:"新密码不能为空",trigger:"blur"}],conf_pwd:[{required:!0,message:"请确认密码",trigger:"blur"}]},formName:{real_name:""},rulesName:{real_name:[{required:!0,message:"姓名不能为空",trigger:"blur"}]},gridPic:{xl:6,lg:8,md:12,sm:12,xs:12},gridBtn:{xl:4,lg:8,md:8,sm:8,xs:8},updatePhone:!1,updatePassword:!1,updateName:!1,cutNUm:"获取验证码",canClick:!0}},mounted:function(){this.getInfo()},methods:{modalPicTap:function(){this.modalPic=!0},getPic:function(e){var t=this;this.formValidate.head_pic=e.att_dir,Object(a.P)({head_pic:e.att_dir}).then((function(e){t.$Message.success(e.msg),t.modalPic=!1})).catch((function(e){t.$Message.error(e.msg)}))},getInfo:function(){var e=this;Object(a.H)().then((function(t){var r=t.data;e.account=r.account,e.formValidate.head_pic=r.head_pic,e.formValidate.real_name=r.real_name,e.formValidate.phone=r.phone})).catch((function(t){e.$Message.error(t.msg)}))},handleSubmit:function(e){var t=this;this.$refs[e].validate((function(e){e?Object(a.P)(t.formValidate).then((function(e){t.$Message.success(e.msg)})).catch((function(e){t.$Message.error(e.msg)})):t.formValidate.new_pwd!==t.formValidate.conf_pwd&&t.$Message.error("您输入的新密码与旧密码不一致")}))},showModal:function(e){this[e]=!0},phoneUpdate:function(){var e=this;this.$refs.formPhone.validate((function(t){t&&Object(a.P)(e.formPhone).then((function(t){e.$Message.success(t.msg),e.$refs.formPhone.resetFields(),e.updatePhone=!1,e.getInfo()})).catch((function(t){e.$Message.error(t.msg)}))}))},pwdUpdate:function(){var e=this;if(this.formPwd.new_pwd!==this.formPwd.conf_pwd)return this.$Message.warning("新密码与确认密码不一致");this.$refs.formPwd.validate((function(t){t&&Object(a.P)(e.formPwd).then((function(t){e.$Message.success(t.msg),e.$refs.formPwd.resetFields(),e.updatePassword=!1})).catch((function(t){e.$Message.error(t.msg)}))}))},nameUpdate:function(){var e=this;this.$refs.formName.validate((function(t){t&&Object(a.P)(e.formName).then((function(t){e.$Message.success(t.msg),e.$refs.formName.resetFields(),e.updateName=!1,e.getInfo()})).catch((function(t){e.$Message.error(t.msg)}))}))},handleCancle:function(e){this[e]=!1},cutDown:function(){if(this.formPhone.phone){if(!this.formPhone.phone)return this.$Message.warning("请输入手机号码");if(!/^1(3|4|5|7|8|9|6)\d{9}$/i.test(this.formPhone.phone))return this.$Message.warning("请输入正确的手机号码");this.$refs.verify.show()}else this.$Message.warning("请填写手机号!")},onSuccess:function(e){var t=this;if(this.canClick){this.canClick=!1,this.cutNUm=60;var r=u.a.apiBaseURL.replace(/adminapi/,"api");s.a.get(r+"/verify_code").then((function(n){var a={type:"login",phone:t.formPhone.phone,key:n.data.data.key,code:"",captchaType:"blockPuzzle",captchaVerification:e.captchaVerification};fetch(r+"/register/verify",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)}).then((function(e){t.time=setInterval((function(){t.cutNUm--,0===t.cutNUm&&(t.cutNUm="获取验证码",t.canClick=!0,clearInterval(t.time),t.time=null)}),1e3)})).catch((function(e){t.$Message.error(e.msg)}))}))}},updatePhoneChange:function(e){e||(this.formPhone.phone="",this.formPhone.code="",this.time&&(clearInterval(this.time),this.time=null,this.cutNUm="获取验证码",this.canClick=!0))}}},f=(r("5ca5"),r("2877")),p=Object(f.a)(m,(function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",[r("Card",{staticClass:"ivu-mt",attrs:{bordered:!1,"dis-hover":""}},[r("div",{staticClass:"header_title",attrs:{slot:"title"},slot:"title"},[e._v(e._s(e.$route.meta.title))]),r("Form",{ref:"formValidate",attrs:{model:e.formValidate,"label-width":60,"label-position":"right","label-colon":!0}},[r("FormItem",{attrs:{label:"头像",prop:"head_pic"}},[r("div",{staticClass:"picBox",on:{click:function(t){return e.modalPicTap("单选")}}},[e.formValidate.head_pic?r("div",{staticClass:"pictrue"},[r("img",{directives:[{name:"lazy",rawName:"v-lazy",value:e.formValidate.head_pic,expression:"formValidate.head_pic"}]})]):r("div",{staticClass:"upLoad acea-row row-center-wrapper"},[r("Icon",{staticClass:"upload_icon",attrs:{type:"md-add",size:"26"}})],1)]),e.formValidate.head_pic?r("span",{staticClass:"text_btn",on:{click:function(t){return e.modalPicTap("单选")}}},[e._v("更换头像")]):e._e()]),r("FormItem",{attrs:{label:"账号"}},[r("Input",{staticClass:"input",attrs:{type:"text",disabled:!0},model:{value:e.account,callback:function(t){e.account=t},expression:"account"}})],1),r("FormItem",{attrs:{label:"姓名"}},[r("Input",{staticClass:"input",attrs:{type:"text",disabled:!0},model:{value:e.formValidate.real_name,callback:function(t){e.$set(e.formValidate,"real_name",t)},expression:"formValidate.real_name"}}),r("span",{staticClass:"text_btn",on:{click:function(t){return e.showModal("updateName")}}},[e._v("修改姓名")])],1),r("FormItem",{attrs:{label:"手机号"}},[r("Input",{staticClass:"input",attrs:{type:"text",disabled:!0},model:{value:e.formValidate.phone,callback:function(t){e.$set(e.formValidate,"phone",t)},expression:"formValidate.phone"}}),r("span",{staticClass:"text_btn",on:{click:function(t){return e.showModal("updatePhone")}}},[e._v("更换手机号")])],1),r("FormItem",{attrs:{label:"密码"}},[r("Input",{staticClass:"input",attrs:{type:"password",disabled:!0},model:{value:e.formValidate.pwd,callback:function(t){e.$set(e.formValidate,"pwd",t)},expression:"formValidate.pwd"}}),r("span",{staticClass:"text_btn",on:{click:function(t){return e.showModal("updatePassword")}}},[e._v("更换密码")])],1)],1)],1),r("Modal",{attrs:{title:"修改手机号",closable:"","mask-closable":!1,"z-index":1},on:{"on-visible-change":e.updatePhoneChange},model:{value:e.updatePhone,callback:function(t){e.updatePhone=t},expression:"updatePhone"}},[r("Form",{ref:"formPhone",attrs:{model:e.formPhone,rules:e.rulesPhone,"label-width":80,"label-position":"right","label-colon":!0}},[r("FormItem",{attrs:{label:"新手机号",prop:"phone"}},[r("Input",{model:{value:e.formPhone.phone,callback:function(t){e.$set(e.formPhone,"phone",t)},expression:"formPhone.phone"}})],1),r("FormItem",{attrs:{label:"验证码",prop:"code"}},[r("Input",{staticStyle:{width:"294px"},model:{value:e.formPhone.code,callback:function(t){e.$set(e.formPhone,"code",t)},expression:"formPhone.code"}}),r("Button",{staticStyle:{"margin-left":"20px",width:"92px"},attrs:{disabled:!this.canClick,type:"primary"},on:{click:e.cutDown}},[e._v(e._s(e.cutNUm))])],1)],1),r("div",{attrs:{slot:"footer"},slot:"footer"},[r("Button",{attrs:{type:"text"},on:{click:function(t){return e.handleCancle("updatePhone")}}},[e._v("取消")]),r("Button",{attrs:{type:"primary"},on:{click:e.phoneUpdate}},[e._v("确定")])],1)],1),r("Modal",{attrs:{title:"修改密码",closable:"","mask-closable":!1,"z-index":1},model:{value:e.updatePassword,callback:function(t){e.updatePassword=t},expression:"updatePassword"}},[r("Form",{ref:"formPwd",attrs:{model:e.formPwd,rules:e.rulesPwd,"label-width":80,"label-position":"right","label-colon":!0}},[r("FormItem",{attrs:{label:"旧密码",prop:"pwd"}},[r("Input",{attrs:{type:"text"},model:{value:e.formPwd.pwd,callback:function(t){e.$set(e.formPwd,"pwd",t)},expression:"formPwd.pwd"}})],1),r("FormItem",{attrs:{label:"新密码",prop:"new_pwd"}},[r("Input",{attrs:{type:"text"},model:{value:e.formPwd.new_pwd,callback:function(t){e.$set(e.formPwd,"new_pwd",t)},expression:"formPwd.new_pwd"}})],1),r("FormItem",{attrs:{label:"确认密码",prop:"conf_pwd"}},[r("Input",{attrs:{type:"text"},model:{value:e.formPwd.conf_pwd,callback:function(t){e.$set(e.formPwd,"conf_pwd",t)},expression:"formPwd.conf_pwd"}})],1)],1),r("div",{attrs:{slot:"footer"},slot:"footer"},[r("Button",{attrs:{type:"text"},on:{click:function(t){return e.handleCancle("updatePassword")}}},[e._v("取消")]),r("Button",{attrs:{type:"primary"},on:{click:e.pwdUpdate}},[e._v("确定")])],1)],1),r("Modal",{attrs:{title:"修改姓名",closable:"","mask-closable":!1,"z-index":1},model:{value:e.updateName,callback:function(t){e.updateName=t},expression:"updateName"}},[r("Form",{ref:"formName",attrs:{model:e.formName,rules:e.rulesName,"label-width":80,"label-position":"right","label-colon":!0}},[r("FormItem",{attrs:{label:"姓名",prop:"real_name"}},[r("Input",{attrs:{type:"text"},model:{value:e.formName.real_name,callback:function(t){e.$set(e.formName,"real_name",t)},expression:"formName.real_name"}})],1)],1),r("div",{attrs:{slot:"footer"},slot:"footer"},[r("Button",{attrs:{type:"text"},on:{click:function(t){return e.handleCancle("updateName")}}},[e._v("取消")]),r("Button",{attrs:{type:"primary"},on:{click:e.nameUpdate}},[e._v("确定")])],1)],1),r("Modal",{attrs:{width:"960px",scrollable:"","footer-hide":"",closable:"",title:"上传用户头像","mask-closable":!1,"z-index":1},model:{value:e.modalPic,callback:function(t){e.modalPic=t},expression:"modalPic"}},[e.modalPic?r("uploadPictures",{attrs:{isChoice:e.isChoice,gridBtn:e.gridBtn,gridPic:e.gridPic},on:{getPic:e.getPic}}):e._e()],1),r("Verify",{ref:"verify",attrs:{captchaType:"blockPuzzle",imgSize:{width:"330px",height:"155px"}},on:{success:e.onSuccess}})],1)}),[],!1,null,"c713c496",null);t.default=p.exports},"5ca5":function(e,t,r){"use strict";var n=r("e399");r.n(n).a},c24f:function(e,t,r){"use strict";r.d(t,"W",(function(){return a})),r.d(t,"M",(function(){return o})),r.d(t,"L",(function(){return c})),r.d(t,"k",(function(){return u})),r.d(t,"r",(function(){return i})),r.d(t,"d",(function(){return s})),r.d(t,"h",(function(){return l})),r.d(t,"g",(function(){return d})),r.d(t,"q",(function(){return m})),r.d(t,"s",(function(){return f})),r.d(t,"I",(function(){return p})),r.d(t,"O",(function(){return h})),r.d(t,"K",(function(){return b})),r.d(t,"J",(function(){return g})),r.d(t,"f",(function(){return _})),r.d(t,"e",(function(){return w})),r.d(t,"n",(function(){return P})),r.d(t,"Q",(function(){return v})),r.d(t,"p",(function(){return O})),r.d(t,"P",(function(){return j})),r.d(t,"bb",(function(){return y})),r.d(t,"T",(function(){return k})),r.d(t,"R",(function(){return x})),r.d(t,"S",(function(){return $})),r.d(t,"V",(function(){return C})),r.d(t,"U",(function(){return I})),r.d(t,"X",(function(){return M})),r.d(t,"v",(function(){return N})),r.d(t,"w",(function(){return V})),r.d(t,"Y",(function(){return U})),r.d(t,"i",(function(){return F})),r.d(t,"ab",(function(){return z})),r.d(t,"C",(function(){return B})),r.d(t,"cb",(function(){return T})),r.d(t,"m",(function(){return S})),r.d(t,"Z",(function(){return q})),r.d(t,"F",(function(){return D})),r.d(t,"B",(function(){return E})),r.d(t,"A",(function(){return J})),r.d(t,"z",(function(){return L})),r.d(t,"D",(function(){return H})),r.d(t,"y",(function(){return R})),r.d(t,"x",(function(){return W})),r.d(t,"u",(function(){return A})),r.d(t,"t",(function(){return G})),r.d(t,"o",(function(){return K})),r.d(t,"l",(function(){return Q})),r.d(t,"G",(function(){return X})),r.d(t,"H",(function(){return Y})),r.d(t,"db",(function(){return Z})),r.d(t,"N",(function(){return ee})),r.d(t,"E",(function(){return te})),r.d(t,"b",(function(){return re})),r.d(t,"a",(function(){return ne})),r.d(t,"eb",(function(){return ae})),r.d(t,"j",(function(){return oe})),r.d(t,"c",(function(){return ce}));var n=r("b6bd");function a(e){return Object(n.a)({url:"user/user",method:"get",params:e})}function o(e){return Object(n.a)({url:"setting/config/user/".concat(e),method:"get"})}function c(e,t){return Object(n.a)({url:"setting/config/user/".concat(e),method:"post",data:t})}function u(e){return Object(n.a)({url:"user/user/".concat(e,"/edit"),method:"get"})}function i(e){return Object(n.a)({url:"user/set_status/".concat(e.status,"/").concat(e.id),method:"put"})}function s(e){return Object(n.a)({url:"marketing/coupon/grant",method:"get",params:e})}function l(e){return Object(n.a)({url:"user/edit_other/".concat(e),method:"get"})}function d(e){return Object(n.a)({url:"user/user/".concat(e),method:"get"})}function m(e){return Object(n.a)({url:"user/one_info/".concat(e.id),method:"get",params:e.datas})}function f(e){return Object(n.a)({url:"user/user_level/vip_list",method:"get",params:e})}function p(e){return Object(n.a)({url:"user/user_level/set_show/".concat(e.id,"/").concat(e.is_show),method:"PUT"})}function h(e,t){return Object(n.a)({url:"user/user_level/task/".concat(e),method:"get",params:t})}function b(e){return Object(n.a)({url:"user/user_level/set_task_show/".concat(e.id,"/").concat(e.is_show),method:"PUT"})}function g(e){return Object(n.a)({url:"user/user_level/set_task_must/".concat(e.id,"/").concat(e.is_must),method:"PUT"})}function _(e){return Object(n.a)({url:"/user/user_level/create_task",method:"get",params:e})}function w(e){return Object(n.a)({url:"user/user_level/create",method:"get",params:e})}function P(e){return Object(n.a)({url:"user/give_level/".concat(e),method:"get"})}function v(e){return Object(n.a)({url:"user/user_group/list",method:"get",params:e})}function O(e){return Object(n.a)({url:"user/user_group/add/".concat(e),method:"get"})}function j(e){return Object(n.a)({url:"setting/update_admin",method:"PUT",data:e})}function y(e){return Object(n.a)({url:"user/set_group",method:"post",data:e})}function k(e){return Object(n.a)({url:"user/user_label",method:"get",params:e})}function x(e,t){return Object(n.a)({url:"user/user_label/add/".concat(e),method:"get",params:t})}function $(e){return Object(n.a)({url:"user/user_label_cate/all",method:"get",params:e})}function C(e){return Object(n.a)({url:"user/user_label_cate/".concat(e,"/edit"),method:"get"})}function I(e){return Object(n.a)({url:"user/user_label_cate/create",method:"get"})}function M(e){return Object(n.a)({url:"/user/member_batch/index",method:"get",params:e})}function N(e,t){return Object(n.a)({url:"/user/member_batch/save/".concat(e),method:"post",data:t})}function V(e,t){return Object(n.a)({url:"/user/member_batch/set_value/".concat(e),method:"get",params:t})}function U(e,t){return Object(n.a)({url:"/user/member_card/index/".concat(e),method:"get",params:t})}function F(e,t){return Object(n.a)({url:"/export/memberCard/".concat(e),method:"get",params:t})}function z(){return Object(n.a)({url:"/user/member/ship",method:"get"})}function B(e,t){return Object(n.a)({url:"/user/member_ship/save/".concat(e),method:"post",data:t})}function T(){return Object(n.a)({url:"/user/user/syncUsers",method:"get"})}function S(){return Object(n.a)({url:"/user/user/create",method:"get"})}function q(){return Object(n.a)({url:"/user/member_scan",method:"get"})}function D(e,t){return Object(n.a)({url:"user/label/".concat(e),method:"post",data:t})}function E(e){return Object(n.a)({url:"user/member_right/save/".concat(e.id),method:"post",data:e})}function J(){return Object(n.a)({url:"user/member/right",method:"get"})}function L(e){return Object(n.a)({url:"/user/member/record",method:"get",params:e})}function H(){return Object(n.a)({url:"user/member/ship_select",method:"get"})}function R(e){return Object(n.a)({url:"user/member_card/set_status",method:"get",params:e})}function W(e){return Object(n.a)({url:"user/member_ship/set_ship_status",method:"get",params:e})}function A(e,t){return Object(n.a)({url:"user/member_agreement/save/".concat(e),method:"post",data:t})}function G(){return Object(n.a)({url:"user/member/agreement",method:"get"})}function K(e){return Object(n.a)({url:"user/give_level_time/".concat(e),method:"get"})}function Q(e){return Object(n.a)({url:"user/label/".concat(e),method:"get"})}function X(e){return Object(n.a)({url:"user/save_set_label",method:"put",data:e})}function Y(e){return Object(n.a)({url:"setting/info",method:"get"})}function Z(e){return Object(n.a)({url:"user/visit_list/".concat(e.id),method:"get",params:e.datas})}function ee(e){return Object(n.a)({url:"user/spread_list/".concat(e.id),method:"get",params:e.datas})}function te(e){return Object(n.a)({url:"user/user/".concat(e.uid),method:"put",data:e})}function re(e,t){return Object(n.a)({url:"agent/set_agent_agreement/".concat(e),method:"post",data:t})}function ne(){return Object(n.a)({url:"agent/get_agent_agreement",method:"get"})}function ae(){return Object(n.a)({url:"user/synchro/work/label",method:"get"})}function oe(e){return Object(n.a)({url:"user/user/extend_info/".concat(e),method:"get"})}function ce(e){return Object(n.a)({url:"user/batch_process",method:"post",data:e})}},e399:function(e,t,r){}}]);