From 35dab133f3085a6bce2f045d2d28605aa64e8e61 Mon Sep 17 00:00:00 2001 From: yuanhao <yuanhao_2024> Date: 星期三, 04 六月 2025 16:24:52 +0800 Subject: [PATCH] fix: 修改字体大小 --- pages/aiQuestions/aiQuestions.vue | 108 +++++++++++++++++++++++++++++++----------------------- 1 files changed, 62 insertions(+), 46 deletions(-) diff --git a/pages/aiQuestions/aiQuestions.vue b/pages/aiQuestions/aiQuestions.vue index 662c028..4ee83c8 100644 --- a/pages/aiQuestions/aiQuestions.vue +++ b/pages/aiQuestions/aiQuestions.vue @@ -2,7 +2,7 @@ <view class="content"> <view class="head" :class="{'isOn':showSet||showHistory}"> <view class="box"> - <image class="back-img" @click='toBack' src="/static/back.png" mode=""></image> + <!-- <image class="back-img" @click='toBack' src="/static/back.png" mode=""></image> --> <image v-if='details.appImg' class="logo" :src="baseUrl+details.appImg" mode="aspectFill" alt=""> </image> <image v-else class="logo" src="/static/question/logo.png" mode="aspectFill" alt=""></image> @@ -11,18 +11,19 @@ {{ details.appName }} </view> <view class="f"> - 闂瓟 + 璐㈡斂AI鍔╂墜 </view> </view> </view> <view class="box-right"> - <image src="/static/question/mute.png" mode=""></image> - <image style="width:40rpx;height:40rpx;" @click="showHistory=!showHistory;showSet=false" + <!-- <image src="/static/question/mute.png" mode=""></image> --> + <image style="width:40rpx;height:40rpx;" @click="getTalkList();showHistory=!showHistory;showSet=false; " src="/static/time.png" mode=""></image> - <image @click="showSet=!showSet;showHistory=false" src="/static/question/set.png" mode=""></image> + <!-- <image @click="" src="/static/icons/add.svg" mode=""></image> --> + <!-- <image @click="showSet=!showSet;showHistory=false" src="/static/question/set.png" mode=""></image>--> </view> </view> - <scroll-view class="ltbox" scroll-y="true" :scroll-into-view="intoView" v-if="msgList"> + <scroll-view class="ltbox" scroll-y="true" :scroll-into-view="intoView" v-if="msgList.length"> <block v-if="details.appId"> <view v-if="msgList&&msgList.length===0" class="wbox"> <image src="/static/exam/bg02.png" mode="widthFix" class="bg2" alt=""></image> @@ -53,14 +54,14 @@ <u-loading mode="circle" v-if="!item.aiLog" size="40" color="#0079FE" class="u-m-r-10"></u-loading> <u-collapse-item :open='true' :title="item.aiLog ? 'AI鎬濊�冨畬鎴�' : 'AI鎬濊�冧腑...'"> - <view v-html="markdown.render(item.thinkLog)"></view> + <view style="font-size: 26rpx;" v-html="markdown.render(item.thinkLog)"></view> </u-collapse-item> </u-collapse> <view v-else-if="!item.aiLog" class="u-flex" style="color: #0079FE;"> <u-loading mode="circle" size="40" color="#0079FE" class="u-m-r-10"></u-loading> AI鎬濊�冧腑路路路 </view> - <view v-html="markdown.render(item.aiLog)"></view> + <view style="font-size: 26rpx;" v-html="markdown.render(item.aiLog)"></view> <view class="file-list" v-if="item.docInfo.length&&item.isEnd"> <view class="one-file" v-for="(file,findex) in item.docInfo" :key='findex'> <image :src="getImg(file.docFormat)" mode=""></image> @@ -72,16 +73,9 @@ <view class="copy" @click='clickCopy(item.aiLog)'> <image src="/static/question/copy.png" mode=""></image> </view> - <view class="copy" @click="clickPlay(item)"> - <image src="/static/question/sount1.png" v-if="item.isPlay==0"></image> - <u-loading v-if="item.isPlay==1" mode="flower" size="34"></u-loading> - <image src="/static/question/sount2.png" v-if="item.isPlay==2"></image> - <!-- <u-icon v-if="item.isPlay==0" name="volume" size="34"></u-icon> - <u-loading v-if="item.isPlay==1" mode="flower" size="34"></u-loading> - <u-icon v-if="item.isPlay==2" name="pause-circle" size="34"></u-icon> --> - </view> </view> - <view class="function-right"> + <!-- + <view class="function-right"> <u-icon name="thumb-up-fill" @click='clickLikes(item)' v-if="item.isLike" color="#2468F2" size="40"></u-icon> <u-icon name="thumb-up" @click='clickLikes(item)' v-else color="#98a1b2" @@ -90,7 +84,8 @@ color="#2468F2" size="40"></u-icon> <u-icon name="thumb-down" @click="clickDislikes(item)" v-else color="#98a1b2" size="40"></u-icon> - </view> + </view> + --> </view> </view> </view> @@ -102,20 +97,24 @@ </view> <view id="bot"></view> </scroll-view> + <view v-else class="tips"> + 鎴戞槸璐㈡斂AI鍔╂墜锛屽緢楂樺叴瑙佸埌浣狅紒鎴戝彲浠ュ洖绛旈」鐩枃妗d腑鐨勫悇绉嶉棶棰橈紝杈撳叆闂蹇潵浣撻獙鍚э紒 + </view> + <audio id="audio" src=""></audio> <view class="btmbox" :class="{'isOn':showKnow}"> - <view v-if="!voiceFlg" class="know-btn" :class="{'active-btn':showKnow}" @click="showKnow=true"> + <!-- <view v-if="!voiceFlg" class="know-btn" :class="{'active-btn':showKnow}" @click="showKnow=true"> <view class="btn-box"> <image v-if="showKnow" src="/static/wd/book-open.png" mode=""></image> <image v-else src="/static/wd/book.png" mode=""></image> </view> - </view> + </view> --> <view :class="['btm-btn',{'voice-btn':recording},{'voice-cancel-btn': voiceStop}]"> <block v-if="!recording"> <image v-if="voiceFlg" src="/static/wd/i03.png" mode="widthFix" class="btnimg2" @click="clickType" alt=""></image> - <image v-else src="/static/wd/i04.png" mode="widthFix" class="btnimg2" @click="clickType" alt=""> - </image> + <!-- <image v-else src="/static/wd/i04.png" mode="widthFix" class="btnimg2" @click="clickType" alt=""> + </image> --> </block> <view @touchstart="touchstartVoice" @touchmove.stop.prevent="touchmoveVoice" @touchend="touchendVoice" @touchcancel="touchcancelVoice" class="u-flex-1 u-text-center tap-btn" v-if="voiceFlg"> @@ -199,12 +198,12 @@ <u-popup v-model="showKnow" mode='bottom' border-radius="20"> <view class="know-box"> <view class="title"> - <view>閫夋嫨鐭ヨ瘑搴� </view> + <view>閫夋嫨椤圭洰 </view> <image @click='showKnow=false;' src="/static/wd/close.png"></image> </view> <view class="sbox"> <u-search @search="search" @custom="toSearch" height="80" bg-color="#F9FAFB" @clear="search" - v-model="keyword" :show-action="true" shape="round" placeholder="鎼滅储鐭ヨ瘑搴�"> + v-model="keyword" :show-action="true" shape="round" placeholder="鎼滅储椤圭洰"> </u-search> </view> <view class='all-know'> @@ -383,8 +382,16 @@ } }, onLoad(options) { - this.appId = options.id - this.toCheck(this.appId) + this.appId = options.id || 1 + this.userId = options.userId || 1 + // this.toCheck(this.appId) + console.log(options) + if(options.knowId) { + this.knowIds = options.knowId.split(',') + } + this.openRecord(); + this.getDetails() + this.getTalkList(); }, onReady() { this.con = document.getElementById('bot'); @@ -502,10 +509,11 @@ }) }, getDetails() { - getInfo(this.appId).then(val => { - this.details = val.data - this.knowIds = this.details.knowIds; - getAppKnowList(this.appId).then(res => { + // getInfo(this.appId).then(val => { + // this.details = val.data + // this.knowIds = this.details.knowIds; + // }) + getAppKnowList(this.appId).then(res => { this.knowList = res.data; this.knowList.forEach(item => { if (this.knowIds.some(e => e == item.knowId)) { @@ -515,7 +523,6 @@ } }) }) - }) }, clickType() { if (this.isDisabled) return @@ -540,7 +547,7 @@ // 浼氳瘽 ID sessionId: log.sessionId, // 褰撳墠鐢ㄦ埛鐨� ID - userId: this.userInfo.userId + userId: this.userId || 1 } // 璋冪敤 qaFeedBack 鎺ュ彛鎻愪氦鐐硅禐鍙嶉 updSessionLogFeedBack({ @@ -559,7 +566,7 @@ isOverall: 0, sessionLogId: log.sessionLogId, sessionId: log.sessionId, - userId: this.userInfo.userId + userId: this.userId } updSessionLogFeedBack({ sessionLogId: log.sessionLogId, @@ -653,7 +660,7 @@ let addTalkInfor = await addTalk({ "appId": this.appId, "sessionName": this.msg, - "userId": this.userInfo.userId + "userId": this.userId }) this.sessionId = addTalkInfor.data.sessionId } @@ -662,7 +669,7 @@ let item = { sessionLogId: '', sessionId: this.sessionId, - userId: this.userInfo.userId, + userId: this.userId, userLog: this.msg, userSound: '', docInfo: [], @@ -701,7 +708,7 @@ "question": item.userLog, "llm_name": this.chooseLlm.value, "app_id": this.appId, - "user_id": this.userInfo.userId, + "user_id": this.userId, "session_id": item.sessionId, "session_log_id": item.sessionLogId, "param_key": "know_id", @@ -1125,6 +1132,7 @@ } </style> <style lang="scss" scoped> + // 璁剧疆寮圭獥 .set-box { padding: 0 34rpx; @@ -1158,7 +1166,7 @@ } text { - font-size: 32rpx; + font-size: 26rpx; color: #000000; font-weight: 400; } @@ -1175,7 +1183,7 @@ } text { - font-size: 32rpx; + font-size: 26rpx; color: #000000; font-weight: 400; } @@ -1198,7 +1206,7 @@ display: flex; align-items: center; justify-content: space-between; - font-size: 34rpx; + font-size: 30rpx; color: #000000; font-weight: 700; line-height: 50rpx; @@ -1240,7 +1248,7 @@ .details { .know-name { - font-size: 32rpx; + font-size: 28rpx; color: #000000; line-height: 50rpx; font-weight: 500; @@ -1255,6 +1263,7 @@ display: inline-block; line-height: 42rpx; border-radius: 8rpx; + font-size: 28rpx; } } } @@ -1440,7 +1449,7 @@ border-radius: 10rpx; background: #0AAFB0; padding: 10rpx 18rpx; - font-size: 30rpx; + font-size: 28rpx; color: white; text-align: center; } @@ -1450,7 +1459,7 @@ flex-direction: row; justify-content: flex-end; width: 100%; - + font-size: 26rpx; .div { background: linear-gradient(273deg, #2F7AFA 0.22%, #226FF4 99.8%); color: #fff; @@ -1459,6 +1468,7 @@ max-width: 100%; padding: 12px 16px; white-space: pre-wrap; + font-size: 26rpx; } } @@ -1494,14 +1504,20 @@ box-sizing: border-box; padding: 20rpx 20rpx 0; } - + .tips{ + padding: 48rpx; + background: #fff; + border-radius: 24rpx; + margin: 40rpx; + font-size: 26rpx; + } .msgbox1 { margin-bottom: 20rpx; .function-box { display: flex; align-items: center; - justify-content: space-between; + justify-content: flex-end; margin-top: 24rpx; .function-left { @@ -1708,7 +1724,7 @@ position: relative; z-index: 2; padding-top: 70rpx; - font-size: 32rpx; + font-size: 28rpx; text-indent: 4em; } @@ -1735,7 +1751,7 @@ .top { color: #000000; - font-size: 32rpx; + font-size: 28rpx; font-weight: bold; span { -- Gitblit v1.9.1