|
|
import{d as e,m as o,a as t,o as i,c as l,w as n,n as a,b as c,e as s,t as u,f as r,i as d,g as p,h as f,j as h,r as m,k as y,l as g,p as b,I as _,q as v,F as k,s as w,u as S,v as C,x as $,y as x,z as I,A as B,B as z,C as A,D as T,E as j,G as q,H as N,J as P}from"./index-4b082bea.js";import{_ as E,r as O,o as U}from"./uni-app.es.de4a22b7.js";const H={"uicon-level":"","uicon-column-line":"","uicon-checkbox-mark":"","uicon-folder":"","uicon-movie":"","uicon-star-fill":"","uicon-star":"","uicon-phone-fill":"","uicon-phone":"","uicon-apple-fill":"","uicon-chrome-circle-fill":"","uicon-backspace":"","uicon-attach":"","uicon-cut":"","uicon-empty-car":"","uicon-empty-coupon":"","uicon-empty-address":"","uicon-empty-favor":"","uicon-empty-permission":"","uicon-empty-news":"","uicon-empty-search":"","uicon-github-circle-fill":"","uicon-rmb":"","uicon-person-delete-fill":"","uicon-reload":"","uicon-order":"","uicon-server-man":"","uicon-search":"","uicon-fingerprint":"","uicon-more-dot-fill":"","uicon-scan":"","uicon-share-square":"","uicon-map":"","uicon-map-fill":"","uicon-tags":"","uicon-tags-fill":"","uicon-bookmark-fill":"","uicon-bookmark":"","uicon-eye":"","uicon-eye-fill":"","uicon-mic":"","uicon-mic-off":"","uicon-calendar":"","uicon-calendar-fill":"","uicon-trash":"","uicon-trash-fill":"","uicon-play-left":"","uicon-play-right":"","uicon-minus":"","uicon-plus":"","uicon-info":"","uicon-info-circle":"","uicon-info-circle-fill":"","uicon-question":"","uicon-error":"","uicon-close":"","uicon-checkmark":"","uicon-android-circle-fill":"","uicon-android-fill":"","uicon-ie":"","uicon-IE-circle-fill":"","uicon-google":"","uicon-google-circle-fill":"","uicon-setting-fill":"","uicon-setting":"","uicon-minus-square-fill":"","uicon-plus-square-fill":"","uicon-heart":"","uicon-heart-fill":"","uicon-camera":"","uicon-camera-fill":"","uicon-more-circle":"","uicon-more-circle-fill":"","uicon-chat":"","uicon-chat-fill":"","uicon-bag-fill":"","uicon-bag":"","uicon-error-circle-fill":"","uicon-error-circle":"","uicon-close-circle":"","uicon-close-circle-fill":"","uicon-checkmark-circle":"","uicon-checkmark-circle-fill":"","uicon-question-circle-fill":"","uicon-question-circle":"","uicon-share":"","uicon-share-fill":"","uicon-shopping-cart":"","uicon-shopping-cart-fill":"","uicon-bell":"","uicon-bell-fill":"","uicon-list":"","uicon-list-dot":"","uicon-zhihu":"","uicon-zhihu-circle-fill":"","uicon-zhifubao":"","uicon-zhifubao-circle-fill":"","uicon-weixin-circle-fill":"","uicon-weixin-fill":"","uicon-twitter-circle-fill":"","uicon-twitter":"","uicon-taobao-circle-fill":"","uicon-taobao":"","uicon-weibo-circle-fill":"","uicon-weibo":"","uicon-qq-fill":"","uicon-qq-circle-fill":"","uicon-moments-circel-fill":"","uicon-moments":"","uicon-qzone":"","uicon-qzone-circle-fill":"","uicon-baidu-circle-fill":"","uicon-baidu":"","uicon-facebook-circle-fill":"","uicon-facebook":"","uicon-car":"","uicon-car-fill":"","uicon-warning-fill":"","uicon-warning":"","uicon-clock-fill":"","uicon-clock":"","uicon-edit-pen":"","uicon-edit-pen-fill":"","uicon-email":"","uicon-email-fill":"","uicon-minus-circle":"","uicon-minus-circle-fill":"","uicon-plus-circle":"","uicon-plus-circle-fill":"","uicon-file-text":"","uicon-file-text-fill":"","uicon-pushpin":"","uicon-pushpin-fill":"","uicon-grid":"","uicon-grid-fill":"","uicon-play-circle":"","uicon-play-circle-fill":"","uicon-pause-circle-fill":"","uicon-pause":"","uicon-pause-circle":"","uicon-eye-off":"","uicon-eye-off-outline":"","uicon-gift-fill":"","uicon-gift":"","uicon-rmb-circle-fill":"","uicon-rmb-circle":"","uicon-kefu-ermai":"","uicon-server-fill":"","uicon-coupon-fill":"","uicon-coupon":"","uicon-integral":"","uicon-integral-fill":"","uicon-home-fill":"","uicon-home":"","uicon-hourglass-half-fill":"","uicon-hourglass":"","uicon-account":"","uicon-plus-people-fill":"","uicon-minus-people-fill":"","uicon-account-fill":"","uicon-thumb-down-fill":"","uicon-thumb-down":"","uicon-thumb-up":"","uicon-thumb-up-fill":"","uicon-lock-fill":"","uicon-lock-open":"","uicon-lock-opened-fill":"","uicon-lock":"","uicon-red-packet-fill":"","uicon-photo-fill":"","uicon-photo":"","uicon-volume-off-fill":"","uicon-volume-off":"","uicon-volume-fill":"","uicon-volume":"","uicon-red-packet":"","uicon-download":"","uicon-arrow-up-fill":"","uicon-arrow-down-fill":"","uicon-play-left-fill":"","uicon-play-right-fill":"","uicon-rewind-left-fill":"","uicon-rewind-right-fill":"","uicon-arrow-downward":"","uicon-arrow-leftward":"","uicon-arrow-rightward":"","uicon-arrow-upward":"","uicon-arrow-down":"","uicon-arrow-right":"","uicon-arrow-left":"","uicon-arrow-up":"","uicon-skip-back-left":"","uicon-skip-forward-right":"","uicon-rewind-right":"","uicon-rewind-left":"","uicon-arrow-right-double":"","uicon-arrow-left-double":"","uicon-wifi-off":"","uicon-wifi":"","uicon-empty-data":"","uicon-empty-history":"","uicon-empty-list":"","uicon-empty-page":"","uicon-empty-order":"","uicon-man":"","uicon-woman":"","uicon-man-add":"","uicon-man-add-fill":"","uicon-man-delete":"","uicon-man-delete-fill":"","uicon-zh":"","uicon-en":""};const L=E({name:"u-icon",data:()=>({}),emits:["click"],mixins:[o,t,{props:{name:{type:String,default:e.icon.name},color:{type:String,default:e.icon.color},size:{type:[String,Number],default:e.icon.size},bold:{type:Boolean,default:e.icon.bold},index:{type:[String,Number],default:e.icon.index},hoverClass:{type:String,default:e.icon.hoverClass},customPrefix:{type:String,default:e.icon.customPrefix},label:{type:[String,Number],default:e.icon.label},labelPos:{type:String,default:e.icon.labelPos},labelSize:{type:[String,Number],default:e.icon.labelSize},labelColor:{type:String,default:e.icon.labelColor},space:{type:[String,Number],default:e.icon.space},imgMode:{type:String,default:e.icon.imgMode},width:{type:[String,Number],default:e.icon.width},height:{type:[String,Number],default:e.icon.height},top:{type:[String,Number],default:e.icon.top},stop:{type:Boolean,default:e.icon.stop}}}],computed:{uClasses(){let e=[];return e.push(this.customPrefix+"-"+this.name),this.color&&uni.$u.config.type.includes(this.color)&&e.push("u-icon__icon--"+this.color),e},iconStyle(){let e={};return e={fontSize:uni.$u.addUnit(this.size),lineHeight:uni.$u.addUnit(this.size),fontWeight:this.bold?"bold":"normal",top:uni.$u.addUnit(this.top)},this.color&&!uni.$u.config.type.includes(this.color)&&(e.color=this.color),e},isImg(){return-1!==this.name.indexOf("/")},imgStyle(){let e={};return e.width=this.width?uni.$u.addUnit(this.width):uni.$u.addUnit(this.size),e.height=this.height?uni.$u.addUnit(this.height):uni.$u.addUnit(this.size),e},icon(){return H["uicon-"+this.name]||this.name}},methods:{clickHandler(e){this.$emit("click",this.index),this.stop&&this.preventEvent(e)}}},[["render",function(e,o,t,h,m,y){const g=d,b=p,_=f;return i(),l(_,{class:c(["u-icon",["u-icon--"+e.labelPos]]),onClick:y.clickHandler},{default:n((()=>[y.isImg?(i(),l(g,{key:0,class:"u-icon__img",src:e.name,mode:e.imgMode,style:a([y.imgStyle,e.$u.addStyle(e.customStyle)])},null,8,["src","mode","style"])):(i(),l(b,{key:1,class:c(["u-icon__icon",y.uClasses]),style:a([y.iconStyle,e.$u.addStyle(e.customStyle)]),"hover-class":e.hoverClass},{default:n((()=>[s(u(y.icon),1)])),_:1},8,["class","style","hover-class"])),""!==e.label?(i(),l(b,{key:2,class:"u-icon__label",style:a({color:e.labelColor,fontSize:e.$u.addUnit(e.labelSize),marginLeft:"right"==e.labelPos?e.$u.addUnit(e.space):0,marginTop:"bottom"==e.labelPos?e.$u.addUnit(e.space):0,marginRight:"left"==e.labelPos?e.$u.addUnit(e.space):0,marginBottom:"top"==e.labelPos?e.$u.addUnit(e.space):0})},{default:n((()=>[s(u(e.label),1)])),_:1},8,["style"])):r("",!0)])),_:1},8,["onClick","class"])}],["__scopeId","data-v-890c3ce2"]]);const R=E({name:"u-search",mixins:[o,t,{props:{shape:{type:String,default:e.search.shape},bgColor:{type:String,default:e.search.bgColor},placeholder:{type:String,default:e.search.placeholder},clearabled:{type:Boolean,default:e.search.clearabled},focus:{type:Boolean,default:e.search.focus},showAction:{type:Boolean,default:e.search.showAction},actionStyle:{type:Object,default:e.search.actionStyle},actionText:{type:String,default:e.search.actionText},inputAlign:{type:String,default:e.search.inputAlign},inputStyle:{type:Object,default:e.search.inputStyle},disabled:{type:Boolean,default:e.search.disabled},borderColor:{type:String,default:e.search.borderColor},searchIconColor:{type:String,default:e.search.searchIconColor},color:{type:String,default:e.search.color},placeholderColor:{type:String,default:e.search.placeholderColor},searchIcon:{type:String,default:e.search.searchIcon},searchIconSize:{type:[Number,String],default:e.search.searchIconSize},margin:{type:String,default:e.search.margin},animation:{type:Boolean,default:e.search.animation},modelValue:{type:String,default:e.search.value},value:{type:String,default:e.search.value},maxlength:{type:[String,Number],default:e.search.maxlength},height:{type:[String,Number],default:e.search.height},label:{type:[String,Number,null],default:e.search.label}}}],data(){return{keyword:"",showClear:!1,show:!1,focused:this.focus}},watch:{keyword(e){this.$emit("update:modelValue",e),this.$emit("change",e)},modelValue:{immediate:!0,handler(e){this.keyword=e}}},computed:{showActionBtn(){return!this.animation&&this.showAction}},emits:["clear","search","custom","focus","blur","click","clickIcon","update:modelValue","change"],methods:{inputChange(e){this.keyword=e.detail.value},clear(){this.keyword="",this.$nextTick((()=>{this.$emit("clear")}))},search(e){this.$emit("search",e.detail.value);try{h()}catch(o){}},custom(){this.$emit("custom",this.keyword);try{h()}catch(e){}},getFocus(){this.focused=!0,this.animation&&this.showAction&&(this.show=!0),this.$emit("focus",this.keyword)},blur(){setTimeout((()=>{this.focused=!1}),100),this.show=!1,this.$emit("blur",this.keyword)},clickHandler(){this.disabled&&this.$emit("click")},clickIcon(){this.$emit("clickIcon")}}},[["render",function(e,o,t,d,h,v){const k=p,w=O(m("u-icon"),L),S=f,C=_;return i(),l(S,{class:"u-search",onClick:v.clickHandler,style:a([{margin:e.margin},e.$u.addStyle(e.customStyle)])},{default:n((()=>[y(S,{class:"u-search__content",style:a({backgroundColor:e.bgColor,borderRadius:"round"==e.shape?"100px":"4px",borderColor:e.borderColor})},{default:n((()=>[e.$slots.label||null!==e.label?g(e.$slots,"label",{key:0},(()=>[y(k,{class:"u-search__content__label"},{default:n((()=>[s(u(e.label),1)])),_:1})]),!0):r("",!0),y(S,{class:"u-search__content__icon"},{default:n((()=>[y(w,{onClick:v.clickIcon,size:e.searchIconSize,name:e.searchIcon,color:e.searchIconColor?e.searchIconColor:e.color},null,8,["onClick","size","name","color"])])),_:1}),y(C,{"confirm-type":"search",onBlur:v.blur,value:h.keyword,onConfirm:v.search,onInput:v.inputChange,disabled:e.disabled,onFocus:v.getFocus,focus:e.focus,maxlength:e.maxlength,"placeholder-class":"u-search__content__input--placeholder",placeholder:e.placeholder,"placeholder-style":`color: ${e.placeholderColor}`,class:"u-search__content__input",type:"text",style:a([{textAlign:e.inputAlign,color:e.color,backgroundColor:e.bgColor,height:e.$u.addUnit(e.height)},e.inputStyle])},null,8,["onBlur","value","onConfirm","onInput","disabled","onFocus","focus","maxlength","placeholder","placeholder-style","style"]),h.keyword&&e.clearabled&&h.focused?(i(),l(S,{key:1,class:"u-search__content__icon u-search__content__close",onClick:v.clear},{default:n((()=>[y(w,{name:"close",size:"11",color:"#ffffff",customStyle:"line-height: 12px"})])),_:1},8,["onClick"])):r("",!0)])),_:3},8,["style"]),y(k,{style:a([e.actionStyle]),class:c(["u-search__action",[(v.showActionBtn||h.show)&&"u-search__action--active"]]),onClick:b(v.custom,["stop","prevent"])},{default:n((()=>[s(u(e.actionText),1)])),_:1},8,["style","class","onClick"])])),_:3},8,["onClick","style"])}],["__scopeId","data-v-7ec77839"]]),M=E({__name:"show-time",setup:e=>(U((()=>{})),(e,o)=>{const t=f;return i(),l(t,{class:"show-time"})})},[["__scopeId","data-v-48629e1f"]]),F=E({__name:"dialogue",props:{chatLog:{type:Array,default:()=>[]},projectConfig:{type:Object,default:()=>({})},userinfo:{type:Object,default:()=>({})}},setup:e=>(o,t)=>{const a=d,c=f;return i(),v(k,null,[y(M),y(c,{class:"inquire-group"},{default:n((()=>[y(a,{class:"avatar",src:e.projectConfig.Al_avatar},null,8,["src"]),y(c,{class:"dialogue"},{default:n((()=>[y(c,{class:"top"},{default:n((()=>[s(u(e.projectConfig.Al_name),1)])),_:1}),y(c,{class:"inquire"},{default:n((()=>[s(u(e.projectConfig.Al_name)+"为您服务,请输入您的问题。",1)])),_:1})])),_:1})])),_:1}),(i(!0),v(k,null,w(e.chatLog,((o,t)=>(i(),l(c,{class:"dialogue-wrap",key:t,ref_for:!0,ref:"messageListContainer"},{default:n((()=>[y(M),y(c,{class:"response-group inquire-group"},{default:n((()=>[y(c,{class:"dialogue answer-inner"},{default:n((()=>[y(c,{class:"top answer-name"},{default:n((()=>[s(u(e.userinfo.nickname),1)])),_:1}),y(c,{class:"answer-dialogue"},{default:n((()=>[s(u(o.message),1)])),_:2},1024)])),_:2},1024),y(a,{class:"avatar",style:{"margin-right":"0"},src:e.userinfo.avatar},null,8,["src"])])),_:2},1024),y(M),y(c,{class:"inquire-group"},{default:n((()=>[y(a,{class:"avatar",src:e.projectConfig.Al_avatar},null,8,["src"]),y(c,{class:"dialogue"},{default:n((()=>[y(c,{class:"top"},{default:n((()=>[s(u(e.projectConfig.Al_name),1)])),_:1}),y(c,{class:"inquire"},{default:n((()=>[s(u(o.response),1)])),_:2},1024)])),_:2},1024)])),_:2},1024)])),_:2},1024)))),128))],64)}},[["__scopeId","data-v-5dfbc218"]]),V=E({__name:"bottom-bar",props:{leftBtnText:{type:String,default:"修改上次记录"},rightBtnText:{type:String,default:"确认添加"},bgColor:{type:String,default:"#ffffff"},borderTop:{type:String,default:"0rpx"},zIndex:{type:Number,default:88},isLastRecord:{type:Boolean,default:!0}},emits:["leftClick","rightClick"],setup(e,{emit:o}){S((o=>({30329026:e.zIndex,"24ae731b":e.borderTop,11627030:e.bgColor})));const t=()=>{o("leftClick")},a=()=>{o("rightClick")};return(o,c)=>{const d=f;return i(),l(d,{class:"bottomBar"},{default:n((()=>[y(d,{class:"barBox"},{default:n((()=>[g(o.$slots,"default",{},(()=>[e.isLastRecord?r("",!0):(i(),l(d,{key:0,class:"cancel",onClick:t},{default:n((()=>[s(u(e.leftBtnText),1)])),_:1})),y(d,{class:"save",onClick:a},{default:n((()=>[s(u(e.rightBtnText),1)])),_:1})]),!0)])),_:3})])),_:3})}}},[["__scopeId","data-v-21a96403"]]),D={props:{show:{type:Boolean,default:e.transition.show},mode:{type:String,default:e.transition.mode},duration:{type:[String,Number],default:e.transition.duration},timingFunction:{type:String,default:e.transition.timingFunction}}},G=e=>({enter:`u-${e}-enter u-${e}-enter-active`,"enter-to":`u-${e}-enter-to u-${e}-enter-active`,leave:`u-${e}-leave u-${e}-leave-active`,"leave-to":`u-${e}-leave-to u-${e}-leave-active`});const J=E({name:"u-transition",data:()=>({inited:!1,viewStyle:{},status:"",transitionEnded:!1,display:!1,classes:""}),computed:{mergeStyle(){const{viewStyle:e,customStyle:o}=this;return{transitionDuration:`${this.duration}ms`,transitionTimingFunction:this.timingFunction,...uni.$u.addStyle(o),...e}}},mixins:[o,t,{methods:{clickHandler(){this.$emit("click")},vueEnter(){const e=G(this.mode);this.status="enter",this.$emit("beforeEnter"),this.inited=!0,this.display=!0,this.classes=e.enter,this.$nextTick((async()=>{await uni.$u.sleep(20),this.$emit("enter"),this.transitionEnded=!1,this.$emit("afterEnter"),this.classes=e["enter-to"]}))},vueLeave(){if(!this.display)return;const e=G(this.mode);this.status="leave",this.$emit("beforeLeave"),this.classes=e.leave,this.$nextTick((()=>{this.transitionEnded=!1,this.$emit("leave"),setTimeout(this.onTransitionEnd,this.duration),this.classes=e["leave-to"]}))},onTransitionEnd(){this.transitionEnded||(this.transitionEnded=!0,this.$emit("leave"===this.status?"afterLeave":"afterEnter"),!this.show&&this.display&&(this.display=!1,this.inited=!1))}}},D],watch:{show:{handler(e){e?this.vueEnter():this.vueLeave()},immediate:!0}}},[["render",function(e,o,t,s,u,d){const p=f;return u.inited?(i(),l(p,{key:0,class:c(["u-transition",u.classes]),ref:"u-transition",onClick:e.clickHandler,style:a([d.mergeStyle]),onTouchmove:e.noop},{default:n((()=>[g(e.$slots,"default",{},void 0,!0)])),_:3},8,["onClick","class","style","onTouchmove"])):r("",!0)}],["__scopeId","data-v-159cf890"]]);const W=E({name:"u-overlay",mixins:[o,t,{props:{show:{type:Boolean,default:e.overlay.show},zIndex:{type:[String,Number],default:e.overlay.zIndex},duration:{type:[String,Number],default:e.overlay.duration},opacity:{type:[String,Number],default:e.overlay.opacity}}}],computed:{overlayStyle(){const e={position:"fixed",top:0,left:0,right:0,zIndex:this.zIndex,bottom:0,"background-color":`rgba(0, 0, 0, ${this.opacity})`};return uni.$u.deepMerge(e,uni.$u.addStyle(this.customStyle))}},methods:{clickHandler(){this.$emit("click")}}},[["render",function(e,o,t,a,c,s){const u=O(m("u-transition"),J);return i(),l(u,{show:e.show,"custom-class":"u-overlay",duration:e.duration,"custom-style":s.overlayStyle,onClick:s.clickHandler},{default:n((()=>[g(e.$slots,"default",{},void 0,!0)])),_:3},8,["show","duration","custom-style","onClick"])}],["__scopeId","data-v-1ce16a4a"]]);const K=E({name:"u-status-bar",mixins:[o,t,{props:{bgColor:{type:String,default:e.statusBar.bgColor}}}],data:()=>({}),computed:{style(){const e={};return e.height=uni.$u.addUnit(uni.$u.sys().statusBarHeight,"px"),e.backgroundColor=this.bgColor,uni.$u.deepMerge(e,uni.$u.addStyle(this.customStyle))}}},[["render",function(e,o,t,c,s,u){const r=f;return i(),l(r,{style:a([u.style]),class:"u-status-bar"},{default:n((()=>[g(e.$slots,"default",{},void 0,!0)])),_:3},8,["style"])}],["__scopeId","data-v-df170e56"]]);const Q=E({name:"u-safe-bottom",mixins:[o,t,{props:{}}],data:()=>({safeAreaBottomHeight:0,isNvue:!1}),computed:{style(){return uni.$u.deepMerge({},uni.$u.addStyle(this.customStyle))}},mounted(){}},[["render",function(e,o,t,n,s,u){const r=f;return i(),l(r,{class:c(["u-safe-bottom",[!s.isNvue&&"u-safe-area-inset-bottom"]]),style:a([u.style])},null,8,["style","class"])}],["__scopeId","data-v-6e02536d"]]);const X=E({name:"u-popup",mixins:[o,t,{props:{show:{type:Boolean,default:e.popup.show},overlay:{type:Boolean,default:e.popup.overlay},mode:{type:String,default:e.popup.mode},duration:{type:[String,Number],default:e.popup.duration},closeable:{type:Boolean,default:e.popup.closeable},overlayStyle:{type:[Object,String],default:e.popup.overlayStyle},closeOnClickOverlay:{type:Boolean,default:e.popup.closeOnClickOverlay},zIndex:{type:[String,Number],default:e.popup.zIndex},safeAreaInsetBottom:{type:Boolean,default:e.popup.safeAreaInsetBottom},safeAreaInsetTop:{type:Boolean,default:e.popup.safeAreaInsetTop},closeIconPos:{type:String,default:e.popup.closeIconPos},round:{type:[Boolean,String,Number],default:e.popup.round},zoom:{type:Boolean,default:e.popup.zoom},bgColor:{type:String,default:e.popup.bgColor},overlayOpacity:{type:[Number,String],default:e.popup.overlayOpacity}}}],data(){return{overlayDuration:this.duration+50}},watch:{show(e,o){}},computed:{transitionStyle(){const e={zIndex:this.zIndex,position:"fixed",display:"flex"};return e[this.mode]=0,"left"===this.mode||"right"===this.mode?uni.$u.deepMerge(e,{bottom:0,top:0}):"top"===this.mode||"bottom"===this.mode?uni.$u.deepMerge(e,{left:0,right:0}):"center"===this.mode?uni.$u.deepMerge(e,{alignItems:"center","justify-content":"center",top:0,left:0,right:0,bottom:0}):void 0},contentStyle(){const e={};if(uni.$u.sys(),"center"!==this.mode&&(e.flex=1),this.bgColor&&(e.backgroundColor=this.bgColor),this.round){const o=uni.$u.addUnit(this.round);"top"===this.mode?(e.borderBottomLeftRadius=o,e.borderBottomRightRadius=o):"bottom"===this.mode?(e.borderTopLeftRadius=o,e.borderTopRightRadius=o):"center"===this.mode&&(e.borderRadius=o)}return uni.$u.deepMerge(e,uni.$u.addStyle(this.customStyle))},position(){return"center"===this.mode?this.zoom?"fade-zoom":"fade":"left"===this.mode?"slide-left":"right"===this.mode?"slide-right":"bottom"===this.mode?"slide-up":"top"===this.mode?"slide-down":void 0}},methods:{overlayClick(){this.closeOnClickOverlay&&this.$emit("close")},close(e){this.$emit("close")},afterEnter(){this.$emit("open")},clickHandler(){"center"===this.mode&&this.overlayClick(),this.$emit("click")}}},[["render",function(e,o,t,s,u,d){const p=O(m("u-overlay"),W),h=O(m("u-status-bar"),K),_=O(m("u-icon"),L),v=f,k=O(m("u-safe-bottom"),Q),w=O(m("u-transition"),J);return i(),l(v,{class:"u-popup"},{default:n((()=>[e.overlay?(i(),l(p,{key:0,show:e.show,onClick:d.overlayClick,duration:u.overlayDuration,customStyle:e.overlayStyle,opacity:e.overlayOpacity},null,8,["show","onClick","duration","customStyle","opacity"])):r("",!0),y(w,{show:e.show,customStyle:d.transitionStyle,mode:d.position,duration:e.duration,onAfterEnter:d.afterEnter,onClick:d.clickHandler},{default:n((()=>[y(v,{class:"u-popup__content",style:a([d.contentStyle]),onClick:b(e.noop,["stop"])},{default:n((()=>[e.safeAreaInsetTop?(i(),l(h,{key:0})):r("",!0),g(e.$slots,"default",{},void 0,!0),e.closeable?(i(),l(v,{key:1,onClick:b(d.close,["stop"]),class:c(["u-popup__content__close",["u-popup__content__close--"+e.closeIconPos]]),"hover-class":"u-popup__content__close--hover","hover-stay-time":"150"},{default:n((()=>[y(_,{name:"close",color:"#909399",size:"18",bold:""})])),_:1},8,["onClick","class"])):r("",!0),e.safeAreaInsetBottom?(i(),l(k,{key:2})):r("",!0)])),_:3},8,["style","onClick"])])),_:3},8,["show","customStyle","mode","duration","onAfterEnter","onClick"])])),_:3})}],["__scopeId","data-v-ca966c1e"]]);const Y=E({__name:"custom-popup",props:{isShowPopup:{type:Boolean,default:!1},isShowClose:{type:Boolean,default:!1}},emits:["closePopup"],setup(e,{emit:o}){function t(){o("closePopup")}return S((e=>({bcf3986c:e.height}))),(o,a)=>{const c=d,u=f;return e.isShowPopup?(i(),l(u,{key:0,class:"mask-wrap"},{default:n((()=>[y(u,{class:"center-content"},{default:n((()=>[e.isShowClose?(i(),l(c,{key:0,onClick:t,class:"close-icon",src:"/assets/error-71356228.png"})):r("",!0),g(o.$slots,"default",{},(()=>[y(u,{class:"warn-wrap"},{default:n((()=>[y(c,{class:"warn-icon",src:"/static/images/warn.png"}),y(u,{style:{"margin-bottom":"28rpx","font-weight":"700"}},{default:n((()=>[s("结束喂养填写")])),_:1})])),_:1})]),!0)])),_:3})])),_:3})):r("",!0)}}},[["__scopeId","data-v-efc6fc73"]]),Z=E({__name:"bottom-popup",props:{isShow:{type:Boolean,default:!1},userinfo:{type:Object,default:()=>({})},projectConfig:{type:Object,default:()=>({})}},emits:["closePopup","clearAll"],setup(e,{emit:o}){const t=I(!1);function a(){!function(e,o=!1){o?C({url:e}):e?$({url:e}):x()}("/pages/member/member")}function c(){o("closePopup")}function h(){o("clearAll")}return(o,g)=>{const b=f,_=d,v=p,k=O(m("u-popup"),X);return i(),l(b,{class:"bottom-popup"},{default:n((()=>[y(k,{show:e.isShow,round:16,mode:"bottom"},{default:n((()=>[y(b,{class:"content"},{default:n((()=>[y(b,{class:"title"},{default:n((()=>[s("我的菜单栏")])),_:1}),y(_,{class:"close-icon",src:"/assets/close-icon-de96aad6.png",onClick:c}),y(b,{class:"info-wrap"},{default:n((()=>[y(b,{class:"left-info"},{default:n((()=>[y(_,{class:"avatar-icon",src:e.userinfo.avatar},null,8,["src"]),y(b,{class:""},{default:n((()=>[y(b,{class:"nickname"},{default:n((()=>[s(u(e.userinfo.nickname),1)])),_:1}),y(b,{class:"userid"},{default:n((()=>[s("ID:"+u(e.userinfo.idcode),1)])),_:1})])),_:1})])),_:1}),y(b,{class:"right-info"},{default:n((()=>[s("拥有免费次数:"+u(e.userinfo.number)+"次",1)])),_:1})])),_:1}),y(b,{class:"invite-wrap"},{default:n((()=>[y(b,{class:"invite-left"},{default:n((()=>[y(b,{class:""},{default:n((()=>[s("邀请新的朋友来体验")])),_:1}),y(b,{class:"times"},{default:n((()=>[s("邀请成功可获得 "),y(v,{style:{"font-weight":"700",color:"#dbc5b8"}},{default:n((()=>[s(u(e.projectConfig.share_num)+"次",1)])),_:1}),s(" 次数奖励")])),_:1})])),_:1}),y(b,{class:"invite-right",onClick:g[0]||(g[0]=e=>t.value=!0)},{default:n((()=>[s("邀请朋友 ")])),_:1})])),_:1}),0==e.userinfo.is_vip?(i(),l(_,{key:0,src:"/assets/vip-bg-18bb2d02.png",class:"vip-bg",onClick:a})):r("",!0),y(b,{class:"clear-all",onClick:h},{default:n((()=>[s("清除聊天记录")])),_:1})])),_:1})])),_:1},8,["show"]),y(Y,{isShowClose:!0,isShowPopup:t.value,onClosePopup:g[1]||(g[1]=e=>t.value=!1)},{default:n((()=>[y(_,{class:"qr-code",src:e.userinfo.share_qr,"show-menu-by-longpress":""},null,8,["src"])])),_:1},8,["isShowPopup"])])),_:1})}}},[["__scopeId","data-v-dcec1182"]]);function ee(e,o=!1){z({title:e,icon:o?"success":"none"})}const oe=E({__name:"index",setup(e){const o=I(""),t=I(!1);I();const a=I(),c=I(),s=I();I(""),A((()=>{T("token")&&(h(),p(),async function(){const e=await B.get({url:"/api/index/getConfig"});c.value=e.data,P("server_qr",e.data.server_qr)}())}));const u=I([]);async function r(e){u.value.push({message:o.value,response:""}),j({title:"飞速思考中..."});const t=await function(e){return B.post({url:"/api/message/sendText",data:{message:e}})}(e);t.data&&(u.value[u.value.length-1].response=t.data,q(),o.value=""),h(),p(),"您的会话次数不足"===t.msg&&ee(`${t.msg}`),console.log("获取搜索结果",t)}async function p(){const e=await N();a.value=e.data,console.log("获取个人信息",e)}async function h(){const e=await B.get({url:"/api/message/getRecord"});e.data.forEach((e=>{e.response=e.response.replaceAll("<br/>","")})),u.value=e.data}async function g(){const e=await B.get({url:"/api/message/clearGroup"});h(),t.value=!1,"清除成功"===e.msg&&ee("清除聊天记录成功")}return(e,p)=>{const h=d,b=O(m("u-search"),R),_=f;return i(),l(_,{class:"content"},{default:n((()=>[y(F,{chatLog:u.value,projectConfig:c.value,userinfo:a.value,ref_key:"dialogueRef",ref:s},null,8,["chatLog","projectConfig","userinfo"]),y(V,{bgColor:"#151419"},{default:n((()=>[y(_,{class:"bottom-wrap"},{default:n((()=>[y(h,{class:"menu-icon",src:"/assets/menu-ded83980.png",onClick:p[0]||(p[0]=e=>t.value=!0)}),y(b,{placeholder:"请输入消息...",modelValue:o.value,"onUpdate:modelValue":p[1]||(p[1]=e=>o.value=e),shape:"square",bgColor:"#242228",showAction:!1,onSearch:p[2]||(p[2]=e=>r(o.value))},null,8,["modelValue"])])),_:1})])),_:1}),y(Z,{isShow:t.value,onClosePopup:p[3]||(p[3]=e=>t.value=!1),userinfo:a.value,projectConfig:c.value,onClearAll:g},null,8,["isShow","userinfo","projectConfig"])])),_:1})}}},[["__scopeId","data-v-bb928b89"]]);export{oe as default}; |