作者 左学珍

流式数据接收,打印机效果渲染,自动滚动未完成

... ... @@ -32,7 +32,8 @@
<image class="tips" src="/static/images/button.png" mode=""></image>
</view>
</u-popup>
<custom-popup :isShowClose="true" :isShowPopup="isShowPopup" @closePopup="isShowPopup=false" height="900rpx">
<custom-popup :isShowClose="true" :isShowPopup="isShowPopup" @closePopup="isShowPopup=false"
:posterImg="userinfo.share_qr" height="900rpx">
</custom-popup>
</view>
</template>
... ... @@ -83,7 +84,7 @@
width: 750rpx;
padding: 32rpx;
box-sizing: border-box;
height: 794rpx;
height: 900rpx;
border-radius: 32rpx 32rpx 0 0;
background: #242228ff;
}
... ... @@ -178,6 +179,7 @@
width: 686rpx;
height: 88rpx;
margin-top: 166rpx;
padding-bottom: 88rpx;
}
.qr-code {
... ...
... ... @@ -4,13 +4,11 @@
<slot>
<view class="top-wrap">
<template v-if="isShowClose">
<image @click="closePopup" class="close-icon" src="/static/images/error.png"></image>
<image @click="closePopup" class="close-icon" src="/static/images/close.png"></image>
</template>
<view class="info-wrap">
<image src="/static/images/menu.png" mode=""></image>
<view class="right-info">
<view class="">春风吹三月</view>
</view>
<image class="poster-img" :src="posterImg" show-menu-by-longpress></image>
<view class="btn-wrap">
<view class="save-btn">长按图片保存</view>
</view>
</view>
</slot>
... ... @@ -29,6 +27,10 @@
isShowClose: {
type: Boolean,
default: false
},
posterImg: {
type: String,
default: '/static/images/vip-icon.png'
}
})
... ... @@ -46,7 +48,7 @@
width: 100vw;
height: 100vh;
z-index: 99999;
background-color: #00000066;
background-color: #000000;
}
.center-content {
... ... @@ -66,6 +68,7 @@
.close-icon {
position: absolute;
z-index: 99;
right: 60rpx;
top: 70rpx;
width: 40rpx;
... ... @@ -73,10 +76,27 @@
}
.top-wrap {
width: 612rpx;
height: 180rpx;
border-radius: 16rpx;
background-color: #fcd09b;
.poster-img {
border-radius: 16rpx;
height: 700rpx;
}
.btn-wrap {
.save-btn {
width: 600rpx;
height: 72rpx;
margin-left: 20rpx;
text-align: center;
line-height: 72rpx;
margin-top: 20rpx;
color: #000;
border-radius: 12rpx;
background: #fcd19aff;
}
}
}
.function-btns {
... ...
... ... @@ -3,8 +3,8 @@
<view class="inquire-group">
<image class="avatar" :src="projectConfig.Al_avatar"></image>
<view class="group-wrap">
<view class="group-item" v-for="item in recommendList" :key="item.id">
<view class="item-title" @click="clickKeywordSearch(item.title)">{{item.title}} </view>
<view class="group-item" v-for="item in recommendList" :key="item.id" @click="clickKeywordSearch(item.title)">
<view class="item-title">{{item.title}} </view>
<view class="item-content">{{item.content}}</view>
</view>
</view>
... ... @@ -22,7 +22,9 @@
<view class="response-group inquire-group">
<view class="dialogue answer-inner">
<view class="top answer-name">{{userinfo.nickname}}</view>
<view class="answer-dialogue">{{item.message }}</view>
<text selectable="true">
<view class="answer-dialogue">{{item.message }}</view>
</text>
</view>
<image class="avatar" style="margin-right: 0;" :src="userinfo.avatar"></image>
</view>
... ... @@ -31,7 +33,9 @@
<image class="avatar" :src="projectConfig.Al_avatar"></image>
<view class="dialogue">
<view class="top">{{projectConfig.Al_name}}</view>
<view class="inquire">{{item.response}}</view>
<text selectable="true">
<view class="inquire">{{item.response}}</view>
</text>
</view>
</view>
</view>
... ... @@ -68,7 +72,7 @@
async function fetchRecorm() {
const res = await getRecorm()
recommendList.value = res.data
console.log('获取推荐文案', res)
// console.log('获取推荐文案', res)
}
... ... @@ -116,6 +120,7 @@
}
.inquire {
word-break: break-all;
width: 462rpx;
padding: 32rpx;
height: auto;
... ... @@ -147,6 +152,7 @@
}
.item-content {
word-break: break-all;
@include oneLine(2);
color: #ffffff8c;
font-size: 24rpx;
... ... @@ -164,6 +170,7 @@
}
.answer-dialogue {
word-break: break-all;
width: 416rpx;
padding: 32rpx;
margin-top: 8rpx;
... ...
... ... @@ -24,6 +24,11 @@
"resolved": "https://registry.npmmirror.com/delegate/-/delegate-3.2.0.tgz",
"integrity": "sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw=="
},
"node_modules/event-source-polyfill": {
"version": "1.0.31",
"resolved": "https://registry.npmmirror.com/event-source-polyfill/-/event-source-polyfill-1.0.31.tgz",
"integrity": "sha512-4IJSItgS/41IxN5UVAVuAyczwZF7ZIEsM1XAoUzIHA6A+xzusEZUutdXz2Nr+MQPLxfTiCvqE79/C8HT8fKFvA=="
},
"node_modules/good-listener": {
"version": "1.2.2",
"resolved": "https://registry.npmmirror.com/good-listener/-/good-listener-1.2.2.tgz",
... ...
{
"hash": "a7c0d7d4",
"browserHash": "d714193d",
"hash": "e1f86111",
"browserHash": "e5aba368",
"optimized": {
"uview-plus": {
"src": "../../uview-plus/index.js",
"file": "uview-plus.js",
"fileHash": "b4b5cd1f",
"fileHash": "4fb9748b",
"needsInterop": false
},
"event-source-polyfill": {
"src": "../../event-source-polyfill/src/eventsource.js",
"file": "event-source-polyfill.js",
"fileHash": "d472ec4b",
"needsInterop": true
}
},
"chunks": {}
"chunks": {
"chunk-RSJERJUL": {
"file": "chunk-RSJERJUL.js"
}
}
}
\ No newline at end of file
... ...
import "./chunk-RSJERJUL.js";
// C:/Users/zhuo/Desktop/practice/vue-three/AI-interlocution/node_modules/uview-plus/libs/mixin/mixin.js
var mixin_default = {
// 定义每个组件都可能需要用到的外部样式以及类名
... ...
... ... @@ -11,6 +11,7 @@
"dependencies": {
"clipboard": "^2.0.11",
"dayjs": "^1.11.9",
"event-source-polyfill": "^1.0.31",
"uview-plus": "^3.1.32"
}
},
... ... @@ -34,6 +35,11 @@
"resolved": "https://registry.npmmirror.com/delegate/-/delegate-3.2.0.tgz",
"integrity": "sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw=="
},
"node_modules/event-source-polyfill": {
"version": "1.0.31",
"resolved": "https://registry.npmmirror.com/event-source-polyfill/-/event-source-polyfill-1.0.31.tgz",
"integrity": "sha512-4IJSItgS/41IxN5UVAVuAyczwZF7ZIEsM1XAoUzIHA6A+xzusEZUutdXz2Nr+MQPLxfTiCvqE79/C8HT8fKFvA=="
},
"node_modules/good-listener": {
"version": "1.2.2",
"resolved": "https://registry.npmmirror.com/good-listener/-/good-listener-1.2.2.tgz",
... ...
... ... @@ -12,6 +12,7 @@
"dependencies": {
"clipboard": "^2.0.11",
"dayjs": "^1.11.9",
"event-source-polyfill": "^1.0.31",
"uview-plus": "^3.1.32"
}
}
... ...
<template>
<view class="content">
<!-- <show-time />
<inquire-dialogue />
<show-time />
<answer-dialogue /> -->
<dialogue :chatLog="chatLog" :projectConfig="projectConfig" :userinfo="userinfo" ref="dialogueRef"
@clickKeywordSearch="clickKeywordSearch"></dialogue>
<scroll-view scroll-y scroll-x show-scrollbar scroll-with-animation :style="{
paddingBottom: '20px',
height: screenHeight - bottomHeight - statusbarHeight - 148 + 'px',
position: 'relative'
}" class="scrollView" :scroll-top="scrollTopHeight" :scroll-into-view="getScrollView">
<view id="scroll-view-content">
<dialogue :chatLog="chatLog" :projectConfig="projectConfig" :userinfo="userinfo" ref="dialogueRef"
@clickKeywordSearch="clickKeywordSearch" />
</view>
</scroll-view>
<bottom-bar bgColor="#151419">
<view class="bottom-wrap">
<image class="menu-icon" src="/static/images/menu.png" @click="isShowPopup=true"></image>
... ... @@ -19,12 +23,11 @@
</template>
<script setup>
import { ref, watchEffect } from 'vue'
import { EventSourcePolyfill } from 'event-source-polyfill';
import { computed, ref, watchEffect } from 'vue'
import { onLoad } from '@dcloudio/uni-app'
import showTime from '@/components/show-time.vue'
import dialogue from '@/components/dialogue.vue'
import inquireDialogue from '@/components/inquire-dialogue.vue'
import answerDialogue from '@/components/answer-dialogue.vue'
import bottomBar from '@/components/bottom-bar/bottom-bar.vue'
import bottomPopup from '@/components/custom-popup/bottom-popup.vue'
... ... @@ -34,11 +37,9 @@
const dialogueVal = ref('')
const isShowPopup = ref(false)
const child = ref()
const userinfo = ref()
const projectConfig = ref()
const dialogueRef = ref()
const token = ref('')
watchEffect(() => {
if (uni.getStorageSync('token')) {
fetchRecord()
... ... @@ -49,21 +50,54 @@
const chatLog = ref([])
async function fetchStartConversation(message) {
chatLog.value.push({ message: dialogueVal.value, response: '' })
// uni.showLoading({
// title: '飞速思考中...'
// })
const res = await getStartConversation(message)
console.log('获取搜索结果', res)
// if (res.data) {
// chatLog.value[chatLog.value.length - 1].response = res.data
// uni.hideLoading()
// dialogueVal.value = ''
// }
// fetchRecord()
// fetchUserinfo()
let source = new EventSourcePolyfill(
`http://aladmin.shs.broing.cn/api/message/sendText2?message=${message}`, {
headers: {
'token': uni.getStorageSync("token") || "", //自定义请求头信息
'accept': 'application/json, text/javascript, */*; q=0.01',
'Content-Type': 'multipart/form-data; boundary=----WebKitFormBoundaryay3HuJlbDrA4oKqJ'
}
})
source.onopen = function(e) {
// console.log('开始流式监听', e)
};
source.onmessage = function(event) {
console.log('onmessage', event.data)
chatLog.value[chatLog.value.length - 1].response = chatLog.value[chatLog.value.length - 1].response.concat(
event.data).replaceAll('<br/>', ' ').replaceAll('undefined', ' ')
};
source.onerror = function(err) {
source.close();
};
dialogueVal.value = ''
fetchUserinfo()
if (res.msg === '您的会话次数不足') showToast(`${res.msg}`)
}
onLoad(() => {
uni.getSystemInfo({
success: function(res) {
console.log(res, '------------')
}
})
})
// const getScrollView = computed(() => {
// return this.scrollview
// })
// 页面滚动到底部
function scrollToBottom() {
uni.createSelectorQuery().in(s).select('#scroll-view-content').boundingClientRect((res) => {
let top = res.height - (s.screenHeight - s.bottomHeight - 140);
if (top > 0) {
this.scrollTopHeight = top;
}
}).exec()
}
// 点击关键词进行搜索
function clickKeywordSearch(e) {
dialogueVal.value = e
... ... @@ -107,6 +141,17 @@
}
.scrollView {
position: fixed;
right: 0px;
left: 0;
top: 0;
/* padding-left: 10px;
padding-right: 10px;
padding-top: 10px; */
width: auto;
}
.content {
@include wrap();
height: auto !important;
... ...
import {
baseURL
} from '@/services/request/config.js'
import { baseURL } from '@/services/request/config.js'
class MyRequest {
constructor(baseURL) {
this.baseURL = baseURL
}
request(options) {
const {
url
} = options
const { url } = options
return new Promise((resolve, reject) => {
uni.request({
...options,
... ... @@ -19,7 +14,6 @@ class MyRequest {
'token': uni.getStorageSync("token") || "" //自定义请求头信息
},
success: (res) => {
console.log(res, '+++++++++')
if (res.data.code == 0) {
resolve(res.data)
} else {
... ...
... ... @@ -21,7 +21,7 @@ class MyRequest {
'Content-Type': 'multipart/form-data; boundary=----WebKitFormBoundaryay3HuJlbDrA4oKqJ'
},
success: (res) => {
console.log(res, '+++++++++')
// console.log(res, '+++++++++')
if (res.data.code == 0) {
resolve(res.data)
} else {
... ...
uni-view[data-v-890c3ce2],uni-scroll-view[data-v-890c3ce2],uni-swiper-item[data-v-890c3ce2]{display:flex;flex-direction:column;flex-shrink:0;flex-grow:0;flex-basis:auto;align-items:stretch;align-content:flex-start}@font-face{font-family:uicon-iconfont;src:url(https://at.alicdn.com/t/font_2225171_8kdcwk4po24.ttf) format("truetype")}.u-icon[data-v-890c3ce2]{display:flex;align-items:center}.u-icon--left[data-v-890c3ce2]{flex-direction:row-reverse;align-items:center}.u-icon--right[data-v-890c3ce2]{flex-direction:row;align-items:center}.u-icon--top[data-v-890c3ce2]{flex-direction:column-reverse;justify-content:center}.u-icon--bottom[data-v-890c3ce2]{flex-direction:column;justify-content:center}.u-icon__icon[data-v-890c3ce2]{font-family:uicon-iconfont;position:relative;display:flex;flex-direction:row;align-items:center}.u-icon__icon--primary[data-v-890c3ce2]{color:#3c9cff}.u-icon__icon--success[data-v-890c3ce2]{color:#5ac725}.u-icon__icon--error[data-v-890c3ce2]{color:#f56c6c}.u-icon__icon--warning[data-v-890c3ce2]{color:#f9ae3d}.u-icon__icon--info[data-v-890c3ce2]{color:#909399}.u-icon__img[data-v-890c3ce2]{height:auto;will-change:transform}.u-icon__label[data-v-890c3ce2]{line-height:1}uni-view[data-v-7ec77839],uni-scroll-view[data-v-7ec77839],uni-swiper-item[data-v-7ec77839]{display:flex;flex-direction:column;flex-shrink:0;flex-grow:0;flex-basis:auto;align-items:stretch;align-content:flex-start}[type=search][data-v-7ec77839]::-webkit-search-decoration{display:none}.u-search[data-v-7ec77839]{display:flex;flex-direction:row;align-items:center;flex:1}.u-search__content[data-v-7ec77839]{display:flex;flex-direction:row;align-items:center;padding:0 10px;flex:1;justify-content:space-between;border-width:1px;border-color:transparent;border-style:solid;overflow:hidden}.u-search__content__icon[data-v-7ec77839]{display:flex;flex-direction:row;align-items:center}.u-search__content__label[data-v-7ec77839]{color:#303133;font-size:14px;margin:0 4px}.u-search__content__close[data-v-7ec77839]{width:20px;height:20px;border-radius:100px;background-color:#c6c7cb;display:flex;flex-direction:row;align-items:center;justify-content:center;transform:scale(.82)}.u-search__content__input[data-v-7ec77839]{flex:1;font-size:14px;line-height:1;margin:0 5px;color:#303133}.u-search__content__input--placeholder[data-v-7ec77839]{color:#909193}.u-search__action[data-v-7ec77839]{font-size:14px;color:#303133;width:0;overflow:hidden;transition-property:width;transition-duration:.3s;white-space:nowrap;text-align:center}.u-search__action--active[data-v-7ec77839]{width:40px;margin-left:5px}.show-time[data-v-48629e1f]{margin:1rem 0;color:#666573;font-size:.625rem;text-align:center;font-weight:700}.inquire-group[data-v-5dfbc218]{display:flex}.inquire-group .avatar[data-v-5dfbc218]{width:3rem;height:3rem;margin-right:.625rem;border-radius:50%}.inquire-group .dialogue .top[data-v-5dfbc218]{font-size:.75rem}.inquire-group .dialogue .inquire[data-v-5dfbc218]{width:14.4375rem;padding:1rem;height:auto;margin-top:.25rem;box-sizing:border-box;border-radius:0 .5rem .5rem;background:#242228ff}.response-group .answer-inner[data-v-5dfbc218]{margin-left:auto}.response-group .answer-inner .answer-name[data-v-5dfbc218]{text-align:right}.response-group .answer-dialogue[data-v-5dfbc218]{width:13rem;padding:1rem;margin-top:.25rem;box-sizing:border-box;border-radius:.5rem 0 .5rem .5rem;background:#dda372ff}.inquire-group[data-v-ed49c85f]{display:flex}.inquire-group .avatar[data-v-ed49c85f]{width:3rem;height:3rem;margin-right:.625rem}.inquire-group .dialogue .top[data-v-ed49c85f]{font-size:.75rem}.inquire-group .dialogue .inquire[data-v-ed49c85f]{width:14.4375rem;padding:1rem;margin-top:.25rem;box-sizing:border-box;border-radius:0 .5rem .5rem;background:#242228ff}.inquire-group[data-v-8828d086]{display:flex}.inquire-group .avatar[data-v-8828d086]{width:3rem;height:3rem;margin-right:.625rem}.inquire-group .dialogue .top[data-v-8828d086]{font-size:.75rem}.inquire-group .dialogue .inquire[data-v-8828d086]{width:14.4375rem;padding:1rem;margin-top:.25rem;box-sizing:border-box;border-radius:0 .5rem .5rem;background:#242228ff}.response-group .answer-inner[data-v-8828d086]{margin-left:auto}.response-group .answer-inner .answer-name[data-v-8828d086]{text-align:right}.response-group .answer-dialogue[data-v-8828d086]{width:13rem;padding:1rem;margin-top:.25rem;box-sizing:border-box;border-radius:.5rem 0 .5rem .5rem;background:#dda372ff}.bottomBar[data-v-21a96403]{position:fixed;z-index:var(--30329026);left:0;right:0;bottom:0;height:5.875rem;width:23.4375rem;border-top:var(--24ae731b);background-color:var(--11627030)}.bottomBar .barBox[data-v-21a96403]{display:flex;align-items:center;width:23.4375rem;box-sizing:border-box;padding:.5rem .5rem 1rem 1rem}.bottomBar .barBox .cancel[data-v-21a96403]{justify-content:center;display:flex;align-items:center;width:10.25rem;height:2.75rem;border-radius:.875rem;font-size:1rem;font-weight:700;margin-right:.9375rem;background:#ffffff}.bottomBar .barBox .save[data-v-21a96403]{justify-content:center;display:flex;align-items:center;width:10.25rem;height:2.75rem;border-radius:.875rem;font-size:1rem;font-weight:700;color:#fff;background:#15B959}uni-view[data-v-159cf890],uni-scroll-view[data-v-159cf890],uni-swiper-item[data-v-159cf890]{display:flex;flex-direction:column;flex-shrink:0;flex-grow:0;flex-basis:auto;align-items:stretch;align-content:flex-start}.u-fade-enter-active[data-v-159cf890],.u-fade-leave-active[data-v-159cf890]{transition-property:opacity}.u-fade-enter[data-v-159cf890],.u-fade-leave-to[data-v-159cf890]{opacity:0}.u-fade-zoom-enter[data-v-159cf890],.u-fade-zoom-leave-to[data-v-159cf890]{transform:scale(.95);opacity:0}.u-fade-zoom-enter-active[data-v-159cf890],.u-fade-zoom-leave-active[data-v-159cf890]{transition-property:transform,opacity}.u-fade-down-enter-active[data-v-159cf890],.u-fade-down-leave-active[data-v-159cf890],.u-fade-left-enter-active[data-v-159cf890],.u-fade-left-leave-active[data-v-159cf890],.u-fade-right-enter-active[data-v-159cf890],.u-fade-right-leave-active[data-v-159cf890],.u-fade-up-enter-active[data-v-159cf890],.u-fade-up-leave-active[data-v-159cf890]{transition-property:opacity,transform}.u-fade-up-enter[data-v-159cf890],.u-fade-up-leave-to[data-v-159cf890]{transform:translate3d(0,100%,0);opacity:0}.u-fade-down-enter[data-v-159cf890],.u-fade-down-leave-to[data-v-159cf890]{transform:translate3d(0,-100%,0);opacity:0}.u-fade-left-enter[data-v-159cf890],.u-fade-left-leave-to[data-v-159cf890]{transform:translate3d(-100%,0,0);opacity:0}.u-fade-right-enter[data-v-159cf890],.u-fade-right-leave-to[data-v-159cf890]{transform:translate3d(100%,0,0);opacity:0}.u-slide-down-enter-active[data-v-159cf890],.u-slide-down-leave-active[data-v-159cf890],.u-slide-left-enter-active[data-v-159cf890],.u-slide-left-leave-active[data-v-159cf890],.u-slide-right-enter-active[data-v-159cf890],.u-slide-right-leave-active[data-v-159cf890],.u-slide-up-enter-active[data-v-159cf890],.u-slide-up-leave-active[data-v-159cf890]{transition-property:transform}.u-slide-up-enter[data-v-159cf890],.u-slide-up-leave-to[data-v-159cf890]{transform:translate3d(0,100%,0)}.u-slide-down-enter[data-v-159cf890],.u-slide-down-leave-to[data-v-159cf890]{transform:translate3d(0,-100%,0)}.u-slide-left-enter[data-v-159cf890],.u-slide-left-leave-to[data-v-159cf890]{transform:translate3d(-100%,0,0)}.u-slide-right-enter[data-v-159cf890],.u-slide-right-leave-to[data-v-159cf890]{transform:translate3d(100%,0,0)}.u-zoom-enter-active[data-v-159cf890],.u-zoom-leave-active[data-v-159cf890]{transition-property:transform}.u-zoom-enter[data-v-159cf890],.u-zoom-leave-to[data-v-159cf890]{transform:scale(.95)}uni-view[data-v-1ce16a4a],uni-scroll-view[data-v-1ce16a4a],uni-swiper-item[data-v-1ce16a4a]{display:flex;flex-direction:column;flex-shrink:0;flex-grow:0;flex-basis:auto;align-items:stretch;align-content:flex-start}.u-overlay[data-v-1ce16a4a]{position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.7)}.u-status-bar[data-v-df170e56],.u-safe-bottom[data-v-6e02536d]{width:100%}uni-view[data-v-ca966c1e],uni-scroll-view[data-v-ca966c1e],uni-swiper-item[data-v-ca966c1e]{display:flex;flex-direction:column;flex-shrink:0;flex-grow:0;flex-basis:auto;align-items:stretch;align-content:flex-start}.u-popup[data-v-ca966c1e]{flex:1}.u-popup__content[data-v-ca966c1e]{background-color:#fff;position:relative}.u-popup__content--round-top[data-v-ca966c1e]{border-radius:0 0 10px 10px}.u-popup__content--round-left[data-v-ca966c1e]{border-radius:0 10px 10px 0}.u-popup__content--round-right[data-v-ca966c1e]{border-radius:10px 0 0 10px}.u-popup__content--round-bottom[data-v-ca966c1e]{border-radius:10px 10px 0 0}.u-popup__content--round-center[data-v-ca966c1e]{border-radius:10px}.u-popup__content__close[data-v-ca966c1e]{position:absolute}.u-popup__content__close--hover[data-v-ca966c1e]{opacity:.4}.u-popup__content__close--top-left[data-v-ca966c1e]{top:15px;left:15px}.u-popup__content__close--top-right[data-v-ca966c1e]{top:15px;right:15px}.u-popup__content__close--bottom-left[data-v-ca966c1e]{bottom:15px;left:15px}.u-popup__content__close--bottom-right[data-v-ca966c1e]{right:15px;bottom:15px}.mask-wrap[data-v-efc6fc73]{position:fixed;top:0;left:0;right:0;width:100vw;height:100vh;z-index:99999;background-color:rgba(0,0,0,.4)}.center-content[data-v-efc6fc73]{display:flex;align-items:center;flex-direction:column;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:21.4375rem;padding:1.5rem 1rem .75rem;box-sizing:border-box;background-color:#fff;border-radius:1rem;height:var(--bcf3986c)}.center-content .close-icon[data-v-efc6fc73]{position:absolute;right:.625rem;top:.625rem;width:1.25rem;height:1.25rem}.center-content .warn-wrap[data-v-efc6fc73]{display:flex;align-items:center;flex-direction:column}.center-content .warn-wrap .warn-icon[data-v-efc6fc73]{width:3.9375rem;height:3.9375rem;margin-bottom:.5rem;font-size:1rem;font-weight:700}.center-content .function-btns[data-v-efc6fc73]{margin-top:.6875rem;justify-content:space-between;display:flex;align-items:center}.bottom-popup[data-v-dcec1182]{color:#fff}.content[data-v-dcec1182]{position:relative;width:23.4375rem;padding:1rem;box-sizing:border-box;height:24.8125rem;border-radius:1rem 1rem 0 0;background:#242228ff}.title[data-v-dcec1182]{font-size:1rem;font-weight:700;text-align:center}.close-icon[data-v-dcec1182]{width:1.25rem;height:1.25rem;position:absolute;top:1rem;right:1rem}.info-wrap[data-v-dcec1182]{justify-content:space-between;display:flex;align-items:center;margin-top:1.875rem}.info-wrap .left-info[data-v-dcec1182]{display:flex}.info-wrap .left-info .avatar-icon[data-v-dcec1182]{width:2.875rem;height:2.875rem;border-radius:.375rem;margin-right:.625rem}.info-wrap .left-info .userid[data-v-dcec1182]{margin-top:.125rem;color:rgba(255,255,255,.35)}.info-wrap .right-info[data-v-dcec1182]{width:9.6875rem;height:2rem;line-height:2rem;text-align:center;border-radius:.375rem;color:#f9ddbe;background:#3a3539}.invite-wrap[data-v-dcec1182]{justify-content:space-between;display:flex;align-items:center;margin:1.25rem 0 1.875rem}.invite-wrap .invite-left .times[data-v-dcec1182]{margin-top:.25rem;color:#838387;font-size:.8125rem}.invite-wrap .invite-right[data-v-dcec1182]{width:5rem;height:1.75rem;line-height:1.75rem;text-align:center;color:#242228;border-radius:.375rem;background:linear-gradient(90deg,#fce4c7ff 0%,#e0a879ff 100%)}.vip-bg[data-v-dcec1182]{width:21.4375rem;height:2.78125rem}.clear-all[data-v-dcec1182]{text-align:center;color:rgba(255,255,255,.55);margin-top:1.875rem}.qr-code[data-v-dcec1182]{width:15.625rem}uni-page-body[data-v-bb928b89]{padding-bottom:6.5rem}.content[data-v-bb928b89]{width:21.4375rem;margin:0 auto;height:auto!important;margin-top:1.25rem}.bottom-wrap[data-v-bb928b89]{display:flex}.bottom-wrap .menu-icon[data-v-bb928b89]{width:1.4375rem;height:1.40625rem;margin-top:.40625rem;margin-right:.65625rem}.bottom-wrap .u-search[data-v-bb928b89]{width:19.3125rem;height:2.25rem;box-sizing:border-box;border-radius:.5rem;background:#242228ff!important}
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};
import{z as s,D as a,o as e,c as r,w as o,h as t,k as c,e as l,i as u}from"./index-4b082bea.js";import{_ as d,o as m}from"./uni-app.es.de4a22b7.js";const n=d({__name:"member",setup(d){const n=s();return m((()=>{n.value=a("server_qr")})),(s,a)=>{const d=t,m=u;return e(),r(d,{class:"member"},{default:o((()=>[c(d,{class:"rights"},{default:o((()=>[l("会员权益:问答无次数限制")])),_:1}),c(m,{class:"qr-code","show-menu-by-longpress":"",src:n.value,mode:""},null,8,["src"]),c(d,{class:""},{default:o((()=>[l("长按识别二维码添加客服微信开通会员")])),_:1})])),_:1})}}},[["__scopeId","data-v-c8dd4856"]]);export{n as default};
import{K as s,L as o,O as t,M as n,N as r}from"./index-4b082bea.js";const a=(s,o)=>{const t=s.__vccOpts||s;for(const[n,r]of o)t[n]=r;return t};function c(s,o){return n(s)?o:s}const e=(t=>(n,a=o())=>{!r&&s(t,n,a)})(t);export{a as _,e as o,c as r};
... ... @@ -14,7 +14,7 @@
<title>AI-interlocution</title>
<!--preload-links-->
<!--app-context-->
<script type="module" crossorigin src="/assets/index-4b082bea.js"></script>
<script type="module" crossorigin src="/assets/index-c0981784.js"></script>
<link rel="stylesheet" href="/assets/index-d909d437.css">
</head>
<body>
... ...

7.2 KB | 宽: | 高:

4.8 KB | 宽: | 高:

  • 两方对比
  • 交换覆盖
  • 透明覆盖