Commit d6c75abe authored by Davve's avatar Davve

运营创建用户名唯一

parent 348c366c
This diff is collapsed.
.createPost-container[data-v-0e78771b]{position:relative}.createPost-container .createPost-main-container[data-v-0e78771b]{padding:40px 45px 20px 50px}.createPost-container .createPost-main-container .postInfo-container[data-v-0e78771b]{position:relative;margin-bottom:10px}.createPost-container .createPost-main-container .postInfo-container[data-v-0e78771b]:after{content:"";display:table;clear:both}.createPost-container .createPost-main-container .postInfo-container .postInfo-container-item[data-v-0e78771b]{float:left}.createPost-container .createPost-main-container .editor-container[data-v-0e78771b]{min-height:500px;margin:0 0 30px}.createPost-container .createPost-main-container .editor-container .editor-upload-btn-container[data-v-0e78771b]{text-align:right;margin-right:10px}.createPost-container .createPost-main-container .editor-container .editor-upload-btn-container .editor-upload-btn[data-v-0e78771b]{display:inline-block}.createPost-container .word-counter[data-v-0e78771b]{width:40px;position:absolute;right:-10px;top:0} .createPost-container[data-v-bf236cbe]{position:relative}.createPost-container .createPost-main-container[data-v-bf236cbe]{padding:40px 45px 20px 50px}.createPost-container .createPost-main-container .postInfo-container[data-v-bf236cbe]{position:relative;margin-bottom:10px}.createPost-container .createPost-main-container .postInfo-container[data-v-bf236cbe]:after{content:"";display:table;clear:both}.createPost-container .createPost-main-container .postInfo-container .postInfo-container-item[data-v-bf236cbe]{float:left}.createPost-container .createPost-main-container .editor-container[data-v-bf236cbe]{min-height:500px;margin:0 0 30px}.createPost-container .createPost-main-container .editor-container .editor-upload-btn-container[data-v-bf236cbe]{text-align:right;margin-right:10px}.createPost-container .createPost-main-container .editor-container .editor-upload-btn-container .editor-upload-btn[data-v-bf236cbe]{display:inline-block}.createPost-container .word-counter[data-v-bf236cbe]{width:40px;position:absolute;right:-10px;top:0}
\ No newline at end of file \ No newline at end of file
.waves-ripple{position:absolute;border-radius:100%;background-color:rgba(0,0,0,.15);background-clip:padding-box;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-transform:scale(0);transform:scale(0);opacity:1}.waves-ripple.z-active{opacity:0;-webkit-transform:scale(2);transform:scale(2);-webkit-transition:opacity 1.2s ease-out,-webkit-transform .6s ease-out;transition:opacity 1.2s ease-out,-webkit-transform .6s ease-out;transition:opacity 1.2s ease-out,transform .6s ease-out;transition:opacity 1.2s ease-out,transform .6s ease-out,-webkit-transform .6s ease-out}.createPost-container[data-v-65fe3f60]{position:relative}.createPost-container .createPost-main-container[data-v-65fe3f60]{padding:40px 45px 20px 50px}.createPost-container .createPost-main-container .postInfo-container[data-v-65fe3f60]{position:relative;margin-bottom:10px}.createPost-container .createPost-main-container .postInfo-container[data-v-65fe3f60]:after{content:"";display:table;clear:both}.createPost-container .createPost-main-container .postInfo-container .postInfo-container-item[data-v-65fe3f60]{float:left}.createPost-container .createPost-main-container .editor-container[data-v-65fe3f60]{min-height:500px;margin:0 0 30px}.createPost-container .createPost-main-container .editor-container .editor-upload-btn-container[data-v-65fe3f60]{text-align:right;margin-right:10px}.createPost-container .createPost-main-container .editor-container .editor-upload-btn-container .editor-upload-btn[data-v-65fe3f60]{display:inline-block}.createPost-container .word-counter[data-v-65fe3f60]{width:40px;position:absolute;right:-10px;top:0}.edit-input[data-v-65fe3f60]{padding-right:100px}.cancel-btn[data-v-65fe3f60]{position:absolute;right:15px;top:10px} .waves-ripple{position:absolute;border-radius:100%;background-color:rgba(0,0,0,.15);background-clip:padding-box;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-transform:scale(0);transform:scale(0);opacity:1}.waves-ripple.z-active{opacity:0;-webkit-transform:scale(2);transform:scale(2);-webkit-transition:opacity 1.2s ease-out,-webkit-transform .6s ease-out;transition:opacity 1.2s ease-out,-webkit-transform .6s ease-out;transition:opacity 1.2s ease-out,transform .6s ease-out;transition:opacity 1.2s ease-out,transform .6s ease-out,-webkit-transform .6s ease-out}.createPost-container[data-v-4b3248f6]{position:relative}.createPost-container .createPost-main-container[data-v-4b3248f6]{padding:40px 45px 20px 50px}.createPost-container .createPost-main-container .postInfo-container[data-v-4b3248f6]{position:relative;margin-bottom:10px}.createPost-container .createPost-main-container .postInfo-container[data-v-4b3248f6]:after{content:"";display:table;clear:both}.createPost-container .createPost-main-container .postInfo-container .postInfo-container-item[data-v-4b3248f6]{float:left}.createPost-container .createPost-main-container .editor-container[data-v-4b3248f6]{min-height:500px;margin:0 0 30px}.createPost-container .createPost-main-container .editor-container .editor-upload-btn-container[data-v-4b3248f6]{text-align:right;margin-right:10px}.createPost-container .createPost-main-container .editor-container .editor-upload-btn-container .editor-upload-btn[data-v-4b3248f6]{display:inline-block}.createPost-container .word-counter[data-v-4b3248f6]{width:40px;position:absolute;right:-10px;top:0}.edit-input[data-v-4b3248f6]{padding-right:100px}.cancel-btn[data-v-4b3248f6]{position:absolute;right:15px;top:10px}
\ No newline at end of file \ No newline at end of file
.createPost-container[data-v-0e78771b]{position:relative}.createPost-container .createPost-main-container[data-v-0e78771b]{padding:40px 45px 20px 50px}.createPost-container .createPost-main-container .postInfo-container[data-v-0e78771b]{position:relative;margin-bottom:10px}.createPost-container .createPost-main-container .postInfo-container[data-v-0e78771b]:after{content:"";display:table;clear:both}.createPost-container .createPost-main-container .postInfo-container .postInfo-container-item[data-v-0e78771b]{float:left}.createPost-container .createPost-main-container .editor-container[data-v-0e78771b]{min-height:500px;margin:0 0 30px}.createPost-container .createPost-main-container .editor-container .editor-upload-btn-container[data-v-0e78771b]{text-align:right;margin-right:10px}.createPost-container .createPost-main-container .editor-container .editor-upload-btn-container .editor-upload-btn[data-v-0e78771b]{display:inline-block}.createPost-container .word-counter[data-v-0e78771b]{width:40px;position:absolute;right:-10px;top:0} .createPost-container[data-v-bf236cbe]{position:relative}.createPost-container .createPost-main-container[data-v-bf236cbe]{padding:40px 45px 20px 50px}.createPost-container .createPost-main-container .postInfo-container[data-v-bf236cbe]{position:relative;margin-bottom:10px}.createPost-container .createPost-main-container .postInfo-container[data-v-bf236cbe]:after{content:"";display:table;clear:both}.createPost-container .createPost-main-container .postInfo-container .postInfo-container-item[data-v-bf236cbe]{float:left}.createPost-container .createPost-main-container .editor-container[data-v-bf236cbe]{min-height:500px;margin:0 0 30px}.createPost-container .createPost-main-container .editor-container .editor-upload-btn-container[data-v-bf236cbe]{text-align:right;margin-right:10px}.createPost-container .createPost-main-container .editor-container .editor-upload-btn-container .editor-upload-btn[data-v-bf236cbe]{display:inline-block}.createPost-container .word-counter[data-v-bf236cbe]{width:40px;position:absolute;right:-10px;top:0}
\ No newline at end of file \ No newline at end of file
.waves-ripple{position:absolute;border-radius:100%;background-color:rgba(0,0,0,.15);background-clip:padding-box;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-transform:scale(0);transform:scale(0);opacity:1}.waves-ripple.z-active{opacity:0;-webkit-transform:scale(2);transform:scale(2);-webkit-transition:opacity 1.2s ease-out,-webkit-transform .6s ease-out;transition:opacity 1.2s ease-out,-webkit-transform .6s ease-out;transition:opacity 1.2s ease-out,transform .6s ease-out;transition:opacity 1.2s ease-out,transform .6s ease-out,-webkit-transform .6s ease-out}.createPost-container[data-v-24d9be33]{position:relative}.createPost-container .createPost-main-container[data-v-24d9be33]{padding:40px 45px 20px 50px}.createPost-container .createPost-main-container .postInfo-container[data-v-24d9be33]{position:relative;margin-bottom:10px}.createPost-container .createPost-main-container .postInfo-container[data-v-24d9be33]:after{content:"";display:table;clear:both}.createPost-container .createPost-main-container .postInfo-container .postInfo-container-item[data-v-24d9be33]{float:left}.createPost-container .createPost-main-container .editor-container[data-v-24d9be33]{min-height:500px;margin:0 0 30px}.createPost-container .createPost-main-container .editor-container .editor-upload-btn-container[data-v-24d9be33]{text-align:right;margin-right:10px}.createPost-container .createPost-main-container .editor-container .editor-upload-btn-container .editor-upload-btn[data-v-24d9be33]{display:inline-block}.createPost-container .word-counter[data-v-24d9be33]{width:40px;position:absolute;right:-10px;top:0} .waves-ripple{position:absolute;border-radius:100%;background-color:rgba(0,0,0,.15);background-clip:padding-box;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-transform:scale(0);transform:scale(0);opacity:1}.waves-ripple.z-active{opacity:0;-webkit-transform:scale(2);transform:scale(2);-webkit-transition:opacity 1.2s ease-out,-webkit-transform .6s ease-out;transition:opacity 1.2s ease-out,-webkit-transform .6s ease-out;transition:opacity 1.2s ease-out,transform .6s ease-out;transition:opacity 1.2s ease-out,transform .6s ease-out,-webkit-transform .6s ease-out}.createPost-container[data-v-632e36d6]{position:relative}.createPost-container .createPost-main-container[data-v-632e36d6]{padding:40px 45px 20px 50px}.createPost-container .createPost-main-container .postInfo-container[data-v-632e36d6]{position:relative;margin-bottom:10px}.createPost-container .createPost-main-container .postInfo-container[data-v-632e36d6]:after{content:"";display:table;clear:both}.createPost-container .createPost-main-container .postInfo-container .postInfo-container-item[data-v-632e36d6]{float:left}.createPost-container .createPost-main-container .editor-container[data-v-632e36d6]{min-height:500px;margin:0 0 30px}.createPost-container .createPost-main-container .editor-container .editor-upload-btn-container[data-v-632e36d6]{text-align:right;margin-right:10px}.createPost-container .createPost-main-container .editor-container .editor-upload-btn-container .editor-upload-btn[data-v-632e36d6]{display:inline-block}.createPost-container .word-counter[data-v-632e36d6]{width:40px;position:absolute;right:-10px;top:0}
\ No newline at end of file \ No newline at end of file
.waves-ripple{position:absolute;border-radius:100%;background-color:rgba(0,0,0,.15);background-clip:padding-box;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-transform:scale(0);transform:scale(0);opacity:1}.waves-ripple.z-active{opacity:0;-webkit-transform:scale(2);transform:scale(2);-webkit-transition:opacity 1.2s ease-out,-webkit-transform .6s ease-out;transition:opacity 1.2s ease-out,-webkit-transform .6s ease-out;transition:opacity 1.2s ease-out,transform .6s ease-out;transition:opacity 1.2s ease-out,transform .6s ease-out,-webkit-transform .6s ease-out}.createPost-container[data-v-24d9be33]{position:relative}.createPost-container .createPost-main-container[data-v-24d9be33]{padding:40px 45px 20px 50px}.createPost-container .createPost-main-container .postInfo-container[data-v-24d9be33]{position:relative;margin-bottom:10px}.createPost-container .createPost-main-container .postInfo-container[data-v-24d9be33]:after{content:"";display:table;clear:both}.createPost-container .createPost-main-container .postInfo-container .postInfo-container-item[data-v-24d9be33]{float:left}.createPost-container .createPost-main-container .editor-container[data-v-24d9be33]{min-height:500px;margin:0 0 30px}.createPost-container .createPost-main-container .editor-container .editor-upload-btn-container[data-v-24d9be33]{text-align:right;margin-right:10px}.createPost-container .createPost-main-container .editor-container .editor-upload-btn-container .editor-upload-btn[data-v-24d9be33]{display:inline-block}.createPost-container .word-counter[data-v-24d9be33]{width:40px;position:absolute;right:-10px;top:0} .waves-ripple{position:absolute;border-radius:100%;background-color:rgba(0,0,0,.15);background-clip:padding-box;pointer-events:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-transform:scale(0);transform:scale(0);opacity:1}.waves-ripple.z-active{opacity:0;-webkit-transform:scale(2);transform:scale(2);-webkit-transition:opacity 1.2s ease-out,-webkit-transform .6s ease-out;transition:opacity 1.2s ease-out,-webkit-transform .6s ease-out;transition:opacity 1.2s ease-out,transform .6s ease-out;transition:opacity 1.2s ease-out,transform .6s ease-out,-webkit-transform .6s ease-out}.createPost-container[data-v-632e36d6]{position:relative}.createPost-container .createPost-main-container[data-v-632e36d6]{padding:40px 45px 20px 50px}.createPost-container .createPost-main-container .postInfo-container[data-v-632e36d6]{position:relative;margin-bottom:10px}.createPost-container .createPost-main-container .postInfo-container[data-v-632e36d6]:after{content:"";display:table;clear:both}.createPost-container .createPost-main-container .postInfo-container .postInfo-container-item[data-v-632e36d6]{float:left}.createPost-container .createPost-main-container .editor-container[data-v-632e36d6]{min-height:500px;margin:0 0 30px}.createPost-container .createPost-main-container .editor-container .editor-upload-btn-container[data-v-632e36d6]{text-align:right;margin-right:10px}.createPost-container .createPost-main-container .editor-container .editor-upload-btn-container .editor-upload-btn[data-v-632e36d6]{display:inline-block}.createPost-container .word-counter[data-v-632e36d6]{width:40px;position:absolute;right:-10px;top:0}
\ No newline at end of file \ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-0be2"],{"704n":function(t,e,a){"use strict";var n=a("z4zC");a.n(n).a},Htjz:function(t,e,a){"use strict";a.r(e);var n={name:"CreateAccount",components:{AccountDetail:a("Ytwa").a}},r=a("KHd+"),o=Object(r.a)(n,function(){var t=this.$createElement;return(this._self._c||t)("account-detail",{attrs:{"is-edit":!1}})},[],!1,null,null,null);o.options.__file="create.vue";e.default=o.exports},VyMG:function(t,e,a){"use strict";a.d(e,"d",function(){return r}),a.d(e,"b",function(){return o}),a.d(e,"a",function(){return s}),a.d(e,"c",function(){return i}),a.d(e,"e",function(){return u});var n=a("t3Un");function r(t){return Object(n.a)({url:"/api/account/list",method:"get",params:t})}function o(t){return Object(n.a)({url:"/api/account/list/update",method:"post",data:t})}function s(t){return Object(n.a)({url:"/api/account/create",method:"post",data:t})}function i(t){return Object(n.a)({url:"/api/account/detail",method:"get",params:{id:t}})}function u(t){return Object(n.a)({url:"/api/account/reset_password",method:"post",data:t})}},Yfch:function(t,e,a){"use strict"},Ytwa:function(t,e,a){"use strict";var n=a("P2sY"),r=a.n(n),o=a("Grqa"),s=a("uARZ"),i=(a("Yfch"),a("VyMG")),u=a("gg54"),c={status:"draft",username:"",password:"",email:"",phone:"",nick_name:""},m={name:"GroupDetail",components:{MDinput:o.a,Sticky:s.a},props:{isEdit:{type:Boolean,default:!1}},data:function(){var t=this,e=function(e,a,n){""===a?(t.$message({message:e.field+"为必传项",type:"error"}),n(new Error(e.field+"为必传项"))):n()};return{postForm:r()({},c),loading:!1,userListOptions:[],rules:{username:[{validator:e}],nick_name:[{validator:e}],email:[{validator:e}],password:[{validator:e}],phone:[{validator:e}]}}},created:function(){if(this.isEdit){var t=this.$route.params&&this.$route.params.id;this.fetchData(t)}else this.postForm=r()({},c);this.tempRoute=r()({},this.$route)},methods:{fetchData:function(t){var e=this;Object(i.c)(t).then(function(t){e.postForm=t.data.data.data}).catch(function(t){console.log(t)})},submitForm:function(){var t=this;this.$refs.postForm.validate(function(e){if(!e)return console.log("error submit!!"),!1;t.loading=!0,Object(i.a)(t.postForm).then(function(e){t.$notify({title:"成功",message:e.data.data.message,type:"success",duration:2e3}),setTimeout(function(){t.$router.push("/account/list")},1e3)}).catch(function(e){t.$notify({title:"失败",message:"操作失败",type:"danger",duration:2e3})}),t.postForm.status="published",t.loading=!1})},getRemoteUserList:function(t){var e=this;Object(u.g)(t).then(function(t){t.data.items&&(e.userListOptions=t.data.items.map(function(t){return t.name}))})}}},l=(a("704n"),a("KHd+")),p=Object(l.a)(m,function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"createPost-container"},[a("el-form",{ref:"postForm",staticClass:"form-container",attrs:{model:t.postForm,rules:t.rules}},[a("sticky",{attrs:{"class-name":"sub-navbar "+t.postForm.status}},[a("el-button",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{"margin-left":"10px"},attrs:{type:"success"},on:{click:t.submitForm}},[t._v("保存")])],1),t._v(" "),a("div",{staticClass:"createPost-main-container"},[a("el-row",[a("el-col",{attrs:{span:24}},[t.isEdit?a("el-form-item",{staticStyle:{"margin-bottom":"40px"},attrs:{prop:"username"}},[a("MDinput",{attrs:{maxlength:100,name:"username",required:"",disabled:"disabled"},model:{value:t.postForm.username,callback:function(e){t.$set(t.postForm,"username",e)},expression:"postForm.username"}},[t._v("\n 账号\n ")])],1):a("el-form-item",{staticStyle:{"margin-bottom":"40px"},attrs:{prop:"username"}},[a("MDinput",{attrs:{maxlength:100,name:"username",required:""},model:{value:t.postForm.username,callback:function(e){t.$set(t.postForm,"username",e)},expression:"postForm.username"}},[t._v("\n 账号\n ")])],1)],1)],1),t._v(" "),a("el-row",[a("el-col",{attrs:{span:24}},[t.isEdit?a("el-form-item",{staticStyle:{"margin-bottom":"40px"},attrs:{prop:"password"}},[a("MDinput",{attrs:{maxlength:100,name:"password",required:"",disabled:"disabled"},model:{value:t.postForm.password,callback:function(e){t.$set(t.postForm,"password",e)},expression:"postForm.password"}},[t._v("\n 密码\n ")])],1):a("el-form-item",{staticStyle:{"margin-bottom":"40px"},attrs:{prop:"password"}},[a("MDinput",{attrs:{maxlength:100,name:"password",required:""},model:{value:t.postForm.password,callback:function(e){t.$set(t.postForm,"password",e)},expression:"postForm.password"}},[t._v("\n 密码\n ")])],1)],1)],1),t._v(" "),a("el-row",[a("el-col",{attrs:{span:24}},[a("el-form-item",{staticStyle:{"margin-bottom":"40px"},attrs:{prop:"email"}},[a("MDinput",{attrs:{maxlength:100,name:"email",required:""},model:{value:t.postForm.email,callback:function(e){t.$set(t.postForm,"email",e)},expression:"postForm.email"}},[t._v("\n 邮箱\n ")])],1)],1)],1),t._v(" "),a("el-row",[a("el-col",{attrs:{span:24}},[a("el-form-item",{staticStyle:{"margin-bottom":"40px"},attrs:{prop:"nick_name"}},[a("MDinput",{attrs:{maxlength:100,name:"nick_name",required:""},model:{value:t.postForm.nick_name,callback:function(e){t.$set(t.postForm,"nick_name",e)},expression:"postForm.nick_name"}},[t._v("\n 姓名\n ")])],1)],1)],1),t._v(" "),a("el-row",[a("el-col",{attrs:{span:24}},[a("el-form-item",{staticStyle:{"margin-bottom":"40px"},attrs:{prop:"phone"}},[a("MDinput",{attrs:{maxlength:100,name:"phone",required:""},model:{value:t.postForm.phone,callback:function(e){t.$set(t.postForm,"phone",e)},expression:"postForm.phone"}},[t._v("\n 电话\n ")])],1)],1)],1)],1)],1)],1)},[],!1,null,"0e78771b",null);p.options.__file="AccountDetail.vue";e.a=p.exports},gg54:function(t,e,a){"use strict";a.d(e,"g",function(){return r}),a.d(e,"c",function(){return o}),a.d(e,"e",function(){return s}),a.d(e,"d",function(){return i}),a.d(e,"b",function(){return u}),a.d(e,"a",function(){return c}),a.d(e,"f",function(){return m});var n=a("t3Un");function r(t){return Object(n.a)({url:"/api/search/user",method:"get",params:{name:t}})}function o(t){return Object(n.a)({url:"/api/search/group",method:"get",params:{name:t}})}function s(t){return Object(n.a)({url:"/api/search/tag",method:"get",params:{name:t}})}function i(t){return Object(n.a)({url:"/api/search/celebrity",method:"get",params:{name:t}})}function u(t){return Object(n.a)({url:"/api/search/city",method:"get",params:{name:t}})}function c(t){return Object(n.a)({url:"/api/search/celebrity",method:"get",params:{name:t}})}function m(t){return Object(n.a)({url:"/api/search/topic",method:"get",params:{name:t}})}},z4zC:function(t,e,a){}}]);
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-1fd3"],{Htjz:function(t,e,a){"use strict";a.r(e);var n={name:"CreateAccount",components:{AccountDetail:a("Ytwa").a}},r=a("KHd+"),o=Object(r.a)(n,function(){var t=this.$createElement;return(this._self._c||t)("account-detail",{attrs:{"is-edit":!1}})},[],!1,null,null,null);o.options.__file="create.vue";e.default=o.exports},VyMG:function(t,e,a){"use strict";a.d(e,"d",function(){return r}),a.d(e,"b",function(){return o}),a.d(e,"a",function(){return s}),a.d(e,"c",function(){return i}),a.d(e,"e",function(){return c});var n=a("t3Un");function r(t){return Object(n.a)({url:"/api/account/list",method:"get",params:t})}function o(t){return Object(n.a)({url:"/api/account/list/update",method:"post",data:t})}function s(t){return Object(n.a)({url:"/api/account/create",method:"post",data:t})}function i(t){return Object(n.a)({url:"/api/account/detail",method:"get",params:{id:t}})}function c(t){return Object(n.a)({url:"/api/account/reset_password",method:"post",data:t})}},Yfch:function(t,e,a){"use strict"},Ytwa:function(t,e,a){"use strict";var n=a("EJiy"),r=a.n(n),o=a("P2sY"),s=a.n(o),i=a("Grqa"),c=a("uARZ"),u=(a("Yfch"),a("VyMG")),m=a("gg54"),l={status:"draft",username:"",password:"",email:"",phone:"",nick_name:""},p={name:"GroupDetail",components:{MDinput:i.a,Sticky:c.a},props:{isEdit:{type:Boolean,default:!1}},data:function(){var t=this,e=function(e,a,n){""===a?(t.$message({message:e.field+"为必传项",type:"error"}),n(new Error(e.field+"为必传项"))):n()};return{postForm:s()({},l),loading:!1,userListOptions:[],rules:{username:[{validator:e}],nick_name:[{validator:e}],email:[{validator:e}],password:[{validator:e}],phone:[{validator:e}]}}},created:function(){if(this.isEdit){var t=this.$route.params&&this.$route.params.id;this.fetchData(t)}else this.postForm=s()({},l);this.tempRoute=s()({},this.$route)},methods:{fetchData:function(t){var e=this;Object(u.c)(t).then(function(t){e.postForm=t.data.data.data}).catch(function(t){console.log(t)})},submitForm:function(){var t=this;this.$refs.postForm.validate(function(e){if(!e)return console.log("error submit!!"),!1;t.loading=!0,Object(u.a)(t.postForm).then(function(e){if(500==e.data.data.code)return t.$notify({title:"失败",message:e.data.data.message,type:"error",duration:2e3}),t.loading=!1,!1;console.log(r()(e.data.data.code)),t.$notify({title:"成功",message:e.data.data.message,type:"success",duration:2e3}),setTimeout(function(){t.$router.push("/account/list")},1e3)}).catch(function(e){t.$notify({title:"失败",message:"操作失败",type:"danger",duration:2e3})}),t.postForm.status="published",t.loading=!1})},getRemoteUserList:function(t){var e=this;Object(m.g)(t).then(function(t){t.data.items&&(e.userListOptions=t.data.items.map(function(t){return t.name}))})}}},d=(a("ecRC"),a("KHd+")),f=Object(d.a)(p,function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"createPost-container"},[a("el-form",{ref:"postForm",staticClass:"form-container",attrs:{model:t.postForm,rules:t.rules}},[a("sticky",{attrs:{"class-name":"sub-navbar "+t.postForm.status}},[a("el-button",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{"margin-left":"10px"},attrs:{type:"success"},on:{click:t.submitForm}},[t._v("保存")])],1),t._v(" "),a("div",{staticClass:"createPost-main-container"},[a("el-row",[a("el-col",{attrs:{span:24}},[t.isEdit?a("el-form-item",{staticStyle:{"margin-bottom":"40px"},attrs:{prop:"username"}},[a("MDinput",{attrs:{maxlength:100,name:"username",required:"",disabled:"disabled"},model:{value:t.postForm.username,callback:function(e){t.$set(t.postForm,"username",e)},expression:"postForm.username"}},[t._v("\n 账号\n ")])],1):a("el-form-item",{staticStyle:{"margin-bottom":"40px"},attrs:{prop:"username"}},[a("MDinput",{attrs:{maxlength:100,name:"username",required:""},model:{value:t.postForm.username,callback:function(e){t.$set(t.postForm,"username",e)},expression:"postForm.username"}},[t._v("\n 账号\n ")])],1)],1)],1),t._v(" "),a("el-row",[a("el-col",{attrs:{span:24}},[t.isEdit?a("el-form-item",{staticStyle:{"margin-bottom":"40px"},attrs:{prop:"password"}},[a("MDinput",{attrs:{maxlength:100,name:"password",required:"",disabled:"disabled"},model:{value:t.postForm.password,callback:function(e){t.$set(t.postForm,"password",e)},expression:"postForm.password"}},[t._v("\n 密码\n ")])],1):a("el-form-item",{staticStyle:{"margin-bottom":"40px"},attrs:{prop:"password"}},[a("MDinput",{attrs:{maxlength:100,name:"password",required:""},model:{value:t.postForm.password,callback:function(e){t.$set(t.postForm,"password",e)},expression:"postForm.password"}},[t._v("\n 密码\n ")])],1)],1)],1),t._v(" "),a("el-row",[a("el-col",{attrs:{span:24}},[a("el-form-item",{staticStyle:{"margin-bottom":"40px"},attrs:{prop:"email"}},[a("MDinput",{attrs:{maxlength:100,name:"email",required:""},model:{value:t.postForm.email,callback:function(e){t.$set(t.postForm,"email",e)},expression:"postForm.email"}},[t._v("\n 邮箱\n ")])],1)],1)],1),t._v(" "),a("el-row",[a("el-col",{attrs:{span:24}},[a("el-form-item",{staticStyle:{"margin-bottom":"40px"},attrs:{prop:"nick_name"}},[a("MDinput",{attrs:{maxlength:100,name:"nick_name",required:""},model:{value:t.postForm.nick_name,callback:function(e){t.$set(t.postForm,"nick_name",e)},expression:"postForm.nick_name"}},[t._v("\n 姓名\n ")])],1)],1)],1),t._v(" "),a("el-row",[a("el-col",{attrs:{span:24}},[a("el-form-item",{staticStyle:{"margin-bottom":"40px"},attrs:{prop:"phone"}},[a("MDinput",{attrs:{maxlength:100,name:"phone",required:""},model:{value:t.postForm.phone,callback:function(e){t.$set(t.postForm,"phone",e)},expression:"postForm.phone"}},[t._v("\n 电话\n ")])],1)],1)],1)],1)],1)],1)},[],!1,null,"bf236cbe",null);f.options.__file="AccountDetail.vue";e.a=f.exports},ecRC:function(t,e,a){"use strict";var n=a("xi+q");a.n(n).a},gg54:function(t,e,a){"use strict";a.d(e,"g",function(){return r}),a.d(e,"c",function(){return o}),a.d(e,"e",function(){return s}),a.d(e,"d",function(){return i}),a.d(e,"b",function(){return c}),a.d(e,"a",function(){return u}),a.d(e,"f",function(){return m});var n=a("t3Un");function r(t){return Object(n.a)({url:"/api/search/user",method:"get",params:{name:t}})}function o(t){return Object(n.a)({url:"/api/search/group",method:"get",params:{name:t}})}function s(t){return Object(n.a)({url:"/api/search/tag",method:"get",params:{name:t}})}function i(t){return Object(n.a)({url:"/api/search/celebrity",method:"get",params:{name:t}})}function c(t){return Object(n.a)({url:"/api/search/city",method:"get",params:{name:t}})}function u(t){return Object(n.a)({url:"/api/search/celebrity",method:"get",params:{name:t}})}function m(t){return Object(n.a)({url:"/api/search/topic",method:"get",params:{name:t}})}},"xi+q":function(t,e,a){}}]);
\ No newline at end of file
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-63d0"],{"4NrL":function(t,e,a){"use strict";a.r(e);var n={name:"EditAccount",components:{AccountDetail:a("Ytwa").a}},r=a("KHd+"),o=Object(r.a)(n,function(){var t=this.$createElement;return(this._self._c||t)("account-detail",{attrs:{"is-edit":!0}})},[],!1,null,null,null);o.options.__file="edit.vue";e.default=o.exports},"704n":function(t,e,a){"use strict";var n=a("z4zC");a.n(n).a},VyMG:function(t,e,a){"use strict";a.d(e,"d",function(){return r}),a.d(e,"b",function(){return o}),a.d(e,"a",function(){return s}),a.d(e,"c",function(){return i}),a.d(e,"e",function(){return u});var n=a("t3Un");function r(t){return Object(n.a)({url:"/api/account/list",method:"get",params:t})}function o(t){return Object(n.a)({url:"/api/account/list/update",method:"post",data:t})}function s(t){return Object(n.a)({url:"/api/account/create",method:"post",data:t})}function i(t){return Object(n.a)({url:"/api/account/detail",method:"get",params:{id:t}})}function u(t){return Object(n.a)({url:"/api/account/reset_password",method:"post",data:t})}},Yfch:function(t,e,a){"use strict"},Ytwa:function(t,e,a){"use strict";var n=a("P2sY"),r=a.n(n),o=a("Grqa"),s=a("uARZ"),i=(a("Yfch"),a("VyMG")),u=a("gg54"),c={status:"draft",username:"",password:"",email:"",phone:"",nick_name:""},m={name:"GroupDetail",components:{MDinput:o.a,Sticky:s.a},props:{isEdit:{type:Boolean,default:!1}},data:function(){var t=this,e=function(e,a,n){""===a?(t.$message({message:e.field+"为必传项",type:"error"}),n(new Error(e.field+"为必传项"))):n()};return{postForm:r()({},c),loading:!1,userListOptions:[],rules:{username:[{validator:e}],nick_name:[{validator:e}],email:[{validator:e}],password:[{validator:e}],phone:[{validator:e}]}}},created:function(){if(this.isEdit){var t=this.$route.params&&this.$route.params.id;this.fetchData(t)}else this.postForm=r()({},c);this.tempRoute=r()({},this.$route)},methods:{fetchData:function(t){var e=this;Object(i.c)(t).then(function(t){e.postForm=t.data.data.data}).catch(function(t){console.log(t)})},submitForm:function(){var t=this;this.$refs.postForm.validate(function(e){if(!e)return console.log("error submit!!"),!1;t.loading=!0,Object(i.a)(t.postForm).then(function(e){t.$notify({title:"成功",message:e.data.data.message,type:"success",duration:2e3}),setTimeout(function(){t.$router.push("/account/list")},1e3)}).catch(function(e){t.$notify({title:"失败",message:"操作失败",type:"danger",duration:2e3})}),t.postForm.status="published",t.loading=!1})},getRemoteUserList:function(t){var e=this;Object(u.g)(t).then(function(t){t.data.items&&(e.userListOptions=t.data.items.map(function(t){return t.name}))})}}},l=(a("704n"),a("KHd+")),p=Object(l.a)(m,function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"createPost-container"},[a("el-form",{ref:"postForm",staticClass:"form-container",attrs:{model:t.postForm,rules:t.rules}},[a("sticky",{attrs:{"class-name":"sub-navbar "+t.postForm.status}},[a("el-button",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{"margin-left":"10px"},attrs:{type:"success"},on:{click:t.submitForm}},[t._v("保存")])],1),t._v(" "),a("div",{staticClass:"createPost-main-container"},[a("el-row",[a("el-col",{attrs:{span:24}},[t.isEdit?a("el-form-item",{staticStyle:{"margin-bottom":"40px"},attrs:{prop:"username"}},[a("MDinput",{attrs:{maxlength:100,name:"username",required:"",disabled:"disabled"},model:{value:t.postForm.username,callback:function(e){t.$set(t.postForm,"username",e)},expression:"postForm.username"}},[t._v("\n 账号\n ")])],1):a("el-form-item",{staticStyle:{"margin-bottom":"40px"},attrs:{prop:"username"}},[a("MDinput",{attrs:{maxlength:100,name:"username",required:""},model:{value:t.postForm.username,callback:function(e){t.$set(t.postForm,"username",e)},expression:"postForm.username"}},[t._v("\n 账号\n ")])],1)],1)],1),t._v(" "),a("el-row",[a("el-col",{attrs:{span:24}},[t.isEdit?a("el-form-item",{staticStyle:{"margin-bottom":"40px"},attrs:{prop:"password"}},[a("MDinput",{attrs:{maxlength:100,name:"password",required:"",disabled:"disabled"},model:{value:t.postForm.password,callback:function(e){t.$set(t.postForm,"password",e)},expression:"postForm.password"}},[t._v("\n 密码\n ")])],1):a("el-form-item",{staticStyle:{"margin-bottom":"40px"},attrs:{prop:"password"}},[a("MDinput",{attrs:{maxlength:100,name:"password",required:""},model:{value:t.postForm.password,callback:function(e){t.$set(t.postForm,"password",e)},expression:"postForm.password"}},[t._v("\n 密码\n ")])],1)],1)],1),t._v(" "),a("el-row",[a("el-col",{attrs:{span:24}},[a("el-form-item",{staticStyle:{"margin-bottom":"40px"},attrs:{prop:"email"}},[a("MDinput",{attrs:{maxlength:100,name:"email",required:""},model:{value:t.postForm.email,callback:function(e){t.$set(t.postForm,"email",e)},expression:"postForm.email"}},[t._v("\n 邮箱\n ")])],1)],1)],1),t._v(" "),a("el-row",[a("el-col",{attrs:{span:24}},[a("el-form-item",{staticStyle:{"margin-bottom":"40px"},attrs:{prop:"nick_name"}},[a("MDinput",{attrs:{maxlength:100,name:"nick_name",required:""},model:{value:t.postForm.nick_name,callback:function(e){t.$set(t.postForm,"nick_name",e)},expression:"postForm.nick_name"}},[t._v("\n 姓名\n ")])],1)],1)],1),t._v(" "),a("el-row",[a("el-col",{attrs:{span:24}},[a("el-form-item",{staticStyle:{"margin-bottom":"40px"},attrs:{prop:"phone"}},[a("MDinput",{attrs:{maxlength:100,name:"phone",required:""},model:{value:t.postForm.phone,callback:function(e){t.$set(t.postForm,"phone",e)},expression:"postForm.phone"}},[t._v("\n 电话\n ")])],1)],1)],1)],1)],1)],1)},[],!1,null,"0e78771b",null);p.options.__file="AccountDetail.vue";e.a=p.exports},gg54:function(t,e,a){"use strict";a.d(e,"g",function(){return r}),a.d(e,"c",function(){return o}),a.d(e,"e",function(){return s}),a.d(e,"d",function(){return i}),a.d(e,"b",function(){return u}),a.d(e,"a",function(){return c}),a.d(e,"f",function(){return m});var n=a("t3Un");function r(t){return Object(n.a)({url:"/api/search/user",method:"get",params:{name:t}})}function o(t){return Object(n.a)({url:"/api/search/group",method:"get",params:{name:t}})}function s(t){return Object(n.a)({url:"/api/search/tag",method:"get",params:{name:t}})}function i(t){return Object(n.a)({url:"/api/search/celebrity",method:"get",params:{name:t}})}function u(t){return Object(n.a)({url:"/api/search/city",method:"get",params:{name:t}})}function c(t){return Object(n.a)({url:"/api/search/celebrity",method:"get",params:{name:t}})}function m(t){return Object(n.a)({url:"/api/search/topic",method:"get",params:{name:t}})}},z4zC:function(t,e,a){}}]);
\ No newline at end of file
This diff is collapsed.
(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-77c0"],{"4NrL":function(t,e,a){"use strict";a.r(e);var n={name:"EditAccount",components:{AccountDetail:a("Ytwa").a}},r=a("KHd+"),o=Object(r.a)(n,function(){var t=this.$createElement;return(this._self._c||t)("account-detail",{attrs:{"is-edit":!0}})},[],!1,null,null,null);o.options.__file="edit.vue";e.default=o.exports},VyMG:function(t,e,a){"use strict";a.d(e,"d",function(){return r}),a.d(e,"b",function(){return o}),a.d(e,"a",function(){return s}),a.d(e,"c",function(){return i}),a.d(e,"e",function(){return c});var n=a("t3Un");function r(t){return Object(n.a)({url:"/api/account/list",method:"get",params:t})}function o(t){return Object(n.a)({url:"/api/account/list/update",method:"post",data:t})}function s(t){return Object(n.a)({url:"/api/account/create",method:"post",data:t})}function i(t){return Object(n.a)({url:"/api/account/detail",method:"get",params:{id:t}})}function c(t){return Object(n.a)({url:"/api/account/reset_password",method:"post",data:t})}},Yfch:function(t,e,a){"use strict"},Ytwa:function(t,e,a){"use strict";var n=a("EJiy"),r=a.n(n),o=a("P2sY"),s=a.n(o),i=a("Grqa"),c=a("uARZ"),u=(a("Yfch"),a("VyMG")),m=a("gg54"),l={status:"draft",username:"",password:"",email:"",phone:"",nick_name:""},p={name:"GroupDetail",components:{MDinput:i.a,Sticky:c.a},props:{isEdit:{type:Boolean,default:!1}},data:function(){var t=this,e=function(e,a,n){""===a?(t.$message({message:e.field+"为必传项",type:"error"}),n(new Error(e.field+"为必传项"))):n()};return{postForm:s()({},l),loading:!1,userListOptions:[],rules:{username:[{validator:e}],nick_name:[{validator:e}],email:[{validator:e}],password:[{validator:e}],phone:[{validator:e}]}}},created:function(){if(this.isEdit){var t=this.$route.params&&this.$route.params.id;this.fetchData(t)}else this.postForm=s()({},l);this.tempRoute=s()({},this.$route)},methods:{fetchData:function(t){var e=this;Object(u.c)(t).then(function(t){e.postForm=t.data.data.data}).catch(function(t){console.log(t)})},submitForm:function(){var t=this;this.$refs.postForm.validate(function(e){if(!e)return console.log("error submit!!"),!1;t.loading=!0,Object(u.a)(t.postForm).then(function(e){if(500==e.data.data.code)return t.$notify({title:"失败",message:e.data.data.message,type:"error",duration:2e3}),t.loading=!1,!1;console.log(r()(e.data.data.code)),t.$notify({title:"成功",message:e.data.data.message,type:"success",duration:2e3}),setTimeout(function(){t.$router.push("/account/list")},1e3)}).catch(function(e){t.$notify({title:"失败",message:"操作失败",type:"danger",duration:2e3})}),t.postForm.status="published",t.loading=!1})},getRemoteUserList:function(t){var e=this;Object(m.g)(t).then(function(t){t.data.items&&(e.userListOptions=t.data.items.map(function(t){return t.name}))})}}},d=(a("ecRC"),a("KHd+")),f=Object(d.a)(p,function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"createPost-container"},[a("el-form",{ref:"postForm",staticClass:"form-container",attrs:{model:t.postForm,rules:t.rules}},[a("sticky",{attrs:{"class-name":"sub-navbar "+t.postForm.status}},[a("el-button",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{"margin-left":"10px"},attrs:{type:"success"},on:{click:t.submitForm}},[t._v("保存")])],1),t._v(" "),a("div",{staticClass:"createPost-main-container"},[a("el-row",[a("el-col",{attrs:{span:24}},[t.isEdit?a("el-form-item",{staticStyle:{"margin-bottom":"40px"},attrs:{prop:"username"}},[a("MDinput",{attrs:{maxlength:100,name:"username",required:"",disabled:"disabled"},model:{value:t.postForm.username,callback:function(e){t.$set(t.postForm,"username",e)},expression:"postForm.username"}},[t._v("\n 账号\n ")])],1):a("el-form-item",{staticStyle:{"margin-bottom":"40px"},attrs:{prop:"username"}},[a("MDinput",{attrs:{maxlength:100,name:"username",required:""},model:{value:t.postForm.username,callback:function(e){t.$set(t.postForm,"username",e)},expression:"postForm.username"}},[t._v("\n 账号\n ")])],1)],1)],1),t._v(" "),a("el-row",[a("el-col",{attrs:{span:24}},[t.isEdit?a("el-form-item",{staticStyle:{"margin-bottom":"40px"},attrs:{prop:"password"}},[a("MDinput",{attrs:{maxlength:100,name:"password",required:"",disabled:"disabled"},model:{value:t.postForm.password,callback:function(e){t.$set(t.postForm,"password",e)},expression:"postForm.password"}},[t._v("\n 密码\n ")])],1):a("el-form-item",{staticStyle:{"margin-bottom":"40px"},attrs:{prop:"password"}},[a("MDinput",{attrs:{maxlength:100,name:"password",required:""},model:{value:t.postForm.password,callback:function(e){t.$set(t.postForm,"password",e)},expression:"postForm.password"}},[t._v("\n 密码\n ")])],1)],1)],1),t._v(" "),a("el-row",[a("el-col",{attrs:{span:24}},[a("el-form-item",{staticStyle:{"margin-bottom":"40px"},attrs:{prop:"email"}},[a("MDinput",{attrs:{maxlength:100,name:"email",required:""},model:{value:t.postForm.email,callback:function(e){t.$set(t.postForm,"email",e)},expression:"postForm.email"}},[t._v("\n 邮箱\n ")])],1)],1)],1),t._v(" "),a("el-row",[a("el-col",{attrs:{span:24}},[a("el-form-item",{staticStyle:{"margin-bottom":"40px"},attrs:{prop:"nick_name"}},[a("MDinput",{attrs:{maxlength:100,name:"nick_name",required:""},model:{value:t.postForm.nick_name,callback:function(e){t.$set(t.postForm,"nick_name",e)},expression:"postForm.nick_name"}},[t._v("\n 姓名\n ")])],1)],1)],1),t._v(" "),a("el-row",[a("el-col",{attrs:{span:24}},[a("el-form-item",{staticStyle:{"margin-bottom":"40px"},attrs:{prop:"phone"}},[a("MDinput",{attrs:{maxlength:100,name:"phone",required:""},model:{value:t.postForm.phone,callback:function(e){t.$set(t.postForm,"phone",e)},expression:"postForm.phone"}},[t._v("\n 电话\n ")])],1)],1)],1)],1)],1)],1)},[],!1,null,"bf236cbe",null);f.options.__file="AccountDetail.vue";e.a=f.exports},ecRC:function(t,e,a){"use strict";var n=a("xi+q");a.n(n).a},gg54:function(t,e,a){"use strict";a.d(e,"g",function(){return r}),a.d(e,"c",function(){return o}),a.d(e,"e",function(){return s}),a.d(e,"d",function(){return i}),a.d(e,"b",function(){return c}),a.d(e,"a",function(){return u}),a.d(e,"f",function(){return m});var n=a("t3Un");function r(t){return Object(n.a)({url:"/api/search/user",method:"get",params:{name:t}})}function o(t){return Object(n.a)({url:"/api/search/group",method:"get",params:{name:t}})}function s(t){return Object(n.a)({url:"/api/search/tag",method:"get",params:{name:t}})}function i(t){return Object(n.a)({url:"/api/search/celebrity",method:"get",params:{name:t}})}function c(t){return Object(n.a)({url:"/api/search/city",method:"get",params:{name:t}})}function u(t){return Object(n.a)({url:"/api/search/celebrity",method:"get",params:{name:t}})}function m(t){return Object(n.a)({url:"/api/search/topic",method:"get",params:{name:t}})}},"xi+q":function(t,e,a){}}]);
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
</el-form-item> </el-form-item>
<el-form-item style="margin-bottom: 40px;" prop="username" v-else> <el-form-item style="margin-bottom: 40px;" prop="username" v-else>
<MDinput v-model="postForm.username" :maxlength="100" name="username" required > <MDinput v-model="postForm.username" :maxlength="100" name="username" required>
账号 账号
</MDinput> </MDinput>
</el-form-item> </el-form-item>
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
</el-form-item> </el-form-item>
<el-form-item style="margin-bottom: 40px;" prop="password" v-else> <el-form-item style="margin-bottom: 40px;" prop="password" v-else>
<MDinput v-model="postForm.password" :maxlength="100" name="password" required > <MDinput v-model="postForm.password" :maxlength="100" name="password" required>
密码 密码
</MDinput> </MDinput>
</el-form-item> </el-form-item>
...@@ -82,22 +82,22 @@ ...@@ -82,22 +82,22 @@
</template> </template>
<script> <script>
import MDinput from '@/components/MDinput' import MDinput from '@/components/MDinput'
import Sticky from '@/components/Sticky' // 粘性header组件 import Sticky from '@/components/Sticky' // 粘性header组件
import { validateURL } from '@/utils/validate' import {validateURL} from '@/utils/validate'
import { CreateAccount, fetchAccountDetail, } from '@/api/account' import {CreateAccount, fetchAccountDetail,} from '@/api/account'
import { userSearch } from '@/api/remoteSearch' import {userSearch} from '@/api/remoteSearch'
const defaultForm = { const defaultForm = {
status: 'draft', status: 'draft',
username: '', username: '',
password: '', password: '',
email: '', email: '',
phone: '', phone: '',
nick_name: '' nick_name: ''
} }
export default { export default {
name: 'GroupDetail', name: 'GroupDetail',
components: {MDinput, Sticky}, components: {MDinput, Sticky},
props: { props: {
...@@ -123,11 +123,11 @@ export default { ...@@ -123,11 +123,11 @@ export default {
loading: false, loading: false,
userListOptions: [], userListOptions: [],
rules: { rules: {
username: [{ validator: validateRequire}], username: [{validator: validateRequire}],
nick_name: [{ validator: validateRequire}], nick_name: [{validator: validateRequire}],
email: [{ validator: validateRequire}], email: [{validator: validateRequire}],
password: [{ validator: validateRequire}], password: [{validator: validateRequire}],
phone: [{ validator: validateRequire}], phone: [{validator: validateRequire}],
}, },
} }
}, },
...@@ -155,6 +155,17 @@ export default { ...@@ -155,6 +155,17 @@ export default {
if (valid) { if (valid) {
this.loading = true this.loading = true
CreateAccount(this.postForm).then(response => { CreateAccount(this.postForm).then(response => {
if (response.data.data.code == 500) {
this.$notify({
title: '失败',
message: response.data.data.message,
type: 'error',
duration: 2000
})
this.loading = false;
return false;
}
console.log(typeof response.data.data.code)
this.$notify({ this.$notify({
title: '成功', title: '成功',
message: response.data.data.message, message: response.data.data.message,
...@@ -189,12 +200,13 @@ export default { ...@@ -189,12 +200,13 @@ export default {
}) })
} }
} }
} }
</script> </script>
<style rel="stylesheet/scss" lang="scss" scoped> <style rel="stylesheet/scss" lang="scss" scoped>
@import "src/styles/mixin.scss"; @import "src/styles/mixin.scss";
.createPost-container {
.createPost-container {
position: relative; position: relative;
.createPost-main-container { .createPost-main-container {
padding: 40px 45px 20px 50px; padding: 40px 45px 20px 50px;
...@@ -224,5 +236,5 @@ export default { ...@@ -224,5 +236,5 @@ export default {
right: -10px; right: -10px;
top: 0px; top: 0px;
} }
} }
</style> </style>
...@@ -236,7 +236,6 @@ ...@@ -236,7 +236,6 @@
loading: false, loading: false,
rules: { rules: {
name: [{validator: validateRequire, trigger: 'blur'}], name: [{validator: validateRequire, trigger: 'blur'}],
user: [{validator: validateRequire, trigger: 'blur'}],
icon: [{validator: validateRequire, trigger: 'blur'}], icon: [{validator: validateRequire, trigger: 'blur'}],
}, },
...@@ -316,7 +315,11 @@ ...@@ -316,7 +315,11 @@
this.$refs.postForm.validate(valid => { this.$refs.postForm.validate(valid => {
if (valid) { if (valid) {
this.loading = true this.loading = true
if (this.user === ''){
this.$message.error('小组组长必须填')
this.loading = false;
return false;
}
this.postForm.user = this.user this.postForm.user = this.user
this.postForm.star = JSON.stringify(this.star) this.postForm.star = JSON.stringify(this.star)
this.postForm.group_users = JSON.stringify(this.group_users); this.postForm.group_users = JSON.stringify(this.group_users);
......
...@@ -450,6 +450,7 @@ ...@@ -450,6 +450,7 @@
this.loading = true; this.loading = true;
if (this.city.length == 0){ if (this.city.length == 0){
this.$message.error('城市必填') this.$message.error('城市必填')
this.loading = false;
return false; return false;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment