作者 左学珍

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

@@ -32,7 +32,8 @@ @@ -32,7 +32,8 @@
32 <image class="tips" src="/static/images/button.png" mode=""></image> 32 <image class="tips" src="/static/images/button.png" mode=""></image>
33 </view> 33 </view>
34 </u-popup> 34 </u-popup>
35 - <custom-popup :isShowClose="true" :isShowPopup="isShowPopup" @closePopup="isShowPopup=false" height="900rpx"> 35 + <custom-popup :isShowClose="true" :isShowPopup="isShowPopup" @closePopup="isShowPopup=false"
  36 + :posterImg="userinfo.share_qr" height="900rpx">
36 </custom-popup> 37 </custom-popup>
37 </view> 38 </view>
38 </template> 39 </template>
@@ -83,7 +84,7 @@ @@ -83,7 +84,7 @@
83 width: 750rpx; 84 width: 750rpx;
84 padding: 32rpx; 85 padding: 32rpx;
85 box-sizing: border-box; 86 box-sizing: border-box;
86 - height: 794rpx; 87 + height: 900rpx;
87 border-radius: 32rpx 32rpx 0 0; 88 border-radius: 32rpx 32rpx 0 0;
88 background: #242228ff; 89 background: #242228ff;
89 } 90 }
@@ -178,6 +179,7 @@ @@ -178,6 +179,7 @@
178 width: 686rpx; 179 width: 686rpx;
179 height: 88rpx; 180 height: 88rpx;
180 margin-top: 166rpx; 181 margin-top: 166rpx;
  182 + padding-bottom: 88rpx;
181 } 183 }
182 184
183 .qr-code { 185 .qr-code {
@@ -4,13 +4,11 @@ @@ -4,13 +4,11 @@
4 <slot> 4 <slot>
5 <view class="top-wrap"> 5 <view class="top-wrap">
6 <template v-if="isShowClose"> 6 <template v-if="isShowClose">
7 - <image @click="closePopup" class="close-icon" src="/static/images/error.png"></image> 7 + <image @click="closePopup" class="close-icon" src="/static/images/close.png"></image>
8 </template> 8 </template>
9 - <view class="info-wrap">  
10 - <image src="/static/images/menu.png" mode=""></image>  
11 - <view class="right-info">  
12 - <view class="">春风吹三月</view>  
13 - </view> 9 + <image class="poster-img" :src="posterImg" show-menu-by-longpress></image>
  10 + <view class="btn-wrap">
  11 + <view class="save-btn">长按图片保存</view>
14 </view> 12 </view>
15 </view> 13 </view>
16 </slot> 14 </slot>
@@ -29,6 +27,10 @@ @@ -29,6 +27,10 @@
29 isShowClose: { 27 isShowClose: {
30 type: Boolean, 28 type: Boolean,
31 default: false 29 default: false
  30 + },
  31 + posterImg: {
  32 + type: String,
  33 + default: '/static/images/vip-icon.png'
32 } 34 }
33 }) 35 })
34 36
@@ -46,7 +48,7 @@ @@ -46,7 +48,7 @@
46 width: 100vw; 48 width: 100vw;
47 height: 100vh; 49 height: 100vh;
48 z-index: 99999; 50 z-index: 99999;
49 - background-color: #00000066; 51 + background-color: #000000;
50 } 52 }
51 53
52 .center-content { 54 .center-content {
@@ -66,6 +68,7 @@ @@ -66,6 +68,7 @@
66 68
67 .close-icon { 69 .close-icon {
68 position: absolute; 70 position: absolute;
  71 + z-index: 99;
69 right: 60rpx; 72 right: 60rpx;
70 top: 70rpx; 73 top: 70rpx;
71 width: 40rpx; 74 width: 40rpx;
@@ -73,10 +76,27 @@ @@ -73,10 +76,27 @@
73 } 76 }
74 77
75 .top-wrap { 78 .top-wrap {
76 - width: 612rpx;  
77 - height: 180rpx;  
78 - border-radius: 16rpx;  
79 - background-color: #fcd09b; 79 +
  80 +
  81 + .poster-img {
  82 + border-radius: 16rpx;
  83 + height: 700rpx;
  84 + }
  85 +
  86 + .btn-wrap {
  87 + .save-btn {
  88 + width: 600rpx;
  89 + height: 72rpx;
  90 + margin-left: 20rpx;
  91 + text-align: center;
  92 + line-height: 72rpx;
  93 + margin-top: 20rpx;
  94 + color: #000;
  95 + border-radius: 12rpx;
  96 + background: #fcd19aff;
  97 + }
  98 + }
  99 +
80 } 100 }
81 101
82 .function-btns { 102 .function-btns {
@@ -3,8 +3,8 @@ @@ -3,8 +3,8 @@
3 <view class="inquire-group"> 3 <view class="inquire-group">
4 <image class="avatar" :src="projectConfig.Al_avatar"></image> 4 <image class="avatar" :src="projectConfig.Al_avatar"></image>
5 <view class="group-wrap"> 5 <view class="group-wrap">
6 - <view class="group-item" v-for="item in recommendList" :key="item.id">  
7 - <view class="item-title" @click="clickKeywordSearch(item.title)">{{item.title}} </view> 6 + <view class="group-item" v-for="item in recommendList" :key="item.id" @click="clickKeywordSearch(item.title)">
  7 + <view class="item-title">{{item.title}} </view>
8 <view class="item-content">{{item.content}}</view> 8 <view class="item-content">{{item.content}}</view>
9 </view> 9 </view>
10 </view> 10 </view>
@@ -22,7 +22,9 @@ @@ -22,7 +22,9 @@
22 <view class="response-group inquire-group"> 22 <view class="response-group inquire-group">
23 <view class="dialogue answer-inner"> 23 <view class="dialogue answer-inner">
24 <view class="top answer-name">{{userinfo.nickname}}</view> 24 <view class="top answer-name">{{userinfo.nickname}}</view>
25 - <view class="answer-dialogue">{{item.message }}</view> 25 + <text selectable="true">
  26 + <view class="answer-dialogue">{{item.message }}</view>
  27 + </text>
26 </view> 28 </view>
27 <image class="avatar" style="margin-right: 0;" :src="userinfo.avatar"></image> 29 <image class="avatar" style="margin-right: 0;" :src="userinfo.avatar"></image>
28 </view> 30 </view>
@@ -31,7 +33,9 @@ @@ -31,7 +33,9 @@
31 <image class="avatar" :src="projectConfig.Al_avatar"></image> 33 <image class="avatar" :src="projectConfig.Al_avatar"></image>
32 <view class="dialogue"> 34 <view class="dialogue">
33 <view class="top">{{projectConfig.Al_name}}</view> 35 <view class="top">{{projectConfig.Al_name}}</view>
34 - <view class="inquire">{{item.response}}</view> 36 + <text selectable="true">
  37 + <view class="inquire">{{item.response}}</view>
  38 + </text>
35 </view> 39 </view>
36 </view> 40 </view>
37 </view> 41 </view>
@@ -68,7 +72,7 @@ @@ -68,7 +72,7 @@
68 async function fetchRecorm() { 72 async function fetchRecorm() {
69 const res = await getRecorm() 73 const res = await getRecorm()
70 recommendList.value = res.data 74 recommendList.value = res.data
71 - console.log('获取推荐文案', res) 75 + // console.log('获取推荐文案', res)
72 } 76 }
73 77
74 78
@@ -116,6 +120,7 @@ @@ -116,6 +120,7 @@
116 } 120 }
117 121
118 .inquire { 122 .inquire {
  123 + word-break: break-all;
119 width: 462rpx; 124 width: 462rpx;
120 padding: 32rpx; 125 padding: 32rpx;
121 height: auto; 126 height: auto;
@@ -147,6 +152,7 @@ @@ -147,6 +152,7 @@
147 } 152 }
148 153
149 .item-content { 154 .item-content {
  155 + word-break: break-all;
150 @include oneLine(2); 156 @include oneLine(2);
151 color: #ffffff8c; 157 color: #ffffff8c;
152 font-size: 24rpx; 158 font-size: 24rpx;
@@ -164,6 +170,7 @@ @@ -164,6 +170,7 @@
164 } 170 }
165 171
166 .answer-dialogue { 172 .answer-dialogue {
  173 + word-break: break-all;
167 width: 416rpx; 174 width: 416rpx;
168 padding: 32rpx; 175 padding: 32rpx;
169 margin-top: 8rpx; 176 margin-top: 8rpx;
@@ -24,6 +24,11 @@ @@ -24,6 +24,11 @@
24 "resolved": "https://registry.npmmirror.com/delegate/-/delegate-3.2.0.tgz", 24 "resolved": "https://registry.npmmirror.com/delegate/-/delegate-3.2.0.tgz",
25 "integrity": "sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw==" 25 "integrity": "sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw=="
26 }, 26 },
  27 + "node_modules/event-source-polyfill": {
  28 + "version": "1.0.31",
  29 + "resolved": "https://registry.npmmirror.com/event-source-polyfill/-/event-source-polyfill-1.0.31.tgz",
  30 + "integrity": "sha512-4IJSItgS/41IxN5UVAVuAyczwZF7ZIEsM1XAoUzIHA6A+xzusEZUutdXz2Nr+MQPLxfTiCvqE79/C8HT8fKFvA=="
  31 + },
27 "node_modules/good-listener": { 32 "node_modules/good-listener": {
28 "version": "1.2.2", 33 "version": "1.2.2",
29 "resolved": "https://registry.npmmirror.com/good-listener/-/good-listener-1.2.2.tgz", 34 "resolved": "https://registry.npmmirror.com/good-listener/-/good-listener-1.2.2.tgz",
1 { 1 {
2 - "hash": "a7c0d7d4",  
3 - "browserHash": "d714193d", 2 + "hash": "e1f86111",
  3 + "browserHash": "e5aba368",
4 "optimized": { 4 "optimized": {
5 "uview-plus": { 5 "uview-plus": {
6 "src": "../../uview-plus/index.js", 6 "src": "../../uview-plus/index.js",
7 "file": "uview-plus.js", 7 "file": "uview-plus.js",
8 - "fileHash": "b4b5cd1f", 8 + "fileHash": "4fb9748b",
9 "needsInterop": false 9 "needsInterop": false
  10 + },
  11 + "event-source-polyfill": {
  12 + "src": "../../event-source-polyfill/src/eventsource.js",
  13 + "file": "event-source-polyfill.js",
  14 + "fileHash": "d472ec4b",
  15 + "needsInterop": true
10 } 16 }
11 }, 17 },
12 - "chunks": {} 18 + "chunks": {
  19 + "chunk-RSJERJUL": {
  20 + "file": "chunk-RSJERJUL.js"
  21 + }
  22 + }
13 } 23 }
  1 +import "./chunk-RSJERJUL.js";
  2 +
1 // C:/Users/zhuo/Desktop/practice/vue-three/AI-interlocution/node_modules/uview-plus/libs/mixin/mixin.js 3 // C:/Users/zhuo/Desktop/practice/vue-three/AI-interlocution/node_modules/uview-plus/libs/mixin/mixin.js
2 var mixin_default = { 4 var mixin_default = {
3 // 定义每个组件都可能需要用到的外部样式以及类名 5 // 定义每个组件都可能需要用到的外部样式以及类名
@@ -11,6 +11,7 @@ @@ -11,6 +11,7 @@
11 "dependencies": { 11 "dependencies": {
12 "clipboard": "^2.0.11", 12 "clipboard": "^2.0.11",
13 "dayjs": "^1.11.9", 13 "dayjs": "^1.11.9",
  14 + "event-source-polyfill": "^1.0.31",
14 "uview-plus": "^3.1.32" 15 "uview-plus": "^3.1.32"
15 } 16 }
16 }, 17 },
@@ -34,6 +35,11 @@ @@ -34,6 +35,11 @@
34 "resolved": "https://registry.npmmirror.com/delegate/-/delegate-3.2.0.tgz", 35 "resolved": "https://registry.npmmirror.com/delegate/-/delegate-3.2.0.tgz",
35 "integrity": "sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw==" 36 "integrity": "sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw=="
36 }, 37 },
  38 + "node_modules/event-source-polyfill": {
  39 + "version": "1.0.31",
  40 + "resolved": "https://registry.npmmirror.com/event-source-polyfill/-/event-source-polyfill-1.0.31.tgz",
  41 + "integrity": "sha512-4IJSItgS/41IxN5UVAVuAyczwZF7ZIEsM1XAoUzIHA6A+xzusEZUutdXz2Nr+MQPLxfTiCvqE79/C8HT8fKFvA=="
  42 + },
37 "node_modules/good-listener": { 43 "node_modules/good-listener": {
38 "version": "1.2.2", 44 "version": "1.2.2",
39 "resolved": "https://registry.npmmirror.com/good-listener/-/good-listener-1.2.2.tgz", 45 "resolved": "https://registry.npmmirror.com/good-listener/-/good-listener-1.2.2.tgz",
@@ -12,6 +12,7 @@ @@ -12,6 +12,7 @@
12 "dependencies": { 12 "dependencies": {
13 "clipboard": "^2.0.11", 13 "clipboard": "^2.0.11",
14 "dayjs": "^1.11.9", 14 "dayjs": "^1.11.9",
  15 + "event-source-polyfill": "^1.0.31",
15 "uview-plus": "^3.1.32" 16 "uview-plus": "^3.1.32"
16 } 17 }
17 } 18 }
1 <template> 1 <template>
2 <view class="content"> 2 <view class="content">
3 - <!-- <show-time />  
4 - <inquire-dialogue />  
5 - <show-time />  
6 - <answer-dialogue /> -->  
7 - <dialogue :chatLog="chatLog" :projectConfig="projectConfig" :userinfo="userinfo" ref="dialogueRef"  
8 - @clickKeywordSearch="clickKeywordSearch"></dialogue> 3 + <scroll-view scroll-y scroll-x show-scrollbar scroll-with-animation :style="{
  4 + paddingBottom: '20px',
  5 + height: screenHeight - bottomHeight - statusbarHeight - 148 + 'px',
  6 + position: 'relative'
  7 + }" class="scrollView" :scroll-top="scrollTopHeight" :scroll-into-view="getScrollView">
  8 + <view id="scroll-view-content">
  9 + <dialogue :chatLog="chatLog" :projectConfig="projectConfig" :userinfo="userinfo" ref="dialogueRef"
  10 + @clickKeywordSearch="clickKeywordSearch" />
  11 + </view>
  12 + </scroll-view>
9 <bottom-bar bgColor="#151419"> 13 <bottom-bar bgColor="#151419">
10 <view class="bottom-wrap"> 14 <view class="bottom-wrap">
11 <image class="menu-icon" src="/static/images/menu.png" @click="isShowPopup=true"></image> 15 <image class="menu-icon" src="/static/images/menu.png" @click="isShowPopup=true"></image>
@@ -19,12 +23,11 @@ @@ -19,12 +23,11 @@
19 </template> 23 </template>
20 24
21 <script setup> 25 <script setup>
22 - import { ref, watchEffect } from 'vue' 26 + import { EventSourcePolyfill } from 'event-source-polyfill';
  27 +
  28 + import { computed, ref, watchEffect } from 'vue'
23 import { onLoad } from '@dcloudio/uni-app' 29 import { onLoad } from '@dcloudio/uni-app'
24 - import showTime from '@/components/show-time.vue'  
25 import dialogue from '@/components/dialogue.vue' 30 import dialogue from '@/components/dialogue.vue'
26 - import inquireDialogue from '@/components/inquire-dialogue.vue'  
27 - import answerDialogue from '@/components/answer-dialogue.vue'  
28 import bottomBar from '@/components/bottom-bar/bottom-bar.vue' 31 import bottomBar from '@/components/bottom-bar/bottom-bar.vue'
29 import bottomPopup from '@/components/custom-popup/bottom-popup.vue' 32 import bottomPopup from '@/components/custom-popup/bottom-popup.vue'
30 33
@@ -34,11 +37,9 @@ @@ -34,11 +37,9 @@
34 37
35 const dialogueVal = ref('') 38 const dialogueVal = ref('')
36 const isShowPopup = ref(false) 39 const isShowPopup = ref(false)
37 - const child = ref()  
38 const userinfo = ref() 40 const userinfo = ref()
39 const projectConfig = ref() 41 const projectConfig = ref()
40 const dialogueRef = ref() 42 const dialogueRef = ref()
41 - const token = ref('')  
42 watchEffect(() => { 43 watchEffect(() => {
43 if (uni.getStorageSync('token')) { 44 if (uni.getStorageSync('token')) {
44 fetchRecord() 45 fetchRecord()
@@ -49,21 +50,54 @@ @@ -49,21 +50,54 @@
49 const chatLog = ref([]) 50 const chatLog = ref([])
50 async function fetchStartConversation(message) { 51 async function fetchStartConversation(message) {
51 chatLog.value.push({ message: dialogueVal.value, response: '' }) 52 chatLog.value.push({ message: dialogueVal.value, response: '' })
52 - // uni.showLoading({  
53 - // title: '飞速思考中...'  
54 - // })  
55 - const res = await getStartConversation(message)  
56 - console.log('获取搜索结果', res)  
57 - // if (res.data) {  
58 - // chatLog.value[chatLog.value.length - 1].response = res.data  
59 - // uni.hideLoading()  
60 - // dialogueVal.value = ''  
61 - // }  
62 - // fetchRecord()  
63 - // fetchUserinfo() 53 + let source = new EventSourcePolyfill(
  54 + `http://aladmin.shs.broing.cn/api/message/sendText2?message=${message}`, {
  55 + headers: {
  56 + 'token': uni.getStorageSync("token") || "", //自定义请求头信息
  57 + 'accept': 'application/json, text/javascript, */*; q=0.01',
  58 + 'Content-Type': 'multipart/form-data; boundary=----WebKitFormBoundaryay3HuJlbDrA4oKqJ'
  59 + }
  60 + })
  61 + source.onopen = function(e) {
  62 + // console.log('开始流式监听', e)
  63 + };
  64 + source.onmessage = function(event) {
  65 + console.log('onmessage', event.data)
  66 + chatLog.value[chatLog.value.length - 1].response = chatLog.value[chatLog.value.length - 1].response.concat(
  67 + event.data).replaceAll('<br/>', ' ').replaceAll('undefined', ' ')
  68 + };
  69 +
  70 + source.onerror = function(err) {
  71 + source.close();
  72 + };
  73 +
  74 + dialogueVal.value = ''
  75 + fetchUserinfo()
64 if (res.msg === '您的会话次数不足') showToast(`${res.msg}`) 76 if (res.msg === '您的会话次数不足') showToast(`${res.msg}`)
65 } 77 }
66 78
  79 + onLoad(() => {
  80 + uni.getSystemInfo({
  81 + success: function(res) {
  82 + console.log(res, '------------')
  83 + }
  84 + })
  85 + })
  86 +
  87 + // const getScrollView = computed(() => {
  88 + // return this.scrollview
  89 + // })
  90 +
  91 + // 页面滚动到底部
  92 + function scrollToBottom() {
  93 + uni.createSelectorQuery().in(s).select('#scroll-view-content').boundingClientRect((res) => {
  94 + let top = res.height - (s.screenHeight - s.bottomHeight - 140);
  95 + if (top > 0) {
  96 + this.scrollTopHeight = top;
  97 + }
  98 + }).exec()
  99 + }
  100 +
67 // 点击关键词进行搜索 101 // 点击关键词进行搜索
68 function clickKeywordSearch(e) { 102 function clickKeywordSearch(e) {
69 dialogueVal.value = e 103 dialogueVal.value = e
@@ -107,6 +141,17 @@ @@ -107,6 +141,17 @@
107 141
108 } 142 }
109 143
  144 + .scrollView {
  145 + position: fixed;
  146 + right: 0px;
  147 + left: 0;
  148 + top: 0;
  149 + /* padding-left: 10px;
  150 + padding-right: 10px;
  151 + padding-top: 10px; */
  152 + width: auto;
  153 + }
  154 +
110 .content { 155 .content {
111 @include wrap(); 156 @include wrap();
112 height: auto !important; 157 height: auto !important;
1 -import {  
2 - baseURL  
3 -} from '@/services/request/config.js' 1 +import { baseURL } from '@/services/request/config.js'
4 2
5 class MyRequest { 3 class MyRequest {
6 constructor(baseURL) { 4 constructor(baseURL) {
7 this.baseURL = baseURL 5 this.baseURL = baseURL
8 } 6 }
9 request(options) { 7 request(options) {
10 - const {  
11 - url  
12 - } = options  
13 - 8 + const { url } = options
14 return new Promise((resolve, reject) => { 9 return new Promise((resolve, reject) => {
15 uni.request({ 10 uni.request({
16 ...options, 11 ...options,
@@ -19,7 +14,6 @@ class MyRequest { @@ -19,7 +14,6 @@ class MyRequest {
19 'token': uni.getStorageSync("token") || "" //自定义请求头信息 14 'token': uni.getStorageSync("token") || "" //自定义请求头信息
20 }, 15 },
21 success: (res) => { 16 success: (res) => {
22 - console.log(res, '+++++++++')  
23 if (res.data.code == 0) { 17 if (res.data.code == 0) {
24 resolve(res.data) 18 resolve(res.data)
25 } else { 19 } else {
@@ -21,7 +21,7 @@ class MyRequest { @@ -21,7 +21,7 @@ class MyRequest {
21 'Content-Type': 'multipart/form-data; boundary=----WebKitFormBoundaryay3HuJlbDrA4oKqJ' 21 'Content-Type': 'multipart/form-data; boundary=----WebKitFormBoundaryay3HuJlbDrA4oKqJ'
22 }, 22 },
23 success: (res) => { 23 success: (res) => {
24 - console.log(res, '+++++++++') 24 + // console.log(res, '+++++++++')
25 if (res.data.code == 0) { 25 if (res.data.code == 0) {
26 resolve(res.data) 26 resolve(res.data)
27 } else { 27 } else {
1 -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}  
1 -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};  
1 -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};  
1 -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 @@ @@ -14,7 +14,7 @@
14 <title>AI-interlocution</title> 14 <title>AI-interlocution</title>
15 <!--preload-links--> 15 <!--preload-links-->
16 <!--app-context--> 16 <!--app-context-->
17 - <script type="module" crossorigin src="/assets/index-4b082bea.js"></script> 17 + <script type="module" crossorigin src="/assets/index-c0981784.js"></script>
18 <link rel="stylesheet" href="/assets/index-d909d437.css"> 18 <link rel="stylesheet" href="/assets/index-d909d437.css">
19 </head> 19 </head>
20 <body> 20 <body>

7.2 KB | 宽: | 高:

4.8 KB | 宽: | 高:

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