1 |
- (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-6c973ad7"],{"23fe":function(s,t,a){"use strict";var e=a("cb7b");a.n(e).a},"46cf":function(s,t,a){"use strict";a.r(t);var e=a("42e3"),i={name:"userLaber",props:{change:Boolean,uid:Number,labelList:{type:Array,default:function(){return[]}}},data:function(){return{activeIds:[]}},watch:{labelList:function(s){var t=this;s.map((function(s){s.label.map((function(s){s.disabled&&t.activeIds.push(s.id)}))}))}},methods:{selectLabel:function(s){if(s.disabled){var t=this.activeIds.indexOf(s.id);this.activeIds.splice(t,1),s.disabled=!1}else this.activeIds.push(s.id),s.disabled=!0},subBtn:function(){var s=this,t=[];this.labelList.map((function(s){s.label.map((function(s){0==s.disabled&&t.push(s.id)}))})),Object(e.X)(this.uid,{label_ids:this.activeIds,un_label_ids:t}).then((function(t){s.$Message.success(t.msg),s.$emit("editLabel",!1)})).catch((function(t){s.$Message.error(t.msg)}))},close:function(){this.$emit("closeChange",!1)}}},n=(a("23fe"),a("d519"),a("2877")),c=Object(n.a)(i,(function(){var s=this,t=s.$createElement,a=s._self._c||t;return a("div",[a("div",{staticClass:"labelChange",class:!0===s.change?"on":""},[a("div",{staticClass:"priceTitle cor32"},[s._v("\n 用户标签\n "),a("span",{staticClass:"iconfontYI icon-guanbi",on:{click:s.close}})]),a("div",{staticClass:"label-wrapper"},s._l(s.labelList,(function(t,e){return a("div",{key:e,staticClass:"label-box"},[a("div",{staticClass:"title"},[s._v(s._s(t.name))]),a("div",{staticClass:"list"},s._l(t.label,(function(t,e){return a("div",{key:e,staticClass:"label-item",class:{on:t.disabled},on:{click:function(a){return s.selectLabel(t)}}},[s._v(s._s(t.label_name))])})),0)])})),0),a("div",{staticClass:"footer"},[a("Button",{staticClass:"btn",attrs:{type:"primary"},on:{click:s.subBtn}},[s._v("确定")])],1)]),a("div",{directives:[{name:"show",rawName:"v-show",value:!0===s.change,expression:"change === true"}],staticClass:"maskModel",on:{touchmove:function(s){s.preventDefault()}}})])}),[],!1,null,"4898f5ed",null).exports,o=a("161e"),l=a.n(o),r=a("5a0c"),u=a.n(r),d={name:"index",components:{userLabels:c,vuePickers:l.a},filters:{getDay:function(s){if(s)return u.a.unix(s).format("YYYY年M月D日")},typeFilters:function(s){return{h5:"H5",wechat:"公众号",routine:"小程序",pc:"PC"}[s]}},data:function(){return{change:!1,activeUserInfo:"",pickerVisible:!1,groupList:[],labelList:[]}},mounted:function(){this.getGroup(),this.getUserInfo()},methods:{getList:function(){var s=this;Object(e.W)(this.$route.params.uid).then((function(t){s.labelList=t.data||[],s.labelList.length?s.change=!0:s.$dialog.error("暂无标签")})).catch((function(t){s.$dialog.error(t.msg)}))},getUserInfo:function(){var s=this;Object(e.V)(this.$route.params.uid).then((function(t){s.activeUserInfo=t.data})).catch((function(t){s.$dialog.error(t.msg)}))},getGroup:function(){var s=this,t={id:0,group_name:"无"};Object(e.U)().then((function(a){a.data.unshift(t);var e=[];a.data.map((function(s){e.push({label:s.group_name,value:s.id})})),s.groupList=[e]})).catch((function(t){s.$dialog.error(t.msg)}))},editLabel:function(){this.change=!1,this.getUserInfo()},onShowLabel:function(){this.getList()},showName:function(){this.pickerVisible=!0},cancel:function(){},confirm:function(s){var t=this;Object(e.F)(this.$route.params.uid,s[0].value).then((function(s){t.$Message.success(s.msg),t.getUserInfo()})).catch((function(s){t.$dialog.error(s.msg)}))},closeChange:function(s){this.change=s}}},p=(a("f4a5"),Object(n.a)(d,(function(){var s=this,t=s.$createElement,a=s._self._c||t;return s.activeUserInfo?a("div",{staticClass:"userBox"},[a("div",{staticClass:"user-header acea-row row-middle"},[a("div",{staticClass:"user-header-img mr20"},[a("img",{directives:[{name:"lazy",rawName:"v-lazy",value:s.activeUserInfo.avatar,expression:"activeUserInfo.avatar"}]})]),a("div",{staticClass:"user-header-name"},[a("span",{staticClass:"sp1 mr10",domProps:{textContent:s._s(s.activeUserInfo.nickname)}}),a("span",{staticClass:"sp2"},[s._v(s._s(s._f("typeFilters")(s.activeUserInfo.user_type)))])])]),a("div",{staticClass:"user-list"},[a("div",{staticClass:"acea-row item bgt"},[a("span",{staticClass:"sp1"},[s._v("用户标签")]),s.activeUserInfo.labelNames.length?a("div",{staticClass:"labelBox"},s._l(s.activeUserInfo.labelNames,(function(t,e){return a("span",{key:e,staticClass:"label"},[s._v(s._s(t))])})),0):a("span",{staticClass:"labelBox"},[s._v("无")]),a("span",{staticClass:"iconfontYI icon-up",on:{click:s.onShowLabel}})]),a("div",{staticClass:"acea-row item bgt"},[a("span",{staticClass:"sp1"},[s._v("手机号")]),a("span",{staticClass:"sp2",domProps:{textContent:s._s(s.activeUserInfo.phone||"无")}})]),a("div",{staticClass:"acea-row item"},[a("span",{staticClass:"sp1"},[s._v("分组")]),s.activeUserInfo.group_name?a("span",{staticClass:"checkName",domProps:{textContent:s._s(s.activeUserInfo.group_name)},on:{click:s.showName}}):a("span",{on:{click:s.showName}},[s._v("无")]),s.groupList.length?a("vue-pickers",{attrs:{data:s.groupList,showToolbar:!0,maskClick:!0,defaultIndex:0,visible:s.pickerVisible},on:{confirm:s.confirm,"update:visible":function(t){s.pickerVisible=t}}}):s._e()],1)]),a("div",{staticClass:"user-list"},[a("div",{staticClass:"acea-row item bgt"},[a("span",{staticClass:"sp1"},[s._v("会员等级")]),a("span",{staticClass:"sp2",domProps:{textContent:s._s(s.activeUserInfo.level_name?s.activeUserInfo.level_name:"无")}})]),a("div",{staticClass:"acea-row item bgt"},[a("span",{staticClass:"sp1"},[s._v("用户类型")]),a("span",{staticClass:"sp2"},[s._v(s._s(s._f("typeFilters")(s.activeUserInfo.user_type)))])]),a("div",{staticClass:"acea-row item bgt"},[a("span",{staticClass:"sp1"},[s._v("余额")]),a("span",{staticClass:"sp2",domProps:{textContent:s._s(s.activeUserInfo.now_money||"无")}})]),a("div",{staticClass:"acea-row item bgt"},[a("span",{staticClass:"sp1"},[s._v("推广员")]),a("span",{staticClass:"sp2",domProps:{textContent:s._s(s.activeUserInfo.is_promoter?"是":"否")}})]),a("div",{staticClass:"acea-row item"},[a("span",{staticClass:"sp1"},[s._v("生日")]),a("span",{staticClass:"sp2"},[s._v(s._s(s._f("getDay")(s.activeUserInfo.birthday)))])])]),s.change?a("user-labels",{attrs:{change:s.change,labelList:s.labelList,uid:Number(s.$route.params.uid)},on:{cancel:s.cancel,editLabel:s.editLabel,closeChange:s.closeChange}}):s._e()],1):s._e()}),[],!1,null,"279105f2",null));t.default=p.exports},"6e94":function(s,t,a){},cb7b:function(s,t,a){},d519:function(s,t,a){"use strict";var e=a("6e94");a.n(e).a},f4a5:function(s,t,a){"use strict";var e=a("faab");a.n(e).a},faab:function(s,t,a){}}]);
|