Commit 69702b55 by 胡悦

Merge branch 'SAAS+V4.54.0' of http://192.168.3.233:8090/glsx/gl_tape into SAAS+V4.54.0

2 parents a9b52cf5 52104f93
......@@ -28,6 +28,13 @@ module.exports = {
...data
})
},
getShortUrl(data){
return http.post({
method: 'dj.api.car.boutique.inspection.batch.file.short.url',
projectName: 'boutique',
...data
})
}
}
<template>
<view class="left-side">
<view class="user-box">
<view class="user-info flex" @click="jumpPersonCenter">
<view
class="user-info flex"
@click="jumpPersonCenter"
>
<view :class="['user-avatar', 'sprite-icon', 'icon-avatar', tabIndex == 99 ? 'user-active' : '']"></view>
<view class="user-name">
{{ userInfo.name }}
<view v-if="hasPerson" class="sprite-icon icon-arrow-next"></view>
<view
v-if="hasPerson"
class="sprite-icon icon-arrow-next"
></view>
</view>
</view>
</view>
<view :class="['left-tabs', { three: tabs.length == 3 }]">
<template v-for="(i, index) in tabs">
<view :class="['tab-item', { tabActive: tabIndex == index }]" :key="index" @click="changeIndex(index, i)">
<view
:class="['tab-item', { tabActive: tabIndex == index }]"
:key="index"
@click="changeIndex(index, i)"
>
<view class="icon-box">
<view :class="['sprite-icon', `icon-${i.icon}${tabIndex == index ? '-active' : ''}`]"></view>
</view>
{{ i.label }}
<view class="dot" v-if="i.icon == 'record' && perRecordNumber"></view>
<view class="dot" v-if="i.icon == 'ai' && sopCount"></view>
<view class="tip-box" v-if="i.icon == 'study' && readCount" @click.stop="readCount = 0">待办事项:{{ readCount }}</view>
<view
class="dot"
v-if="i.icon == 'record' && perRecordNumber"
></view>
<view
class="dot"
v-if="i.icon == 'ai' && sopCount"
></view>
<view
class="tip-box"
v-if="i.icon == 'study' && readCount"
>待办事项:{{ readCount }}</view>
</view>
</template>
</view>
<view class="left-footer">
<view class="btn" @click="openPop">
<view
class="btn"
@click="openPop"
>
<view class="sprite-icon icon-feedback"></view>
<view class="message-number" v-if="messageTotal > 0"></view>
<view
class="message-number"
v-if="messageTotal > 0"
></view>
</view>
<view class="btn" @click="handleSetting">
<view
class="btn"
@click="handleSetting"
>
<view class="sprite-icon icon-setting"></view>
</view>
</view>
<!-- 客服弹框 -->
<!-- <kf-box ref="kfRef" /> -->
<message-pop ref="kfRef" :type="messageType" :messageData="messageData"></message-pop>
<message-pop
ref="kfRef"
:type="messageType"
:messageData="messageData"
></message-pop>
<!-- 设置弹框 -->
<setting-box ref="settingRef" @stopAudio="$emit('stopAudio')" />
<setting-box
ref="settingRef"
@stopAudio="$emit('stopAudio')"
/>
</view>
</template>
......@@ -44,6 +79,7 @@ import KfBox from "./KfBox";
import MessagePop from "./MessagePop"
import SettingBox from "./SettingBox";
import { STORAGE_OBJECTkEY } from '@/utils/cache/constantData'
import utils from '@/utils/utils'
export default {
components: { KfBox, SettingBox, MessagePop },
props: {
......@@ -51,7 +87,7 @@ export default {
userInfo: Object
},
name: '',
data() {
data () {
return {
tabs: [
{
......@@ -72,7 +108,7 @@ export default {
{
label: "学习中心",
icon: "study",
isTrack:true,
isTrack: true,
name: 'StudyCenter'
},
],
......@@ -82,40 +118,40 @@ export default {
total: 0
},
messageTotal: 0,
readCount:0,
trackId:0,
trackInterval:null,
collectTrack:false,
readCount: 0,
trackId: 0,
trackInterval: null,
collectTrack: false,
hasPerson: false,
messageType: 'study',
sopCount: 0
}
},
watch: {
userInfo(n) {
userInfo (n) {
if (n.shopMerchantId) this.haveCustomerAccess(n)
},
trackId(n) {
if(!n) {
trackId (n) {
if (!n) {
clearInterval(this.trackInterval)
}
}
},
computed: {
perRecordNumber() {
perRecordNumber () {
return this.$store.state.audio.perRecordNumber
}
},
created() {
created () {
// 监听自定义事件
uni.$on('pageBack', () => {
console.log('pageBack')
this.getMessageInfo();
this.getSopCount()
this.getSopCount()
});
uni.$on('studyCenter', () => {
console.log('studyCenter')
this.changeIndex(3,this.tabs[3])
this.changeIndex(3, this.tabs[3])
});
this.getMessageInfo()
this.getUnreadCount()
......@@ -123,42 +159,51 @@ export default {
},
inject: ['showPage'],
methods: {
getUnreadCount() {
getUnreadCount () {
let _this = this
uni.$api.commonApi.getUnreadCount({}).then(res => {
this.readCount = res.data
setTimeout(() => {
utils.getViewInfo('.tip-box', info => {
_this.$emit('showReadCountTips', {
style: `display:block;opacity:1;top: ${info.top}px; left: ${info.left}px;`,
text: `待办事项:${res.data}`
})
})
}, 1e3)
})
},
addTrack() {
addTrack () {
const { merchantId, merchantName } = uni.$storage.get("userInfo")
const params = {
goodsType: 1,
merchantId,
merchantName
}
uni.$api.commonApi.dynamicrecordAdd(params).then(res=>{
uni.$api.commonApi.dynamicrecordAdd(params).then(res => {
this.trackId = res
})
},
leaveTrack() {
if(!this.trackId) return
uni.$api.commonApi.dynamicrecordLeave({id:this.trackId}).then(res=>{
leaveTrack () {
if (!this.trackId) return
uni.$api.commonApi.dynamicrecordLeave({ id: this.trackId }).then(res => {
console.log(res)
})
},
startTrack() {
this.trackInterval = setInterval(()=>{
this.leaveTrack()
}, 5000)
startTrack () {
this.trackInterval = setInterval(() => {
this.leaveTrack()
}, 5000)
},
clickHome() {
if(this.tabs[this.tabIndex].isTrack)
this.changeIndex(0,this.tabs[0])
clickHome () {
if (this.tabs[this.tabIndex].isTrack)
this.changeIndex(0, this.tabs[0])
},
handleSetting() {
this.$refs.settingRef.open()
this.clickHome()
handleSetting () {
this.$refs.settingRef.open()
this.clickHome()
},
findBeiSenSSOToken() {
findBeiSenSSOToken () {
return new Promise(resolve => {
const url = 'https%3A%2F%2Fcloud.italent.cn%2FPageHome%2FIndex%3Fproduct%3DLearning%26keyName%3DNusion%26pageCode%3DLearningNewHomepage%26appCode%3DLearning%26_qsrcapp%3DLearning%26_qrt%3Dhtml%26quark_s%3D5102bff371c00da5b19968ee53a8c3f1499ecd2447a19f72f3e3ba2390cc9617%23%2FviewDynamic%3Fshadow_context%3D%257BappModel%253A%2522italent%2522%252Cuppid%253A%25221%2522%257D%26quark_s%3D028930f1066f8ef8d28790940d53ae64337f44bde3a44cf89a290e4a3611e3e2'
uni.$api.commonApi.findBeiSenSSOToken({}).then(res => {
......@@ -169,58 +214,58 @@ export default {
})
})
},
async changeIndex(index,item) {
async changeIndex (index, item) {
console.log(index, 'changeIndex')
// if (this.tabIndex == index) return;
// 点击学习中心要跳从北森回后台配置的学习中心,学习中心为3
if (this.tabIndex == index && index !== 3) return;
let jumpUrl
if(item.isTrack) {
if (item.isTrack) {
this.readCount = 0
try {
jumpUrl = await this.findBeiSenSSOToken()
jumpUrl = await this.findBeiSenSSOToken()
} catch (error) {
console.log(error)
}
if(jumpUrl) {
this.addTrack()
this.startTrack()
}
if (jumpUrl) {
this.addTrack()
this.startTrack()
}
}else {
this.leaveTrack()
this.trackId = 0
clearInterval(this.trackInterval)
} else {
this.leaveTrack()
this.trackId = 0
clearInterval(this.trackInterval)
}
this.$emit('update:tabIndex', index)
this.$emit("changeTab", index,jumpUrl)
this.getMessageInfo()
this.getSopCount()
},
async haveCustomerAccess(val) {
const {shopMerchantId, sceneType:scene} = val
async haveCustomerAccess (val) {
const { shopMerchantId, sceneType: scene } = val
const res = await uni.$api.customerApi.haveCustomerAccess({
merchantId:shopMerchantId
merchantId: shopMerchantId
})
if (res) this.tabs.push( {
if (res) this.tabs.push({
label: "客户档案",
icon: "customer-file",
name: 'CustomerFile'
})
this.$store.state.user.haveCustomerAccess = res
uni.$api.customerApi.saleOpen({
merchantId:shopMerchantId,
uni.$api.customerApi.saleOpen({
merchantId: shopMerchantId,
scene
}).then(result=>{
if(result) {
}).then(result => {
if (result) {
this.hasPerson = true
}
})
},
// 获取话术未读列表
async getMessage() {
async getMessage () {
console.log('获取话术', uni.$storage.get("userInfo"))
const {sceneType, uuid} = uni.$storage.get("userInfo")
const { sceneType, uuid } = uni.$storage.get("userInfo")
const res = await uni.$api.commonApi.getUnreadRecord({
businessType: sceneType,
uuid
......@@ -232,8 +277,8 @@ export default {
}
},
// 消息中心未读总数
async getMessageCount() {
const {sceneType} = uni.$storage.get("userInfo")
async getMessageCount () {
const { sceneType } = uni.$storage.get("userInfo")
const res = await uni.$api.commonApi.getMessageCount({
status: 0, // 待查看,未读
businessType: sceneType
......@@ -242,7 +287,7 @@ export default {
this.messageTotal = res
},
// 学习中心消息弹窗,优先级高于有修改话术弹窗
async getMessagePop() {
async getMessagePop () {
const res = await uni.$api.commonApi.getMessagePop({})
console.log(res, 'res111')
if (res.ids && res.ids.length > 0) {
......@@ -258,26 +303,26 @@ export default {
await this.getMessage()
}
},
openPop() {
openPop () {
// this.messageType = 'system'
// this.$refs.kfRef.open()
uni.navigateTo({
url: `/pages/common/messageList`
})
},
getMessageInfo() {
getMessageInfo () {
// this.getMessage()
this.getMessageCount()
this.getMessagePop()
},
jumpPersonCenter() {
if(this.hasPerson) {
jumpPersonCenter () {
if (this.hasPerson) {
this.clickHome()
this.$emit('update:tabIndex', 99)
}
},
async getSopCount() {
const {sceneType} = uni.$storage.get("userInfo")
async getSopCount () {
const { sceneType } = uni.$storage.get("userInfo")
this.sopCount = await uni.$api.commonApi.getSopAiAgentMessageCount({
moduleType: 4, // 0-系统通知,1-优秀话术,2-话术预警,3-AI导师
businessType: sceneType,
......@@ -286,7 +331,7 @@ export default {
console.log(this.sopCount, 'sopCount')
}
},
beforeCreate() {
beforeCreate () {
clearInterval(this.trackInterval)
},
}
......@@ -371,6 +416,7 @@ export default {
z-index: 99999;
padding-left: toRpx(60);
text-align: left;
opacity: 0;
}
}
......
<template>
<view class="container" @click="handleTouchStart">
<view
class="container"
@click="handleTouchStart"
>
<view :class="['home', { show: !id && showHome }]">
<left-side :userInfo="userInfo" :tabIndex.sync="tabIndex" ref="leftBox" @changeTab="changeTab" @stopAudio="stopAudio" />
<left-side
:userInfo="userInfo"
:tabIndex.sync="tabIndex"
ref="leftBox"
@changeTab="changeTab"
@stopAudio="stopAudio"
@showReadCountTips="showReadCountTips"
/>
<view
class="tips-box"
:style="tipsObject.style"
@click.stop="closeTips"
>{{tipsObject.text}}</view>
<view class="right-side">
<template v-if="tabIndex == 0">
<view class="right-content">
<view class="start" @click="$emit('start')">
<image class="start-btn" src="../../assets/images/home/start.gif" alt="开始接待" />
<image class="start-border" src="../../assets/images/home/start-border.png" />
<view
class="start"
@click="$emit('start')"
>
<image
class="start-btn"
src="../../assets/images/home/start.gif"
alt="开始接待"
/>
<image
class="start-border"
src="../../assets/images/home/start-border.png"
/>
</view>
<view class="module-list">
<slot name="module" />
......@@ -15,12 +40,26 @@
</view>
</template>
<template v-else-if="tabIndex == 99">
<component is="Point" ref="pointRef" :userInfo="userInfo" @showPage="handleShowPage" />
<component
:is="'Point'"
ref="pointRef"
:userInfo="userInfo"
@showPage="handleShowPage"
/>
</template>
<template v-else>
<component :is="componentName" @handleOperation="handleOperation" ref="pointRef" :userInfo="userInfo" @showPage="handleShowPage" />
<component
:is="componentName"
@handleOperation="handleOperation"
ref="pointRef"
:userInfo="userInfo"
@showPage="handleShowPage"
/>
</template>
<view class="store-addr" v-if="footerBox">
<view
class="store-addr"
v-if="footerBox"
>
<view class="icon-addr sprite-icon icon-addr"></view>
<view class="addr-text">{{ userInfo.shopMerchantName }}</view>
</view>
......@@ -29,17 +68,41 @@
<view :class="['detail', { show: id }]">
<slot name="detail" />
</view>
<view class="point-page" v-if="!showHome">
<component :is="pointComponentName" @backHome="backHome" @jump="jump" :transfer="transfer" />
<view
class="point-page"
v-if="!showHome"
>
<component
:is="pointComponentName"
@backHome="backHome"
@jump="jump"
:transfer="transfer"
/>
</view>
<!-- 未点击开始接待,弹窗 -->
<MessageBox ref="previewRef" @confirm="$emit('preview')" :popupW="704" content="直接点击素材可进行预览,若面向车主展示,请点击「开始接待」" confirmBtnText="预览素材" @cancel="$emit('previewCancel')" @close="$emit('previewClose')"></MessageBox>
<MessageBox
ref="previewRef"
@confirm="$emit('preview')"
:popupW="704"
content="直接点击素材可进行预览,若面向车主展示,请点击「开始接待」"
confirmBtnText="预览素材"
@cancel="$emit('previewCancel')"
@close="$emit('previewClose')"
></MessageBox>
<!-- 停留弹框 -->
<!-- <MessageBox ref="tipBox" @cancel="tipCancel" @confirm="tipConfirm" content="系统检测到您在当前页面停留较久,是否仍在客户接待中?" cancelBtnText="否" confirmBtnText="是"></MessageBox> -->
<!-- 退出弹框 -->
<MessageBox :popupW="704" ref="finish" :content="finishContene" :isFooter="false">
<MessageBox
:popupW="704"
ref="finish"
:content="finishContene"
:isFooter="false"
>
<view class="footer">
<view class="footer-btn confirm flex" @click="$emit('openStep')">
<view
class="footer-btn confirm flex"
@click="$emit('openStep')"
>
<template v-if="finishDoneText">
{{ finishDoneText }}
</template>
......@@ -48,7 +111,10 @@
<text>(推荐)</text>
</template>
</view>
<view class="footer-btn cancel flex" @click="$emit('backHome')">
<view
class="footer-btn cancel flex"
@click="$emit('backHome')"
>
仍要退出
<text>(不推荐)</text>
</view>
......@@ -57,9 +123,23 @@
<!-- 升级弹框 -->
<update-box />
<slot name="content" />
<web-view @message="handlerMessage" ref="webview" src="/hybrid/html/index.html"></web-view>
<web-view ref="studyWebview" :src="jumpUrl" v-if="showBeisen"></web-view>
<image v-if="showLeadPage" @click="showLeadPage = false" class="lead-page" src="../../assets/images/noviceGuide/lead-page.png" mode="scaleToFill" />
<web-view
@message="handlerMessage"
ref="webview"
src="/hybrid/html/index.html"
></web-view>
<web-view
ref="studyWebview"
:src="jumpUrl"
v-if="showBeisen"
></web-view>
<image
v-if="showLeadPage"
@click="showLeadPage = false"
class="lead-page"
src="../../assets/images/noviceGuide/lead-page.png"
mode="scaleToFill"
/>
</view>
</template>
<script>
......@@ -96,7 +176,7 @@ export default {
default: '当前操作视为强制退出接待,若需正常流程完成接待请点击「完成接待」'
}
},
data() {
data () {
return {
studyUrl: '',
jumpUrl: '',
......@@ -107,29 +187,30 @@ export default {
userInfo: {},
tabIndex: 0,
showLeadPage: false,
showBeisen: false
showBeisen: false,
tipsObject: {}
}
},
mounted() {
mounted () {
const userInfo = uni.$storage.get('userInfo') || {}
this.userInfo = userInfo
this.checkVersion()
this.checkLead()
},
provide() {
provide () {
return {
showPage: this.handleShowPage,
hideFooter: this.handleFooter
}
},
computed: {
previewRef() {
previewRef () {
return this.$refs.previewRef
},
finishRef() {
finishRef () {
return this.$refs.finish
},
componentName() {
componentName () {
console.log(this.$refs.leftBox.tabs, this.tabIndex, this.$refs.leftBox.tabs[this.tabIndex].name)
return this.$refs.leftBox.tabs[this.tabIndex].name
}
......@@ -148,22 +229,22 @@ export default {
})
return
}
} else {
this.jumpUrl = ''
}
},
handleFooter(val) {
handleFooter (val) {
this.footerBox = val
},
backHome() {
backHome () {
this.showHome = true
console.log(this.$refs.pointRef)
Promise.resolve().then(() => {
this.$refs.pointRef?.$refs?.centerRef?.init && this.$refs.pointRef.$refs.centerRef.init()
})
},
jump(val) {
jump (val) {
this.showHome = true
if (val == 'CustomerFile') {
this.tabIndex = 2
......@@ -171,12 +252,12 @@ export default {
}
this.$emit('start')
},
handleShowPage(name, transfer) {
handleShowPage (name, transfer) {
this.transfer = transfer
this.showHome = false
this.pointComponentName = name
},
checkLead() {
checkLead () {
let leadPage = uni.$storage.get('leadPage') || []
const { phone } = this.userInfo
const version = plus?.runtime?.version || '' // 平板
......@@ -198,22 +279,22 @@ export default {
}
}
},
handleOperation(val, data) {
handleOperation (val, data) {
console.log(val, data, 'val, data')
const { type } = val;
// 提取公共的webview设置逻辑
const setWebviewStyle = () => {
setTimeout(() => {
const currentWebview = this.$parent.$scope.$getAppWebview();
const wv = currentWebview.children()[1];
if (wv) {
wv.setStyle({
left: '8%',
top: '3%',
height: '97%',
width: '92%'
wv.setStyle({
left: '8%',
top: '3%',
height: '97%',
width: '92%'
});
} else {
this.jumpUrl = '';
......@@ -232,7 +313,7 @@ export default {
appCode: 'Learning',
id: COURSE_ID
};
const queryString = Object.entries(params)
.map(([key, value]) => `${key}=${value}`)
.join('&');
......@@ -242,12 +323,12 @@ export default {
};
// 根据操作类型执行相应逻辑
switch(type) {
switch (type) {
case 'openCourse':
this.showBeisen = true;
setWebviewStyle();
break;
case 'courseDetail':
handleCourseDetail();
this.showBeisen = true;
......@@ -257,10 +338,22 @@ export default {
}
},
// 学习中心修改阅读状态,打开后才修改
async getStudyCenterRead(id) {
async getStudyCenterRead (id) {
console.log(id, 'getStudyCenterRead')
const res = await uni.$api.commonApi.getStudyCenterRead({ id })
console.log(res)
},
showReadCountTips (res) {
this.tipsObject = res
},
closeTips () {
this.$refs.leftBox.readCount = 0
this.tipsObject = {
style: '',
text: ''
}
}
}
}
......@@ -268,6 +361,21 @@ export default {
<style scoped lang="scss">
.container {
position: relative;
.tips-box {
position: absolute;
color: #ffffff;
font-size: toRpx(28);
width: toRpx(310);
height: toRpx(90);
line-height: toRpx(64);
background-image: url('@/assets/images/home/daliog.png');
background-size: 100% 100%;
z-index: 9;
padding-left: toRpx(60);
text-align: left;
display: none;
opacity: 0;
}
&::after {
content: '';
position: absolute;
......
......@@ -30,7 +30,7 @@
<template v-for="(i, ind) in item.recordingCheckResultList">
<view
:class="['detail-box',i.detailClassName]"
:key="`${index}_${ind}`"
:key="`text_${index}_${ind}`"
>
<view class="text-box">
<view
......@@ -46,14 +46,14 @@
<view class="content-box">
<block v-if="!i.scriptRec">
<view class="suggestions-box no">
暂无建议
暂无话术推荐
</view>
</block>
<block v-else>
<view class="suggestions-box">
<view class="title">
<view class="sprite-icon icon-suggestions-icon"></view>
话术建议
话术推荐
</view>
<view class="text">
<rich-text :nodes="i.scriptRec"></rich-text>
......@@ -121,7 +121,6 @@
</template>
<script type='text/ecmascript-6'>
import dayjs from 'dayjs'
import utils from '@/utils/utils'
export default {
......@@ -420,7 +419,7 @@ export default {
.detail-box {
background: #f5f8fc;
overflow: hidden;
opacity: 0;
.content-box {
transform: translateY(-100%);
}
......@@ -522,6 +521,7 @@ export default {
@keyframes hide-box {
100% {
height: toRpx(80);
opacity: 1;
}
}
......@@ -633,7 +633,8 @@ export default {
right: toRpx(20);
font-size: toRpx(24);
color: #757980;
display: inline-block;
display: inline-flex;
align-items: center;
height: toRpx(36);
border-radius: toRpx(16);
padding: 0 toRpx(22) 0 toRpx(12);
......
......@@ -45,7 +45,7 @@
<view class="suggestions-box">
<view class="suggestions-title">
<view class="sprite-icon icon-suggestions-icon"></view>
话术建议
话术推荐
</view>
<view class="text">
<rich-text :nodes="item.scriptRec"></rich-text>
......@@ -163,29 +163,29 @@ export default {
}
.quality-block {
.title {
height: 80rpx;
height: toRpx(80);
background: linear-gradient(119.9deg, #e1f7fc 0%, #f3f7ff 27%, #f7f2ff 41%, #e8f1ff 66%, #f7f2ff 100%);
font-size: 28rpx;
font-size: toRpx(28);
font-weight: 600;
padding: 0 20rpx;
padding: 0 toRpx(20);
&::before {
content: '';
width: 8rpx;
height: 8rpx;
width: toRpx(8);
height: toRpx(8);
background: #000000;
border-radius: 100%;
display: block;
margin-right: 16rpx;
margin-right: toRpx(16);
}
.matched-btn {
margin-left: auto;
height: 56rpx;
border-radius: 28rpx;
height: toRpx(56);
border-radius: toRpx(28);
background: #ffffff;
padding: 0 36rpx;
padding: 0 toRpx(36);
color: #eb4e4e;
font-size: 24rpx;
font-size: toRpx(24);
font-weight: 600;
}
.hit {
......@@ -239,7 +239,7 @@ export default {
}
}
.script-rec {
padding: 24rpx;
padding: toRpx(24);
.suggestions-box {
background: #ffffff;
border-radius: toRpx(16);
......
......@@ -124,7 +124,7 @@ export default {
<style scoped lang='scss'>
.quality-table-box {
.quality-table {
height: 872rpx;
height: toRpx(872);
width: 100%;
box-sizing: border-box;
border-radius: toRpx(16);
......@@ -144,7 +144,7 @@ export default {
}
}
.row-1 {
width: 272rpx;
width: toRpx(272);
}
.row-2 {
width: toRpx(248);
......@@ -178,7 +178,7 @@ export default {
box-sizing: border-box;
}
.row-3 {
padding: 24rpx 48rpx;
padding: toRpx(24) toRpx(48);
justify-content: flex-start;
}
}
......
......@@ -56,17 +56,17 @@ export default {
<style scoped lang='scss'>
.tags-box {
padding-bottom: 24rpx;
padding-bottom: toRpx(24);
.tags-flex {
gap: 20rpx;
gap: toRpx(20);
flex-wrap: wrap;
.tag {
height: 64rpx;
border-radius: 16rpx;
height: toRpx(64);
border-radius: toRpx(16);
background: #edf3ff;
padding: 0 20rpx;
padding: 0 toRpx(20);
color: #4673ff;
font-size: 28rpx;
font-size: toRpx(28);
}
}
}
......
......@@ -49,7 +49,10 @@
</template>
</view>
<view class="control-box flex">
<view class="sprite-icon icon-reception-share"></view>
<view
class="sprite-icon icon-reception-share"
@click="share"
></view>
<view
class="play-box flex"
@click="onHandle"
......@@ -98,6 +101,7 @@ import Dialogue from './components/Dialogue.vue'
import Quality from './components/Quality.vue'
import Tags from './components/Tags.vue'
import QualityTable from './components/QualityTable.vue'
import dayjs from 'dayjs'
export default {
components: {
QualityTable,
......@@ -183,6 +187,7 @@ export default {
},
setAudio (recordingUrl) {
this.qualityAudio = uni.createInnerAudioContext()
console.log(recordingUrl)
this.qualityAudio.src = recordingUrl
this.qualityAudio.onPause(() => {
......@@ -197,6 +202,7 @@ export default {
this.status = 'ending'
this.currentTime = this.formatTime(this.qualityAudio.duration)
this.dialogueRef.isPlayIng = false
this.isOperate = true
})
},
onTimeUpdate () {
......@@ -257,14 +263,61 @@ export default {
item.conversationDetailDTOList[item.conversationDetailDTOList.length - 1].scriptRec = scriptRec
}
} else item.conversationDetailDTOList = [{
scriptRec: scriptRec || '暂无建议'
scriptRec: scriptRec || '暂无话术推荐'
}]
})
this.qualityData = res
},
desensitizePhoneNumber(phoneNumber){
return phoneNumber.replace(phoneNumber.slice(3,7),'****')
}
desensitizePhoneNumber (phoneNumber) {
return phoneNumber.replace(phoneNumber.slice(3, 7), '****')
},
async share () {
try {
const {
merchantName,
receptionStartTime,
receptionEndTime,
duration,
merchantId,
batchId,
receptionStatus
} = this.pageData,
receptionStatusText = {
1: '成交',
2: '战败',
3: '未知'
}[receptionStatus]
// 获取短链地址
const url = await uni.$api.receptionApi.getShortUrl({
merchantNo: merchantId,
batchId,
receptionStartTime: receptionStartTime
})
if (url) {
// 门店 - 接待开始时间 - 接待时长 - 员工标记的接待结果 - 接待录音mp3地址(更换成短链)
let text = [
merchantName,
dayjs(receptionStartTime).format("YYYY年MM月DD日 HH:mm:ss"),
dayjs(receptionEndTime).format("YYYY年MM月DD日 HH:mm:ss"),
duration,
receptionStatusText,
url
].join(' - ')
uni.setClipboardData({
data: text,
})
} else uni.showToast({
title: "获取短链失败",
icon: "none",
})
} catch (error) {
uni.showToast({
title: error,
icon: "none",
})
}
},
}
}
</script>
......@@ -463,7 +516,7 @@ export default {
background: #ffffff;
box-sizing: border-box;
overflow-y: auto;
padding: 0 40rpx;
padding: 0 toRpx(40);
}
}
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!