| 1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["CustomLinkList"],{5396:function(e,t,n){"use strict";n("78ec")},"78ec":function(e,t,n){},"92c7":function(e,t,n){"use strict";n("498a"),n("9911");var a=function(){var e=this,t=e._self._c;return t("div",{staticClass:"consumer-share-link views"},[t("el-dialog",{attrs:{visible:e.dialogLink,center:"",title:e.$t("Ib.Index.CreateLink"),"custom-class":"dialog_header_w dialogLink consumer-share-dialog"},on:{"update:visible":function(t){e.dialogLink=t}}},[t("div",{staticClass:"dia-content"},[t("div",{staticClass:"content"},[t("div",{staticClass:"form-item form-item-name"},[t("label",{staticClass:"form-label"},[e._v(e._s(e.$t("Ib.Index.LinkName")))]),t("el-input",{staticClass:"form-input",attrs:{size:"small",placeholder:e.$t("Ib.Index.LinkName")},model:{value:e.linkName,callback:function(t){e.linkName=t},expression:"linkName"}})],1),t("div",{staticClass:"form-section"},[t("div",{staticClass:"section-title"},[t("i",{staticClass:"el-icon-s-operation"}),e._v(" "+e._s(e.$t("Ib.Index.Spread5"))+" ")]),t("div",{staticClass:"account-type-grid"},[t("div",{staticClass:"account-type-card"},[t("div",{staticClass:"account-type-label"},[e._v(e._s(e.$t("AccountType.StandardAccount")))]),t("el-select",{staticClass:"account-select",attrs:{size:"small",placeholder:e.$t("Placeholder.Choose")},on:{change:function(t){return e.handleAccountTypeChange("standard","7")}},model:{value:e.accountTypeSettings.standard.selectedIndex,callback:function(t){e.$set(e.accountTypeSettings.standard,"selectedIndex",t)},expression:"accountTypeSettings.standard.selectedIndex"}},e._l(e.getAvailableSpreads("7"),(function(n,a){return t("el-option",{key:a,attrs:{label:e.getSpreadLabel(n),value:a}})})),1)],1),t("div",{staticClass:"account-type-card"},[t("div",{staticClass:"account-type-label"},[e._v(e._s(e.$t("AccountType.SeniorAccount")))]),t("el-select",{staticClass:"account-select",attrs:{size:"small",placeholder:e.$t("Placeholder.Choose")},on:{change:function(t){return e.handleAccountTypeChange("ecn","2")}},model:{value:e.accountTypeSettings.ecn.selectedIndex,callback:function(t){e.$set(e.accountTypeSettings.ecn,"selectedIndex",t)},expression:"accountTypeSettings.ecn.selectedIndex"}},e._l(e.getAvailableSpreads("2"),(function(n,a){return t("el-option",{key:a,attrs:{label:e.getSpreadLabel(n),value:a}})})),1)],1),t("div",{staticClass:"account-type-card"},[t("div",{staticClass:"account-type-label"},[e._v(e._s(e.$t("AccountType.CentAccount")))]),t("el-select",{staticClass:"account-select",attrs:{size:"small",placeholder:e.$t("Placeholder.Choose")},on:{change:function(t){return e.handleAccountTypeChange("cent","8")}},model:{value:e.accountTypeSettings.cent.selectedIndex,callback:function(t){e.$set(e.accountTypeSettings.cent,"selectedIndex",t)},expression:"accountTypeSettings.cent.selectedIndex"}},e._l(e.getAvailableSpreads("8"),(function(n,a){return t("el-option",{key:a,attrs:{label:e.getSpreadLabel(n),value:a}})})),1)],1)])]),t("div",{staticClass:"action-row"},[t("el-button",{staticClass:"btn-create",attrs:{type:"primary",size:"small"},on:{click:e.CreateLink}},[t("i",{staticClass:"el-icon-link"}),e._v(" "+e._s(e.$t("Ib.Index.CreateLink"))+" ")])],1),e.link?[t("div",{staticClass:"result-section qr-section"},[t("div",{staticClass:"qr-wrapper"},[t("QrCode",{ref:"qrCode",attrs:{text:e.link,width:200,height:200}})],1)]),t("div",{staticClass:"result-section link-section"},[t("div",{staticClass:"result-label"},[t("i",{staticClass:"el-icon-link"}),e._v(" "+e._s(e.$t("Ib.Index.Copy"))+" ")]),t("div",{staticClass:"link-row"},[t("el-input",{staticClass:"link-input",attrs:{readonly:"",size:"small",id:"custom_link_dialog"},model:{value:e.link,callback:function(t){e.link="string"===typeof t?t.trim():t},expression:"link"}}),t("el-button",{staticClass:"btn-copy",attrs:{size:"small",type:"primary"},on:{click:function(t){return e.CopyShareLink("custom_link_dialog")}}},[t("i",{staticClass:"el-icon-document-copy"}),e._v(" "+e._s(e.$t("Ib.Index.Copy"))+" ")])],1)])]:e._e()],2)]),t("div",{staticClass:"commission-adjust-notice"},[t("div",{staticClass:"commission-adjust-notice__section"},[t("div",{staticClass:"commission-adjust-notice__section-head"},[t("i",{staticClass:"el-icon-info commission-adjust-notice__icon"}),t("span",{staticClass:"commission-adjust-notice__title"},[e._v(e._s(e.$t("Customer_info.Real.CommissionNoticeOpenTitle")))])]),t("p",{staticClass:"commission-adjust-notice__p"},[e._v(" "+e._s(e.$t("Customer_info.Real.CommissionNoticeOpenP1"))+" ")]),t("p",{staticClass:"commission-adjust-notice__p"},[e._v(" "+e._s(e.$t("Customer_info.Real.CommissionNoticeOpenP2"))+" ")])])]),t("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[t("el-button",{attrs:{size:"small"},on:{click:function(t){e.dialogLink=!1}}},[e._v(e._s(e.$t("Btn.Cancel")))]),t("el-button",{attrs:{size:"small",type:"primary",disabled:!e.link},on:{click:e.saveLink}},[e._v(e._s(e.$t("Btn.Confirm")))])],1)])],1)},i=[],r=n("5530"),s=n("c7eb"),c=n("1da1"),o=(n("99af"),n("4de4"),n("7db0"),n("caad"),n("a15b"),n("d81d"),n("14d9"),n("e9f5"),n("910d"),n("f665"),n("7d54"),n("ab43"),n("b64b"),n("d3b7"),n("2532"),n("159b"),n("5d411")),l=n("9630"),u=n("f121"),d=n.n(u),p=d.a.Code,g=d.a.Host80,f={name:"CustomLinkList",components:{QrCode:o["a"]},data:function(){return{pictLoading:!1,dialogLink:!1,tableData:[],linkName:"",excludeList:[],excludeLists:[],excludeListVN:[],spreadList:[],excludeShowLoginTypes:[],selectedSpreadId:"",loginTypes:"",ibInvalid:"B0",link:"",linkValue:"",currentCId:null,currentId:null,accountTypeSettings:{ecn:{selectedIndex:null,selectedItem:null,loginType:"2"},standard:{selectedIndex:null,selectedItem:null,loginType:"7"},cent:{selectedIndex:null,selectedItem:null,loginType:"8"}},accountTypeData:{ecn:[],standard:[],cent:[]},pagerInfo:{row:10,current:1,pageTotal:0,rowTotal:10},qrCodeDialogVisible:!1,currentQrCodeLink:""}},computed:{getInfoId:function(){return JSON.parse(this.Session.Get("user",!0)).id}},methods:{LinkActivity1:function(){var e,t,n,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=null!==(e=null!==(t=null===a||void 0===a?void 0:a.cId)&&void 0!==t?t:null===a||void 0===a||null===(n=a.form)||void 0===n?void 0:n.cId)&&void 0!==e?e:null;this.currentCId=i||null,this.currentId=a&&"id"in a?a.id:null,this.openAddDialog()},openAddDialog:function(){var e=this;return Object(c["a"])(Object(s["a"])().mark((function t(){return Object(s["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.getCustomLinkTypes();case 2:e.selectedSpreadId="",e.linkName="",e.link="",e.linkValue="",e.accountTypeSettings={ecn:{selectedIndex:null,selectedItem:null,loginType:"2"},standard:{selectedIndex:null,selectedItem:null,loginType:"7"},cent:{selectedIndex:null,selectedItem:null,loginType:"8"}},e.dialogLink=!0;case 8:case"end":return t.stop()}}),t)})))()},getCustomLinkTypes:function(){var e=this;return Object(c["a"])(Object(s["a"])().mark((function t(){var n,a,i;return Object(s["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return n=e.currentId?{ibId:e.currentId}:{},t.next=3,l["a"].getRegisterLinkTypes(n);case 3:a=t.sent,a.code==p.StatusOK?(i=a.data||[],console.log(i,"123"),e.accountTypeData={ecn:i.filter((function(e){return 2===e.loginType||"2"===e.loginType})),standard:i.filter((function(e){return 7===e.loginType||"7"===e.loginType})),cent:i.filter((function(e){return 8===e.loginType||"8"===e.loginType}))}):(e.$pigeon.MessageError(a.msg),e.accountTypeData={ecn:[],standard:[],cent:[]});case 5:case"end":return t.stop()}}),t)})))()},getAvailableSpreads:function(e){return"2"===e?this.accountTypeData.ecn||[]:"7"===e?this.accountTypeData.standard||[]:"8"===e&&this.accountTypeData.cent||[]},handleAccountTypeChange:function(e,t){var n=this.accountTypeSettings[e],a=this.getAvailableSpreads(t);null!==n.selectedIndex&&void 0!==n.selectedIndex?n.selectedItem=a[n.selectedIndex]||null:n.selectedItem=null,this.$forceUpdate()},getSpreadLabel:function(e){return e.groupName||""},loginTypeList:function(){var e=this;return Object(c["a"])(Object(s["a"])().mark((function t(){var n;return Object(s["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,l["a"].loginTypeList({page:{current:1,row:100}});case 2:n=t.sent,n.code==p.StatusOK?e.spreadList=n.data:e.$pigeon.MessageError(n.msg);case 4:case"end":return t.stop()}}),t)})))()},getValidAccountTypes:function(e,t){var n=this.spreadList.find((function(e){return e.id===t})),a={hide:"",commission:"",excludeShowLoginTypes:[]};if(!n)return a;var i=e.filter((function(e){return n.loginTypes.includes(e)})),r=e.filter((function(e){return!n.loginTypes.includes(e)})),s=this.excludeList.filter((function(e){return r.includes(e.value)})).map((function(e){return e.label})),c=this.excludeLists.filter((function(e){return!i.includes(e.value)})).map((function(e){return e.value}));return this.loginTypes=s.join("、"),{hide:n.hide,commission:n.comPoint,excludeShowLoginTypes:c,invalidLabels:s,invalidValues:r}},getLink1:function(){var e=this;return Object(c["a"])(Object(s["a"])().mark((function t(){var n,a,i,c;return Object(s["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(n=[],a=[],Object.keys(e.accountTypeSettings).forEach((function(t){var i=e.accountTypeSettings[t];i.selectedItem&&(n.push(i.loginType),a.push(i.selectedItem))})),0!==n.length){t.next=7;break}return e.$pigeon.MessageWarning(e.$i18n.t("Ib.Index.Spread5")),e.link="",t.abrupt("return");case 7:return i=Object(r["a"])({loginConfig:a},e.currentId?{ibId:e.currentId}:{}),t.next=10,l["a"].customLinkCode(i);case 10:if(c=t.sent,c.code!==p.StatusOK){t.next=16;break}return e.$pigeon.MessageOK(c.msg),t.abrupt("return",c.data);case 16:return e.$pigeon.MessageError(c.msg),t.abrupt("return","");case 18:case"end":return t.stop()}}),t)})))()},CreateLink:function(){var e=this;return Object(c["a"])(Object(s["a"])().mark((function t(){var n;return Object(s["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(e.linkName){t.next=3;break}return e.$pigeon.MessageWarning(e.$i18n.t("Ib.Index.LinkName")),t.abrupt("return");case 3:return t.next=5,e.getLink1();case 5:if(n=t.sent,n){t.next=8;break}return t.abrupt("return");case 8:e.linkValue=n,e.link="".concat(g,"/#/signup/").concat(e.getInfoId,"/").concat(n,"/").concat(e.ibInvalid);case 10:case"end":return t.stop()}}),t)})))()},saveLink:function(){var e=this;return Object(c["a"])(Object(s["a"])().mark((function t(){var n,a,i;return Object(s["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(e.linkName){t.next=3;break}return e.$pigeon.MessageWarning(e.$i18n.t("Label.Name")),t.abrupt("return");case 3:if(e.link){t.next=6;break}return e.$pigeon.MessageWarning(e.$i18n.t("Ib.Index.CreateLink")),t.abrupt("return");case 6:if(n=[],Object.keys(e.accountTypeSettings).forEach((function(t){var a=e.accountTypeSettings[t];a.selectedItem&&n.push(a.selectedItem)})),0!==n.length){t.next=11;break}return e.$pigeon.MessageWarning(e.$i18n.t("Ib.Index.Spread5")),t.abrupt("return");case 11:return a={name:e.linkName,link:e.link,linkValue:e.linkValue,loginConfig:n},e.currentCId&&(a.cId=e.currentCId),e.currentId&&(a.ibId=e.currentId),t.next=16,l["a"].customLinkAdd(a);case 16:i=t.sent,i.code===p.StatusOK?(e.$pigeon.MessageOK(i.msg),e.dialogLink=!1,e.currentCId=null,e.currentId=null,e.linkName="",e.link="",e.linkValue="",e.excludeShowLoginTypes=[],e.selectedSpreadId="",e.accountTypeSettings={ecn:{selectedIndex:null,selectedItem:null,loginType:"2"},standard:{selectedIndex:null,selectedItem:null,loginType:"7"},cent:{selectedIndex:null,selectedItem:null,loginType:"8"}},e.$emit("saved")):e.$pigeon.MessageError(i.msg);case 18:case"end":return t.stop()}}),t)})))()},CopyShareLink:function(e){var t=document.getElementById(e);t&&(t.select(),document.execCommand("Copy"),this.$pigeon.MessageOK(this.$i18n.t("card.Msg.m8")))},downloadQrCode:function(){this.$refs.qrCode&&this.$refs.qrCode.downloadQrCode()},showQrCodeDialog:function(e){e&&(this.currentQrCodeLink=e,this.qrCodeDialogVisible=!0)},handleCurrentChange:function(e){this.pagerInfo.current=e,this.getList()},getGroupNameByLoginType:function(e,t){if(!e)return"";var n=e;if("string"===typeof e)try{n=JSON.parse(e)}catch(i){return""}if(!Array.isArray(n))return"";var a=n.find((function(e){return e.loginType===t||e.loginType===String(t)||String(e.loginType)===String(t)}));return a&&a.groupName||""},formatLoginTypes:function(e){if(!e)return"--";var t=e;if("string"===typeof e)try{t=JSON.parse(e)}catch(i){t=e.split(",").map((function(e){return e.trim()}))}Array.isArray(t)||(t=[t]);var n={1:this.$i18n.t("AccountType.ClassicAccount"),2:this.$i18n.t("AccountType.SeniorAccount"),3:this.$i18n.t("AccountType.AgencyAccount"),5:this.$i18n.t("AccountType.SpeedAccount"),6:this.$i18n.t("AccountType.SpeedAccount"),7:this.$i18n.t("AccountType.StandardAccount"),8:this.$i18n.t("AccountType.CentAccount")},a=t.map((function(e){return n[String(e)]||e})).filter(Boolean);return a.length>0?a.join("、"):"--"}},created:function(){var e=this;this.$nextTick((function(){e.excludeLists=[{label:e.$i18n.t("AccountType.SeniorAccount"),value:"2"},{label:e.$i18n.t("AccountType.AgencyAccount"),value:"3"},{label:e.$i18n.t("AccountType.StandardAccount"),value:"7"},{label:e.$i18n.t("AccountType.CentAccount"),value:"8"}],e.excludeLists=e.excludeLists.filter((function(e){return!e.hidden}))}))}},m=f,h=(n("5396"),n("2877")),v=Object(h["a"])(m,a,i,!1,null,"3914491a",null);t["a"]=v.exports},9473:function(e,t,n){"use strict";n("970e")},"970e":function(e,t,n){},b66e:function(e,t,n){"use strict";n.r(t);n("b0c0"),n("498a"),n("9911");var a=function(){var e=this,t=e._self._c;return t("div",{staticClass:"view",attrs:{id:"ib_CustomLinkList"}},[t("div",{staticClass:"crm-title-box"},[t("div",{staticClass:"tit"},[t("span",{directives:[{name:"t",rawName:"v-t",value:"Ib.Index.CreateLink",expression:"'Ib.Index.CreateLink'"}]})]),t("span",{staticClass:"btn crm-cursor",on:{click:e.openAddDialog}},[t("i",{staticClass:"el-icon-plus"}),t("span",{directives:[{name:"t",rawName:"v-t",value:"Custom.Index.AddAccount",expression:"'Custom.Index.AddAccount'"}]})])]),t("div",{staticClass:"main-content"},[t("div",{staticClass:"tab"},[t("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.pictLoading,expression:"pictLoading"}],staticClass:"crm_tab",staticStyle:{width:"100%"},attrs:{data:e.tableData,stripe:"","element-loading-background":"rgba(43, 48, 67, 0.1)","element-loading-spinner":"el-icon-loading"}},[t("el-table-column",{attrs:{prop:"name",align:"center","header-align":"center",label:e.$t("Ib.Custom.NameLabel")},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.name||"--"))]}}])}),t("el-table-column",{attrs:{prop:"link",align:"center","header-align":"center",label:e.$t("Ib.Index.Link"),width:"400"},scopedSlots:e._u([{key:"default",fn:function(n){return[t("div",{staticStyle:{display:"flex","align-items":"center","justify-content":"center",gap:"10px","white-space":"nowrap"}},[t("el-input",{staticStyle:{"max-width":"400px","white-space":"nowrap",overflow:"hidden","text-overflow":"ellipsis",flex:"1"},attrs:{readonly:"",size:"mini",id:"custom_link_"+n.row.id},model:{value:n.row.link,callback:function(t){e.$set(n.row,"link","string"===typeof t?t.trim():t)},expression:"scope.row.link"}}),t("div",{staticClass:"crm-cursor qr-code-icon",staticStyle:{"white-space":"nowrap","line-height":"28px",display:"flex","align-items":"center",padding:"0 8px"},on:{click:function(t){return e.showQrCodeDialog(n.row.link)}}},[t("svg",{staticStyle:{width:"18px",height:"18px",fill:"#368fec","vertical-align":"middle"},attrs:{viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"}},[t("path",{attrs:{d:"M3 3h8v8H3V3zm2 2v4h4V5H5zm8-2h8v8h-8V3zm2 2v4h4V5h-4zM3 13h8v8H3v-8zm2 2v4h4v-4H5zm13-2h3v2h-3v-2zm0 4h3v2h-3v-2zm-4-4h2v6h-2v-6zm4-8h2v2h-2V3zm0 4h2v2h-2V7zm-4 0h2v2h-2V7z"}})])]),t("span",{directives:[{name:"t",rawName:"v-t",value:"Ib.Index.Copy",expression:"'Ib.Index.Copy'"}],staticClass:"crm-cursor",staticStyle:{"white-space":"nowrap","line-height":"28px"},on:{click:function(t){return e.CopyShareLink("custom_link_"+n.row.id)}}})],1)]}}])}),t("el-table-column",{attrs:{prop:"linkValue",align:"center","header-align":"center",label:e.$t("Ib.Index.LinkValue"),width:"300"},scopedSlots:e._u([{key:"default",fn:function(n){return[t("div",{staticStyle:{display:"flex","align-items":"center","justify-content":"center",gap:"10px","white-space":"nowrap"}},[t("el-input",{staticStyle:{"max-width":"400px","white-space":"nowrap",overflow:"hidden","text-overflow":"ellipsis",flex:"1"},attrs:{readonly:"",size:"mini",value:n.row.linkValue||"--",id:"custom_linkValue_"+n.row.id}}),n.row.linkValue?t("span",{directives:[{name:"t",rawName:"v-t",value:"Ib.Index.Copy",expression:"'Ib.Index.Copy'"}],staticClass:"crm-cursor",staticStyle:{"white-space":"nowrap","line-height":"28px"},on:{click:function(t){return e.CopyShareLink("custom_linkValue_"+n.row.id)}}}):e._e()],1)]}}])}),t("el-table-column",{attrs:{prop:"customNum",align:"center","header-align":"center",label:e.$t("Ib.Index.CustomNum")},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(t.row.customNum||"--"))]}}])}),t("el-table-column",{attrs:{prop:"comPoint",align:"center","header-align":"center",label:e.$t("AccountType.StandardAccount")},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(e.getGroupNameByLoginType(t.row.loginConfig,7)||"--"))]}}])}),t("el-table-column",{attrs:{prop:"hide",align:"center","header-align":"center",label:e.$t("AccountType.SeniorAccount")},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(e._s(e.getGroupNameByLoginType(t.row.loginConfig,2)||"--"))]}}])}),t("el-table-column",{attrs:{prop:"loginTypes",align:"center","header-align":"center",label:e.$t("AccountType.CentAccount")},scopedSlots:e._u([{key:"default",fn:function(t){return[e._v(" "+e._s(e.getGroupNameByLoginType(t.row.loginConfig,8)||"--")+" ")]}}])})],1),e.pagerInfo.rowTotal?t("div",{staticClass:"crm_pagination"},[t("el-pagination",{staticClass:"page",attrs:{background:"",layout:"prev, pager, next","page-size":e.pagerInfo.row,total:e.pagerInfo.rowTotal},on:{"current-change":e.handleCurrentChange}})],1):e._e()],1)]),t("ConsumerShareLink",{ref:"consumerShareLink",on:{saved:e.getList}}),t("el-dialog",{attrs:{visible:e.qrCodeDialogVisible,center:"",title:e.$t("Ib.Index.QrCode"),"custom-class":"dialog_header_w qr-code-dialog",width:"400px"},on:{"update:visible":function(t){e.qrCodeDialogVisible=t}}},[t("div",{staticClass:"qr-code-dialog-content"},[e.currentQrCodeLink?t("QrCode",{ref:"dialogQrCode",attrs:{text:e.currentQrCodeLink,width:300,height:300}}):e._e()],1),t("div",{staticStyle:{"margin-top":"16px","text-align":"center"}},[t("el-button",{directives:[{name:"t",rawName:"v-t",value:"Ib.Index.DownloadQrCode",expression:"'Ib.Index.DownloadQrCode'"}],attrs:{type:"primary"},on:{click:e.downloadDialogQrCode}})],1),t("div",{staticClass:"dialog-footer",staticStyle:{"text-align":"center",padding:"20px 0"},attrs:{slot:"footer"},slot:"footer"},[t("el-button",{directives:[{name:"t",rawName:"v-t",value:"Btn.Cancel",expression:"'Btn.Cancel'"}],on:{click:function(t){e.qrCodeDialogVisible=!1}}})],1)])],1)},i=[],r=n("c7eb"),s=n("1da1"),c=n("5530"),o=(n("7db0"),n("e9f5"),n("f665"),n("b64b"),n("d3b7"),n("d4ec")),l=n("bee2"),u=n("8f33"),d=n("262e"),p=n("ff2d"),g=n("bc3a"),f=n.n(g),m=n("f121"),h=n.n(m),v=function(e){function t(){var e;return Object(o["a"])(this,t),e=Object(u["a"])(this,t),f.a.defaults.baseURL=h.a.Host85,e}return Object(d["a"])(t,e),Object(l["a"])(t,[{key:"googleGroupAdd",value:function(){var e=Object(s["a"])(Object(r["a"])().mark((function e(){var t,n,a=arguments;return Object(r["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=a.length>0&&void 0!==a[0]?a[0]:{},e.next=3,this.post("/google/group/add",t);case 3:return n=e.sent,e.abrupt("return",n);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"customLinkAdd",value:function(){var e=Object(s["a"])(Object(r["a"])().mark((function e(){var t,n,a=arguments;return Object(r["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=a.length>0&&void 0!==a[0]?a[0]:{},e.next=3,this.post("/agent/custom/link/add",t);case 3:return n=e.sent,e.abrupt("return",n);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"customLinkSearchList",value:function(){var e=Object(s["a"])(Object(r["a"])().mark((function e(){var t,n,a=arguments;return Object(r["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=a.length>0&&void 0!==a[0]?a[0]:{},e.next=3,this.post("/agent/custom/link/search/list",t);case 3:return n=e.sent,e.abrupt("return",n);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"customLinkTypes",value:function(){var e=Object(s["a"])(Object(r["a"])().mark((function e(){var t,n,a=arguments;return Object(r["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=a.length>0&&void 0!==a[0]?a[0]:{},e.next=3,this.post("/custom/register/link/types",t);case 3:return n=e.sent,e.abrupt("return",n);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()},{key:"agentApplyAddPoint",value:function(){var e=Object(s["a"])(Object(r["a"])().mark((function e(){var t,n,a=arguments;return Object(r["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t=a.length>0&&void 0!==a[0]?a[0]:{},e.next=3,this.post("/agent/apply/add/point",t);case 3:return n=e.sent,e.abrupt("return",n);case 5:case"end":return e.stop()}}),e,this)})));function t(){return e.apply(this,arguments)}return t}()}])}(p["a"]),b=new v,y=n("5d411"),C=n("92c7"),k=h.a.Code,x={name:"CustomLinkList",components:{QrCode:y["a"],ConsumerShareLink:C["a"]},data:function(){return{pictLoading:!1,tableData:[],pagerInfo:{row:10,current:1,pageTotal:0,rowTotal:10},qrCodeDialogVisible:!1,currentQrCodeLink:""}},methods:{openAddDialog:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.$route.query,n=t.cId,a=t.id,i=Object(c["a"])({},e);null!=n&&(i.cId=n),null!=a&&(i.id=a);var r=this.$refs.consumerShareLink;r&&r.LinkActivity1(i)},getList:function(){var e=this;return Object(s["a"])(Object(r["a"])().mark((function t(){var n;return Object(r["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.pictLoading=!0,t.next=3,b.customLinkSearchList({page:{current:e.pagerInfo.current,row:e.pagerInfo.row}});case 3:n=t.sent,n.code==k.StatusOK?(null!=n.data&&(e.tableData=n.data,e.pagerInfo.rowTotal=n.page.rowTotal,e.pagerInfo.pageTotal=n.page.pageTotal),e.pictLoading=!1):(e.$pigeon.MessageError(n.msg),e.pictLoading=!1);case 5:case"end":return t.stop()}}),t)})))()},CopyShareLink:function(e){var t=document.getElementById(e);t&&(t.select(),document.execCommand("Copy"),this.$pigeon.MessageOK(this.$i18n.t("card.Msg.m8")))},showQrCodeDialog:function(e){e&&(this.currentQrCodeLink=e,this.qrCodeDialogVisible=!0)},downloadDialogQrCode:function(){this.$refs.dialogQrCode&&this.$refs.dialogQrCode.downloadQrCode()},handleCurrentChange:function(e){this.pagerInfo.current=e,this.getList()},getGroupNameByLoginType:function(e,t){if(!e)return"";var n=e;if("string"===typeof e)try{n=JSON.parse(e)}catch(i){return""}if(!Array.isArray(n))return"";var a=n.find((function(e){return e.loginType===t||e.loginType===String(t)||String(e.loginType)===String(t)}));return a&&a.groupName||""}},created:function(){this.getList()}},w=x,I=(n("9473"),n("2877")),L=Object(I["a"])(w,a,i,!1,null,"724978f6",null);t["default"]=L.exports}}]);
|