徐总多门店
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

1 lines
6.4 KiB

(window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-0e0229fe"],{"1a0d":function(s,t,e){},"46cf":function(s,t,e){"use strict";e.r(t);var a=e("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(a.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=(e("fb58"),e("dcda"),e("2877")),c=Object(n.a)(i,(function(){var s=this,t=s._self._c;return t("div",[t("div",{staticClass:"labelChange",class:!0===s.change?"on":""},[t("div",{staticClass:"priceTitle cor32"},[s._v("\n 用户标签\n "),t("span",{staticClass:"iconfontYI icon-guanbi",on:{click:s.close}})]),t("div",{staticClass:"label-wrapper"},s._l(s.labelList,(function(e,a){return t("div",{key:a,staticClass:"label-box"},[t("div",{staticClass:"title"},[s._v(s._s(e.name))]),t("div",{staticClass:"list"},s._l(e.label,(function(e,a){return t("div",{key:a,staticClass:"label-item",class:{on:e.disabled},on:{click:function(t){return s.selectLabel(e)}}},[s._v(s._s(e.label_name))])})),0)])})),0),t("div",{staticClass:"footer"},[t("Button",{staticClass:"btn",attrs:{type:"primary"},on:{click:s.subBtn}},[s._v("确定")])],1)]),t("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=e("161e"),l=e.n(o),r=e("5a0c"),u=e.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(a.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(a.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(a.U)().then((function(e){e.data.unshift(t);var a=[];e.data.map((function(s){a.push({label:s.group_name,value:s.id})})),s.groupList=[a]})).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(a.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=(e("70e0"),Object(n.a)(d,(function(){var s=this,t=s._self._c;return s.activeUserInfo?t("div",{staticClass:"userBox"},[t("div",{staticClass:"user-header acea-row row-middle"},[t("div",{staticClass:"user-header-img mr20"},[t("img",{directives:[{name:"lazy",rawName:"v-lazy",value:s.activeUserInfo.avatar,expression:"activeUserInfo.avatar"}]})]),t("div",{staticClass:"user-header-name"},[t("span",{staticClass:"sp1 mr10",domProps:{textContent:s._s(s.activeUserInfo.nickname)}}),t("span",{staticClass:"sp2"},[s._v(s._s(s._f("typeFilters")(s.activeUserInfo.user_type)))])])]),t("div",{staticClass:"user-list"},[t("div",{staticClass:"acea-row item bgt"},[t("span",{staticClass:"sp1"},[s._v("用户标签")]),s.activeUserInfo.labelNames.length?t("div",{staticClass:"labelBox"},s._l(s.activeUserInfo.labelNames,(function(e,a){return t("span",{key:a,staticClass:"label"},[s._v(s._s(e))])})),0):t("span",{staticClass:"labelBox"},[s._v("无")]),t("span",{staticClass:"iconfontYI icon-up",on:{click:s.onShowLabel}})]),t("div",{staticClass:"acea-row item bgt"},[t("span",{staticClass:"sp1"},[s._v("手机号")]),t("span",{staticClass:"sp2",domProps:{textContent:s._s(s.activeUserInfo.phone||"无")}})]),t("div",{staticClass:"acea-row item"},[t("span",{staticClass:"sp1"},[s._v("分组")]),s.activeUserInfo.group_name?t("span",{staticClass:"checkName",domProps:{textContent:s._s(s.activeUserInfo.group_name)},on:{click:s.showName}}):t("span",{on:{click:s.showName}},[s._v("无")]),s.groupList.length?t("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)]),t("div",{staticClass:"user-list"},[t("div",{staticClass:"acea-row item bgt"},[t("span",{staticClass:"sp1"},[s._v("会员等级")]),t("span",{staticClass:"sp2",domProps:{textContent:s._s(s.activeUserInfo.level_name?s.activeUserInfo.level_name:"无")}})]),t("div",{staticClass:"acea-row item bgt"},[t("span",{staticClass:"sp1"},[s._v("用户类型")]),t("span",{staticClass:"sp2"},[s._v(s._s(s._f("typeFilters")(s.activeUserInfo.user_type)))])]),t("div",{staticClass:"acea-row item bgt"},[t("span",{staticClass:"sp1"},[s._v("余额")]),t("span",{staticClass:"sp2",domProps:{textContent:s._s(s.activeUserInfo.now_money||"无")}})]),t("div",{staticClass:"acea-row item bgt"},[t("span",{staticClass:"sp1"},[s._v("推广员")]),t("span",{staticClass:"sp2",domProps:{textContent:s._s(s.activeUserInfo.is_promoter?"是":"否")}})]),t("div",{staticClass:"acea-row item"},[t("span",{staticClass:"sp1"},[s._v("生日")]),t("span",{staticClass:"sp2"},[s._v(s._s(s._f("getDay")(s.activeUserInfo.birthday)))])])]),s.change?t("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},"6bf3":function(s,t,e){},"70e0":function(s,t,e){"use strict";e("85c5")},"85c5":function(s,t,e){},dcda:function(s,t,e){"use strict";e("1a0d")},fb58:function(s,t,e){"use strict";e("6bf3")}}]);