|
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591 |
- <template>
- <view class="translation" @click="changeEditing(false)">
- <view style="width: 690rpx;height: 64rpx;margin: 0 auto;margin-top: 30rpx;background: #F2F2F2;border-radius: 32rpx;
- display: flex;align-items: center;" @tap="toKeywordsearch()">
- <image style="width: 28rpx;height: 28rpx;margin-left: 30rpx;" src="/static/images/search.png" mode="">
- </image>
- <text style="margin-left: 10rpx;color: #999999;font-size: 24rpx;">请输入关键字</text>
- </view>
- <view class="top">
- <view class="title">
- <view class="call_record_time">{{date}}</view>
- <view class="hash" @click="gotoChat" v-if="commentList.length">
- 查看全部评论
- </view>
- </view>
- <view class="call_record_time_one">接待时长 {{alltimeStr}}</view>
- <zaudio @checkPlaybackRate="checkPlaybackRate" theme="theme4"></zaudio>
- </view>
- <scroll-view :scroll-top="scrollTop" lower-threshold='100px' @scrolltolower="ltolower()" upper-threshold='40px'
- @scrolltoupper="rolltoupper()" :scroll-into-view="scrollId" scroll-y="true" class="text scroll-Y">
-
- <!-- 音频识别模块 -->
- <view>
- <!-- 聊天记录-->
- <view class="dialog-block" v-for="(dialog,i) in dialogList" :key="i">
- <view :id="'dialog'+i" class="fileName">录音文件</view>
-
- <view class="text" :id="'dialog'+csdFileindex+'text'+item.bg"
- :class="{active: Math.floor(item.bg/1000) < playNow && Math.floor(item.ed/1000) > playNow, isGreen: item.isShow == 0}"
- v-for="(item,index) in dialog.message" :key="index" :data-speaker="item.speaker">
- <view class="avatar">
- <image v-if="item.isShow == 0" src="https://static.quhouse.com/b11a7e1ccf914020b3ee23d3e4862637.png" mode="widthFix">
- </image>
- <text v-else :style="[borderColor(item.speaker)]">{{ item.speaker | toCapital }}</text>
- </view>
- <view class="content">
- <view v-html="item.onebest"></view>
- </view>
- </view>
- </view>
- <!-- 点赞 -->
- <view class="likeArea" :class="{'liked':isLiked}">
- <image
- :src="isLiked?'/static/images/recordingManagement/likeActive.png':'/static/images/recordingManagement/like_gray.png'"
- mode=""></image>
- </view>
- <view class="hash" id="hash">
- </view>
- </view>
- </scroll-view>
- <!-- 写评价 -->
- <view class="bottomArea">
- <image class="voice" @click.stop="changeVoiceShow" src="/static/images/recordingManagement/voice.png"
- mode=""></image>
- <view class="inputArea">
- <textarea :value="content" :focus="textareaFocus" type="text" @input="changeContent" :auto-height="true"
- class="editor" :class="{'active':editing}" @click.stop="changeEditing(true)" @confirm="sendComment">
- </textarea>
- <view class="placeholder" :class="{'editing':editing}" v-if="!content && !editing">写评价</view>
- <image class="edit" v-if="!editing && content == ''" src="/static/images/recordingManagement/edit.png"
- mode=""></image>
- </view>
- <image class="like" v-if="myId != createUser && !editing" @click="changeLike"
- src="/static/images/recordingManagement/like.png" mode=""></image>
- <image class="add" @click.stop="uploadImage" v-if="!editing && content == ''"
- src="/static/images/recordingManagement/add.png" mode=""></image>
- <view class="send" @click="sendComment" v-if="content!=''">
- 发送
- </view>
- </view>
-
-
-
- <!-- 评语列表 -->
- <u-popup v-model="watchAllCommit" mode="bottom">
- <scroll-view style="height: 70vh;" scroll-y>
- <view class="boxs">
- <view class="chat">
- <view class="total">
- 全部评论(共{{commentList.length}}条)
- </view>
- <view class="list">
- <view class="message" v-for="(item,index) in commentList" :key="index">
- <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>
- <view class="right">
- <view class="name">
- {{item.commentName||"未知昵称"}}
- </view>
- <view class="subtitle" v-if="item.commentAutoGraph">
- {{item.commentAutoGraph}}
- </view>
- <view class="answer" v-if="item.replyName">
- 回复@{{item.replyName}}
- </view>
- <view class="content" v-if="item.content">
- {{item.content}}
- </view>
- <view class="pic" v-if="item.picUrl">
- <image style="width: 100%;max-width: 240px;" :src="item.picUrl" mode="widthFix">
- </image>
- </view>
-
- <view class="bottom">
- <view class="time">
- {{item.createTime}}
- </view>
- <view class="button" v-if="myId != item.commentUser"
- @click.stop="answer(item.commentUser,item.id)">
- 回复
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
-
- <!-- 写评价 -->
- <view class="bottomArea">
- <image class="voice" @click.stop="changeVoiceShow"
- src="/static/images/recordingManagement/voice.png" mode=""></image>
- <view class="inputArea">
- <textarea :value="content" :focus="textareaFocus" type="text" @input="changeContent"
- :auto-height="true" class="editor" :class="{'active':editing}"
- @click.stop="changeEditing(true)" @confirm="sendComment">
- </textarea>
- <view class="placeholder" :class="{'editing':editing}" v-if="!content && !editing">写评价
- </view>
- <image class="edit" v-if="!editing && content == ''"
- src="/static/images/recordingManagement/edit.png" mode=""></image>
- </view>
- <image class="like" v-if="myId != createUser && !editing" @click="changeLike"
- src="/static/images/recordingManagement/like.png" mode=""></image>
- <image class="add" @click.stop="uploadImage" v-if="!editing && content == ''"
- src="/static/images/recordingManagement/add.png" mode=""></image>
- <view class="send" @click="sendComment" v-if="content!=''">
- 发送
- </view>
- </view>
- </view>
- </scroll-view>
- </u-popup>
-
-
- <!-- 回到顶部 -->
- <!-- <view class="backTop" @click.stop="gotoTop()">
- <image src="/static/images/backTop.png" mode=""></image>
- </view> -->
- <!-- 语音输入 -->
- <cover-view class="voiceContent" v-if="voiceShow" @click="changeVoiceShow">
- <cover-view class="box" @click.stop="" @touchstart="voiceStart" @touchend="voiceEnd">
- <cover-view class="center">
- <cover-image class="voice" src="/static/images/voice.png" mode="widthFix"></cover-image>
- <cover-view class="text">
- {{isRecording?'正在输入':'长按语音输入'}}
- </cover-view>
- </cover-view>
- </cover-view>
- </cover-view>
- </view>
- </template>
-
- <script>
- var app = getApp();
- var util = require("../../../utils/util.js");
- var config = require("../../../config");
-
- var plugin = requirePlugin("WechatSI")
- let manager = plugin.getRecordRecognitionManager();
-
- import zaudio from '@/components/uniapp-zaudio/zaudio';
- export default {
- components: {
- zaudio
- },
- data() {
- return {
- roleindex: 0,
- dialogList: [], // 录音对话转移列表
- luyinList: [], //录音文件列表
- newluyinList: [],
- id: "",
- customerId: '',
- message: "", //聊天记录表
- durationTimeStr: "",
- autoLoad: true,
- playNow: 0,
- scrollTop: 0,
- scrollId: "",
- editing: false,
- isLiked: null,
- createUser: null,
- commentList: [], //评论列表
- content: "",
- voiceShow: false,
- isRecording: false,
- answerUserId: null,
- answerId: null,
- textareaFocus: false,
- myId: uni.getStorageSync("weapp_session_userInfo_data").accountId,
- audioPlay: false, //当前的播放状态控制
- sliderValue: 0, //进度条最小值
- end: false,
- recordPath: "",
- csdFileindex: 0,
- date: "", //年月日
- alltimeStr: "00:00",
- num: 0, //上拉 转写文件下标
- Bnum: 0, //下拉 转写文件下标
- status: 0,
- itemobj: {},
- textindex: 0, //下拉 转写文件下标
- toptextindex: 0, //上拉 转写文件下标
- timer: null,
- watchAllCommit: false, // 查看全部评论
- ACTION: Symbol('zaudio'), // 唯一值区分每个页面的方法
- isPageHide: false, // 是否息屏
- duration: '',
-
- nowPlaying: 0, // 当前播放位置
- stepPosition: 0, // 需要跳转的播放位置
- };
- },
- onLoad(options) {
- this.status = options.status;
- this.customerId = options.customerId;
- this.itemobj = JSON.parse(options.itemobj);
- this.stateisshow = options.stateisshow;
-
- this.getdianzan()
- this.getCommentList();
- // 当进入页面时调一次接口添加浏览量
- this.getView()
- let that = this
- this.timer = setTimeout(function() {
- that.addHot()
- }, 30000)
-
- //注意: 不同的回调方法, 相同的业务函数方法名, 不会相互影响;
- this.$zaudio.on('stop', this.ACTION, () => {
- // console.log('我是强制暂停或关闭小程序音频浮窗触发的')
- })
- this.$zaudio.on('seek', this.ACTION, (time) => {
- this.sliderChangeComplate(this.TIMEEVENT(time))
- })
- this.$zaudio.on('playing', this.ACTION, (obj) => {
- this.duration = obj.duration
- this.nowPlaying = obj.current_value
- this.TimeUpdate(this.TIMEEVENT(obj.current))
- })
-
- uni.$on('THEFULLTEXT2', info => {
- this.getluyinList(info)
- })
-
- },
- onShow() {
- //实时渲染当前的播放状态
- this.$zaudio.syncRender()
- this.initRecord();
- if (this.stateisshow == 2) {
- var info = this.itemobj;
- }
-
- !this.isPageHide && this.getluyinList(info);
- },
-
-
- onHide() {
- this.isPageHide = true
- },
-
- onUnload() {
- uni.$off('THEFULLTEXT2')
- //卸载不需要的业务和获取播放状态的业务,提高页面性能
- this.$zaudio.off('seek', this.ACTION);
- this.$zaudio.off('stop', this.ACTION);
- this.$zaudio.off('playing', this.ACTION);
- },
-
-
- methods: {
- borderColor(index) {
- let obj = {
- color: '',
- borderRadius: '',
- border: ''
- }
- switch (index) {
- case 1:
- obj.color = '#E6625B';
- obj.borderRadius = '8rpx';
- obj.border= '2rpx solid #E6625B';
- break;
- case 2:
- obj.color = '#FF981E';
- obj.borderRadius = '8rpx';
- obj.border= '2rpx solid #FF981E';
- break;
- case 3:
- obj.color = '#F6BD16';
- obj.borderRadius = '8rpx';
- obj.border= '2rpx solid #F6BD16';
- break;
- case 5:
- obj.color = '#4980C8';
- obj.borderRadius = '8rpx';
- obj.border= '2rpx solid #4980C8';
- break;
- case 6:
- obj.color = '#60CBEC';
- obj.borderRadius = '8rpx';
- obj.border= '2rpx solid #60CBEC';
- break;
- case 7:
- obj.color = '##FF981E';
- obj.borderRadius = '8rpx';
- obj.border= '2rpx solid #FF981E';
- break;
- case 8:
- obj.color = '#4F861E';
- obj.borderRadius = '8rpx';
- obj.border= '2rpx solid #4F861E';
- break;
- default:
- obj.color = '#9F61C8';
- obj.borderRadius = '8rpx';
- obj.border= '2rpx solid #9F61C8';
- break;
- }
- return obj
- },
- toKeywordsearch() {
- uni.navigateTo({
- url: '/pages/learning/Thefulltext/search?customerId=' + this.customerId + "&status=" + this
- .status + "&skpl=" + "2" + '&UpDateEvent=THEFULLTEXT2'
- })
- },
- getView() {
- this.$u.get('/addtodigest/addPageviews', {
- id: this.customerId
- })
- .then(res => {
- // console.log(res)
- })
- },
- addHot() {
- this.$u.post('/zkstudyrecord', {
- targetId: this.customerId
- })
- .then(res => {
- // console.log(res)
- })
- },
- TimeUpdate(currentTime) {
- this.playNow = Number(currentTime)
- if (this.dialogList.length == 0) {
- return
- } else {
- const message = this.dialogList[0].message;
- if (!message) return
- for (let i = 0; i < message.length; i++) {
- if ((Math.floor(message[i].bg / 1000) <= this.playNow && this.playNow < Math.floor(message[i].ed /
- 1000))) {
- this.scrollId = "dialog" + this.csdFileindex + "text" + message[i].bg;
- break;
- }
- if (i < message.length - 1 && Math.floor(message[i].ed / 1000) < this.playNow && this.playNow <
- Math.floor(message[i + 1].bg / 1000)) {
- this.scrollId = "dialog" + this.csdFileindex + "text" + message[i].bg;
- break;
- }
- }
- }
- this.$forceUpdate()
- },
- //下一页
- ltolower() {
- var lengthcz = this.newluyinList.length - 1;
- if (this.textindex >= lengthcz) {
- uni.showToast({
- title: '到底了',
- icon: 'none',
- duration: 2000
- });
- return
- } else {
- this.textindex = this.textindex + 1;
- this.newluyinList[this.textindex].message.forEach(item => {
- this.dialogList[0].message.push(item)
- })
- }
- },
- //上一页
- rolltoupper() {
- if (this.toptextindex == 0) {
- // uni.showToast({
- // title: '到头了',
- // duration: 2000
- // });
- return
- } else {
- if (this.dialogList[0] == undefined) {
- return
- } else {
- this.toptextindex = this.toptextindex - 1;
- let reverselist = this.newluyinList[this.toptextindex].message;
- let runlist = reverselist.reverse();
- runlist.forEach(item => {
- this.dialogList[0].message.unshift(item)
- })
- }
- }
- // console.log("上一页", this.toptextindex)
- },
- //获取点赞列表isLiked likegetLike
- getdianzan() {
- this.$u.get(config.service.likegetLike, {
- targetId: this.customerId
- }).then(data => {
- this.isLiked = data.like;
- }).catch(e => {
- uni.hideLoading();
- })
- },
- // 获取评论列表
- getCommentList() {
- const that = this;
- util.getRequestPromise(config.service.cmmentList + '?targetId=' + this.customerId, {}, false, "GET").then(
- data => {
- let tmp = data;
- tmp.reverse();
- that.commentList = tmp;
- });
- },
- // 获取录音记录列表
- getluyinList(info) {
- const parames = {
- pageNum: 1,
- pageSize: 100,
- query: {
- customerId: this.customerId
- }
- }
- this.$u.post("/corpus/findByPage", parames).then(res => {
- if (res && res.length) {
- let alltime = res[0].recordDuration;
- this.alltimeStr = this.getTime(alltime)
- if (info.bg != 0) {
- this.luyinList = res;
- this.recordPath = res[0].recordPath
- this.date = res[0].receptionTime;
- this.getCorpusAnalysis(info);
- this.stepPlay(Math.floor(info.bg / 1000))
- } else {
- this.luyinList = res;
- this.recordPath = res[0].recordPath
- this.date = res[0].receptionTime;
- this.getCorpusAnalysis(info);
- this.zyAudio()
- }
- }
- })
- },
- //搜索跳转
- adasdasdasd(e) {
- this.stepPlay(e)
- },
-
- // 获取转义后的对话结果
- getCorpusAnalysis(info) {
- this.dialogList = [];
- let obj = {
- corpusId: this.luyinList[this.csdFileindex].id,
- bg: info.bg,
- speaker: this.roleindex,
- }
- this.$u.get(config.service.getCorpusAnal, obj).then((data) => {
- let jsonInfo = JSON.parse(data.audioContent);
- //上拉标记点
- this.textindex = data.index;
- //下拉标记点
- this.toptextindex = data.index;
-
- jsonInfo.forEach(item => {
- item.message = JSON.parse(item.onebest)
- item.backindex = this.csdFileindex;
- if (info.onebest) {
- item.message.forEach(che => {
- if (che.onebest == info.onebest) {
- che.onebest =
- `<font style='color: red'>${che.onebest}</font>`;
- }
- })
- }
- })
- this.newluyinList = jsonInfo;
- this.dialogList.push(jsonInfo[this.textindex]);
- this.adasdasdasd(Math.floor(info.bg / 1000))
- })
- },
- getTime(time) {
- return util.formatSecond(time)
- },
-
- //音频前进回退
- sliderChangeComplate(currentTime) {
- let platetime = currentTime * 1000;
- this.dialogList = []
- this.$u.get(config.service.fastForward, {
- corpusId: this.luyinList[this.csdFileindex].id,
- bg: platetime
- }).then(data => {
- this.textindex = data.index;
- this.toptextindex = data.index;
- this.dialogList.push(this.newluyinList[data.index])
- if (this.$zaudio.paused) {
- this.$zaudio.operate()
- }
- })
- },
-
-
-
- formatTime(num) {
- //格式化时间格式
- num = num.toFixed(0);
- let second = num % 60;
- if (second < 10) second = '0' + second;
- let min = Math.floor(num / 60);
- if (min < 10) min = '0' + min;
- return min + ":" + second;
- },
- changeVoiceShow() {
- this.voiceShow = !this.voiceShow;
- },
-
- voiceStart() {
- manager.start({
- lang: "zh_CN"
- });
- },
- voiceEnd() {
- // uni.showToast();
- if (this.isRecording) {
- uni.showLoading({
- title: "识别中"
- })
- }
- this.voiceShow = false;
- this.isRecording = false;
- manager.stop();
- },
- // 语音初始化
- initRecord() {
- const that = this;
- manager.onStart = function(res) {
- that.isRecording = true;
- // this.voiceState = "onStart:" + res.msg + "正在录音"
- };
- //有新的识别内容返回,则会调用此事件
- manager.onRecognize = (res) => {
- // console.log('ing' + res.result);
- }
-
- // 识别结束事件
- manager.onStop = (res) => {
- uni.hideLoading();
- let newText = that.content + res.result;
- if (newText.length > 140) {
- newText = newText.substring(0, 140)
- }
- that.content = newText;
- that.textareaFocus = true;
- }
-
- // 识别错误事件
- manager.onError = (res) => {
- uni.hideLoading();
- }
- },
- changeContent(e) {
- this.content = e.detail.value;
- },
- answer(userId, tid) {
- this.answerId = tid;
- this.answerUserId = userId;
- this.editing = true;
- this.textareaFocus = true;
- },
- // 保存评论
- sendComment() {
- if (this.content == "") {
- uni.showToast({
- icon: "none",
- title: "请输入标题"
- })
- return;
- }
- let parames = {
- targetId: this.customerId,
- content: this.content,
- commentType: 1
- };
- if (this.answerUserId) {
- parames.replyCommentId = this.answerId;
- parames.replyUser = this.answerUserId;
- }
- const that = this;
- util.getRequestPromise(config.service.saveCmment, parames, false).then(data => {
- that.getCommentList();
- uni.showToast({
- title: "评论成功",
- icon: "none"
- })
- that.textareaFocus = false;
- that.content = "";
- });
- },
- uploadImage() {
- const that = this;
- var parames = {
- targetId: that.customerId,
- commentType: 1
- };
- if (this.answerUserId) {
- parames.replyCommentId = this.answerId;
- parames.replyUser = this.answerUserId;
- }
- uni.chooseImage({
- count: 1, //默认9
- sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
- sourceType: ['album', 'camera'],
- success: function(res) {
- uni.showLoading({
- title: "上传中"
- })
- uni.uploadFile({
- url: config.service.saveCmmentUpload,
- filePath: res.tempFilePaths[0],
- name: 'file',
- header: {
- 'Authorization': 'Bearer ' + uni.getStorageSync(
- 'weapp_session_login_data').token
- },
- formData: parames,
- success: (uploadFileRes) => {
- that.getCommentList();
- uni.hideLoading();
- uni.showToast({
- icon: "none",
- title: "上传成功"
- })
- // console.log(uploadFileRes.data);
- }
- });
- }
- });
- },
- changeLike() {
- uni.showLoading({
- title: "请求中",
- mask: true
- })
- if (this.isLiked) {
- this.cancelLike();
- } else {
- this.saveLike();
- }
- },
- // 点赞
- saveLike() {
- const that = this;
- util.getRequestPromise(config.service.saveLike, {
- targetId: this.customerId
- }, false).then(data => {
- that.isLiked = true;
- uni.hideLoading();
- uni.showToast({
- icon: "none",
- title: "点赞成功"
- })
- });
- },
- // 取消点赞
- cancelLike() {
- const that = this;
- util.getRequestPromise(config.service.cancelLike, {
- targetId: this.customerId
- }, false).then(data => {
- that.isLiked = false;
- uni.hideLoading();
- uni.showToast({
- icon: "none",
- title: "取消点赞成功"
- })
- });
- },
- // 查看全部评论
- gotoChat() {
- this.watchAllCommit = true
- },
- gotoTop() {
- this.scrollId = null;
- this.$nextTick(() => {
- this.scrollId = "top";
- })
- },
- changeEditing(type) {
- this.editing = type;
- this.answerId = null;
- this.answerUserId = null;
- this.textareaFocus = false;
- },
-
-
-
- // 迅速切换音频源并切换回来
- checkPlaybackRate() {
- this.stepPosition = this.nowPlaying
- //
- let data = [{
- src: 'https://static.quhouse.com/record/prop/2022-12-13/1670905992910-00066.mp3',
- title: '录音音频',
- singer: '',
- coverImgUrl: ''
- }]
- this.$zaudio.setAudio(data)
- //渲染第一首音频
- this.$zaudio.setRender(0)
- if (!this.refresh) {
- setTimeout(() => {
- this.$zaudio.operate()
- }, 150)
- }
- setTimeout(() => {
- this.zyAudio()
- }, 500)
- },
- //录音实例
- zyAudio() {
- let data = [{
- src: this.recordPath,
- title: '录音音频',
- singer: '',
- coverImgUrl: ''
- }]
- this.$zaudio.setAudio(data)
- //渲染第一首音频
- this.$zaudio.setRender(0)
-
- if (this.stepPosition != 0) {
- setTimeout(() => {
- this.stepPlay(this.stepPosition)
- }, 1500)
- }
- },
-
-
- // 跳转指定位置播放
- stepPlay(t) {
- this.$zaudio.seek(t)
- if (this.$zaudio.paused) {
- this.$zaudio.operate()
- }
- }
- }
- };
- </script>
- <style lang="scss" scoped>
- .biaoqiantom {
- background-color: #008EF2;
- color: #FFFFFF;
- border: none;
- }
-
- .boxs {
- min-height: 100%;
- display: flex;
- flex-direction: column;
-
- .chat {
- flex-grow: 1;
- }
-
- .bottomArea {
- flex-shrink: 0;
- position: sticky;
- bottom: 0;
- }
- }
-
- // 表单
- .tian-view {
- width: 570rpx;
- background-color: #FFFFFF;
- border-bottom: 1px solid #ededee;
- display: flex;
- min-height: 96rpx;
-
- .tian-view-t1 {
- width: 20rpx;
- font-size: 34rpx;
- height: 34rpx;
- line-height: 110rpx;
- letter-spacing: 0px;
- color: red;
- }
-
- .tian-view-t2 {
- width: 30%;
- min-height: 96rpx;
- line-height: 96rpx;
- font-size: 34rpx;
- color: #333;
- }
-
- .tian-view-t3 {
- width: 61%;
- padding-top: 31rpx;
- padding-bottom: 31rpx;
- display: flex;
-
- .tian-input {
- width: 98%;
- font-size: 34rpx;
- border: none;
- }
- }
- }
-
- .zhezhoa {
- position: fixed;
- top: 0;
- left: 0;
- z-index: 999;
- width: 100%;
- height: 100vh;
- opacity: 0.5;
- background-color: #666666;
- }
-
- .bounced {
- width: 570rpx;
- background: #FFFFFF;
- z-index: 1000;
- border-radius: 10rpx;
- position: fixed;
- left: 50%;
- top: 50%;
- transform: translate(-50%, -50%);
-
- /* 50%为自身尺寸的一半 */
- .jiajinghuatit {
- width: 100%;
- height: 68rpx;
- font-size: 30rpx;
- text-align: center;
- line-height: 68rpx;
- }
-
- .jiajinghuaview {
- padding: 18rpx 18rpx 18rpx 18rpx;
- display: flex;
- flex-wrap: wrap;
-
- .jiajinghuaview1 {
- padding: 8rpx 8rpx 8rpx 8rpx;
- font-size: 26rpx;
- border-radius: 12rpx;
- border: 1px solid #979797;
- margin-left: 8rpx;
- }
-
- .jighuaview2 {
- padding: 8rpx 8rpx 8rpx 8rpx;
- font-size: 26rpx;
- border-radius: 12rpx;
- border: 1px solid #979797;
- margin-left: 8rpx;
- display: flex;
-
- .view1-text {
- text-align: center;
- // border-right: 1rpx solid red;
- }
-
- .view1-img {
- width: 50rpx;
- }
- }
- }
-
- .bounced3 {
- height: 100rpx;
- width: 100%;
- margin-top: 40rpx;
- border-top: 1px solid #dddddd;
- display: flex;
- }
-
- .bounced3-1 {
- width: 50%;
- height: 100%;
- text-align: center;
- line-height: 100rpx;
- border-right: 1px solid #dddddd;
- font-size: 36rpx;
- color: #999999;
- }
-
- .bounced3-2 {
- width: 50%;
- height: 100%;
- text-align: center;
- line-height: 100rpx;
- font-size: 36rpx;
- color: #108ee9;
- }
- }
-
- .tab-box {
- width: 100%;
- display: flex;
- justify-content: center;
- align-items: center;
-
- .yinpinshibie {
- width: 156rpx;
- height: 50rpx;
- font-size: 36rpx;
- font-weight: 400;
- color: #333333;
- text-align: center;
- line-height: 50rpx;
- letter-spacing: 2rpx;
- margin-right: 188rpx;
-
- &.active {
- position: relative;
-
- &::after {
- position: absolute;
- content: '';
- width: 119rpx;
- height: 8rpx;
- background: #008EF2;
- border-radius: 4rpx;
- top: 50rpx;
- right: 0;
- left: 0;
- margin: 0 auto;
- }
- }
- }
-
- .rate {
- width: 156rpx;
- height: 50rpx;
- font-size: 36rpx;
- font-weight: 400;
- color: #333333;
- line-height: 50rpx;
- letter-spacing: 2rpx;
- text-align: center;
-
- &.active {
- position: relative;
-
- &::after {
- position: absolute;
- content: '';
- width: 119rpx;
- height: 8rpx;
- background: #008EF2;
- border-radius: 4rpx;
- top: 50rpx;
- right: 0;
- left: 0;
- margin: 0 auto;
- }
- }
- }
- }
-
- .dialog-block {
- margin: 20rpx 0;
- border-bottom: 1px solid #ccc;
-
- .fileName {
- text-align: center;
- margin: 10rpx auto;
- width: 115rpx;
- height: 42rpx;
- line-height: 42rpx;
- background: #EFEFEF;
- border-radius: 4rpx;
- font-size: 20rpx;
- font-weight: 400;
- color: #333333;
- }
- }
-
- // 评分
- .rate-box {
- padding: 10rpx 20rpx;
-
- .date {
- width: 300rpx;
- height: 33rpx;
- font-size: 24rpx;
- font-weight: 400;
- color: #333333;
- line-height: 33rpx;
- letter-spacing: 1rpx;
- margin-bottom: 8rpx;
- }
-
- .title {
- width: 100%;
- height: 42rpx;
- font-size: 30rpx;
- font-weight: 500;
- color: #333333;
- line-height: 42rpx;
- letter-spacing: 2rpx;
- margin-bottom: 20rpx;
- }
-
- .level1 {
- display: flex;
- align-items: center;
-
- .level-name {
- width: 104rpx;
- height: 33rpx;
- font-size: 24rpx;
- font-weight: 500;
- color: #333333;
- line-height: 33rpx;
- letter-spacing: 1rpx;
- margin-right: 10rpx;
- }
-
- .level-progress {
- flex: 1;
- border-radius: 11rpx;
- height: 21rpx;
- background-color: #BEE4FF;
- position: relative;
-
- .color {
- width: 0;
- position: absolute;
- top: 0;
- left: 0;
- height: 21rpx;
- border-radius: 11rpx 0 0 11rpx;
- background-color: #008EF2;
- }
- }
-
- .level-rate {
- width: 65rpx;
- height: 33rpx;
- font-size: 24rpx;
- font-weight: 500;
- color: #333333;
- line-height: 33rpx;
- letter-spacing: 1rpx;
- margin: 0 20rpx 0 15rpx;
- }
-
- .arrow {
- width: 37rpx;
- height: 21rpx;
- padding: 5rpx 20rpx;
- }
-
- .rotatearrow {
- transform: rotate(270deg);
- }
- }
-
- .level1-subbox {
- display: flex;
- margin-top: 20rpx;
- flex-wrap: wrap;
-
- .sub-name {
- width: 50%;
- display: flex;
- margin-bottom: 18rpx;
-
- .subitem-name {
- width: 104rpx;
- height: 33rpx;
- font-size: 24rpx;
- font-weight: 400;
- color: #999999;
- line-height: 33rpx;
- letter-spacing: 1rpx;
- margin-right: 12rpx;
- }
-
- .checkimg {
- width: 27rpx;
- height: 27rpx;
- }
-
- }
- }
- }
-
- .luyin {
- height: 100rpx;
- width: 100%;
- }
-
- .translation {
- background: #FFFFFF;
- display: flex;
- flex-direction: column;
- height: 100vh;
- }
-
- .translation .top {
- margin-top: 20rpx;
- padding: 0 30rpx;
- background: #ffffff;
- border-bottom: 1rpx solid #F2F2F2;
- padding-bottom: 10rpx;
- }
-
- .translation .top .title {
- padding: 0 30rpx;
- display: flex;
- align-items: center;
- justify-content: space-between;
-
- .hash {
- color: rgba(21, 144, 233, 1);
- font-size: 26rpx;
- }
- }
-
- .call_record_time {
- height: 42rpx;
- line-height: 42rpx;
- font-size: 30rpx;
- font-family: PingFangSC-Medium, PingFang SC;
- font-weight: 500;
- color: #303030;
- }
-
- .call_record_time_one {
- padding-left:30rpx;
- color: #70798d;
- display: flex;
- justify-content: space-between;
- position: relative;
- height: 40rpx;
- font-size: 28rpx;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- color: #303030;
- line-height: 40rpx;
- margin-top: 20rpx;
-
- .diangweitupian {
- width: 46rpx;
- height: 46rpx;
- position: absolute;
- top: 0rpx;
- right: 75rpx;
- }
-
- .file-change {
- position: absolute;
- top: 50rpx;
- right: 0rpx;
- width: 184rpx;
- background: #FFFFFF;
- box-shadow: 0rpx 0rpx 6rpx 2rpx rgba(230, 230, 230, 0.5);
- border-radius: 4rpx;
- z-index: 99;
- height: auto;
- max-height: 600rpx;
- overflow: auto;
- }
-
- .file-item {
- width: 184rpx;
- height: 60rpx;
- line-height: 60rpx;
- text-align: center;
- font-size: 30rpx;
- font-weight: 400;
- color: #333333;
- border-bottom: 1rpx solid #E2E2E2;
- }
-
- .file-item:last-child {
- border: 0
- }
-
- .fileactive {
- color: #008EF2
- }
- }
-
- .scroll-Y {
- font-size: 36rpx;
- color: #999999;
- background: #FFFFFF;
- margin-top: 30rpx;
- flex: 1;
- overflow-y: scroll;
- width: 100%;
- }
-
- .scroll-Y .text {
- margin: 30rpx;
- line-height: 40rpx;
- display: flex;
- align-items: flex-start;
- }
-
- .scroll-Y .text[data-speaker="2"],
- .scroll-Y .text[data-speaker="4"],
- .scroll-Y .text[data-speaker="6"] {
- flex-direction: row-reverse;
- text-align: right;
-
- .content {
- margin-left: 0;
- margin-right: 30rpx;
- }
- }
-
- .scroll-Y .text .avatar {
- text{
- display: block;
- width: 72rpx;
- height: 72rpx;
- line-height: 72rpx;
- text-align: center;
- background: #FFFFFF;
- border-radius: 8rpx;
- font-size: 30rpx;
- font-family: PingFangSC-Medium, PingFang SC;
- font-weight: 500;
- box-sizing: border-box;
- }
- image{
- width: 72rpx;
- height: 72rpx;
- }
- }
-
- .scroll-Y .text .content {
- margin-left: 30rpx;
- text-align: left;
- padding: 10rpx;
- background: #f8f8f8;
- border-radius: 12rpx;
- max-width: 442rpx;
- color: #999999;
- position: relative;
- font-size: 30rpx;
- font-family: PingFangSC-Regular, PingFang SC;
- font-weight: 400;
- color: #505050;
- line-height: 40rpx;
- }
- .scroll-Y .text.active .content {
- color: #2671E2 !important;
- position: relative;
- }
-
- .likeArea {
- width: 86rpx;
- height: 84rpx;
- margin: 20rpx auto 38rpx auto;
- border-radius: 50%;
- display: flex;
- justify-content: center;
- align-items: center;
- border: 1rpx solid #C1C2C1;
-
- &.liked {
- border: 1rpx solid rgba(21, 144, 233, 1);
- }
-
- image {
- width: 38rpx;
- height: 39rpx;
- }
- }
-
- .chat {
- padding: 20rpx;
- display: flex;
- flex-direction: column;
- border-top: 1rpx solid rgba(151, 151, 151, 0.4);
-
- .total {
- color: rgba(21, 144, 233, 1);
- font-size: 24rpx;
- }
-
- .list {
- display: flex;
- flex-direction: column;
-
- .message {
- display: flex;
- margin-top: 20rpx;
-
- border-bottom: 1rpx solid rgba(151, 151, 151, 0.4);
- padding-bottom: 20rpx;
-
- &:last-child {
- border-bottom: 0;
- }
-
- .avator {
- margin-left: 120rpx;
- }
-
- &:first-child {
- .avator {
- margin-left: 0;
- }
- }
-
- .right {
- display: flex;
- flex-direction: column;
- margin-left: 20rpx;
- flex: 1;
-
- .name {
- color: rgba(16, 16, 16, 1);
- font-size: 30rpx;
- }
-
- .subtitle {
- color: rgba(120, 120, 120, 1);
- font-size: 24rpx;
- margin-top: 16rpx;
- }
-
- .answer {
- font-size: 24rpx;
- color: #787878;
- }
-
- .content {
- color: rgba(49, 48, 48, 1);
- font-size: 30rpx;
- margin-top: 20rpx;
- position: relative;
- }
-
- .bottom {
- margin-top: 16rpx;
- display: flex;
- justify-content: space-between;
-
- .time {
- color: rgba(185, 185, 185, 1);
- font-size: 20rpx;
- }
-
- .button {
- color: rgba(144, 144, 144, 1);
- font-size: 30rpx;
- width: 111rpx;
- height: 44rpx;
- border-radius: 22rpx;
- border: 1rpx solid rgba(151, 151, 151, 1);
- text-align: center;
- }
- }
- }
- }
- }
- }
-
- .bottomArea {
- min-height: 90rpx;
- background: #F0F2F5;
- width: 100vw;
- display: flex;
- align-items: center;
- border-top: 1rpx solid rgba(151, 151, 151, 0.25);
-
- .voice {
- width: 44rpx;
- height: 44rpx;
- margin-left: 38rpx;
- }
-
- .inputArea {
- margin-left: 38rpx;
- margin-right: 38rpx;
- flex: 1;
- display: flex;
- position: relative;
-
- .edit {
- width: 30rpx;
- height: 28rpx;
- position: absolute;
- top: 31rpx;
- left: 27rpx;
- }
-
- .editor {
- background: rgba(0, 139, 245, 0.17);
- border-radius: 29rpx;
- flex: 1;
- min-height: 58rpx;
- width: unset;
- padding: 0 32rpx;
- font-size: 30rpx;
- margin: 16rpx 0;
- line-height: 29px;
- }
-
- .placeholder {
- position: absolute;
- left: 70rpx;
- top: 26rpx;
- color: #26A2FF;
-
- &.editing {
- left: 36rpx;
- }
- }
- }
-
- .download {
- width: 41rpx;
- height: 35rpx;
- margin-right: 36rpx;
- }
-
- .like {
- width: 38rpx;
- height: 39rpx;
- margin-right: 38rpx;
- }
-
- .add {
- width: 50rpx;
- height: 50rpx;
- margin-right: 38rpx;
- }
-
- .send {
- background: #1590e9;
- color: white;
- padding: 10rpx 20rpx;
- margin: 5px;
- border-radius: 8rpx;
- }
- }
-
- .backTop {
- width: 60rpx;
- height: 60rpx;
- background: rgba(211, 235, 253, 1);
- box-shadow: 0rpx 0rpx 2rpx 4rpx rgba(38, 161, 255, 0.04);
- border-radius: 50%;
- position: fixed;
- bottom: 200rpx;
- right: 8rpx;
- display: flex;
- justify-content: center;
- align-items: center;
-
- image {
- width: 26rpx;
- height: 34rpx;
- }
- }
-
- .voiceContent {
- position: fixed;
- top: 0;
- bottom: 0;
- left: 0;
- right: 0;
- width: 100vw;
- height: 100vh;
- display: flex;
- justify-content: center;
- align-items: center;
- background: rgba(30, 30, 30, 0.4592);
- z-index: 10001;
- }
-
- .box {
- background: rgba(21, 144, 233, 0.299);
- width: 524rpx;
- height: 524rpx;
- border-radius: 50%;
- display: flex;
- align-items: center;
- justify-content: center;
-
- .center {
- width: 412rpx;
- height: 412rpx;
- background: #1590E9;
- border-radius: 50%;
- display: flex;
- align-items: center;
- justify-content: center;
- flex-direction: column;
-
- .voice {
- width: 110rpx;
- height: 133rpx;
- }
-
- .text {
- color: #FFFFFF;
- font-size: 36rpx;
- margin-top: 24rpx;
- }
- }
- }
-
- .audio-container {
- width: 100%;
- display: flex;
- justify-content: space-between;
- align-items: center;
-
- .audio-head {
- width: 60rpx;
- height: 60rpx;
- flex-shrink: 0;
- }
-
- .audio-head .image {
- width: 100%;
- height: 100%;
- }
-
- .audio-slider {
- width: 96%;
- position: relative;
- padding: 2px 0rpx 0px 20px;
- display: flex;
- justify-content: space-between;
- align-items: center;
- }
-
- .audio-slider .slider {
- width: 100%;
- padding: 0px 15rpx;
- box-sizing: border-box;
- }
-
- .audio-time {
- width: 110rpx;
- text-align: right;
- font-size: 24rpx;
- line-height: 28rpx;
- color: #70798D;
- display: flex;
- justify-content: space-between;
- }
-
- .audio-play {
- width: 40rpx;
- height: 40rpx;
- flex-shrink: 0;
- }
-
- .audio-play .image {
- width: 100%;
- height: 100%;
- }
- }
- </style>
|