import{g as e,s as t,e as a,o as l,f as s,w as i,p as o,u as c,m as n,k as r,G as d,l as h,v as u,i as m,F as p,q as g,j as f,H as A,O as b,h as y,n as k,b as C,r as w,t as D}from"./index-Cx-ljvzK.js";import{_ as x}from"./uni-icons.rIRNGGE5.js";import{r as _}from"./uni-app.es.C2wev25l.js";import{t as v}from"./uni-cloud.es.D6hSd7-y.js";import{_ as S}from"./_plugin-vue_export-helper.BCo6x5W8.js";import{_ as B}from"./uni-load-more.Biu55tCr.js";import{h as E}from"./headerHeight.BKcShUBq.js";import{n as I}from"./nav.-FlBmVf_.js";const L=S({name:"uni-data-select",mixins:[v.mixinDatacom||{}],props:{localdata:{type:Array,default:()=>[]},value:{type:[String,Number],default:""},modelValue:{type:[String,Number],default:""},label:{type:String,default:""},placeholder:{type:String,default:"请选择"},emptyTips:{type:String,default:"无选项"},clear:{type:Boolean,default:!0},defItem:{type:Number,default:0},disabled:{type:Boolean,default:!1},format:{type:String,default:""},placement:{type:String,default:"bottom"}},data:()=>({showSelector:!1,current:"",mixinDatacomResData:[],apps:[],channels:[],cacheKey:"uni-data-select-lastSelectedValue"}),created(){this.debounceGet=this.debounce((()=>{this.query()}),300),this.collection&&!this.localdata.length&&this.debounceGet()},computed:{typePlaceholder(){const e=this.placeholder,t={"opendb-stat-app-versions":"版本","opendb-app-channels":"渠道","opendb-app-list":"应用"}[this.collection];return t?e+t:e},valueCom(){return this.modelValue},textShow(){let e=this.current;return e.length>10?e.slice(0,25)+"...":e},getOffsetByPlacement(){switch(this.placement){case"top":return"bottom:calc(100% + 12px);";case"bottom":return"top:calc(100% + 12px);"}}},watch:{localdata:{immediate:!0,handler(e,t){Array.isArray(e)&&t!==e&&(this.mixinDatacomResData=e)}},valueCom(e,t){this.initDefVal()},mixinDatacomResData:{immediate:!0,handler(e){e.length&&this.initDefVal()}}},methods:{debounce(e,t=100){let a=null;return function(...l){a&&clearTimeout(a),a=setTimeout((()=>{e.apply(this,l)}),t)}},query(){this.mixinDatacomEasyGet()},onMixinDatacomPropsChange(){this.collection&&this.debounceGet()},initDefVal(){let e="";if(!this.valueCom&&0!==this.valueCom||this.isDisabled(this.valueCom)){let t;if(this.collection&&(t=this.getCache()),t||0===t)e=t;else{let t="";this.defItem>0&&this.defItem<=this.mixinDatacomResData.length&&(t=this.mixinDatacomResData[this.defItem-1].value),e=t}(e||0===e)&&this.emit(e)}else e=this.valueCom;const t=this.mixinDatacomResData.find((t=>t.value===e));this.current=t?this.formatItemName(t):""},isDisabled(e){let t=!1;return this.mixinDatacomResData.forEach((a=>{a.value===e&&(t=a.disable)})),t},clearVal(){this.emit(""),this.collection&&this.removeCache()},change(e){e.disable||(this.showSelector=!1,this.current=this.formatItemName(e),this.emit(e.value))},emit(e){this.$emit("input",e),this.$emit("update:modelValue",e),this.$emit("change",e),this.collection&&this.setCache(e)},toggleSelector(){this.disabled||(this.showSelector=!this.showSelector)},formatItemName(e){let{text:t,value:a,channel_code:l}=e;if(l=l?`(${l})`:"",this.format){let t="";t=this.format;for(let a in e)t=t.replace(new RegExp(`{${a}}`,"g"),e[a]);return t}return this.collection.indexOf("app-list")>0?`${t}(${a})`:t||`未命名${l}`},getLoadData(){return this.mixinDatacomResData},getCurrentCacheKey(){return this.collection},getCache(t=this.getCurrentCacheKey()){return(e(this.cacheKey)||{})[t]},setCache(a,l=this.getCurrentCacheKey()){let s=e(this.cacheKey)||{};s[l]=a,t(this.cacheKey,s)},removeCache(a=this.getCurrentCacheKey()){let l=e(this.cacheKey)||{};delete l[a],t(this.cacheKey,l)}}},[["render",function(e,t,y,k,C,w){const D=f,v=_(a("uni-icons"),x),S=A,B=b;return l(),s(D,{class:"uni-stat__select"},{default:i((()=>[y.label?(l(),o("span",{key:0,class:"uni-label-text hide-on-phone"},c(y.label+":"),1)):n("",!0),r(D,{class:d(["uni-stat-box",{"uni-stat__actived":C.current}])},{default:i((()=>[r(D,{class:d(["uni-select",{"uni-select--disabled":y.disabled}])},{default:i((()=>[r(D,{class:"uni-select__input-box",onClick:w.toggleSelector},{default:i((()=>[C.current?(l(),s(D,{key:0,class:"uni-select__input-text"},{default:i((()=>[h(c(w.textShow),1)])),_:1})):(l(),s(D,{key:1,class:"uni-select__input-text uni-select__input-placeholder"},{default:i((()=>[h(c(w.typePlaceholder),1)])),_:1})),C.current&&y.clear&&!y.disabled?(l(),s(D,{key:2,onClick:u(w.clearVal,["stop"])},{default:i((()=>[r(v,{type:"clear",color:"#c0c4cc",size:"24"})])),_:1},8,["onClick"])):(l(),s(D,{key:3},{default:i((()=>[r(v,{type:C.showSelector?"top":"bottom",size:"14",color:"#999"},null,8,["type"])])),_:1}))])),_:1},8,["onClick"]),C.showSelector?(l(),s(D,{key:0,class:"uni-select--mask",onClick:w.toggleSelector},null,8,["onClick"])):n("",!0),C.showSelector?(l(),s(D,{key:1,class:"uni-select__selector",style:m(w.getOffsetByPlacement)},{default:i((()=>[r(D,{class:d("bottom"==y.placement?"uni-popper__arrow_bottom":"uni-popper__arrow_top")},null,8,["class"]),r(B,{"scroll-y":"true",class:"uni-select__selector-scroll"},{default:i((()=>[0===C.mixinDatacomResData.length?(l(),s(D,{key:0,class:"uni-select__selector-empty"},{default:i((()=>[r(S,null,{default:i((()=>[h(c(y.emptyTips),1)])),_:1})])),_:1})):(l(!0),o(p,{key:1},g(C.mixinDatacomResData,((e,t)=>(l(),s(D,{class:"uni-select__selector-item",key:t,onClick:t=>w.change(e)},{default:i((()=>[r(S,{class:d({"uni-select__selector__disabled":e.disable})},{default:i((()=>[h(c(w.formatItemName(e)),1)])),_:2},1032,["class"])])),_:2},1032,["onClick"])))),128))])),_:1})])),_:1},8,["style"])):n("",!0)])),_:1},8,["class"])])),_:1},8,["class"])])),_:1})}],["__scopeId","data-v-fe4b6be6"]]);const M=S({components:{headerHeight:E,navBar:I},data:()=>({statusBarHeight:0,problemList:[{title:"问题分类",id:0,list:[{title:"全部问题"}]},{title:"常见问题",id:1,list:[]}],footerList:[{title:"在线客服",icon:"data:image/png;base64,iVBORw0KGgo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FbEPvwLYM9U4GMRuNy0BOrfrWm1FbzahKE22POxCFxrvHxm6vChCGwEPjjwahUOTM3zXRFwZxzlvAr299CcAYqljcvSVsRu4bqnB0M0VIEPpVBpAdXgxxBQFb62gOrwNQWMAl9LwGjwNQSMCl9awOjwJQXMBD4kwF2J35kjk65FbD2wz7mhbSd1EFg7ZCVsjle0+7vrj9G2Eq9pjgO127Lbxj7vbYPX/2E60ylhh4D7sVZC10+bHVgfEdeBsy2U8r5O1UqY/s35JwpdG5oNZttoT9xCANofvG6avvcdhIpC6LQ6VdgX3/uhGkgdcBL3xbaUk4DsgpgLmHWI/gAf2LUxhCYAdwAAAABJRU5ErkJggg=="}],page:1,limit:10,typeData:null,typeId:null,ThemeData:null}),onLoad(a){const{id:l,h:s}=a;t("token",l),e("token")&&this.getHelpList(),this.statusBarHeight=s,t("BarHeight",s),e("Theme_Data")&&(this.ThemeData=JSON.parse(e("Theme_Data")))},methods:{async getHelpList(){y.get("/api/Help/help_type",{token:e("token")||""}).then((e=>{const{data:t,code:a}=e;a&&(this.problemList[0].list=t.map((e=>({...e,text:`${e.type_name}的相关问题`,value:e.id}))),this.typeId=t.length?t[0].id:null,this.typeData=t.length?t[0]:null),this.$nextTick((()=>{this.getProblemList(this.typeId)})),this.errorPage=!1})).catch((e=>{this.errorPage=!0}))},async getProblemList(t){y.get("/api/Help/help_list",{token:e("token")||"",type:t,page:this.page,page_limit:this.limit}).then((e=>{const{data:t,code:a}=e;a&&(this.problemList[1].list=t)}))},changeType(e){this.typeId=e,this.typeData=this.problemList[0].list.filter((e=>this.typeId===e.id))[0],this.getProblemList(this.typeId),this.problemList[1].list=[]},jumpPage(e){k({url:`/pages/feedback/problemDetail?id=${e.id}`})},operate(t){k(t?{url:`/pages/feedback/feedback?id=${e("token")}`}:{url:`/pages/feedback/customerService?h=${this.statusBarHeight}`})},back(){this.closeWeb()},closeWeb(){const e=C().platform;"ios"===e?window.webkit.messageHandlers.nativeHandler.postMessage({action:"closeWeb"}):"android"===e&&window.Android.closeWeb()}}},[["render",function(e,t,d,u,A,b){var y;const k=w("navBar"),v=f,S=_(a("uni-icons"),x),E=_(a("uni-data-select"),L),I=_(a("uni-load-more"),B);return l(),s(v,{class:"view-page",style:m({backgroundImage:`url('${(null==(y=A.ThemeData)?void 0:y.app_bg)||e.$config.PRIMARY_BGURL}')`})},{default:i((()=>[r(k,{style:m({marginTop:`${A.statusBarHeight}${"ios"===C().platform?"px":"dp"}`}),navTitle:"帮助与反馈",emitBack:!0,onBackEvent:b.back},null,8,["style","onBackEvent"]),r(v,{class:"content"},{default:i((()=>[r(v,{class:"top-tip flex-line flex-spaceB"},{default:i((()=>[r(v,{class:""},{default:i((()=>[r(v,{class:"tip"},{default:i((()=>[h(" Hi,有什么可以帮你 ")])),_:1}),r(v,{class:"color-6 font-24 font-w400"},{default:i((()=>[h(" 尽全力,帮助你 ")])),_:1})])),_:1}),r(v,{class:"kefu-icon"},{default:i((()=>[D("img",{src:"/h5/web/assets/kefu-BdcHH_a1.png",alt:""})])),_:1})])),_:1}),r(v,{class:"problem-view"},{default:i((()=>[(l(!0),o(p,null,g(A.problemList,((e,a)=>(l(),s(v,{class:"problem-box",key:a},{default:i((()=>[r(v,{class:"box-title color-0 font-w500 font-32"},{default:i((()=>{var t;return[h(c(e.id?`${null==(t=A.typeData)?void 0:t.type_name}相关问题`:e.title),1)]})),_:2},1024),e.list&&0!==e.list.length?(l(),s(v,{key:0,class:"box-content"},{default:i((()=>[e.id?(l(!0),o(p,{key:0},g(e.list,((t,a)=>(l(),s(v,{class:"flex-line box-line box-lines",onClick:e=>b.jumpPage(t)},{default:i((()=>[r(v,{class:"title"},{default:i((()=>[e.id?(l(),o(p,{key:0},[h(c(t.title),1)],64)):n("",!0)])),_:2},1024),r(v,{class:""},{default:i((()=>[e.id?(l(),s(S,{key:0,type:"right",size:"14",color:"rgb(153, 153, 153)"})):n("",!0)])),_:2},1024)])),_:2},1032,["onClick"])))),256)):(l(),s(E,{key:1,class:"box-line",modelValue:A.typeId,"onUpdate:modelValue":t[0]||(t[0]=e=>A.typeId=e),clear:!1,localdata:e.list,onChange:b.changeType},null,8,["modelValue","localdata","onChange"]))])),_:2},1024)):(l(),s(v,{key:1,class:""},{default:i((()=>[r(I,{status:"noMore"})])),_:1}))])),_:2},1024)))),128))])),_:1})])),_:1}),r(v,{class:"footer flex-line"},{default:i((()=>[(l(!0),o(p,null,g(A.footerList,((e,t)=>(l(),s(v,{class:"footer-button flex-line",onClick:e=>b.operate(t),key:t},{default:i((()=>[r(v,{class:"icon"},{default:i((()=>[D("img",{src:e.icon,alt:""},null,8,["src"])])),_:2},1024),r(v,{class:"title ml-6 color-3 font-28 font-w400"},{default:i((()=>[h(c(e.title),1)])),_:2},1024)])),_:2},1032,["onClick"])))),128))])),_:1})])),_:1},8,["style"])}],["__scopeId","data-v-e700e384"]]);export{M as default};