AI销管
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 
 

1709 wiersze
41 KiB

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