AI销管
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.

index2.vue 38 KiB

2 yıl önce
2 yıl önce
2 yıl önce
2 yıl önce
2 yıl önce
2 yıl önce
2 yıl önce
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576
  1. <template>
  2. <view class="translation" @click="changeEditing(false)">
  3. <view class="top" style="margin-top: 30rpx;">
  4. <view class="title">
  5. <view class="call_record_time">{{date}}</view>
  6. <view class="hash" @click="gotoChat" v-if="commentList.length != 0">
  7. 查看全部评论
  8. </view>
  9. </view>
  10. <view class="call_record_time_one" >接待时长 {{alltimeStr}}</view>
  11. <view class="audio-container">
  12. <view class="audio-play" @tap="changePlayState">
  13. <image class="image" mode="widthFix" :src="audioPlay ? 'https://qufang.oss-cn-beijing.aliyuncs.com/upload/icon/xcx/jjycrm/pause.png' : 'https://qufang.oss-cn-beijing.aliyuncs.com/upload/icon/xcx/jjycrm/play.png'"></image>
  14. </view>
  15. <view class="audio-slider">
  16. <view class="audio-time">
  17. <text>{{currentTimeStr}}</text>
  18. </view>
  19. <slider class="slider" min="0" :max="sliderMax" @change="sliderChangeComplate" block-size="14"
  20. :value="sliderValue" activeColor="blue"></slider>
  21. <view class="audio-time">
  22. <text>{{timeStr}}</text>
  23. </view>
  24. </view>
  25. </view>
  26. </view>
  27. <scroll-view :scroll-top="scrollTop" lower-threshold='100px' @scrolltolower="ltolower()"
  28. upper-threshold='40px' @scrolltoupper="rolltoupper()"
  29. :scroll-into-view="scrollId" scroll-y="true" class="text scroll-Y">
  30. <!-- 音频识别模块 -->
  31. <view >
  32. <!-- 聊天记录-->
  33. <view class="dialog-block" v-for="(dialog,i) in dialogList" :key="i">
  34. <view :id="'dialog'+i" class="fileName">录音文件</view>
  35. <view class="text dingweishiy" :id="'dialog'+csdFileindex+'text'+index"
  36. :class="{active: item.bg < playNow && item.ed > playNow && i==0}"
  37. v-for="(item,index) in dialog.message" :key="index" :data-speaker="item.speaker"
  38. >
  39. <view class="avatar">
  40. <view v-if="item.speaker == 1" style="color: #60CBEC;">
  41. <image v-if="item.isShow == 0" :src="Aimg.replace(/[\r\n]/g,'')" mode="widthFix"></image>
  42. <text v-else>A</text>
  43. </view>
  44. <view v-if="item.speaker == 2" style="color: #EC8B47;">
  45. <image v-if="item.isShow == 0" :src="Aimg.replace(/[\r\n]/g,'')" mode="widthFix"></image>
  46. <text v-else>B</text>
  47. </view>
  48. <view v-if="item.speaker == 3" style="color: #4F861E;">
  49. <image v-if="item.isShow == 0" :src="Aimg.replace(/[\r\n]/g,'')" mode="widthFix"></image>
  50. <text v-else>C</text>
  51. </view>
  52. <view v-if="item.speaker == 4" style="color: #9F61C8;">
  53. <image v-if="item.isShow == 0" :src="Aimg.replace(/[\r\n]/g,'')" mode="widthFix"></image>
  54. <text v-else>D</text>
  55. </view>
  56. <view v-if="item.speaker == 5" style="color: #4980C8;">
  57. <image v-if="item.isShow == 0" :src="Aimg.replace(/[\r\n]/g,'')" mode="widthFix"></image>
  58. <text v-else>E</text>
  59. </view>
  60. <view v-if="item.speaker == 6" style="color: #60CBEC;">
  61. <image v-if="item.isShow == 0" :src="Aimg.replace(/[\r\n]/g,'')" mode="widthFix"></image>
  62. <text v-else>F</text>
  63. </view>
  64. <view v-if="item.speaker == 7" style="color: #EC8B47;">
  65. <image v-if="item.isShow == 0" :src="Aimg.replace(/[\r\n]/g,'')" mode="widthFix"></image>
  66. <text v-else>G</text>
  67. </view>
  68. <view v-if="item.speaker == 8" style="color: #4F861E;">
  69. <image v-if="item.isShow == 0" :src="Aimg.replace(/[\r\n]/g,'')" mode="widthFix"></image>
  70. <text v-else>H</text>
  71. </view>
  72. <view v-if="item.speaker == 9" style="color: #9F61C8;">
  73. <image v-if="item.isShow == 0" :src="Aimg.replace(/[\r\n]/g,'')" mode="widthFix"></image>
  74. <text v-else>I</text>
  75. </view>
  76. </view>
  77. <view class="content">
  78. <view v-html="item.onebest"></view>
  79. </view>
  80. <view class="tankuangcss" v-if="startTime==item.bg">
  81. <view style="max-width: 85rpx; height: 38rpx;font-size: 24rpx;color: #333333;text-align: center;line-height: 38rpx;
  82. border-radius: 2rpx;border: 1px solid #979797;">标签</view>
  83. <view style="max-width: 171rpx;height: 38rpx;background: #008EF2;border-radius: 2rpx;display: flex;
  84. align-items: center;margin-left: 10rpx;" @click="dianjibiaoqian()">
  85. <view style="width: 126rpx;height: 38rpx;line-height: 38rpx;font-size: 24rpx;color: #FFFFFF;
  86. text-align: center; overflow: hidden;">{{biaoqian}}</view>
  87. <view v-if="biaoqian.length>4" style="width: 37rpx;height: 37rpx;line-height: 37rpx;">
  88. <u-icon name="chat-fill" color="#ffffff" size="32rpx"></u-icon>
  89. </view>
  90. </view>
  91. </view>
  92. <view class="biaoqianya" v-if="startTime==item.bg">
  93. <view class="biaoqianyaisshow" v-if="biaoqianyaisshow">
  94. {{biaoqian}}
  95. </view>
  96. </view>
  97. </view>
  98. </view>
  99. <!-- 点赞 -->
  100. <view class="likeArea" :class="{'liked':isLiked}">
  101. <image :src="isLiked?'/static/images/recordingManagement/likeActive.png':'/static/images/recordingManagement/like_gray.png'"
  102. mode=""></image>
  103. </view>
  104. <view class="hash" id="hash">
  105. </view>
  106. <!-- 评语列表 -->
  107. <view class="chat" v-if="commentList.length != 0">
  108. <view class="total">
  109. 全部评论(共{{commentList.length}}条)
  110. </view>
  111. <view class="list">
  112. <view class="message" v-for="(item,index) in commentList" :key="index">
  113. <u-avatar class="avator" size="72" :src="item.commentPic ||'https://qufang.oss-cn-beijing.aliyuncs.com/upload/icon/xcx/jjycrm/my/headPicture.png'"></u-avatar>
  114. <view class="right">
  115. <view class="name">
  116. {{item.commentName||"未知昵称"}}
  117. </view>
  118. <view class="subtitle" v-if="item.commentAutoGraph">
  119. {{item.commentAutoGraph}}
  120. </view>
  121. <view class="answer" v-if="item.replyName">
  122. 回复@{{item.replyName}}
  123. </view>
  124. <view class="content" v-if="item.content">
  125. {{item.content}}
  126. </view>
  127. <view class="pic" v-if="item.picUrl">
  128. <image style="width: 100%;max-width: 240px;" :src="item.picUrl" mode="widthFix"></image>
  129. </view>
  130. <view class="bottom">
  131. <view class="time">
  132. {{item.createTime}}
  133. </view>
  134. <view class="button" v-if="myId != item.commentUser" @click.stop="answer(item.commentUser,item.id)">
  135. 回复
  136. </view>
  137. </view>
  138. </view>
  139. </view>
  140. </view>
  141. </view>
  142. </view>
  143. </scroll-view>
  144. <!-- 写评价 -->
  145. <view class="bottomArea">
  146. <image class="voice" @click.stop="changeVoiceShow" src="/static/images/recordingManagement/voice.png" mode=""></image>
  147. <view class="inputArea">
  148. <textarea :value="content" :focus="textareaFocus" type="text" @input="changeContent" :auto-height="true" class="editor"
  149. :class="{'active':editing}" @click.stop="changeEditing(true)" @confirm="sendComment">
  150. </textarea>
  151. <view class="placeholder" :class="{'editing':editing}" v-if="!content && !editing">写评价</view>
  152. <image class="edit" v-if="!editing && content == ''" src="/static/images/recordingManagement/edit.png" mode=""></image>
  153. </view>
  154. <image class="like" v-if="myId != createUser && !editing" @click="changeLike" src="/static/images/recordingManagement/like.png"
  155. mode=""></image>
  156. <image class="add" @click.stop="uploadImage" v-if="!editing && content == ''" src="/static/images/recordingManagement/add.png"
  157. mode=""></image>
  158. <view class="send" @click="sendComment" v-if="content!=''">
  159. 发送
  160. </view>
  161. </view>
  162. <!-- 回到顶部 -->
  163. <!-- <view class="backTop" @click="gotoTop">
  164. <image src="/static/images/backTop.png" mode=""></image>
  165. </view> -->
  166. <!-- 语音输入 -->
  167. <cover-view class="voiceContent" v-if="voiceShow" @click="changeVoiceShow">
  168. <cover-view class="box" @click.stop="" @touchstart="voiceStart" @touchend="voiceEnd">
  169. <cover-view class="center">
  170. <cover-image class="voice" src="/static/images/voice.png" mode="widthFix"></cover-image>
  171. <cover-view class="text">
  172. {{isRecording?'正在输入':'长按语音输入'}}
  173. </cover-view>
  174. </cover-view>
  175. </cover-view>
  176. </cover-view>
  177. </view>
  178. </template>
  179. <script>
  180. var app = getApp();
  181. var util = require("../../../utils/util.js");
  182. var config = require("../../../config");
  183. var plugin = requirePlugin("WechatSI")
  184. let manager = plugin.getRecordRecognitionManager();
  185. export default {
  186. data() {
  187. return {
  188. Aimg: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAMAAAC5zwKfAAACqVBMVEUAAAD////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////9/f3////9/f39/f3////////9/f3////////////9/f3////9/f39/f3////9/f3////////9/f3////9/f3////////////////9/f39/f3////////9/f39/f3////9/f39/f3////////9/f39/f3////////9/f39/f39/f3////////////////+/v7+/v7////+/v7////+/v7////+/v7+/v7////////+/v7+/v7////+/v7////+/v7////////////////////////////+/v7////+/v7////+/v7+/v7////////////+/v7////+/v7////+/v7+/v7////////+/v7////+/v7////////+/v7////////+/v7////+/v7+/v7+/v7////////+/v7+/v7////+/v7+/v7////+/v7////+/v7////+/v7////+/v7+/v7////+/v7+/v7////+/v7////+/v7////+/v7+/v7////+/v5jdC9iAAAA4nRSTlMAAQIDBAUGBwgLDA0ODxARExQVFhgbHB4fICEiIyQmJygpKy4wMTIzNDY3ODk6Oz0+P0BBQkRGR0lKTE5PUFFTVFVXWFlcXV9gYWJjZWZnaGlqa2xtbm9wcXJzdHV2d3h6e319foGBgoODh4mKiouMjI2QkZKSk5OUlpeYmZmam5ycnZ+foKGio6SmqKmpq6yur7CwsbGytba5uru8wMDBwcLCw8XGx8jJysrLzM7P0dLT1dXW1tfY2drc3N7f4OHh5Obm5+jp6uvs7vDx8vLz8/T09fX29/f4+fn6+vz8/f7+RVDt+wAAA55JREFUGBntwf9/1HMAB/DX7XYbuXWV1cyMoixfugrRGNXytW33pbVdJ83XkiMLSb4LJd/zZUi0SKT5FmGS77HUVaixnHP2+kt8vt3Zbp/3+7P3XR5+8XziP1E4uiYcrh1bjMNi6NzXumnoeX3eSOSrpHUv+zi0ogJ5qd3JLN1XuJGzwqW0sW4oclT0Im19XIqcuNdQ4D0vcnEDhdYgB2f+SbFZUHbEdkrsLYeqFko9CEVH7qJUohxqLqODO6BmLR18XwAVRQfpZDxUnExHjVBRR0eroGIZHX0AFe10tA8qdtNZIRR00VEPVLxLRzuh4jk62gIVy+joSaiI0tECqPDT0blQ4f6RDpI+KHmYDjZBzWQ6aIaibZSK+6BoOqViUOXqoER8BJSdlqJYFDm4h0LveJAD7+cUiFciJ1U/01aiGjk65zfaSF6EnE3azQEO1iAPFZuZZes45MUT3cM+emLFyNfwK3fQ8k1sFA6L0cElTzx9d1OVC/8bNG/gzY+GQaKk461gCQZr8iMHSNZD4nySv6wYj0EYFv2UhqcgcTsN70ePhtzER3+lJe6BxXP9jTctvrl1yS1jkLaNlkTbBR6IlF3dyT78sHh+oqkSlrJe/uOH1jGw4apem2I/1yLtGRo6kRZiP73t57mQxb+Z2dqRdikNtyLtBWb78Cz05bomyQH+KIGljIYaWNxxDtC72ouMgsdpZzosHhqqYDmFdraOQNpttHUfLKU0TITlKtra6IZpCu3tgMVPQx0sG2ivDqaVFDgOppk0LIbJm6C9DTB1UCAMU4SGZ2GqocAumL6jQBtMMRq2wLScAik3dMV/UWB/EQwrafgSpk6KlEJ3LIXOgGE9DQdgqKDQSdBNoNAiGL6i6SjowhSaAt1UCm2CzpOk6QTonqfQJdBdSKGkD5pKWqZCU7iHQtdB10KxWmjOpqUJmtMp9gB091LsIWiCtCyFZiHFXoZuHcW+hiZGy0vQvE2xT6DbTolKAI/R8hmA4SmKdUG3jxIhAG/QkigAZlAi6QJQTJk2AF1MGwXcRRkfgJGU2V8EHzP8wBeUqQQwllKTcCozpuFESk0AMJNSC3AxM8KYT6lpAFootRGLmLEQ6ynVCCBAqcSQ1cy4f8ghSs0HcMzvlKp+lRmvVFMqNQ6aaIoyd3Yy49vllOmuh+H4WZFIpFnTpJmjadTM1oQ1oVAgFNQENA0N9f01BIKh8OzGOU3NkbmXzwuV41/wNztgHKhu7WKTAAAAAElFTkSuQmCC",
  189. dialogList: [], // 录音对话转移列表
  190. isshowFile: false, // 录音文件默认隐藏
  191. luyinList: [], //录音文件列表
  192. newluyinList:[],
  193. fileIndex: 0, //文件索引
  194. fileId: '', //选中的录音ID
  195. id: "",
  196. audioStop: false,
  197. customerId: '',
  198. date: "",
  199. time: "",
  200. message: "", //聊天记录表
  201. durationTimeStr: "",
  202. autoLoad: true,
  203. playNow: 0,
  204. scrollTop: 0,
  205. scrollId: "",
  206. editing: false,
  207. isLiked: null,
  208. createUser: null,
  209. commentList: [], //评论列表
  210. content: "",
  211. voiceShow: false,
  212. isRecording: false,
  213. answerUserId: null,
  214. answerId: null,
  215. textareaFocus: false,
  216. myId: uni.getStorageSync("weapp_session_userInfo_data").accountId,
  217. startTime:"",
  218. alltimeStr:"00:00",
  219. audioPlay: false, //当前的播放状态控制
  220. sliderValue: 0, //进度条最小值
  221. end: false,
  222. sliderMax: 0, //进度条最大值
  223. innerAudioContext: "", //播放实例
  224. currentTimeStr: "00:00", //当前进度的时间
  225. timeStr: "00:00", //总的时间
  226. recordPath: "",
  227. csdFileindex:0,
  228. biaoqian:"",
  229. biaoqianyaisshow:false,
  230. startFile:'',
  231. textindex:0,//下拉 转写文件下标
  232. toptextindex:0,//上拉 转写文件下标
  233. roleindex:0,
  234. };
  235. },
  236. onLoad: function(options) {
  237. this.startTime=options.startTime
  238. this.customerId=options.customerId,
  239. this.biaoqian=options.biaoqian;
  240. this.startFile=options.startFile;
  241. this.getdianzan()
  242. this.getCommentList();
  243. this.getView()
  244. },
  245. onShow: function() {
  246. this.initRecord();
  247. this.innerAudioContext = uni.createInnerAudioContext();
  248. this.innerAudioContext.autoplay = false;
  249. this.innerAudioContext.title = '音频';
  250. this.onPlay()
  251. this.onPause()
  252. this.onCanplay()
  253. this.onEnded()
  254. this.onSeeking()
  255. this.onSeeked()
  256. this.TimeUpdate()
  257. this.getluyinList();
  258. },
  259. // 在组件实例被从页面节点树移除时执行
  260. destroyed: function() {
  261. if (this.innerAudioContext) {
  262. this.innerAudioContext.destroy();
  263. }
  264. },
  265. onUnload:function(){
  266. this.innerAudioContext.destroy();
  267. },
  268. methods: {
  269. getView(){
  270. this.$u.get('/autoSR/api/addtodigest/addPageviews',{
  271. id:this.customerId
  272. })
  273. .then(res=>{
  274. // console.log(res)
  275. })
  276. },
  277. onPlay(){
  278. this.innerAudioContext.onPlay(() => {
  279. // 播放监听
  280. console.log('播放!');
  281. this.audioPlay = true;
  282. });
  283. },
  284. onPause(){
  285. this.innerAudioContext.onPause(() => {
  286. // 暂停监听
  287. console.log('暂停播放!');
  288. this.audioPlay = false
  289. });
  290. },
  291. onCanplay() {
  292. this.innerAudioContext.onCanplay((callback) => {
  293. console.log("缓冲回调",this.innerAudioContext.duration);
  294. })
  295. },
  296. onEnded(){
  297. this.innerAudioContext.onEnded(() => {
  298. // 结束播放监听
  299. console.log('播放结束!');
  300. this.audioPlay = false;
  301. });
  302. },
  303. onSeeking(){
  304. this.innerAudioContext.onSeeking((res) => {
  305. console.log("进行跳转", res);
  306. })
  307. },
  308. onSeeked(){
  309. this.innerAudioContext.onSeeked((res) => {
  310. console.log("结束跳转", res);
  311. this.$forceUpdate()
  312. });
  313. },
  314. TimeUpdate(){
  315. this.innerAudioContext.onTimeUpdate(() => {
  316. const {
  317. currentTime,
  318. duration
  319. } = this.innerAudioContext;
  320. this.playNow = parseInt(currentTime * 1000)
  321. if (this.dialogList.length == 0) {
  322. } else {
  323. const message = this.dialogList[0].message
  324. for (let i = 0; i < message.length; i++) {
  325. if (Number(message[i].bg) < this.playNow && Number(message[i].ed) > this.playNow) {
  326. this.scrollId = "dialog" + this.csdFileindex + "text" + i;
  327. break;
  328. }
  329. }
  330. }
  331. const currTimeStr = this.formatTime(currentTime);
  332. this.sliderValue = parseInt(currentTime);
  333. // 变动的时间
  334. this.currentTimeStr = currTimeStr;
  335. //进度条最大值
  336. this.sliderMax = this.luyinList[this.csdFileindex].recordDuration;
  337. this.$forceUpdate()
  338. });
  339. },
  340. //下一页
  341. ltolower() {
  342. var lengthcz=this.newluyinList.length-1;
  343. if (this.textindex >= lengthcz) {
  344. uni.showToast({
  345. title: '到底了',
  346. duration: 2000
  347. });
  348. return
  349. }else {
  350. this.textindex=this.textindex+1;
  351. this.newluyinList[this.textindex].message.forEach(item=>{
  352. this.dialogList[0].message.push(item)
  353. })
  354. }
  355. console.log("下一页",this.textindex)
  356. },
  357. //上一页
  358. rolltoupper() {
  359. if(this.toptextindex == 0){
  360. // uni.showToast({
  361. // title: '到头了',
  362. // duration: 2000
  363. // });
  364. return
  365. }else {
  366. if(this.dialogList[0]==undefined ){
  367. return
  368. }else{
  369. this.toptextindex=this.toptextindex-1;
  370. let reverselist=this.newluyinList[this.toptextindex].message;
  371. let runlist=reverselist.reverse();
  372. runlist.forEach(item=>{
  373. this.dialogList[0].message.unshift(item)
  374. })
  375. }
  376. }
  377. console.log("上一页",this.toptextindex)
  378. },
  379. //点击标签
  380. dianjibiaoqian(){
  381. if(this.biaoqian.length>4){
  382. this.biaoqianyaisshow= !this.biaoqianyaisshow;
  383. }
  384. },
  385. //获取点赞列表isLiked likegetLike
  386. getdianzan(){
  387. uni.request({
  388. url: config.service.likegetLike + '?targetId=' + this.customerId, //仅为示例,并非真实接口地址。
  389. method:"GET",
  390. header: {
  391. 'content-type': 'application/json',
  392. 'Authorization': 'Bearer '+uni.getStorageSync('weapp_session_login_data').token
  393. },
  394. success: (data) => {
  395. if(data.data.code==10000){
  396. this.isLiked=data.data.data.like;
  397. }else{
  398. uni.hideLoading();
  399. uni.showModal({
  400. title: '提示',
  401. content: '请求数据失败,请重新尝试',
  402. showCancel: false
  403. });
  404. }
  405. },
  406. fail(error) {
  407. uni.hideLoading();
  408. uni.showModal({
  409. title: '提示',
  410. content: '网络异常,请重新尝试',
  411. showCancel: false
  412. });
  413. return false;
  414. }
  415. });
  416. },
  417. // 获取评论列表
  418. getCommentList() {
  419. const that = this;
  420. util.getRequestPromise(config.service.cmmentList + '?targetId=' + this.customerId, {}, false, "GET").then(data => {
  421. let tmp = data;
  422. tmp.reverse();
  423. that.commentList = tmp;
  424. });
  425. },
  426. // 获取录音记录列表
  427. getluyinList() {
  428. this.sliderMax = 0; //进度条最大值
  429. this.timeStr = "00:00"; //总的时间
  430. const parames = {
  431. pageNum: 1,
  432. pageSize: 100,
  433. query: {
  434. whetherFinish: 1,
  435. customerId: this.customerId,
  436. id:this.startFile
  437. }
  438. }
  439. this.$u.post("/corpus/fendianFindByPage", parames).then(res => {
  440. if (res && res.length) {
  441. let alltime = res[0].recordDuration;
  442. this.alltimeStr = this.getTime(alltime)
  443. this.luyinList = res;
  444. this.recordPath = res[0].recordPath
  445. this.sliderMax = this.getTime(res[0].recordDuration)
  446. this.timeStr = this.getTime(res[0].recordDuration)
  447. this.date = res[0].receptionTime;
  448. this.getCorpusAnalysis();
  449. this.creatAudio()
  450. }
  451. })
  452. },
  453. //首次跳转
  454. adasdasdasd(e) {
  455. const currTimeStr = this.formatTime(e)
  456. this.currentTimeStr = currTimeStr
  457. this.innerAudioContext.seek(e);
  458. this.innerAudioContext.play();
  459. },
  460. //录音文件切换隐藏
  461. showFile() {
  462. this.isshowFile = !this.isshowFile
  463. },
  464. changeVoiceShow() {
  465. this.voiceShow = !this.voiceShow;
  466. },
  467. voiceStart: function() {
  468. manager.start({
  469. lang: "zh_CN"
  470. });
  471. },
  472. voiceEnd: function() {
  473. // uni.showToast();
  474. if (this.isRecording) {
  475. uni.showLoading({
  476. title: "识别中"
  477. })
  478. }
  479. this.voiceShow = false;
  480. this.isRecording = false;
  481. manager.stop();
  482. },
  483. // 语音初始化
  484. initRecord() {
  485. const that = this;
  486. manager.onStart = function(res) {
  487. that.isRecording = true;
  488. // this.voiceState = "onStart:" + res.msg + "正在录音"
  489. };
  490. //有新的识别内容返回,则会调用此事件
  491. manager.onRecognize = (res) => {
  492. console.log('ing' + res.result);
  493. }
  494. // 识别结束事件
  495. manager.onStop = (res) => {
  496. uni.hideLoading();
  497. let newText = that.content + res.result;
  498. if (newText.length > 140) {
  499. newText = newText.substring(0, 140)
  500. }
  501. that.content = newText;
  502. that.textareaFocus = true;
  503. }
  504. // 识别错误事件
  505. manager.onError = (res) => {
  506. uni.hideLoading();
  507. }
  508. },
  509. // 录音暂停播放
  510. changePlayState() {
  511. if (this.audioPlay == false) {
  512. this.innerAudioContext.play();
  513. } else {
  514. this.innerAudioContext.pause()
  515. }
  516. },
  517. //音频前进回退
  518. sliderChangeComplate(e) {
  519. let platetime=e.detail.value*1000;
  520. this.dialogList=[]
  521. uni.request({
  522. url: config.service.fastForward + '?corpusId=' + this.luyinList[this.csdFileindex].id+"&bg="+platetime, //仅为示例,并非真实接口地址。
  523. method: "GET",
  524. header: {
  525. 'content-type': 'application/json',
  526. 'Authorization': 'Bearer '+uni.getStorageSync('weapp_session_login_data').token
  527. },
  528. success: (data) => {
  529. this.textindex=data.data.data.index;
  530. this.toptextindex=data.data.data.index;
  531. this.dialogList.push(this.newluyinList[data.data.data.index])
  532. const currTimeStr = this.formatTime(e.detail.value)
  533. this.currentTimeStr = currTimeStr
  534. this.innerAudioContext.seek(e.detail.value);
  535. this.innerAudioContext.play();
  536. }
  537. })
  538. },
  539. // 获取转义后的对话结果
  540. getCorpusAnalysis(){
  541. this.dialogList = [];
  542. uni.request({
  543. url: config.service.getCorpusAnal + '?corpusId=' + this.luyinList[this.csdFileindex].id+"&bg="+this.startTime+"&speaker="+this.roleindex, //仅为示例,并非真实接口地址。
  544. method: "GET",
  545. header: {
  546. 'content-type': 'application/json',
  547. 'Authorization': 'Bearer '+uni.getStorageSync('weapp_session_login_data').token
  548. },
  549. success: (data) => {
  550. const jsonInfo = JSON.parse(data.data.data.audioContent);
  551. //上拉标记点
  552. this.textindex=data.data.data.index;
  553. //下拉标记点
  554. this.toptextindex=data.data.data.index;
  555. jsonInfo.forEach(item=>{
  556. item.message=JSON.parse(item.onebest)
  557. item.backindex=this.csdFileindex
  558. })
  559. console.log(jsonInfo)
  560. this.newluyinList=jsonInfo;
  561. this.dialogList.push(jsonInfo[this.textindex]);
  562. var itc=parseInt(this.startTime/1000)
  563. this.adasdasdasd(itc)
  564. }
  565. })
  566. },
  567. getTime(time) {
  568. return util.formatSecond(time)
  569. },
  570. //录音实例
  571. creatAudio() {
  572. this.innerAudioContext = uni.createInnerAudioContext();
  573. this.innerAudioContext.autoplay = true;
  574. this.innerAudioContext.src = this.recordPath;
  575. this.innerAudioContext.title = '音频';
  576. this.onPlay()
  577. this.onPause()
  578. this.onCanplay()
  579. this.onEnded()
  580. this.onSeeking()
  581. this.onSeeked()
  582. this.TimeUpdate()
  583. },
  584. formatTime(num) {
  585. //格式化时间格式
  586. num = num.toFixed(0);
  587. let second = num % 60;
  588. if (second < 10) second = '0' + second;
  589. let min = Math.floor(num / 60);
  590. if (min < 10) min = '0' + min;
  591. return min + ":" + second;
  592. },
  593. changeContent(e) {
  594. this.content = e.detail.value;
  595. },
  596. answer(userId, tid) {
  597. this.answerId = tid;
  598. this.answerUserId = userId;
  599. this.editing = true;
  600. this.textareaFocus = true;
  601. },
  602. // 保存评论
  603. sendComment() {
  604. if (this.content == "") {
  605. uni.showToast({
  606. icon: "none",
  607. title: "请输入标题"
  608. })
  609. return;
  610. }
  611. let parames = {
  612. targetId: this.customerId,
  613. content: this.content,
  614. commentType: 1
  615. };
  616. if (this.answerUserId) {
  617. parames.replyCommentId = this.answerId;
  618. parames.replyUser = this.answerUserId;
  619. }
  620. const that = this;
  621. util.getRequestPromise(config.service.saveCmment, parames, false).then(data => {
  622. that.getCommentList();
  623. uni.showToast({
  624. title: "评论成功",
  625. icon: "none"
  626. })
  627. that.textareaFocus = false;
  628. that.content = "";
  629. });
  630. },
  631. uploadImage() {
  632. const that = this;
  633. var parames = {
  634. targetId: that.id,
  635. commentType: 1
  636. };
  637. if (this.answerUserId) {
  638. parames.replyCommentId = this.answerId;
  639. parames.replyUser = this.answerUserId;
  640. }
  641. uni.chooseImage({
  642. count: 1, //默认9
  643. sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
  644. sourceType: ['album', 'camera'],
  645. success: function(res) {
  646. uni.showLoading({
  647. title: "上传中"
  648. })
  649. uni.uploadFile({
  650. url: config.service.saveCmmentUpload,
  651. filePath: res.tempFilePaths[0],
  652. name: 'file',
  653. header: {
  654. 'Authorization': 'Bearer '+uni.getStorageSync('weapp_session_login_data').token
  655. },
  656. formData: parames,
  657. success: (uploadFileRes) => {
  658. that.getCommentList();
  659. uni.hideLoading();
  660. uni.showToast({
  661. icon: "none",
  662. title: "上传成功"
  663. })
  664. console.log(uploadFileRes.data);
  665. }
  666. });
  667. }
  668. });
  669. },
  670. changeLike() {
  671. uni.showLoading({
  672. title: "请求中",
  673. mask: true
  674. })
  675. if (this.isLiked) {
  676. this.cancelLike();
  677. } else {
  678. this.saveLike();
  679. }
  680. },
  681. // 点赞
  682. saveLike() {
  683. const that = this;
  684. util.getRequestPromise(config.service.saveLike, {
  685. targetId: this.customerId
  686. }, false).then(data => {
  687. that.isLiked = true;
  688. uni.hideLoading();
  689. uni.showToast({
  690. icon: "none",
  691. title: "点赞成功"
  692. })
  693. });
  694. },
  695. // 取消点赞
  696. cancelLike() {
  697. const that = this;
  698. util.getRequestPromise(config.service.cancelLike, {
  699. targetId: this.customerId
  700. }, false).then(data => {
  701. that.isLiked = false;
  702. uni.hideLoading();
  703. uni.showToast({
  704. icon: "none",
  705. title: "取消点赞成功"
  706. })
  707. });
  708. },
  709. gotoChat() {
  710. this.scrollId = null;
  711. this.$nextTick(() => {
  712. this.scrollId = "hash";
  713. })
  714. },
  715. gotoTop() {
  716. this.scrollId = null;
  717. this.$nextTick(() => {
  718. this.scrollId = "top";
  719. })
  720. },
  721. changeEditing(type) {
  722. this.editing = type;
  723. this.answerId = null;
  724. this.answerUserId = null;
  725. this.textareaFocus = false;
  726. this.dialogList.forEach(res=>{
  727. res.message.forEach(asd=>{
  728. asd.isshow=false;
  729. })
  730. })
  731. }
  732. }
  733. };
  734. </script>
  735. <style lang="scss" scoped>
  736. .audio-container {
  737. width: 100%;
  738. display: flex;
  739. justify-content: space-between;
  740. align-items: center;
  741. .audio-head {
  742. width: 60rpx;
  743. height: 60rpx;
  744. flex-shrink: 0;
  745. }
  746. .audio-head .image {
  747. width: 100%;
  748. height: 100%;
  749. }
  750. .audio-slider {
  751. width: 96%;
  752. position: relative;
  753. padding: 2px 0rpx 0px 20px;
  754. display: flex;
  755. justify-content: space-between;
  756. align-items: center;
  757. }
  758. .audio-slider .slider {
  759. width: 100%;
  760. padding: 0px 15rpx;
  761. box-sizing: border-box;
  762. }
  763. .audio-time {
  764. width: 110rpx;
  765. text-align: right;
  766. font-size: 24rpx;
  767. line-height: 28rpx;
  768. color: #70798D;
  769. display: flex;
  770. justify-content: space-between;
  771. }
  772. .audio-play {
  773. width: 40rpx;
  774. height: 40rpx;
  775. flex-shrink: 0;
  776. }
  777. .audio-play .image {
  778. width: 100%;
  779. height: 100%;
  780. }
  781. }
  782. .biaoqiantom{
  783. background-color: #008EF2;
  784. color: #FFFFFF;
  785. border: none;
  786. }
  787. // 表单
  788. .tian-view{
  789. width: 570upx;
  790. background-color: #FFFFFF;
  791. border-bottom: 1px solid #ededee;
  792. display: flex;
  793. min-height: 96rpx;
  794. .tian-view-t1{
  795. width: 20rpx;
  796. font-size: 34rpx;
  797. height: 34rpx;
  798. line-height: 110rpx;
  799. letter-spacing: 0px;
  800. color: red;
  801. }
  802. .tian-view-t2{
  803. width:30%;
  804. min-height: 96rpx;
  805. line-height: 96rpx;
  806. font-size: 34rpx;
  807. color: #333;
  808. }
  809. .tian-view-t3{
  810. width: 61%;
  811. padding-top: 31rpx;
  812. padding-bottom:31rpx;
  813. display:flex;
  814. .tian-input{
  815. width:98%;
  816. font-size: 34rpx;
  817. border: none;
  818. }
  819. }
  820. }
  821. .zhezhoa {
  822. position: fixed;
  823. top: 0;
  824. left: 0;
  825. z-index: 999;
  826. width: 100%;
  827. height: 100vh;
  828. opacity: 0.5;
  829. background-color: #666666;
  830. }
  831. .bounced {
  832. width: 570upx;
  833. background: #FFFFFF;
  834. z-index: 1000;
  835. border-radius: 10upx;
  836. position: fixed;
  837. left: 50%;
  838. top: 50%;
  839. transform: translate(-50%, -50%);
  840. /* 50%为自身尺寸的一半 */
  841. .jiajinghuatit{
  842. width: 100%;
  843. height: 68rpx;
  844. font-size: 30rpx;
  845. text-align: center;
  846. line-height: 68rpx;
  847. }
  848. .jiajinghuaview{
  849. padding: 18rpx 18rpx 18rpx 18rpx;
  850. display: flex;
  851. flex-wrap:wrap;
  852. .jiajinghuaview1{
  853. padding: 8rpx 8rpx 8rpx 8rpx;
  854. font-size: 26rpx;
  855. border-radius: 12rpx;
  856. border: 1px solid #979797;
  857. margin-left: 8rpx;
  858. }
  859. .jighuaview2{
  860. padding: 8rpx 8rpx 8rpx 8rpx;
  861. font-size: 26rpx;
  862. border-radius: 12rpx;
  863. border: 1px solid #979797;
  864. margin-left: 8rpx;
  865. display: flex;
  866. .view1-text{
  867. text-align: center;
  868. // border-right: 1rpx solid red;
  869. }
  870. .view1-img{
  871. width: 50rpx;
  872. }
  873. }
  874. }
  875. .bounced3 {
  876. height: 100upx;
  877. width: 100%;
  878. margin-top: 40upx;
  879. border-top: 1px solid #dddddd;
  880. display: flex;
  881. }
  882. .bounced3-1 {
  883. width: 50%;
  884. height: 100%;
  885. text-align: center;
  886. line-height: 100upx;
  887. border-right: 1px solid #dddddd;
  888. font-size: 36upx;
  889. color: #999999;
  890. }
  891. .bounced3-2 {
  892. width: 50%;
  893. height: 100%;
  894. text-align: center;
  895. line-height: 100upx;
  896. font-size: 36upx;
  897. color: #108ee9;
  898. }
  899. }
  900. .bosdttom{
  901. color: #008EF2;
  902. }
  903. .tab-box {
  904. width: 100%;
  905. display: flex;
  906. justify-content: center;
  907. align-items: center;
  908. .yinpinshibie {
  909. width: 156rpx;
  910. height: 50rpx;
  911. font-size: 36rpx;
  912. font-weight: 400;
  913. color: #333333;
  914. text-align: center;
  915. line-height: 50rpx;
  916. letter-spacing: 2rpx;
  917. margin-right: 188rpx;
  918. &.active {
  919. position: relative;
  920. &::after {
  921. position: absolute;
  922. content: '';
  923. width: 119rpx;
  924. height: 8rpx;
  925. background: #008EF2;
  926. border-radius: 4rpx;
  927. top: 50rpx;
  928. right: 0;
  929. left: 0;
  930. margin: 0 auto;
  931. }
  932. }
  933. }
  934. .rate {
  935. width: 156rpx;
  936. height: 50rpx;
  937. font-size: 36rpx;
  938. font-weight: 400;
  939. color: #333333;
  940. line-height: 50rpx;
  941. letter-spacing: 2rpx;
  942. text-align: center;
  943. &.active {
  944. position: relative;
  945. &::after {
  946. position: absolute;
  947. content: '';
  948. width: 119rpx;
  949. height: 8rpx;
  950. background: #008EF2;
  951. border-radius: 4rpx;
  952. top: 50rpx;
  953. right: 0;
  954. left: 0;
  955. margin: 0 auto;
  956. }
  957. }
  958. }
  959. }
  960. .dialog-block {
  961. margin: 20rpx 0;
  962. border-bottom: 1px solid #ccc;
  963. .fileName {
  964. text-align: center;
  965. margin: 10rpx auto;
  966. width: 115rpx;
  967. height: 42rpx;
  968. line-height: 42rpx;
  969. background: #EFEFEF;
  970. border-radius: 4rpx;
  971. font-size: 20rpx;
  972. font-weight: 400;
  973. color: #333333;
  974. }
  975. }
  976. // 评分
  977. .rate-box {
  978. padding: 10rpx 20rpx;
  979. .date {
  980. width: 300rpx;
  981. height: 33rpx;
  982. font-size: 24rpx;
  983. font-weight: 400;
  984. color: #333333;
  985. line-height: 33rpx;
  986. letter-spacing: 1rpx;
  987. margin-bottom: 8rpx;
  988. }
  989. .title {
  990. width: 100%;
  991. height: 42rpx;
  992. font-size: 30rpx;
  993. font-weight: 500;
  994. color: #333333;
  995. line-height: 42rpx;
  996. letter-spacing: 2rpx;
  997. margin-bottom: 20rpx;
  998. }
  999. .level1 {
  1000. display: flex;
  1001. align-items: center;
  1002. .level-name {
  1003. width: 104rpx;
  1004. height: 33rpx;
  1005. font-size: 24rpx;
  1006. font-weight: 500;
  1007. color: #333333;
  1008. line-height: 33rpx;
  1009. letter-spacing: 1rpx;
  1010. margin-right: 10rpx;
  1011. }
  1012. .level-progress {
  1013. flex: 1;
  1014. border-radius: 11rpx;
  1015. height: 21rpx;
  1016. background-color: #BEE4FF;
  1017. position: relative;
  1018. .color {
  1019. width: 0;
  1020. position: absolute;
  1021. top: 0;
  1022. left: 0;
  1023. height: 21rpx;
  1024. border-radius: 11rpx 0 0 11rpx;
  1025. background-color: #008EF2;
  1026. }
  1027. }
  1028. .level-rate {
  1029. width: 65rpx;
  1030. height: 33rpx;
  1031. font-size: 24rpx;
  1032. font-weight: 500;
  1033. color: #333333;
  1034. line-height: 33rpx;
  1035. letter-spacing: 1rpx;
  1036. margin: 0 20rpx 0 15rpx;
  1037. }
  1038. .arrow {
  1039. width: 37rpx;
  1040. height: 21rpx;
  1041. padding: 5rpx 20rpx;
  1042. }
  1043. .rotatearrow {
  1044. transform: rotate(270deg);
  1045. }
  1046. }
  1047. .level1-subbox {
  1048. display: flex;
  1049. margin-top: 20rpx;
  1050. flex-wrap: wrap;
  1051. .sub-name {
  1052. width: 50%;
  1053. display: flex;
  1054. margin-bottom: 18rpx;
  1055. .subitem-name {
  1056. width: 104rpx;
  1057. height: 33rpx;
  1058. font-size: 24rpx;
  1059. font-weight: 400;
  1060. color: #999999;
  1061. line-height: 33rpx;
  1062. letter-spacing: 1rpx;
  1063. margin-right: 12rpx;
  1064. }
  1065. .checkimg {
  1066. width: 27rpx;
  1067. height: 27rpx;
  1068. }
  1069. }
  1070. }
  1071. }
  1072. .luyin {
  1073. height: 100rpx;
  1074. width: 100%;
  1075. }
  1076. .translation {
  1077. padding-left: 30rpx;
  1078. padding-right: 30rpx;
  1079. background: #FFFFFF;
  1080. display: flex;
  1081. flex-direction: column;
  1082. height: 100vh;
  1083. }
  1084. .translation .top {
  1085. margin: 0 -30upx;
  1086. padding: 0 30upx;
  1087. background: #ffffff;
  1088. border-bottom: 1rpx solid #F2F2F2;
  1089. padding-bottom: 10rpx;
  1090. }
  1091. .translation .top .title {
  1092. display: flex;
  1093. justify-content: space-between;
  1094. .hash {
  1095. color: rgba(21, 144, 233, 1);
  1096. font-size: 24upx;
  1097. }
  1098. }
  1099. .call_record_time {
  1100. height: 44rpx;
  1101. font-size: 28rpx;
  1102. font-weight: 600;
  1103. color: #008EF2;
  1104. line-height: 44rpx;
  1105. }
  1106. .call_record_time_one {
  1107. height: 48rpx;
  1108. font-size: 24rpx;
  1109. font-weight: 500;
  1110. color: #70798d;
  1111. line-height: 48rpx;
  1112. display: flex;
  1113. justify-content: space-between;
  1114. position: relative;
  1115. .diangweitupian{
  1116. width: 46rpx;
  1117. height: 46rpx;
  1118. // border: 1px solid red;
  1119. position: absolute;
  1120. top: 0rpx;
  1121. right: 75rpx;
  1122. }
  1123. .file-change {
  1124. position: absolute;
  1125. top: 50rpx;
  1126. right: 0rpx;
  1127. width: 184rpx;
  1128. background: #FFFFFF;
  1129. box-shadow: 0rpx 0rpx 6rpx 2rpx rgba(230, 230, 230, 0.5);
  1130. border-radius: 4rpx;
  1131. z-index: 99;
  1132. height: auto;
  1133. max-height: 600rpx;
  1134. overflow: auto;
  1135. }
  1136. .file-item {
  1137. width: 184rpx;
  1138. height: 60rpx;
  1139. line-height: 60rpx;
  1140. text-align: center;
  1141. font-size: 30rpx;
  1142. font-weight: 400;
  1143. color: #333333;
  1144. border-bottom: 1rpx solid #E2E2E2;
  1145. }
  1146. .file-item:last-child {
  1147. border: 0
  1148. }
  1149. .fileactive {
  1150. color: #008EF2
  1151. }
  1152. }
  1153. .dingweishiy{
  1154. position: relative;
  1155. .tankuangcss{
  1156. position: absolute;
  1157. bottom: -50rpx;
  1158. left:0rpx;
  1159. width: 100%;
  1160. // border: 1rpx solid red;
  1161. font-size: 24rpx;
  1162. color: #FFFFFF;
  1163. padding-top: 4rpx;
  1164. padding-bottom:4rpx;
  1165. display: flex;
  1166. justify-content: center;
  1167. border-radius: 15rpx;
  1168. z-index: 1000;
  1169. }
  1170. .biaoqianya{
  1171. width: 631rpx;
  1172. margin: 0 auto;
  1173. position: absolute;
  1174. bottom: -120rpx;
  1175. left:0rpx;
  1176. z-index: 2000;
  1177. color: #FFFFFF;
  1178. .biaoqianyaisshow{
  1179. background-image: url(../../../static/images/biaoqianya.png);
  1180. background-size: 100% 100%;
  1181. text-align: left;
  1182. text-indent: 20rpx;
  1183. }
  1184. }
  1185. }
  1186. .scroll-Y {
  1187. font-size: 36upx;
  1188. color: #999999;
  1189. background: #FFFFFF;
  1190. margin-top: 30upx;
  1191. flex: 1;
  1192. overflow-y: scroll;
  1193. width: 100%;
  1194. }
  1195. .scroll-Y .text {
  1196. margin: 80upx 30upx;
  1197. line-height: 80upx;
  1198. display: flex;
  1199. align-items: center;
  1200. }
  1201. .scroll-Y .text[data-speaker="2"],
  1202. .scroll-Y .text[data-speaker="4"],
  1203. .scroll-Y .text[data-speaker="6"] {
  1204. flex-direction: row-reverse;
  1205. text-align: right;
  1206. .content {
  1207. margin-left: 0;
  1208. margin-right: 30upx;
  1209. background: #F6F6F6;
  1210. color: #999999;
  1211. }
  1212. }
  1213. .scroll-Y .text .avatar {
  1214. width: 64upx;
  1215. height: 64upx;
  1216. line-height: 64upx;
  1217. text-align: center;
  1218. // border: 1rpx solid red;
  1219. font-size: 36rpx;
  1220. border-radius: 50%;
  1221. background: #F2F2F2;
  1222. color: #008EF2;
  1223. // display: flex;
  1224. // justify-content: center;
  1225. // align-items: center;
  1226. image {
  1227. width: 40upx;
  1228. }
  1229. }
  1230. .scroll-Y .text .content {
  1231. margin-left: 30upx;
  1232. line-height: 60rpx;
  1233. text-align: left;
  1234. padding: 0 5px;
  1235. background: #2BC805;
  1236. border-radius: 8upx;
  1237. max-width: 442rpx;
  1238. color: #FFFFFF;
  1239. }
  1240. .scroll-Y .text.active .content {
  1241. color: #38FFF1;
  1242. position: relative;
  1243. }
  1244. .scroll-Y .text.active[data-speaker="2"] .content,
  1245. .scroll-Y .text.active[data-speaker="4"] .content,
  1246. .scroll-Y .text.active[data-speaker="6"] .content {
  1247. color: #FF7538;
  1248. position: relative;
  1249. }
  1250. .likeArea {
  1251. width: 86upx;
  1252. height: 84upx;
  1253. margin: 20upx auto 38upx auto;
  1254. border-radius: 50%;
  1255. display: flex;
  1256. justify-content: center;
  1257. align-items: center;
  1258. border: 1upx solid #C1C2C1;
  1259. &.liked {
  1260. border: 1upx solid rgba(21, 144, 233, 1);
  1261. }
  1262. image {
  1263. width: 38upx;
  1264. height: 39upx;
  1265. }
  1266. }
  1267. .chat {
  1268. display: flex;
  1269. flex-direction: column;
  1270. border-top: 1upx solid rgba(151, 151, 151, 0.4);
  1271. padding-top: 20upx;
  1272. .total {
  1273. color: rgba(21, 144, 233, 1);
  1274. font-size: 24upx;
  1275. }
  1276. .list {
  1277. display: flex;
  1278. flex-direction: column;
  1279. .message {
  1280. display: flex;
  1281. margin-top: 20upx;
  1282. border-bottom: 1upx solid rgba(151, 151, 151, 0.4);
  1283. padding-bottom: 20upx;
  1284. &:last-child {
  1285. border-bottom: 0;
  1286. }
  1287. .avator {
  1288. margin-left: 120upx;
  1289. }
  1290. &:first-child {
  1291. .avator {
  1292. margin-left: 0;
  1293. }
  1294. }
  1295. .right {
  1296. display: flex;
  1297. flex-direction: column;
  1298. margin-left: 20upx;
  1299. flex: 1;
  1300. .name {
  1301. color: rgba(16, 16, 16, 1);
  1302. font-size: 30upx;
  1303. }
  1304. .subtitle {
  1305. color: rgba(120, 120, 120, 1);
  1306. font-size: 24upx;
  1307. margin-top: 16upx;
  1308. }
  1309. .answer {
  1310. font-size: 24upx;
  1311. color: #787878;
  1312. }
  1313. .content {
  1314. color: rgba(49, 48, 48, 1);
  1315. font-size: 30upx;
  1316. margin-top: 20upx;
  1317. position: relative;
  1318. }
  1319. .bottom {
  1320. margin-top: 16upx;
  1321. display: flex;
  1322. justify-content: space-between;
  1323. .time {
  1324. color: rgba(185, 185, 185, 1);
  1325. font-size: 20upx;
  1326. }
  1327. .button {
  1328. color: rgba(144, 144, 144, 1);
  1329. font-size: 30upx;
  1330. width: 111upx;
  1331. height: 44upx;
  1332. border-radius: 22upx;
  1333. border: 1upx solid rgba(151, 151, 151, 1);
  1334. text-align: center;
  1335. }
  1336. }
  1337. }
  1338. }
  1339. }
  1340. }
  1341. .bottomArea {
  1342. min-height: 90upx;
  1343. background: #F0F2F5;
  1344. width: 100vw;
  1345. margin: 0 -30rpx;
  1346. display: flex;
  1347. align-items: center;
  1348. border-top: 1upx solid rgba(151, 151, 151, 0.25);
  1349. .voice {
  1350. width: 44upx;
  1351. height: 44upx;
  1352. margin-left: 38upx;
  1353. }
  1354. .inputArea {
  1355. margin-left: 38upx;
  1356. margin-right: 38upx;
  1357. flex: 1;
  1358. display: flex;
  1359. position: relative;
  1360. .edit {
  1361. width: 30upx;
  1362. height: 28upx;
  1363. position: absolute;
  1364. top: 31upx;
  1365. left: 27upx;
  1366. }
  1367. .editor {
  1368. background: rgba(0, 139, 245, 0.17);
  1369. border-radius: 29upx;
  1370. flex: 1;
  1371. min-height: 58upx;
  1372. width: unset;
  1373. padding: 0 32upx;
  1374. font-size: 30upx;
  1375. margin: 16rpx 0;
  1376. line-height: 29px;
  1377. }
  1378. .placeholder {
  1379. position: absolute;
  1380. left: 70rpx;
  1381. top: 22rpx;
  1382. color: #26A2FF;
  1383. &.editing {
  1384. left: 36rpx;
  1385. }
  1386. }
  1387. }
  1388. .download {
  1389. width: 41upx;
  1390. height: 35upx;
  1391. margin-right: 36upx;
  1392. }
  1393. .like {
  1394. width: 38upx;
  1395. height: 39upx;
  1396. margin-right: 38upx;
  1397. }
  1398. .add {
  1399. width: 50upx;
  1400. height: 50upx;
  1401. margin-right: 38upx;
  1402. }
  1403. .send {
  1404. background: #1590e9;
  1405. color: white;
  1406. padding: 10rpx 20rpx;
  1407. margin: 5px;
  1408. border-radius: 8rpx;
  1409. }
  1410. }
  1411. .backTop {
  1412. width: 60upx;
  1413. height: 60upx;
  1414. background: rgba(211, 235, 253, 1);
  1415. box-shadow: 0upx 0upx 2upx 4upx rgba(38, 161, 255, 0.04);
  1416. border-radius: 50%;
  1417. position: fixed;
  1418. bottom: 200upx;
  1419. right: 8upx;
  1420. display: flex;
  1421. justify-content: center;
  1422. align-items: center;
  1423. image {
  1424. width: 26upx;
  1425. height: 34upx;
  1426. }
  1427. }
  1428. .voiceContent {
  1429. position: fixed;
  1430. top: 0;
  1431. bottom: 0;
  1432. left: 0;
  1433. right: 0;
  1434. width: 100vw;
  1435. height: 100vh;
  1436. display: flex;
  1437. justify-content: center;
  1438. align-items: center;
  1439. background: rgba(30, 30, 30, 0.4592);
  1440. z-index: 10001;
  1441. }
  1442. .box {
  1443. background: rgba(21, 144, 233, 0.299);
  1444. width: 524upx;
  1445. height: 524upx;
  1446. border-radius: 50%;
  1447. display: flex;
  1448. align-items: center;
  1449. justify-content: center;
  1450. .center {
  1451. width: 412upx;
  1452. height: 412upx;
  1453. background: #1590E9;
  1454. border-radius: 50%;
  1455. display: flex;
  1456. align-items: center;
  1457. justify-content: center;
  1458. flex-direction: column;
  1459. .voice {
  1460. width: 110upx;
  1461. height: 133upx;
  1462. }
  1463. .text {
  1464. color: #FFFFFF;
  1465. font-size: 36upx;
  1466. margin-top: 24upx;
  1467. }
  1468. }
  1469. }
  1470. </style>