Commit dcec7aa7 by 李伟康

更新环境配置和请求处理逻辑

1. 修改默认环境index从2改为3,指向生产环境
2. 更新gscDomain的uat和prod配置
3. 优化http.js请求处理逻辑,移除无用console.log
4. 修复dialogue.js组件中的异步处理问题
1 parent f76fc91c
import { import {
preReleaseAppId preReleaseAppId
} from '~/config' } from '~/config'
const target = ['ip', 'dev', 'uat', 'prod', 'preRelease'] const target = ['ip', 'dev', 'uat', 'prod', 'preRelease']
let index = 2 let index = 3
/** /**
* *
0本地 0本地
1开发 1开发
2测试 2测试
3生产 3生产
4预发布 4预发布
*/ */
const accountInfo = wx.getAccountInfoSync() const accountInfo = wx.getAccountInfoSync()
const systemInfo = wx.getSystemInfoSync() const systemInfo = wx.getSystemInfoSync()
// console.log(systemInfo); // console.log(systemInfo);
// console.log(accountInfo.miniProgram.envVersion) // console.log(accountInfo.miniProgram.envVersion)
//手动控制体验版环境的请求 true就依据下面index false就默认为2 //手动控制体验版环境的请求 true就依据下面index false就默认为2
const manual = true const manual = true
const release = false const release = false
// 判断小程序环境 // 判断小程序环境
// develop:开发版(正常开发工具,测试时) // develop:开发版(正常开发工具,测试时)
// trial:体验版 // trial:体验版
// release:正式版 // release:正式版
// console.log( systemInfo.platform); // console.log( systemInfo.platform);
// console.log(accountInfo.miniProgram.envVersion); // console.log(accountInfo.miniProgram.envVersion);
// 对比一下appkey // 对比一下appkey
// console.log(); // console.log();
if (systemInfo.platform != 'devtools') { if (systemInfo.platform != 'devtools') {
// 判断预发布的appid 是强制锁定为4(预发布的地址) // 判断预发布的appid 是强制锁定为4(预发布的地址)
if (accountInfo.miniProgram.appId == preReleaseAppId) { if (accountInfo.miniProgram.appId == preReleaseAppId) {
index = 4 index = 4
} else { } else {
switch (accountInfo.miniProgram.envVersion) { switch (accountInfo.miniProgram.envVersion) {
case 'develop': case 'develop':
// this.globalData.url = 'http://192.168.0.252:3000/api'; // // this.globalData.url = 'http://192.168.0.252:3000/api'; //
break break
case 'trial': case 'trial':
index = manual ? index : 2 index = manual ? index : 2
break break
case 'release': case 'release':
index = release ? index : 3 index = release ? index : 3
break break
default: default:
index = 3 index = 3
break break
} }
} }
} }
const secretKey = { const secretKey = {
ip: {}, ip: {},
dev: { dev: {
sso: { sso: {
appKey: '8b31ae1009ccb0f96130ca4bd90e3d89', appKey: '8b31ae1009ccb0f96130ca4bd90e3d89',
secret: '02d60f17ae714872845d2aa9d3b087e109ccb0f96130ca4b' secret: '02d60f17ae714872845d2aa9d3b087e109ccb0f96130ca4b'
} }
}, },
uat: { uat: {
sso: { sso: {
appKey: '8b31ae1009ccb0f96130ca4bd90e3d89', appKey: '8b31ae1009ccb0f96130ca4bd90e3d89',
secret: '02d60f17ae714872845d2aa9d3b087e109ccb0f96130ca4b' secret: '02d60f17ae714872845d2aa9d3b087e109ccb0f96130ca4b'
} }
}, },
prod: { prod: {
sso: { sso: {
appKey: '8b31ae1009ccb0f96130ca4bd90e3d89', appKey: '8b31ae1009ccb0f96130ca4bd90e3d89',
secret: '02d60f17ae714872845d2aa9d3b087e109ccb0f96130ca4b' secret: '02d60f17ae714872845d2aa9d3b087e109ccb0f96130ca4b'
} }
}, },
preRelease: { preRelease: {
sso: { sso: {
appKey: '8b31ae1009ccb0f96130ca4bd90e3d89', appKey: '8b31ae1009ccb0f96130ca4bd90e3d89',
secret: '02d60f17ae714872845d2aa9d3b087e109ccb0f96130ca4b' secret: '02d60f17ae714872845d2aa9d3b087e109ccb0f96130ca4b'
} }
} }
} [target[index]] } [target[index]]
const domain = { const domain = {
// ip: 'http://192.168.2.94:8558', // ip: 'http://192.168.2.94:8558',
// ip: 'http://192.168.2.3:8315', // ip: 'http://192.168.2.3:8315',
ip: 'http://192.168.1.170:8315', ip: 'http://192.168.1.170:8315',
/**登录: 192.168.2.3:8315 /**登录: 192.168.2.3:8315
商城: 192.168.2.3:8558 */ 商城: 192.168.2.3:8558 */
dev: 'https://scrm.dev.glsx.com.cn', dev: 'https://scrm.dev.glsx.com.cn',
uat: 'https://scrm.test.glsx.com.cn', uat: 'https://scrm.test.glsx.com.cn',
preRelease: 'https://scrm.beta.glsx.com.cn', preRelease: 'https://scrm.beta.glsx.com.cn',
prod: 'https://scrm.glsx.com.cn' prod: 'https://scrm.glsx.com.cn'
} [target[index]] } [target[index]]
const djDomain = { const djDomain = {
ip: 'https://dj.dev.glsx.com.cn', ip: 'https://dj.dev.glsx.com.cn',
dev: 'https://dj.dev.glsx.com.cn', dev: 'https://dj.dev.glsx.com.cn',
preRelease: 'https://dj.beta.glsx.com.cn', preRelease: 'https://dj.beta.glsx.com.cn',
uat: 'https://dj.test.glsx.com.cn', uat: 'https://dj.test.glsx.com.cn',
prod: 'https://dj.glsx.com.cn', prod: 'https://dj.glsx.com.cn',
} [target[index]] } [target[index]]
const djSecretKey = { const djSecretKey = {
ip: { ip: {
appKey: '48e5e13229b82c1b4e6e8c96151f0637', appKey: '48e5e13229b82c1b4e6e8c96151f0637',
secret: 'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b' secret: 'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b'
}, },
dev: { dev: {
appKey: '48e5e13229b82c1b4e6e8c96151f0637', appKey: '48e5e13229b82c1b4e6e8c96151f0637',
secret: 'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b' secret: 'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b'
}, },
uat: { uat: {
appKey: '48e5e13229b82c1b4e6e8c96151f0637', appKey: '48e5e13229b82c1b4e6e8c96151f0637',
secret: 'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b' secret: 'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b'
}, },
preRelease: { preRelease: {
appKey: '48e5e13229b82c1b4e6e8c96151f0637', appKey: '48e5e13229b82c1b4e6e8c96151f0637',
secret: 'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b' secret: 'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b'
}, },
prod: { prod: {
appKey: 'd7ffc3346fc9a45bccaaa35300d59022', appKey: 'd7ffc3346fc9a45bccaaa35300d59022',
secret: '4bc07f8868374c49a4661d603377e3106fc9a45bccaaa353' secret: '4bc07f8868374c49a4661d603377e3106fc9a45bccaaa353'
}, },
pet: { pet: {
appKey: 'd7ffc3346fc9a45bccaaa35300d59022', appKey: 'd7ffc3346fc9a45bccaaa35300d59022',
secret: '4bc07f8868374c49a4661d603377e3106fc9a45bccaaa353' secret: '4bc07f8868374c49a4661d603377e3106fc9a45bccaaa353'
} }
} [target[index]] } [target[index]]
const gscDomain = { const gscDomain = {
ip: 'http://192.168.3.145:9898', ip: 'http://192.168.3.145:9898',
dev: 'https://gsc-agent.dev.glsx.com.cn', dev: 'https://gsc-agent.dev.glsx.com.cn',
uat: 'https://gsc-agent.dev.glsx.com.cn', uat: 'https://gsc-agent.test.glsx.com.cn',
preRelease: 'https://gsc-agent.beta.glsx.com.cn', preRelease: 'https://gsc-agent.beta.glsx.com.cn',
prod: 'https://gsc-agent.glsx.com.cn' prod: 'https://gsc-agent.gldijia.com.cn'
} [target[index]] } [target[index]]
const pathEnum = { const pathEnum = {
sso: '/rop-scrm-sso/', sso: '/rop-scrm-sso/',
shopmall: '/rop-scrm-shopmall/', shopmall: '/rop-scrm-shopmall/',
coupon: '/rop-scrm-coupon/', coupon: '/rop-scrm-coupon/',
carlife: '/rop-scrm-carlife/', carlife: '/rop-scrm-carlife/',
live: '/rop-scrm-live/', live: '/rop-scrm-live/',
equity: '/rop-scrm-equity/', equity: '/rop-scrm-equity/',
entmicro: '/rop-scrm-entmicro/', entmicro: '/rop-scrm-entmicro/',
wechat: '/rop-scrm-wechat/', wechat: '/rop-scrm-wechat/',
boutiquecoupon: '/rop-scrm-boutiquecoupon/', boutiquecoupon: '/rop-scrm-boutiquecoupon/',
material: '/rop-scrm-marketing/', //素材 material: '/rop-scrm-marketing/', //素材
sop: '/rop-scrm-sop/', sop: '/rop-scrm-sop/',
customercollect: '/rop-scrm-bigdatautil/', customercollect: '/rop-scrm-bigdatautil/',
drac: '/rop-scrm-entmicro/', drac: '/rop-scrm-entmicro/',
busassistant: '/rop-scrm-busassistant/', busassistant: '/rop-scrm-busassistant/',
pad: '/rop-dj-pad/', pad: '/rop-dj-pad/',
} }
const defaultMerchantId = { const defaultMerchantId = {
ip: '44211227', ip: '44211227',
dev: '44211227', dev: '44211227',
uat: '44210895', uat: '44210895',
prod: '44208317', prod: '44208317',
preRelease: '44211283' preRelease: '44211283'
} [target[index]] } [target[index]]
const CONFIG_ENV_MAP = { const CONFIG_ENV_MAP = {
'1': 'develope', '1': 'develope',
'2': 'test', '2': 'test',
'3': 'production', '3': 'production',
'4': 'beta' '4': 'beta'
} }
module.exports = { module.exports = {
index, index,
domain, domain,
pathEnum, pathEnum,
secretKey, secretKey,
defaultMerchantId, defaultMerchantId,
env: CONFIG_ENV_MAP[index], env: CONFIG_ENV_MAP[index],
gscDomain, gscDomain,
djSecretKey, djSecretKey,
djDomain djDomain
} }
\ No newline at end of file \ No newline at end of file
import sign from './sign.js' import sign from './sign.js'
import { import {
defaultMerchantId, defaultMerchantId,
secretKey, secretKey,
pathEnum, pathEnum,
domain, domain,
gscDomain, gscDomain,
djDomain, djDomain,
djSecretKey djSecretKey
} from '../env/index' } from '../env/index'
const HOST = { const HOST = {
scrm: domain, scrm: domain,
dj: djDomain dj: djDomain
} }
/**接口 */ /**接口 */
class Request { class Request {
get(params, returnAll = false, hostType = 'scrm') { get(params, returnAll = false, hostType = 'scrm') {
return this.request('GET', params, returnAll, hostType) return this.request('GET', params, returnAll, hostType)
} }
post(params, returnAll = false, hostType = 'scrm') { post(params, returnAll = false, hostType = 'scrm') {
return this.request('POST', params, returnAll, hostType) return this.request('POST', params, returnAll, hostType)
} }
fetch(method, data, returnAll = true, hostType = 'scrm') { fetch(method, data, returnAll = true, hostType = 'scrm') {
return this.post({ return this.post({
method, method,
...data, ...data,
}, },
returnAll, returnAll,
hostType hostType
); );
} }
wx_request({ wx_request({
url, url,
method = 'GET', method = 'GET',
data = {}, data = {},
header = {}, header = {},
dataType = 'json', dataType = 'json',
responseType = "text" responseType = "text"
}) { }) {
return new Promise((resolve) => { return new Promise((resolve) => {
wx.request({ wx.request({
url, url,
data, data,
method, method,
header, header,
dataType, dataType,
responseType, responseType,
success(response) { success(response) {
resolve(response.data) resolve(response.data)
} }
}) })
}) })
} }
reportTrack(params) { reportTrack(params) {
return this.request('POST', params, true) return this.request('POST', params, true)
} }
request(RequestMethods, params, returnAll , hostType = 'scrm') { request(RequestMethods, params, returnAll , hostType = 'scrm') {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
wx.showNavigationBarLoading() wx.showNavigationBarLoading()
let header = RequestMethods === 'POST' ? { let header = RequestMethods === 'POST' ? {
'content-type': 'application/x-www-form-urlencoded' 'content-type': 'application/x-www-form-urlencoded'
} : { } : {
'Cache-Control': 'no-cache' 'Cache-Control': 'no-cache'
} }
let { let {
merchantId merchantId
} = wx.p.storage.get('merchant_info') } = wx.p.storage.get('merchant_info')
header.merchantId = wx.$merchant_id || merchantId || defaultMerchantId header.merchantId = wx.$merchant_id || merchantId || defaultMerchantId
let projectName = params.projectName let projectName = params.projectName
if (!projectName) projectName = this.getRopProject(params.method) if (!projectName) projectName = this.getRopProject(params.method)
const path = pathEnum[projectName] const path = pathEnum[projectName]
params = this.getData(params, hostType) params = this.getData(params, hostType)
wx.request({ wx.request({
url: `${HOST[hostType]}${path}router?method=${params.method}`, url: `${HOST[hostType]}${path}router?method=${params.method}`,
data: params, data: params,
method: RequestMethods, method: RequestMethods,
header, header,
dataType: 'json', dataType: 'json',
responseType: 'text', responseType: 'text',
success(response) { success(response) {
/**业务代码 */ /**业务代码 */
let { let {
data: { data: {
code, code,
message message
}, },
data data
} = response } = response
if (returnAll) { if (returnAll) {
resolve(data) resolve(data)
return return
} }
if (code == 20 || code == 21) { if (code == 20 || code == 21) {
wx.hideLoading() wx.hideLoading()
const thisPage = wx.p.router.getPageInstance(), const thisPage = wx.p.router.getPageInstance(),
options = Object.keys(thisPage.options) options = Object.keys(thisPage.options)
let currentRoute = thisPage.route, let currentRoute = thisPage.route,
query = [] query = []
if (options.length) { if (options.length) {
options.map(key => { options.map(key => {
query.push(`${key}=${thisPage.options[key]}`) query.push(`${key}=${thisPage.options[key]}`)
}) })
} }
if (query.length) currentRoute += `?${query.join('&')}` if (query.length) currentRoute += `?${query.join('&')}`
return wx.p.router.redirectTo('/pages/loading/loading', { return wx.p.router.redirectTo('/pages/loading/loading', {
url: `/${currentRoute}` url: `/${currentRoute}`
}) })
} else { } else {
if (code == '0') { if (code == '0') {
resolve(data.data) resolve(data.data)
} else { } else {
wx.showToast({ wx.showToast({
title: message || '系统异常', title: message || '系统异常',
icon: 'none' icon: 'none'
}) })
} }
} }
}, },
fail(error) { fail(error) {
wx.hideLoading() wx.hideLoading()
console.error(`接口异常:`, error) console.error(`接口异常:`, error)
wx.showToast({ wx.showToast({
title: typeof error == 'string' ? error : JSON.stringify(error) || '系统异常', title: typeof error == 'string' ? error : JSON.stringify(error) || '系统异常',
icon: 'error' icon: 'error'
}) })
reject(error) reject(error)
}, },
complete() { complete() {
wx.stopPullDownRefresh() wx.stopPullDownRefresh()
wx.hideNavigationBarLoading() wx.hideNavigationBarLoading()
} }
}) })
}) })
} }
getData(params,hostType) { getData(params,hostType) {
let projectName = params.projectName let projectName = params.projectName
if (!projectName) projectName = this.getRopProject(params.method) if (!projectName) projectName = this.getRopProject(params.method)
else delete params.projectName else delete params.projectName
let appKey = '48e5e13229b82c1b4e6e8c96151f0637' let appKey = '48e5e13229b82c1b4e6e8c96151f0637'
let secret = 'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b' let secret = 'c24619ed7fef02a0ae16328146bca5f97cc6493957a2137b'
if (secretKey[projectName]) { if (secretKey[projectName]) {
appKey = secretKey[projectName].appKey appKey = secretKey[projectName].appKey
secret = secretKey[projectName].secret secret = secretKey[projectName].secret
} }
if(hostType == 'dj'){ if(hostType == 'dj'){
appKey = djSecretKey.appKey appKey = djSecretKey.appKey
secret = djSecretKey.secret secret = djSecretKey.secret
} }
let { let {
sessionId sessionId
} = wx.p.storage.get() } = wx.p.storage.get()
let noSignAttr = [] let noSignAttr = []
if (!params.sessionId && sessionId) params.sessionId = sessionId if (!params.sessionId && sessionId) params.sessionId = sessionId
if (params.delSessionId) { if (params.delSessionId) {
delete params.sessionId delete params.sessionId
delete params.delSessionId delete params.delSessionId
} }
if (params.noSignAttr) { if (params.noSignAttr) {
noSignAttr = params.noSignAttr noSignAttr = params.noSignAttr
delete params.noSignAttr delete params.noSignAttr
} }
params.v = '1.0.0' params.v = '1.0.0'
params.format = 'json' params.format = 'json'
params.locale = 'zh_CN' params.locale = 'zh_CN'
params.source = 'dj-wechat' params.source = 'dj-wechat'
params.appKey = appKey params.appKey = appKey
return sign(params, secret, noSignAttr) return sign(params, secret, noSignAttr)
} }
getRopProject(method) { getRopProject(method) {
const projectName = method.split('.')[2] const projectName = method.split('.')[2]
return projectName return projectName
} }
gscGet(url, data = {}, returnAll = false) { gscGet(url, data = {}, returnAll = false) {
return this.gscRequest(url, params, 'GET', returnAll) return this.gscRequest(url, params, 'GET', returnAll)
} }
gscPost(url, data = {}, returnAll = false) { gscPost(url, data = {}, returnAll = false) {
return this.gscRequest(url, data, 'POST', returnAll) return this.gscRequest(url, data, 'POST', returnAll)
} }
gscRequest(url, data = {}, method = 'GET', returnAll) { gscRequest(url, data = {}, method = 'GET', returnAll) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
wx.showNavigationBarLoading() wx.showNavigationBarLoading()
wx.request({ wx.request({
url: `${gscDomain}/gsc-agent-manage-biz/${url}`, url: `${gscDomain}/gsc-agent-manage-biz/${url}`,
data, data,
method, method,
success(response) { success(response) {
let { let {
data data
} = response } = response
if (returnAll) { if (returnAll) {
resolve(data) resolve(data)
return return
} }
resolve(data.data) resolve(data.data)
}, },
fail(error) { fail(error) {
wx.hideLoading() wx.hideLoading()
reject(error) reject(error)
}, },
complete() { complete() {
console.log(`${gscDomain}/gsc-agent-manage-biz/${url}`) wx.stopPullDownRefresh()
wx.stopPullDownRefresh() wx.hideNavigationBarLoading()
wx.hideNavigationBarLoading() }
} })
}) })
}) }
} }
}
export default new Request() export default new Request()
\ No newline at end of file \ No newline at end of file
// packageEquity/pages/receptionDetail/components/dialogue/dialogue.js // packageEquity/pages/receptionDetail/components/dialogue/dialogue.js
let thisPage = null let thisPage = null
Component({ Component({
/** /**
* 组件的属性列表 * 组件的属性列表
*/ */
properties: { properties: {
recordData: Object, recordData: Object,
batchId: { batchId: {
type: Number, type: Number,
observer: function (n) { observer: function (n) {
const data = { if (this.IntersectionObserver) {
batchId: n, this.IntersectionObserver.disconnect()
}; this.IntersectionObserver = null
this.findConversationDetailByBatchId(data) }
}
},
totalDuration: { this.setData({
type: Number, flag: false,
value: 0 progress: 0,
}, dialogueList: []
qualityData: { })
type: Array, const data = {
observer: function (n) { batchId: n,
if (n.length) this.findCbByBatchId(n) };
} this.findConversationDetailByBatchId(data)
} }
}, },
lifetimes: { totalDuration: {
ready() {}, type: Number,
detached() { value: 0
this.IntersectionObserver?.disconnect() },
} qualityData: {
type: Array,
}, observer: function (n) {
/** if (n.length) this.findCbByBatchId(n)
* 组件的初始数据 }
*/ }
data: { },
progress: 0, lifetimes: {
dialogueList: [], ready() {},
}, detached() {
this.IntersectionObserver?.disconnect()
/** }
* 组件的方法列表
*/ },
methods: { /**
findCbByBatchId(data) { * 组件的初始数据
let { */
recordingDuration:totalDuration data: {
} = this.data.recordData, progress: 0,
margin = 20 dialogueList: [],
wx.p.wxApi.getViewInfo('.axis-bar', ({ },
height: containerHeight,
top: barTop /**
}) => { * 组件的方法列表
if (containerHeight == 0) { */
return setTimeout(() => { methods: {
this.findCbByBatchId() findCbByBatchId(data) {
}, 100) let {
} recordingDuration: totalDuration
this.barTop = barTop } = this.data.recordData,
this.containerHeight = containerHeight margin = 20
let axisList = [] wx.p.wxApi.getViewInfo('.axis-bar', ({
data?.sort((a, b) => a.offset - b.offset).forEach(e => { height: containerHeight,
const { top: barTop
offset: mergedOffset, }) => {
} = e if (containerHeight == 0) {
e.top = mergedOffset / totalDuration * containerHeight return setTimeout(() => {
e.docTop = mergedOffset / totalDuration * containerHeight this.findCbByBatchId()
e.text_id = `text_${mergedOffset}` }, 100)
e.mergedOffset = mergedOffset }
if (mergedOffset != null) axisList.push(e) this.barTop = barTop
}) this.containerHeight = containerHeight
axisList.map((e, index) => { let axisList = []
// 检查并调整 top 值,避免重叠 data?.sort((a, b) => a.offset - b.offset).forEach(e => {
for (let i = 0; i < index; i++) { const {
if (e.top < axisList[i].top + margin && offset: mergedOffset,
e.top + margin > axisList[i].top) { } = e
// 如果重叠,将当前元素的 top 设置为前一个元素的底部加上 margin e.top = mergedOffset / totalDuration * containerHeight
e.top = axisList[i].top + margin; e.docTop = mergedOffset / totalDuration * containerHeight
} e.text_id = `text_${mergedOffset}`
} e.mergedOffset = mergedOffset
}) if (mergedOffset != null) axisList.push(e)
this.setData({ })
axisList axisList.map((e, index) => {
}) // 检查并调整 top 值,避免重叠
}, this) for (let i = 0; i < index; i++) {
}, if (e.top < axisList[i].top + margin &&
getAudioObject() { e.top + margin > axisList[i].top) {
thisPage = wx.p.router.getPageInstance() // 如果重叠,将当前元素的 top 设置为前一个元素的底部加上 margin
if (thisPage.qualityAudio) this.innerAudioContext = thisPage.qualityAudio e.top = axisList[i].top + margin;
else setTimeout(() => { }
this.getAudioObject() }
}, 100) })
}, this.setData({
onTimeUpdate() { axisList
const { })
dialogueList }, this)
} = this.data, { },
paused getAudioObject() {
} = this.innerAudioContext, { thisPage = wx.p.router.getPageInstance()
mergedOffset if (thisPage.qualityAudio) this.innerAudioContext = thisPage.qualityAudio
} = this.setProgress(), else setTimeout(() => {
item = dialogueList.find(e => e.mergedOffset == mergedOffset) this.getAudioObject()
if (!paused) this.setData({ }, 100)
isPlayIng: true },
}) onTimeUpdate() {
if (this.data.isScrollling) return const {
if (item && item.id) this.setTopId(item, true) dialogueList
}, } = this.data, {
paused
setTopId(item, scroll = false) { } = this.innerAudioContext, {
const { mergedOffset
dialogueList } = this.setProgress(),
} = this.data item = dialogueList.find(e => e.mergedOffset == mergedOffset)
let centerIndex = dialogueList.findIndex(e => e.text_id == item.text_id) if (!paused) this.setData({
centerIndex -= 3 isPlayIng: true
if (centerIndex < 0) centerIndex = 0 })
wx.nextTick(() => { if (this.data.isScrollling) return
this.setData({ if (item && item.id) this.setTopId(item, true)
activeId: item.text_id, },
})
}) setTopId(item, scroll = false) {
if (scroll) this.setData({ const {
toId: dialogueList[centerIndex].text_id dialogueList
}) } = this.data
}, let centerIndex = dialogueList.findIndex(e => e.text_id == item.text_id)
setProgress() { centerIndex -= 3
const { if (centerIndex < 0) centerIndex = 0
duration, wx.nextTick(() => {
currentTime this.setData({
} = this.innerAudioContext, activeId: item.text_id,
mergedOffset = Math.ceil(currentTime) })
this.setData({ })
progress: mergedOffset / duration * 100 if (scroll) this.setData({
}) toId: dialogueList[centerIndex].text_id
return { })
currentTime, },
mergedOffset setProgress() {
} const {
}, duration,
toDefenceDetail(e) { currentTime
let { } = this.innerAudioContext,
item, mergedOffset = Math.ceil(currentTime)
} = e.currentTarget.dataset this.setData({
this.setData({ progress: mergedOffset / duration * 100
toId: item.text_id })
}) return {
this.setData({ currentTime,
isScrollling: true mergedOffset
}) }
this.touchend() },
}, toDefenceDetail(e) {
seekPlay(e) { let {
let { item,
item, } = e.currentTarget.dataset
click, this.setData({
scroll toId: item.text_id
} = e.currentTarget.dataset, { })
activeId this.setData({
} = this.data isScrollling: true
if (!item) return })
thisPage.seek(item.mergedOffset) this.touchend()
this.setTopId(item, scroll) },
if (click && item.text_id == activeId) { seekPlay(e) {
const { let {
paused item,
} = this.innerAudioContext click,
if (paused) thisPage.play() scroll
else thisPage.onPause() } = e.currentTarget.dataset, {
thisPage.setData({ activeId
isOperate: !paused } = this.data
}) if (!item) return
} else { thisPage.seek(item.mergedOffset)
thisPage.play() this.setTopId(item, scroll)
thisPage.setData({ if (click && item.text_id == activeId) {
isOperate: false const {
}) paused
} } = this.innerAudioContext
}, if (paused) thisPage.play()
formatTime(num) { else thisPage.onPause()
let minutes = Math.floor(num / 60) || '0', thisPage.setData({
seconds = num % 60 || '0' isOperate: !paused
seconds = seconds < 10 ? `0${seconds}` : seconds })
return `${minutes}:${seconds}` } else {
}, thisPage.play()
relativeToViewport() { thisPage.setData({
if (this.IntersectionObserver) return isOperate: false
this.IntersectionObserver = this.createIntersectionObserver({ })
observeAll: true }
}) },
this.IntersectionObserver.relativeToViewport({ formatTime(num) {
bottom: 1000, let minutes = Math.floor(num / 60) || '0',
top: 0, seconds = num % 60 || '0'
}).observe('.item', res => { seconds = seconds < 10 ? `0${seconds}` : seconds
const { return `${minutes}:${seconds}`
index },
} = res.dataset, { relativeToViewport() {
dialogueList if (this.IntersectionObserver) return
} = this.data, { this.IntersectionObserver = this.createIntersectionObserver({
originalList observeAll: true
} = this, })
item = dialogueList[index] this.IntersectionObserver.relativeToViewport({
if (!item?.visible && res.intersectionRatio > 0) { bottom: 1000,
this.setData({ top: 0,
[`dialogueList[${index}]`]: originalList[index] }).observe('.item', res => {
}) const {
} index
}) } = res.dataset, {
}, dialogueList
/**对话列表 */ } = this.data, {
async findConversationDetailByBatchId(params) { originalList
const dialogueList = await wx.p.api.receptionApi.findConversationDetailByBatchId(params) } = this,
this.getAudioObject() item = dialogueList[index]
dialogueList?.map(e => { if (!item?.visible && res.intersectionRatio > 0) {
e.visible = true this.setData({
e.time = this.formatTime(e.mergedOffset) [`dialogueList[${index}]`]: originalList[index]
e.text_id = `text_${e.mergedOffset}` })
if (e?.recordingCheckResultList && e.recordingCheckResultList.length) { }
e.recordingCheckResultList.map(i => { })
i.showCheckDetail = false },
let [scriptRec] = JSON.parse(i.scriptRec) /**对话列表 */
if (scriptRec) i.scriptRec = scriptRec.replace(/\n/g, '<br>') async findConversationDetailByBatchId(params) {
else i.scriptRec = '' const dialogueList = await wx.p.api.receptionApi.findConversationDetailByBatchId(params)
}) this.getAudioObject()
} dialogueList?.map(e => {
}) e.visible = true
this.setData({ e.time = this.formatTime(e.mergedOffset)
flag: true, e.text_id = `text_${e.mergedOffset}`
}) if (e?.recordingCheckResultList && e.recordingCheckResultList.length) {
this.originalList = dialogueList e.recordingCheckResultList.map(i => {
this.setDialogueData(dialogueList) i.showCheckDetail = false
}, let [scriptRec] = JSON.parse(i.scriptRec)
setDialogueData(dialogueList) { if (scriptRec) i.scriptRec = scriptRec.replace(/\n/g, '<br>')
wx.p.wxApi.showLoading('加载中...') else i.scriptRec = ''
const batchSize = 100 })
let batch = [] }
// 遍历对话列表,累积数据 })
for (let i = 0; i < dialogueList.length; i++) { this.setData({
batch.push({ flag: true,
visible: false, })
text_id: dialogueList[i].text_id, this.originalList = dialogueList
id: dialogueList[i].id, this.setDialogueData(dialogueList)
mergedOffset: dialogueList[i].mergedOffset },
}); setDialogueData(dialogueList) {
// 当累积的数据达到批量大小时,执行 setData 更新 wx.p.wxApi.showLoading('加载中...')
if ((i + 1) % batchSize === 0 || i === dialogueList.length - 1) { const batchSize = 100
this.setData({ let batch = []
dialogueList: [...this.data.dialogueList, ...batch] // 遍历对话列表,累积数据
}); for (let i = 0; i < dialogueList.length; i++) {
batch = []; // 清空累积的数据,准备下一批 batch.push({
} visible: false,
} text_id: dialogueList[i].text_id,
id: dialogueList[i].id,
// // 确保最后不足100条的数据也被更新 mergedOffset: dialogueList[i].mergedOffset
if (batch.length > 0) { });
this.setData({ // 当累积的数据达到批量大小时,执行 setData 更新
dialogueList: [...this.data.dialogueList, ...batch] if ((i + 1) % batchSize === 0 || i === dialogueList.length - 1) {
}) this.setData({
} dialogueList: [...this.data.dialogueList, ...batch]
// // 更新完成后清除加载提示 });
wx.hideLoading(); batch = []; // 清空累积的数据,准备下一批
this.relativeToViewport(); }
}, }
/** 查询质检侧边栏 (质检使用id匹配,攻防用偏移量匹配) */
switchDetail(e) { // // 确保最后不足100条的数据也被更新
const { if (batch.length > 0) {
index, this.setData({
value, dialogueList: [...this.data.dialogueList, ...batch]
ind, })
key }
} = e.currentTarget.dataset // // 更新完成后清除加载提示
let target = `dialogueList[${index}]` wx.hideLoading();
if (ind > -1) target = `dialogueList[${index}].recordingCheckResultList[${ind}]` this.relativeToViewport();
this.setData({ },
[`${target}.${key}`]: !value /** 查询质检侧边栏 (质检使用id匹配,攻防用偏移量匹配) */
}) switchDetail(e) {
}, const {
touchstart() { index,
this.setData({ value,
isScrollling: true ind,
}) key
this.clearTimer() } = e.currentTarget.dataset
}, let target = `dialogueList[${index}]`
touchend() { if (ind > -1) target = `dialogueList[${index}].recordingCheckResultList[${ind}]`
this.touchTimer = setTimeout(() => { this.setData({
this.setData({ [`${target}.${key}`]: !value
isScrollling: false })
}) },
this.clearTimer() touchstart() {
}, 3e3) this.setData({
}, isScrollling: true
clearTimer() { })
if (this.touchTimer) { this.clearTimer()
clearTimeout(this.touchTimer) },
this.touchTimer = null touchend() {
} this.touchTimer = setTimeout(() => {
}, this.setData({
onPause() { isScrollling: false
this.setData({ })
isPlayIng: false this.clearTimer()
}) }, 3e3)
}, },
barSeek(e) { clearTimer() {
function findNearest(arr, target) { if (this.touchTimer) {
let closest = arr[0]; clearTimeout(this.touchTimer)
let minDiff = Math.abs(target - arr[0]); this.touchTimer = null
}
for (let i = 1; i < arr.length; i++) { },
const diff = Math.abs(target - arr[i]); onPause() {
if (diff < minDiff) { this.setData({
minDiff = diff; isPlayIng: false
closest = arr[i]; })
} },
} barSeek(e) {
function findNearest(arr, target) {
return closest; let closest = arr[0];
} let minDiff = Math.abs(target - arr[0]);
let [touches] = e.touches, {
barTop, for (let i = 1; i < arr.length; i++) {
containerHeight const diff = Math.abs(target - arr[i]);
} = this, { if (diff < minDiff) {
duration minDiff = diff;
} = this.innerAudioContext, { closest = arr[i];
dialogueList }
} = this.data }
if (touches) {
let { return closest;
clientY }
} = touches, let [touches] = e.touches, {
progress = (clientY - barTop) / containerHeight * 100, barTop,
offsetList = dialogueList.map(i => i.mergedOffset), containerHeight
mergedOffset = findNearest(offsetList, duration * progress / 100), } = this, {
item = dialogueList.find(i => i.mergedOffset == mergedOffset) duration
this.seekPlay({ } = this.innerAudioContext, {
currentTarget: { dialogueList
dataset: { } = this.data
item, if (touches) {
scroll: true let {
} clientY
} } = touches,
}, false) progress = (clientY - barTop) / containerHeight * 100,
} offsetList = dialogueList.map(i => i.mergedOffset),
}, mergedOffset = findNearest(offsetList, duration * progress / 100),
item = dialogueList.find(i => i.mergedOffset == mergedOffset)
} this.seekPlay({
currentTarget: {
dataset: {
item,
scroll: true
}
}
}, false)
}
},
}
}) })
\ No newline at end of file \ No newline at end of file
<view class="view"> <view class="view">
<block wx:if="{{flag}}"> <block wx:if="{{flag}}">
<block wx:if="{{dialogueList.length}}"> <block wx:if="{{dialogueList.length}}">
<scroll-view class="scroll-view" enhanced scroll-y scroll-into-view="{{toId}}" show-scrollbar="{{false}}" bindtouchstart="touchstart" bindtouchend="touchend" scroll-with-animation bindscroll="watchScrollTrack" data-event-code="dialogue"> <scroll-view class="scroll-view" enhanced scroll-y scroll-into-view="{{toId}}" show-scrollbar="{{false}}" bindtouchstart="touchstart" bindtouchend="touchend" scroll-with-animation bindscroll="watchScrollTrack" data-event-code="dialogue">
<block wx:for="{{dialogueList}}" wx:key="index"> <block wx:for="{{dialogueList}}" wx:key="index">
<view class="item {{activeId == item.text_id?'active':''}}" id="{{item.text_id}}" data-click bindtap="seekPlay" data-item="{{item}}" data-index="{{index}}"> <view class="item {{activeId == item.text_id?'active':''}}" id="{{item.text_id}}" data-click bindtap="seekPlay" data-item="{{item}}" data-index="{{index}}">
<block wx:if="{{item.visible}}"> <block wx:if="{{item.visible}}">
<view class="avatar-box"> <view class="avatar-box">
<view class="icon"> <view class="icon">
<image class="icon" src="/assets/images/role-{{item.role}}.png" /> <image class="icon" src="/assets/images/role-{{item.role}}.png" />
</view> </view>
<view class="time">{{item.time}}</view> <view class="time">{{item.time}}</view>
</view> </view>
<view class="text"> <view class="text">
{{item.content}} {{item.content}}
</view> </view>
</block> </block>
<block wx:else> <block wx:else>
<view class="loading"></view> <view class="loading"></view>
</block> </block>
</view> </view>
<!-- 意图匹配 --> <!-- 意图匹配 -->
<block wx:if="{{item.recordingCheckResultList}}"> <block wx:if="{{item.recordingCheckResultList}}">
<block wx:for="{{item.recordingCheckResultList}}" wx:key="ind" wx:for-item="i" wx:for-index="ind"> <block wx:for="{{item.recordingCheckResultList}}" wx:key="ind" wx:for-item="i" wx:for-index="ind">
<view class="detail-box {{i.showCheckDetail?'up':'down'}}"> <view class="detail-box {{i.showCheckDetail?'up':'down'}}">
<view class="text-box"> <view class="text-box">
<view class="btn" bindtap="switchDetail" data-index="{{index}}" data-ind="{{ind}}" data-key="showCheckDetail" data-value="{{i.showCheckDetail}}"> <view class="btn" bindtap="switchDetail" data-index="{{index}}" data-ind="{{ind}}" data-key="showCheckDetail" data-value="{{i.showCheckDetail}}">
意图匹配 意图匹配
<image class="arrow" src="/assets/images/date-arrow.png" mode=""/> <image class="arrow" src="/assets/images/date-arrow.png" mode=""/>
</view> </view>
{{i.tagGroupName}} {{i.tagGroupName}}
<view class="score">{{i.score}}分</view> <view class="score">{{i.score}}分</view>
</view> </view>
<view class="content-box"> <view class="content-box">
<block wx:if="{{!i.scriptRec}}"> <block wx:if="{{!i.scriptRec}}">
<view class="suggestions-box no"> <view class="suggestions-box no">
<image class="icon" src="/assets/images/no-suggestions.png" mode=""/> <image class="icon" src="/assets/images/no-suggestions.png" mode=""/>
暂无话术推荐 暂无话术推荐
</view> </view>
</block> </block>
<block wx:else> <block wx:else>
<view class="suggestions-box"> <view class="suggestions-box">
<view class="title"> <view class="title">
<image class="icon" src="/assets/images/suggestions-icon.png" /> <image class="icon" src="/assets/images/suggestions-icon.png" />
话术推荐 话术推荐
</view> </view>
<view class="text"> <view class="text">
<rich-text nodes="{{i.scriptRec}}"></rich-text> <rich-text nodes="{{i.scriptRec}}"></rich-text>
</view> </view>
</view> </view>
</block> </block>
</view> </view>
</view> </view>
</block> </block>
</block> </block>
</block> </block>
<view class="safeAreaInset">到底了!</view> <view class="safeAreaInset">到底了~</view>
</scroll-view> </scroll-view>
</block> </block>
<block wx:else> <block wx:else>
<view class="nothing flex"> <view class="nothing flex">
<image class="icon" src="/assets/images/quality-no-data.png" /> <image class="icon" src="/assets/images/quality-no-data.png" />
分析中,稍等... 分析中,稍等...
</view> </view>
</block> </block>
</block> </block>
<view class="axis-bar-area" bindtap="barSeek" hidden="{{!qualityData.length}}"> <view class="axis-bar-area" bindtap="barSeek" hidden="{{!qualityData.length}}">
<view class="axis-bar"> <view class="axis-bar">
<view class="progress-bar" style="height:{{progress + '%'}}"></view> <view class="progress-bar" style="height:{{progress + '%'}}"></view>
<block wx:for="{{axisList}}" wx:key="index"> <block wx:for="{{axisList}}" wx:key="index">
<view class="axis-item {{activeId == item.text_id?'axis-active':''}}" style="top:{{item.docTop + 'px'}};"> <view class="axis-item {{activeId == item.text_id?'axis-active':''}}" style="top:{{item.docTop + 'px'}};">
<view class="axis-dot {{!isPlayIng && !isScrollling?'':'radius'}}" catchtap="seekPlay" data-item="{{item}}" data-scroll></view> <view class="axis-dot {{!isPlayIng && !isScrollling?'':'radius'}}" catchtap="seekPlay" data-item="{{item}}" data-scroll></view>
</view> </view>
<block wx:if="{{!isPlayIng && !isScrollling}}"> <block wx:if="{{!isPlayIng && !isScrollling}}">
<view class="axis-text {{activeId == item.text_id?'axis-text-active':''}}" catchtap="seekPlay" data-item="{{item}}" data-scroll style="top:{{item.top + 'px'}};"> <view class="axis-text {{activeId == item.text_id?'axis-text-active':''}}" catchtap="seekPlay" data-item="{{item}}" data-scroll style="top:{{item.top + 'px'}};">
{{item.tagGroupName}}+{{item.score}} {{item.tagGroupName}}+{{item.score}}
</view> </view>
</block> </block>
</block> </block>
<view class="hide-bar"> <view class="hide-bar">
<block wx:for="{{axisList}}" wx:key="index"> <block wx:for="{{axisList}}" wx:key="index">
<block wx:if="{{item.inspectionConversationDetailId}}"> <block wx:if="{{item.inspectionConversationDetailId}}">
<view class="axis-line {{item.colorName}}" style="height:{{item.height + 20 + 'px'}};top:{{item.docTop - 10 + 'px'}};"></view> <view class="axis-line {{item.colorName}}" style="height:{{item.height + 20 + 'px'}};top:{{item.docTop - 10 + 'px'}};"></view>
</block> </block>
</block> </block>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
\ No newline at end of file \ No newline at end of file
// packageEquity/pages/newReceptionRecords/components/quality/quality.js // packageEquity/pages/newReceptionRecords/components/quality/quality.js
let thisPage = null let thisPage = null
Component({ Component({
/** /**
* 组件的属性列表 * 组件的属性列表
*/ */
properties: { properties: {
qualityData: Array qualityData: Array
}, },
lifetimes: { lifetimes: {
ready() { ready() {
this.getAudioObject() this.getAudioObject()
} }
}, },
/** /**
* 组件的初始数据 * 组件的初始数据
*/ */
data: { data: {
activeIndex: 0, activeIndex: 0,
activeId: '' activeId: '',
}, classifyId: ''
},
/**
* 组件的方法列表 /**
*/ * 组件的方法列表
methods: { */
getAudioObject() { methods: {
thisPage = wx.p.router.getPageInstance() reset() {
if (thisPage.qualityAudio) this.innerAudioContext = thisPage.qualityAudio this.setData({
else setTimeout(() => { activeIndex: 0,
this.getAudioObject() activeId: '',
}, 100) classifyId: ''
}, })
changeClassifyType(e) { this.getAudioObject()
let { },
index getAudioObject() {
} = e.currentTarget.dataset thisPage = wx.p.router.getPageInstance()
this.setData({ if (thisPage.qualityAudio) this.innerAudioContext = thisPage.qualityAudio
activeIndex: index else setTimeout(() => {
}) this.getAudioObject()
}, }, 100)
onTimeUpdate() { },
const { changeClassifyType(e) {
mergedOffset let {
} = this.setProgress() index
this.setData({ } = e.currentTarget.dataset, {
activeId: `text_${mergedOffset}` activeIndex
}) } = this.data
}, if (activeIndex == index) return
setProgress() { this.setData({
const { activeIndex: index,
currentTime classifyId: `classify-${index}`
} = this.innerAudioContext, })
mergedOffset = Math.ceil(currentTime) },
return { onTimeUpdate() {
currentTime, const {
mergedOffset mergedOffset
} } = this.setProgress()
}, this.setData({
seekPlay(e) { activeId: `text_${mergedOffset}`
let { })
activeId },
} = this.data, { setProgress() {
item, const {
} = e.currentTarget.dataset currentTime
if (!item) return } = this.innerAudioContext,
thisPage.seek(item.mergedOffset) mergedOffset = Math.ceil(currentTime)
if (item.text_id == activeId) { return {
const { currentTime,
paused mergedOffset
} = this.innerAudioContext }
if (paused) thisPage.play() },
else thisPage.onPause() seekPlay(e) {
thisPage.setData({ let {
isOperate: !paused activeId
}) } = this.data, {
} else { item,
thisPage.play() } = e.currentTarget.dataset
thisPage.setData({ if (!item) return
isOperate: false thisPage.seek(item.mergedOffset)
}) if (item.text_id == activeId) {
} const {
} paused
} } = this.innerAudioContext
if (paused) thisPage.play()
else thisPage.onPause()
thisPage.setData({
isOperate: !paused
})
} else {
thisPage.play()
thisPage.setData({
isOperate: false
})
}
}
}
}) })
\ No newline at end of file \ No newline at end of file
.flex { .flex {
display: flex; display: flex;
align-items: center; align-items: center;
} }
.view { .view {
height: 100%; height: 100%;
width: 100%; width: 100%;
position: relative; position: relative;
.scroll-classify{
.classify-wrap { width: calc(100% - 56rpx);
margin: 0 28rpx; margin: 0 28rpx;
box-sizing: border-box; }
width: calc(100% - 56rpx); .classify-wrap {
height: 112rpx; width: 100%;
display: flex; box-sizing: border-box;
flex-wrap: nowrap; height: 112rpx;
overflow-x: auto; display: flex;
background: #f5f9ff; flex-wrap: nowrap;
border-radius: 16rpx 16rpx 0 0; background: #f5f9ff;
.classify-item { border-radius: 16rpx 16rpx 0 0;
min-width: 160rpx; .classify-item {
height: 100%; min-width: 160rpx;
padding: 0 24rpx; height: 100%;
flex-shrink: 0; padding: 0 24rpx;
justify-content: center; flex-shrink: 0;
flex-direction: column; justify-content: center;
line-height: 40rpx; flex-direction: column;
font-size: 28rpx; line-height: 40rpx;
transition: all 0.15s; font-size: 28rpx;
background: #f5f9ff; transition: all 0.15s;
background: #f5f9ff;
.title {
color: #757980; .title {
} color: #757980;
}
.score {
color: #347bff; .score {
font-weight: 600; color: #347bff;
} font-weight: 600;
} }
}
.active {
border-radius: 16rpx 16rpx 0 0; .active {
background: #ffffff; border-radius: 16rpx 16rpx 0 0;
background: #ffffff;
.title {
color: #292d33; .title {
font-weight: 600; color: #292d33;
} font-weight: 600;
} }
} }
}
.scroll-view {
height: calc(100% - 112rpx); .scroll-view {
} height: calc(100% - 112rpx);
}
.quality-block {
width: calc(100% - 56rpx); .quality-block {
margin: 0 28rpx; width: calc(100% - 56rpx);
margin: 0 28rpx;
.title {
height: 80rpx; .title {
background: linear-gradient(119.9deg, #e1f7fc 0%, #f3f7ff 27%, #f7f2ff 41%, #e8f1ff 66%, #f7f2ff 100%); height: 80rpx;
font-size: 28rpx; background: linear-gradient(119.9deg, #e1f7fc 0%, #f3f7ff 27%, #f7f2ff 41%, #e8f1ff 66%, #f7f2ff 100%);
font-weight: 600; font-size: 28rpx;
padding: 0 20rpx; font-weight: 600;
padding: 0 20rpx;
&::before {
content: ''; &::before {
width: 8rpx; content: '';
height: 8rpx; width: 8rpx;
background: #000000; height: 8rpx;
border-radius: 100%; background: #000000;
display: block; border-radius: 100%;
margin-right: 16rpx; display: block;
} margin-right: 16rpx;
}
.matched-btn {
margin-left: auto; .matched-btn {
height: 56rpx; margin-left: auto;
border-radius: 28rpx; height: 56rpx;
background: #ffffff; border-radius: 28rpx;
padding: 0 36rpx; background: #ffffff;
color: #eb4e4e; padding: 0 36rpx;
font-size: 24rpx; color: #eb4e4e;
font-weight: 600; font-size: 24rpx;
} font-weight: 600;
}
.hit {
color: #35c376; .hit {
} color: #35c376;
} }
}
.quality-item {
padding: 20rpx 24rpx; .quality-item {
background: #fff; padding: 20rpx 24rpx;
background: #fff;
.avatar-box {
position: relative; .avatar-box {
width: 68rpx; position: relative;
height: 96rpx; width: 68rpx;
flex-shrink: 0; height: 96rpx;
display: flex; flex-shrink: 0;
align-items: center; display: flex;
flex-direction: column; align-items: center;
flex-direction: column;
.icon {
width: 68rpx; .icon {
height: 68rpx; width: 68rpx;
border-radius: 100%; height: 68rpx;
overflow: hidden; border-radius: 100%;
flex-shrink: 0; overflow: hidden;
} flex-shrink: 0;
}
.time {
width: 70rpx; .time {
height: 28rpx; width: 70rpx;
background: #ffffff; height: 28rpx;
border: 2rpx solid #f0f6ff; background: #ffffff;
border-radius: 28rpx; border: 2rpx solid #f0f6ff;
font-size: 20rpx; border-radius: 28rpx;
color: #999ea8; font-size: 20rpx;
display: flex; color: #999ea8;
align-items: center; display: flex;
justify-content: center; align-items: center;
box-sizing: border-box; justify-content: center;
} box-sizing: border-box;
} }
}
.text {
width: 508rpx; .text {
min-height: 80rpx; width: 508rpx;
color: #292d33; min-height: 80rpx;
font-size: 26rpx; color: #292d33;
margin-left: 16rpx; font-size: 26rpx;
line-height: 44rpx; margin-left: 16rpx;
} line-height: 44rpx;
} }
}
.active {
background: #f0f6ff; .active {
background: #f0f6ff;
.text {
font-weight: 500; .text {
} font-weight: 500;
} }
}
.script-rec {
padding: 24rpx; .script-rec {
background-color: #f2f6ff; padding: 24rpx;
.suggestions-box { background-color: #f2f6ff;
background: #FFF; .suggestions-box {
border-radius: 16rpx; background: #FFF;
padding: 24rpx 28rpx; border-radius: 16rpx;
box-sizing: border-box; padding: 24rpx 28rpx;
border: 2rpx solid #e8f0ff; box-sizing: border-box;
.suggestions-title { border: 2rpx solid #e8f0ff;
display: flex; .suggestions-title {
align-items: center; display: flex;
font-weight: 500; align-items: center;
font-size: 28rpx; font-weight: 500;
color: #333333; font-size: 28rpx;
margin-bottom: 20rpx; color: #333333;
margin-bottom: 20rpx;
.icon {
width:32rpx; .icon {
height:32rpx; width:32rpx;
margin-right: 12rpx; height:32rpx;
} margin-right: 12rpx;
} }
}
.text {
color: #292d33; .text {
font-size: 26rpx; color: #292d33;
line-height: 44rpx; font-size: 26rpx;
} line-height: 44rpx;
}
.suggestions-text {
padding-bottom: 22rpx; .suggestions-text {
border-bottom: 2rpx solid #f0f6ff; padding-bottom: 22rpx;
margin-bottom: 24rpx; border-bottom: 2rpx solid #f0f6ff;
} margin-bottom: 24rpx;
} }
} }
}
.active {
background: #f0f6ff; .active {
background: #f0f6ff;
.text {
font-weight: 500; .text {
} font-weight: 500;
} }
} }
}
.nothing {
width: 100%; .nothing {
height: 100%; width: 100%;
flex-direction: column; height: 100%;
justify-content: center; flex-direction: column;
color: #999ea8; justify-content: center;
font-size: 24rpx; color: #999ea8;
background: #fff; font-size: 24rpx;
.icon { background: #fff;
width: 172rpx; .icon {
height: 172rpx; width: 172rpx;
} height: 172rpx;
} }
}
} }
\ No newline at end of file \ No newline at end of file
<view class="view"> <view class="view">
<block wx:if="{{qualityData.length}}"> <block wx:if="{{qualityData.length}}">
<view class="classify-wrap"> <scroll-view class="scroll-classify" scroll-x enable-flex scroll-into-view="{{classifyId}}" scroll-with-animation>
<block wx:for="{{qualityData}}" wx:key="index"> <view class="classify-wrap">
<view class="classify-item flex {{index == activeIndex?'active':''}}" bindtap="changeClassifyType" data-index="{{index}}"> <block wx:for="{{qualityData}}" wx:key="index">
<view class="title">{{item.tagGroupName}}</view> <view class="classify-item flex {{index == activeIndex?'active':''}}" bindtap="changeClassifyType" data-index="{{index}}" id="classify-{{index}}">
<view class="score">{{item.formatScore}}</view> <view class="title">{{item.tagGroupName}}</view>
</view> <view class="score">{{item.formatScore}}</view>
</block> </view>
</view> </block>
<scroll-view class="scroll-view" enhanced scroll-y scroll-with-animation scroll-into-view="{{activeId}}"> </view>
<block wx:if="{{qualityData[activeIndex]}}"> </scroll-view>
<view class="quality-block"> <scroll-view class="scroll-view" enhanced scroll-y scroll-with-animation scroll-into-view="{{activeId}}">
<view class="title flex"> <block wx:if="{{qualityData[activeIndex]}}">
{{qualityData[activeIndex].tagGroupName}} <view class="quality-block">
<view class="matched-btn flex {{qualityData[activeIndex].matchedClass}}">{{qualityData[activeIndex].matchedText}}</view> <view class="title flex">
</view> {{qualityData[activeIndex].tagGroupName}}
<block wx:for="{{qualityData[activeIndex].conversationDetailDTOList}}" wx:key="index"> <view class="matched-btn flex {{qualityData[activeIndex].matchedClass}}">{{qualityData[activeIndex].matchedText}}</view>
<block wx:if="{{item.text_id}}"> </view>
<view id="{{item.text_id}}" class="quality-item flex {{item.text_id == activeId?'active':''}}" bind:tap="seekPlay" data-item="{{item}}"> <block wx:for="{{qualityData[activeIndex].conversationDetailDTOList}}" wx:key="index">
<view class="avatar-box"> <block wx:if="{{item.text_id}}">
<view class="icon"> <view id="{{item.text_id}}" class="quality-item flex {{item.text_id == activeId?'active':''}}" bind:tap="seekPlay" data-item="{{item}}">
<image class="icon" src="/assets/images/role-{{item.role}}.png" /> <view class="avatar-box">
</view> <view class="icon">
<view class="time">{{item.time}}</view> <image class="icon" src="/assets/images/role-{{item.role}}.png" />
</view> </view>
<view class="text flex">{{item.content}}</view> <view class="time">{{item.time}}</view>
</view> </view>
</block> <view class="text flex">{{item.content}}</view>
<block wx:if="{{item.scriptRec}}"> </view>
<view class="script-rec"> </block>
<view class="suggestions-box"> <block wx:if="{{item.scriptRec}}">
<view class="suggestions-title"> <view class="script-rec">
<image class="icon" src="/assets/images/suggestions-icon.png" /> <view class="suggestions-box">
话术推荐 <view class="suggestions-title">
</view> <image class="icon" src="/assets/images/suggestions-icon.png" />
<view class="text"> 话术推荐
<rich-text nodes="{{item.scriptRec}}"></rich-text> </view>
</view> <view class="text">
</view> <rich-text nodes="{{item.scriptRec}}"></rich-text>
</view> </view>
</block> </view>
</block> </view>
</view> </block>
</block> </block>
</scroll-view> </view>
</block> </block>
<block wx:else> </scroll-view>
<view class="nothing flex"> </block>
<image class="icon" src="/assets/images/quality-no-data.png" /> <block wx:else>
分析中,稍等... <view class="nothing flex">
</view> <image class="icon" src="/assets/images/quality-no-data.png" />
</block> 分析中,稍等...
</view>
</block>
</view> </view>
\ No newline at end of file \ No newline at end of file
// packageReception/pages/detail/detail.js // packageReception/pages/detail/detail.js
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
typeLists: ['对话', '质检'], typeLists: ['对话', '质检'],
qualityAudio: '', activeIndex: 0,
activeIndex: 0, status: 'pause',
status: 'pause', currentTime: '00:00', //当前音频的播放位置
currentTime: '00:00', //当前音频的播放位置 isOperate: true,
isOperate: true, },
},
/**
/** * 生命周期函数--监听页面加载
* 生命周期函数--监听页面加载 */
*/ onLoad(options) {
onLoad(options) { this.getReceptionBatchIdList(options)
this.getReceptionBatchIdList(options) },
}, async getReceptionBatchIdList(params) {
async getReceptionBatchIdList(params) { const data = await wx.p.api.receptionApi.getReceptionBatchIdList(params)
const data = await wx.p.api.receptionApi.getReceptionBatchIdList(params) if (data && data.length) {
if (data && data.length) { this.setData({
this.setData({ customerList: data,
customerList: data, record: data[0]
record: data[0] }, () => {
}, () => { this.setAudio()
this.setAudio() })
}) this.getReceptionDetail()
this.getReceptionDetail() }
} wx.p.wxApi.getViewInfo('.reception-wrap', ({
wx.p.wxApi.getViewInfo('.reception-wrap', ({ height
height }) => {
}) => { let wrapHeight = `${height * 2}rpx`
let wrapHeight = `${height * 2}rpx` this.setData({
this.setData({ receptionWrapStyle: `height:calc(100% - ${wrapHeight} - constant(safe-area-inset-bottom));height:calc(100% - ${wrapHeight} - env(safe-area-inset-bottom))`
receptionWrapStyle: `height:calc(100% - ${wrapHeight} - constant(safe-area-inset-bottom));height:calc(100% - ${wrapHeight} - env(safe-area-inset-bottom))` })
}) })
}) },
}, changeDetail(e) {
async getReceptionDetail() { let {
try { item
const { } = e.currentTarget.dataset, {
record: { record
batchId } = this.data
} if (!item || item.batchId == record.batchId) return
} = this.data, wx.showLoading({
data = await wx.p.api.receptionApi.getReceptionDetail({ mask: true
batchId })
}) this.qualityAudio.destroy()
if (!data) throw '获取数据失败' this.qualityRef().reset()
data.map(item => { this.setData({
item.offset = Number(item.offset) record: item,
item.formatScore = `${item.score || item.score === 0 ? item.score : '-'}/${item.sumScore || item.sumScore === 0 ? item.sumScore : '-'}` qualityData: [],
let hitTextList = JSON.parse(item.hitText), status: 'pause',
matchedClass = 'no-hit', isOperate: true,
matchedText = '意图不匹配' currentTime: '00:00',
if (hitTextList && hitTextList.length) { }, () => {
item.hitTextList = hitTextList.map(e => e.replace(/\n/g, '<br>')) this.setAudio()
matchedClass = 'hit' })
matchedText = '意图匹配' this.getReceptionDetail()
} },
item.matchedClass = matchedClass async getReceptionDetail() {
item.matchedText = matchedText try {
let [scriptRec] = JSON.parse(item.scriptRec) wx.showLoading({
if (scriptRec) scriptRec = scriptRec.replace(/\n/g, '<br>') mask: true
if (item.conversationDetailDTOList && item.conversationDetailDTOList.length) { })
item.conversationDetailDTOList.map(e => { const {
e.time = this.formatTime(e.mergedOffset) record: {
e.text_id = `text_${e.mergedOffset}` batchId
if (e.mergedOffset == item.offset && !item.matched) { }
e.scriptRec = scriptRec } = this.data,
item.matched = true data = await wx.p.api.receptionApi.getReceptionDetail({
} batchId
}) })
if (item.conversationDetailDTOList.findIndex(e => e.scriptRec) == -1) { if (!data) throw '获取数据失败'
/**时间戳都对不上时 话术推荐加到最后 */ data.map(item => {
item.conversationDetailDTOList[item.conversationDetailDTOList.length - 1].scriptRec = scriptRec item.offset = Number(item.offset)
} item.formatScore = `${item.score || item.score === 0 ? item.score : '-'}/${item.sumScore || item.sumScore === 0 ? item.sumScore : '-'}`
} else item.conversationDetailDTOList = [{ let hitTextList = JSON.parse(item.hitText),
scriptRec: scriptRec || '暂无建议' matchedClass = 'no-hit',
}] matchedText = '意图不匹配'
}) if (hitTextList && hitTextList.length) {
this.setData({ item.hitTextList = hitTextList.map(e => e.replace(/\n/g, '<br>'))
qualityData: data matchedClass = 'hit'
}) matchedText = '意图匹配'
} catch (error) { }
console.log(error) item.matchedClass = matchedClass
if (error) wx.p.wxApi.showToast(error) item.matchedText = matchedText
} let [scriptRec] = JSON.parse(item.scriptRec)
}, if (scriptRec) scriptRec = scriptRec.replace(/\n/g, '<br>')
formatTime(seconds) { if (item.conversationDetailDTOList && item.conversationDetailDTOList.length) {
let minutes = Math.floor(seconds / 60); item.conversationDetailDTOList.map(e => {
let remainingSeconds = Math.floor(seconds % 60); // 直接取整 e.time = this.formatTime(e.mergedOffset)
e.text_id = `text_${e.mergedOffset}`
minutes = minutes.toString().padStart(2, '0'); if (e.mergedOffset == item.offset && !item.matched) {
remainingSeconds = remainingSeconds.toString().padStart(2, '0'); e.scriptRec = scriptRec
item.matched = true
return `${minutes}:${remainingSeconds}`; }
}, })
navbarReady(e) { if (item.conversationDetailDTOList.findIndex(e => e.scriptRec) == -1) {
let { /**时间戳都对不上时 话术推荐加到最后 */
height item.conversationDetailDTOList[item.conversationDetailDTOList.length - 1].scriptRec = scriptRec
} = e.detail }
this.setData({ } else item.conversationDetailDTOList = [{
layoutStyle: `padding-top:${height}px` scriptRec: scriptRec || '暂无建议'
}) }]
}, })
changeType(e) { this.setData({
let { qualityData: data
index })
} = e.currentTarget.dataset } catch (error) {
this.setData({ console.log(error)
activeIndex: index if (error) wx.p.wxApi.showToast(error)
}) }
}, },
onHandle(e) { formatTime(seconds) {
let { let minutes = Math.floor(seconds / 60);
isOperate let remainingSeconds = Math.floor(seconds % 60); // 直接取整
} = this.data;
if (isOperate) { minutes = minutes.toString().padStart(2, '0');
this.play() remainingSeconds = remainingSeconds.toString().padStart(2, '0');
} else {
this.onPause() return `${minutes}:${remainingSeconds}`;
} },
this.setData({ navbarReady(e) {
isOperate: !isOperate let {
}) height
}, } = e.detail
//音频暂停 this.setData({
onPause() { layoutStyle: `padding-top:${height}px`
this.dialogueRef().onPause() })
this.qualityAudio.pause() },
changeType(e) {
}, let {
//播放 index
play() { } = e.currentTarget.dataset
const { this.setData({
openId activeIndex: index
} = this.data.userInfo })
wx.p.api.receptionApi.addCustomerDynamicRecord({ },
customerOpenId: openId, onHandle(e) {
goodsId: 1, let {
goodsType: 1 isOperate
}) } = this.data;
if (!this.data.showPlayControl) { if (isOperate) {
return wx.showToast({ this.play()
title: '音频暂不能播放,稍等...', } else {
icon: 'none' this.onPause()
}) }
} this.setData({
const { isOperate: !isOperate
paused })
} = this.qualityAudio },
if (paused) this.qualityAudio.play() //音频暂停
}, onPause() {
//跳转到指定位置 this.dialogueRef().onPause()
seek(time) { this.qualityAudio.pause()
this.qualityAudio.seek(time)
}, },
setAudio() { //播放
const { play() {
record const {
} = this.data openId
this.qualityAudio = wx.createInnerAudioContext({ } = this.data.userInfo
useWebAudioImplement: true wx.p.api.receptionApi.addCustomerDynamicRecord({
}) customerOpenId: openId,
this.qualityAudio.src = record.recordingUrl goodsId: 1,
this.qualityAudio.onPause(() => { goodsType: 1
this.setData({ })
status: 'pause' if (!this.data.showPlayControl) {
}) return wx.showToast({
this.setKeepScreenOn() title: '音频暂不能播放,稍等...',
}) icon: 'none'
//监听音频的播放事件 })
this.qualityAudio.onPlay(() => { }
this.setData({ const {
status: 'start' paused
}) } = this.qualityAudio
this.setKeepScreenOn(true) if (paused) this.qualityAudio.play()
}) },
this.qualityAudio.onCanplay(() => { //跳转到指定位置
this.setData({ seek(time) {
showPlayControl: true this.qualityAudio.seek(time)
}) },
}) setAudio() {
this.qualityAudio.onTimeUpdate(this.onTimeUpdate) const {
this.qualityAudio.onEnded(() => { record
this.setData({ } = this.data
status: 'ending', this.qualityAudio = wx.createInnerAudioContext({
currentTime: this.formatTime(this.qualityAudio.duration), useWebAudioImplement: true
isOperate: true })
}) this.qualityAudio.src = record.recordingUrl
this.dialogueRef().setData({ this.qualityAudio.onPause(() => {
isPlayIng: false this.setData({
}) status: 'pause'
this.setKeepScreenOn() })
}) this.setKeepScreenOn()
}, })
onTimeUpdate() { //监听音频的播放事件
this.setData({ this.qualityAudio.onPlay(() => {
currentTime: this.formatTime(this.qualityAudio.currentTime) this.setData({
}) status: 'start'
this.dialogueRef().onTimeUpdate() })
this.qualityRef().onTimeUpdate() this.setKeepScreenOn(true)
}, })
dialogueRef() { this.qualityAudio.onCanplay(() => {
return this.selectComponent('#dialogue') this.setData({
}, showPlayControl: true
qualityRef() { })
return this.selectComponent('#quality') })
}, this.qualityAudio.onTimeUpdate(this.onTimeUpdate)
format(seconds) { this.qualityAudio.onEnded(() => {
seconds = Math.floor(seconds / 1000) this.setData({
let formattedTime = '' status: 'ending',
if (seconds < 60) return seconds + '秒' currentTime: this.formatTime(this.qualityAudio.duration),
else { isOperate: true
let hours = Math.floor(seconds / 3600), })
minutes = Math.floor((seconds % 3600) / 60), this.dialogueRef().setData({
remainingSeconds = seconds % 60 isPlayIng: false
if (hours > 0) formattedTime += hours + '小时' })
if (minutes > 0 || hours > 0) formattedTime += minutes + '分' this.setKeepScreenOn()
if (remainingSeconds > 0) formattedTime += remainingSeconds + '秒' })
return formattedTime },
} onTimeUpdate() {
}, this.setData({
//屏幕是否常亮 currentTime: this.formatTime(this.qualityAudio.currentTime)
setKeepScreenOn(keepScreenOn = false) { })
wx.setKeepScreenOn({ this.dialogueRef().onTimeUpdate()
keepScreenOn this.qualityRef().onTimeUpdate()
}) },
}, dialogueRef() {
/** return this.selectComponent('#dialogue')
* 生命周期函数--监听页面初次渲染完成 },
*/ qualityRef() {
onReady() { return this.selectComponent('#quality')
},
}, format(seconds) {
seconds = Math.floor(seconds / 1000)
/** let formattedTime = ''
* 生命周期函数--监听页面显示 if (seconds < 60) return seconds + '秒'
*/ else {
onShow() { let hours = Math.floor(seconds / 3600),
minutes = Math.floor((seconds % 3600) / 60),
}, remainingSeconds = seconds % 60
if (hours > 0) formattedTime += hours + '小时'
/** if (minutes > 0 || hours > 0) formattedTime += minutes + '分'
* 生命周期函数--监听页面隐藏 if (remainingSeconds > 0) formattedTime += remainingSeconds + '秒'
*/ return formattedTime
onHide() { }
this.qualityAudio.stop() },
}, //屏幕是否常亮
setKeepScreenOn(keepScreenOn = false) {
/** wx.setKeepScreenOn({
* 生命周期函数--监听页面卸载 keepScreenOn
*/ })
onUnload() { },
this.qualityAudio.stop() /**
}, * 生命周期函数--监听页面初次渲染完成
*/
/** onReady() {
* 页面相关事件处理函数--监听用户下拉动作
*/ },
onPullDownRefresh() {
/**
}, * 生命周期函数--监听页面显示
*/
/** onShow() {
* 页面上拉触底事件的处理函数
*/ },
onReachBottom() {
/**
}, * 生命周期函数--监听页面隐藏
*/
onHide() {
this.qualityAudio.stop()
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
this.qualityAudio.stop()
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
}) })
\ No newline at end of file \ No newline at end of file
/* packageReception/pages/detail/detail.wxss */ /* packageReception/pages/detail/detail.wxss */
page { page {
background: #f3f6fa; background: #f3f6fa;
} }
.layout { .layout {
position: relative; position: relative;
height: 100vh; height: 100vh;
box-sizing: border-box; box-sizing: border-box;
&::after { &::after {
content: ''; content: '';
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
width: 100%; width: 100%;
height: 480rpx; height: 480rpx;
background-image: url('https://img02.glsx.com.cn/weapp/resource/miniprogram/common/reception-bg.png'); background-image: url('https://img02.glsx.com.cn/weapp/resource/miniprogram/common/reception-bg.png');
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
z-index: -1; z-index: -1;
} }
.customer-list { .customer-list {
display: flex; display: flex;
flex-wrap: nowrap; flex-wrap: nowrap;
overflow-x: auto; overflow-x: auto;
gap: 0 16rpx; gap: 0 16rpx;
padding: 8rpx 0 24rpx; padding: 8rpx 0 24rpx;
.customer-item { .customer-item {
height: 60rpx; height: 60rpx;
border-radius: 12rpx; border-radius: 12rpx;
background: #ffffff; background: #ffffff;
padding: 0 24rpx; padding: 0 24rpx;
color: #383a3d; color: #383a3d;
font-size: 28rpx; font-size: 28rpx;
border: 2rpx solid #fff; border: 2rpx solid #fff;
flex-shrink: 0; flex-shrink: 0;
&:first-of-type { &:first-of-type {
margin-left: 32rpx; margin-left: 32rpx;
} }
&:last-of-type { &:last-of-type {
margin-right: 32rpx; margin-right: 32rpx;
} }
.name { .name {
max-width: 224rpx; max-width: 224rpx;
} }
.score { .score {
flex-shrink: 0; flex-shrink: 0;
color: #9d9fa3; color: #9d9fa3;
margin-left: 8rpx; margin-left: 8rpx;
} }
} }
.active { .active {
border-color: #3773f8; border-color: #3773f8;
background: #3773f81a; background: #3773f81a;
color: #3773f8; color: #3773f8;
font-weight: 500; font-weight: 500;
.score { .score {
color: #3773f8; color: #3773f8;
} }
} }
} }
.customer-info-box { .customer-info-box {
height: 142rpx; height: 142rpx;
border-radius: 24rpx; border-radius: 24rpx;
background: #ffffff; background: #ffffff;
margin: 0 32rpx; margin: 0 32rpx;
padding: 24rpx; padding: 24rpx;
box-sizing: border-box; box-sizing: border-box;
position: relative; position: relative;
.customer-icon { .customer-icon {
width: 80rpx; width: 80rpx;
height: 80rpx; height: 80rpx;
margin-right: 16rpx; margin-right: 16rpx;
} }
.customer-info { .customer-info {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
height: 100%; height: 100%;
.customer-name { .customer-name {
color: #9d9fa3; color: #9d9fa3;
font-size: 24rpx; font-size: 24rpx;
.name { .name {
color: #292d33; color: #292d33;
font-size: 30rpx; font-size: 30rpx;
max-width: 360rpx; max-width: 360rpx;
font-weight: 500; font-weight: 500;
margin-right: 8rpx; margin-right: 8rpx;
} }
} }
.customer-car { .customer-car {
margin-top: auto; margin-top: auto;
transform: translateY(-8rpx);
.customer-car-item { .customer-car-item {
margin-right: 12rpx; margin-right: 12rpx;
padding: 0 8rpx; padding: 0 8rpx;
height: 32rpx; height: 32rpx;
border-radius: 4rpx; border-radius: 4rpx;
border: 2rpx solid #e8ecf0; border: 2rpx solid #e8ecf0;
display: flex; display: flex;
align-items: center; align-items: center;
color: #9d9fa3; color: #9d9fa3;
font-size: 22rpx; font-size: 22rpx;
box-sizing: border-box; box-sizing: border-box;
width: fit-content; width: fit-content;
} }
} }
} }
.customer-score { .customer-score {
position: absolute; position: absolute;
right: 24rpx; right: 24rpx;
bottom: 24rpx; bottom: 24rpx;
color: #292d33; color: #292d33;
font-size: 24rpx; font-size: 24rpx;
font-weight: 500; font-weight: 500;
display: flex; display: flex;
align-items: baseline; align-items: baseline;
.num { .num {
font-size: 40rpx; font-size: 40rpx;
margin-right: 4rpx; margin-right: 4rpx;
} }
} }
} }
.reception-nav { .reception-nav {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
padding: 24rpx 32rpx 16rpx; padding: 24rpx 32rpx 16rpx;
.reception-types { .reception-types {
display: flex; display: flex;
align-items: center; align-items: center;
.type { .type {
width: 144rpx; width: 144rpx;
line-height: 40rpx; line-height: 40rpx;
padding: 10rpx 0; padding: 10rpx 0;
background: #FFFFFF; background: #FFFFFF;
border-radius: 12rpx; border-radius: 12rpx;
margin-right: 16rpx; margin-right: 16rpx;
color: #5a5e66; color: #5a5e66;
font-size: 28rpx; font-size: 28rpx;
font-weight: 400; font-weight: 400;
text-align: center; text-align: center;
} }
.active { .active {
font-weight: 600; font-weight: 600;
color: #fff; color: #fff;
background: linear-gradient(135deg, #4f52ff 0%, #349bff 100%); background: linear-gradient(135deg, #4f52ff 0%, #349bff 100%);
} }
} }
.reception-operate { .reception-operate {
display: flex; display: flex;
align-items: center; align-items: center;
.img { .img {
width: 52rpx; width: 52rpx;
height: 52rpx; height: 52rpx;
} }
.share { .share {
margin-right: 12rpx; margin-right: 12rpx;
} }
.audio-wrap { .audio-wrap {
min-width: 140rpx; min-width: 140rpx;
height: 60rpx; height: 60rpx;
display: flex; display: flex;
align-items: center; align-items: center;
background: #FFFFFF; background: #FFFFFF;
padding: 4rpx; padding: 4rpx;
border-radius: 28rpx; border-radius: 28rpx;
box-sizing: border-box; box-sizing: border-box;
transition: all .1s; transition: all .1s;
.time { .time {
font-weight: 400; font-weight: 400;
font-size: 26rpx; font-size: 26rpx;
color: #757980; color: #757980;
margin-left: 4rpx; margin-left: 4rpx;
} }
} }
} }
} }
} }
.type-wrap { .type-wrap {
position: relative; position: relative;
.component-item { .component-item {
width: 100%; width: 100%;
height: 100%; height: 100%;
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
transition: all 0.15s; transition: all 0.15s;
} }
.hide { .hide {
opacity: 0; opacity: 0;
z-index: -1; z-index: -1;
} }
} }
\ No newline at end of file \ No newline at end of file
<navigation-bar bindnavbarReady="navbarReady" navStyle="background-color:transparent;" showBack>接待详情</navigation-bar> <navigation-bar bindnavbarReady="navbarReady" navStyle="background-color:transparent;" showBack>接待详情</navigation-bar>
<view class="layout" style="{{layoutStyle}}"> <view class="layout" style="{{layoutStyle}}">
<view class="reception-wrap"> <view class="reception-wrap">
<view class="customer-list"> <view class="customer-list">
<block wx:for="{{customerList}}" wx:key="index"> <block wx:for="{{customerList}}" wx:key="index">
<view class="customer-item flex {{item.batchId == record.batchId?'active':''}}"> <view class="customer-item flex {{item.batchId == record.batchId?'active':''}}" bindtap="changeDetail" data-item="{{item}}">
<view class="name text-hide">{{item.customerName}}</view> <view class="name text-hide">{{item.customerName}}</view>
<block wx:if="{{item.score != null}}"> <block wx:if="{{item.score != null}}">
<view class="score">{{item.score}}分</view> <view class="score">{{item.score}}分</view>
</block> </block>
</view> </view>
</block> </block>
</view> </view>
<view class="customer-info-box flex"> <view class="customer-info-box flex">
<image src="/assets/images/portrait.png" class="customer-icon" /> <image src="/assets/images/portrait.png" class="customer-icon" />
<view class="customer-info"> <view class="customer-info">
<view class="customer-name flex"> <view class="customer-name flex">
<view class="name text-hide">{{record.customerName}}</view> <view class="name text-hide">{{record.customerName}}</view>
{{record.customerPhone}} {{record.customerPhone}}
</view> </view>
<view class="customer-car"> <view class="customer-car flex">
<block wx:if="{{record.carBrand}}"> <block wx:if="{{record.carBrand}}">
<view class="customer-car-item">{{record.carBrand}}</view> <view class="customer-car-item">{{record.carBrand}}</view>
</block> </block>
<block wx:if="{{record.carModel}}"> <block wx:if="{{record.carModel}}">
<view class="customer-car-item">{{record.carModel}}</view> <view class="customer-car-item">{{record.carModel}}</view>
</block> </block>
</view> </view>
</view> </view>
<view class="customer-score"> <view class="customer-score">
<view class="num">{{record.score}}</view> <view class="num">{{record.score}}</view>
分 分
</view> </view>
</view> </view>
<view class="reception-nav"> <view class="reception-nav">
<view class="reception-types"> <view class="reception-types">
<block wx:for="{{typeLists}}" wx:key="index"> <block wx:for="{{typeLists}}" wx:key="index">
<view class="type {{activeIndex==index?'active':''}}" data-index="{{index}}" bind:tap="changeType">{{item}}</view> <view class="type {{activeIndex==index?'active':''}}" data-index="{{index}}" bind:tap="changeType">{{item}}</view>
</block> </block>
</view> </view>
<view class="reception-operate"> <view class="reception-operate">
<view class="audio-wrap" bind:tap="onHandle"> <view class="audio-wrap" bind:tap="onHandle">
<image class="img" src="/assets/images/play.png" wx:if="{{status=='pause'||status=='ending'}}" /> <image class="img" src="/assets/images/play.png" wx:if="{{status=='pause'||status=='ending'}}" />
<image class="img" src="/assets/images/stop.png" wx:else /> <image class="img" src="/assets/images/stop.png" wx:else />
<view class="time">{{currentTime}}</view> <view class="time">{{currentTime}}</view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<view class="type-wrap" style="{{receptionWrapStyle}}"> <view class="type-wrap" style="{{receptionWrapStyle}}">
<block wx:if="{{receptionWrapStyle}}"> <block wx:if="{{receptionWrapStyle}}">
<view class="component-item {{activeIndex != 0 ?'hide':''}}"> <view class="component-item {{activeIndex != 0 ?'hide':''}}">
<dialogue id="dialogue" batchId="{{record.batchId}}" recordData="{{record}}" qualityData="{{qualityData}}"></dialogue> <dialogue id="dialogue" batchId="{{record.batchId}}" recordData="{{record}}" qualityData="{{qualityData}}"></dialogue>
</view> </view>
<view class="component-item {{activeIndex != 1?'hide':''}}"> <view class="component-item {{activeIndex != 1?'hide':''}}">
<quality id="quality" qualityData="{{qualityData}}"></quality> <quality id="quality" qualityData="{{qualityData}}"></quality>
</view> </view>
</block> </block>
</view> </view>
</view> </view>
\ No newline at end of file \ No newline at end of file
// pages/reception/index.js // pages/reception/index.js
import dayjs from 'dayjs' import dayjs from 'dayjs'
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
list: [], list: [],
tips: '今日无待处理复盘,请继续保持!' tips: '今日无待处理复盘,请继续保持!'
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
async onLoad(options) { async onLoad(options) {},
async getAiagent(params) {
}, let {
async getAiagent(params) { bussinessType,
const { staffUuid,
bussinessType, phone,
staffUuid, channelType,
phone, modelType
channelType, } = params, {
modelType reviewDate
} = params, } = this.options
{reviewDate} = this.options const [data] = await wx.p.api.receptionApi.getAiagent({
const [data] = await wx.p.api.receptionApi.getAiagent({ ownerShipType: 1,
ownerShipType: 1, accountPhone: phone,
accountPhone: phone, agentCode: 'AI8'
agentCode: 'AI8' })
}) if (data) {
if (data) { let {
console.log(data, '---') agentUrl,
let { domainName,
agentUrl, taskStatus
domainName, } = data,
taskStatus brand = {
} = data, 1: '问界',
brand = { 2: '比亚迪',
1: '问界', 3: '其他'
2: '比亚迪', } [channelType],
3: '其他' AIAvatar = 'https://img01.glsx.com.cn/weapp/resource/miniprogram/common/avatar_ai.png', //左侧头像
} [channelType], AIUrl = `${agentUrl}?avatar_ai=${AIAvatar}&no_header=1&businessType=${bussinessType}&one_id=${staffUuid}&platformType=1&domain=${domainName}&brandType=${modelType || 1001}`
AIUrl = `${agentUrl}?no_header=1&businessType=${bussinessType}&one_id=${staffUuid}&platformType=1&domain=${domainName}&brandType=${modelType || 1001}` if(!reviewDate) reviewDate = dayjs().subtract(1, 'day')
AIUrl += `&phone=${phone}&brand=${brand}&date=${dayjs(reviewDate).format('YYYY-MM-DD')}` AIUrl += `&phone=${phone}&brand=${brand}&date=${dayjs(reviewDate).format('YYYY-MM-DD')}`
if (taskStatus) AIUrl += `&practice_status=${taskStatus}` if (taskStatus) AIUrl += `&practice_status=${taskStatus}`
this.setData({ this.setData({
AIUrl AIUrl
}) })
} else wx.p.wxApi.showToast('获取智能体失败') } else wx.p.wxApi.showToast('获取智能体失败')
}, },
async getReceptionList(params) { async getReceptionList(params) {
try { try {
wx.showLoading({ wx.showLoading({
mask: true mask: true
}) })
console.log(params) console.log()
const data = await wx.p.api.receptionApi.getReceptionList(params) if (!params.userId) throw '缺少必要参数:userId'
let total = data.reduce((sum, e) => { const data = await wx.p.api.receptionApi.getReceptionList(params)
const length = e?.sopTaskDetailTagList?.length || 0 if(!data) throw '获取复盘失败,请稍后再试!'
return sum + Number(length) let total = data.reduce((sum, e) => {
}, 0) const length = e?.sopTaskDetailTagList?.length || 0
this.setData({ return sum + Number(length)
total, }, 0)
list: data, data.map(e => {
loadComplete: true, e?.sopTaskDetailTagList?.map(i => {
tips: total ? `今日有 ${total} 条待复盘记录,请尽快处理哦~` : '今日无待处理复盘,请继续保持!' let {
}) weakness,
if (data && data.length && !this.data.AIUrl) this.getAiagent(data[0]) suggestion
wx.hideLoading() } = i
console.log(data) i.weakness = weakness ? weakness.replace(/\n/g, '<br>') : '-'
} catch (error) { i.suggestion = suggestion ? suggestion.replace(/\n/g, '<br>') : '-'
console.log(error) })
wx.hideLoading() })
this.setData({ this.setData({
loadComplete: true, total,
}) list: data,
} loadComplete: true,
}, tips: total ? `今日有 ${total} 条待复盘记录,请尽快处理哦~` : '今日无待处理复盘,请继续保持!'
toDetail() { })
const { if (data && data.length && !this.data.AIUrl) this.getAiagent(data[0])
openId wx.hideLoading()
} = this.data.userInfo console.log(data)
wx.p.api.receptionApi.addCustomerDynamicRecord({ } catch (error) {
customerOpenId: openId, console.log(error)
goodsId: 1, wx.hideLoading()
goodsType: 3 if (error) wx.p.wxApi.showToast(error)
}) this.setData({
wx.p.router.go('/packageReception/pages/detail/detail', this.options) loadComplete: true,
}, })
jumpAI(e) { }
const { },
openId toDetail() {
} = this.data.userInfo const {
wx.p.api.receptionApi.addCustomerDynamicRecord({ openId
customerOpenId: openId, } = this.data.userInfo
goodsId: 1, wx.p.api.receptionApi.addCustomerDynamicRecord({
goodsType: 2 customerOpenId: openId,
}) goodsId: 1,
let { goodsType: 3
item })
} = e.currentTarget.dataset, { wx.p.router.go('/packageReception/pages/detail/detail', this.options)
AIUrl },
} = this.data jumpAI(e) {
AIUrl += `&presuppositionProblem=${item.tagName}` const {
wx.p.router.jumpH5(AIUrl, true) openId
console.log(e) } = this.data.userInfo
}, wx.p.api.receptionApi.addCustomerDynamicRecord({
navbarReady(e) { customerOpenId: openId,
let { goodsId: 1,
height goodsType: 2
} = e.detail })
this.setData({ let {
layoutStyle: `padding-top:${height}px` item
}) } = e.currentTarget.dataset, {
}, AIUrl
/** } = this.data
* 生命周期函数--监听页面初次渲染完成 AIUrl += `&presuppositionProblem=${item.tagName}`
*/ wx.p.router.jumpH5(AIUrl, true)
onReady() { console.log(e)
},
}, navbarReady(e) {
let {
/** height
* 生命周期函数--监听页面显示 } = e.detail
*/ this.setData({
onShow() { layoutStyle: `padding-top:${height}px`
this.getReceptionList(this.options) })
}, },
/**
/** * 生命周期函数--监听页面初次渲染完成
* 生命周期函数--监听页面隐藏 */
*/ onReady() {
onHide() {
},
},
/**
/** * 生命周期函数--监听页面显示
* 生命周期函数--监听页面卸载 */
*/ onShow() {
onUnload() { this.getReceptionList(this.options)
},
},
/**
/** * 生命周期函数--监听页面隐藏
* 页面相关事件处理函数--监听用户下拉动作 */
*/ onHide() {
onPullDownRefresh() {
},
},
/**
/** * 生命周期函数--监听页面卸载
* 页面上拉触底事件的处理函数 */
*/ onUnload() {
onReachBottom() {
},
}
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
}
}) })
\ No newline at end of file \ No newline at end of file
/* pages/reception/index.wxss */ /* pages/reception/index.wxss */
page { page {
background: #f3f6fa; background: #f3f6fa;
} }
.layout { .layout {
position: relative; position: relative;
height: 100vh; height: 100vh;
box-sizing: border-box; box-sizing: border-box;
&::after { &::after {
content: ''; content: '';
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
width: 100%; width: 100%;
height: 480rpx; height: 480rpx;
background-image: url('https://img02.glsx.com.cn/weapp/resource/miniprogram/common/reception-bg.png'); background-image: url('https://img02.glsx.com.cn/weapp/resource/miniprogram/common/reception-bg.png');
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
z-index: -1; z-index: -1;
} }
.tips-box { .tips-box {
width: 686rpx; width: 686rpx;
border-radius: 32rpx; border-radius: 32rpx;
margin: 36rpx auto; margin: 36rpx auto;
background: linear-gradient(90deg, #cce2ff 0%, #c7e5ff 100%); background: linear-gradient(90deg, #cce2ff 0%, #c7e5ff 100%);
.tips-title { .tips-title {
height: 96rpx; height: 96rpx;
justify-content: center; justify-content: center;
position: relative; position: relative;
.icon { .icon {
position: absolute; position: absolute;
width: 120rpx; width: 120rpx;
height: 120rpx; height: 120rpx;
left: 24rpx; left: 24rpx;
bottom: 4rpx; bottom: 4rpx;
} }
.text { .text {
background: linear-gradient(90deg, #00BDE3 -100%, #0A3479 100%); width: 342rpx;
font-size: 32rpx; height: 48rpx;
-webkit-background-clip: text; // background: linear-gradient(90deg, #00BDE3 -100%, #0A3479 100%);
background-clip: text; // font-size: 32rpx;
color: transparent; // -webkit-background-clip: text;
letter-spacing: -1rpx; // background-clip: text;
line-height: 48rpx; // color: transparent;
} // letter-spacing: -1rpx;
} // line-height: 48rpx;
}
.tips { }
box-sizing: border-box;
padding: 0 40rpx; .tips {
height: 100rpx; box-sizing: border-box;
border-radius: 28rpx; padding: 0 40rpx;
border: 2rpx solid #ffffff; height: 100rpx;
background: #eef7ff; border-radius: 28rpx;
backdrop-filter: blur(16rpx); border: 2rpx solid #ffffff;
box-shadow: inset 0 -12rpx 20rpx 0 #ffffff99; background: #eef7ff;
color: #3d4b66; backdrop-filter: blur(16rpx);
font-size: 28rpx; box-shadow: inset 0 -12rpx 20rpx 0 #ffffff99;
} color: #3d4b66;
} font-size: 28rpx;
}
.title { }
padding: 0 32rpx;
height: 64rpx; .title {
color: #2d2f33; padding: 0 32rpx;
font-size: 32rpx; height: 64rpx;
font-weight: 500; color: #2d2f33;
font-size: 32rpx;
.num { font-weight: 500;
margin-left: 8rpx;
} .num {
margin-left: 8rpx;
.btn { }
margin-left: auto;
color: #3773f8; .btn {
font-size: 28rpx; margin-left: auto;
} color: #3773f8;
} font-size: 28rpx;
.icon{
.scroll { width: 20rpx;
height: calc(100% - 340rpx - var(--constantSafeAreaInsetBottom)); height: 20rpx;
height: calc(100% - 340rpx - var(--envSafeAreaInsetBottom)); margin-left: 8rpx;
}
.item { }
margin: 24rpx 32rpx 0; }
border-radius: 28rpx;
background: #ffffff; .scroll {
padding: 24rpx 32rpx; height: calc(100% - 340rpx - var(--constantSafeAreaInsetBottom));
position: relative; height: calc(100% - 340rpx - var(--envSafeAreaInsetBottom));
&-status { .item {
position: absolute; margin: 24rpx 32rpx 0;
top: 24rpx; border-radius: 28rpx;
right: 32rpx; background: #ffffff;
height: 52rpx; padding: 24rpx 32rpx;
padding: 0 16rpx; position: relative;
border-radius: 24rpx;
font-size: 26rpx; &-status {
background: #e9f9f1; position: absolute;
color: #2cca74; top: 24rpx;
} right: 32rpx;
height: 52rpx;
&-icon { padding: 0 16rpx;
width: 32rpx; border-radius: 24rpx;
height: 32rpx; font-size: 26rpx;
margin-right: 8rpx; background: #e9f9f1;
} color: #2cca74;
}
&-title {
line-height: 44rpx; &-icon {
color: #1d1d1f; width: 32rpx;
font-size: 30rpx; height: 32rpx;
font-weight: 500; margin-right: 8rpx;
margin: 4rpx 0 20rpx; }
}
&-title {
&-info { line-height: 44rpx;
color: #686b70; color: #1d1d1f;
font-size: 28rpx; font-size: 30rpx;
line-height: 44rpx; font-weight: 500;
word-break: break-all; margin: 4rpx 0 20rpx;
} }
&-suggestion { &-info {
margin-top: 16rpx; color: #686b70;
border-radius: 24rpx; font-size: 28rpx;
background: #f5f8fc; line-height: 48rpx;
padding: 20rpx 24rpx 24rpx; word-break: break-all;
color: #383a3d; }
font-size: 28rpx;
line-height: 44rpx; &-suggestion {
word-break: break-all; margin-top: 16rpx;
border-radius: 24rpx;
.item-icon { background: #f5f8fc;
width: 36rpx; padding: 20rpx 24rpx 24rpx;
height: 36rpx; color: #383a3d;
margin-right: 6rpx; font-size: 28rpx;
} line-height: 44rpx;
word-break: break-all;
&-title {
color: #3773f8; .item-icon {
font-size: 28rpx; width: 36rpx;
font-weight: 500; height: 36rpx;
margin-bottom: 12rpx; margin-right: 6rpx;
} }
}
&-title {
&-btn { color: #3773f8;
justify-content: center; font-size: 28rpx;
color: #ffffff; font-weight: 500;
font-size: 28rpx; margin-bottom: 12rpx;
margin-top: 24rpx; }
height: 72rpx; }
border-radius: 40rpx;
background: linear-gradient(135deg, #4f52ff 0%, #349bff 100%); &-btn {
} justify-content: center;
color: #ffffff;
&-arrow-icon { font-size: 28rpx;
width: 32rpx; margin-top: 24rpx;
height: 32rpx; height: 72rpx;
margin-left: 16rpx; border-radius: 40rpx;
} background: linear-gradient(135deg, #4f52ff 0%, #349bff 100%);
} }
.bottom { &-arrow-icon {
color: #9d9fa3; width: 32rpx;
font-size: 26rpx; height: 32rpx;
line-height: 40rpx; margin-left: 16rpx;
text-align: center; }
padding: 32rpx 0 16rpx; }
}
} .bottom {
} color: #9d9fa3;
.nothing { font-size: 26rpx;
width: 100%; line-height: 40rpx;
height: 100%; text-align: center;
flex-direction: column; padding: 32rpx 0 16rpx;
justify-content: center; }
color: #999ea8; }
font-size: 24rpx; }
.icon { .nothing {
width: 172rpx; width: 100%;
height: 172rpx; height: 100%;
} flex-direction: column;
justify-content: center;
color: #999ea8;
font-size: 24rpx;
.icon {
width: 172rpx;
height: 172rpx;
}
} }
\ No newline at end of file \ No newline at end of file
<navigation-bar bindnavbarReady="navbarReady" navStyle="background-color:transparent;">质检复盘</navigation-bar> <navigation-bar bindnavbarReady="navbarReady" navStyle="background-color:transparent;">质检复盘</navigation-bar>
<view class="layout" style="{{layoutStyle}}"> <view class="layout" style="{{layoutStyle}}">
<view class="tips-box"> <view class="tips-box">
<view class="tips-title flex"> <view class="tips-title flex">
<image src="/assets/images/title-icon.png" class="icon" /> <image src="/assets/images/title-icon.png" class="icon" />
<view class="text">您好,我是质检复盘助理</view> <image src="/assets/images/title-text.png" class="text" />
</view> <!-- <view class="text">您好,我是质检复盘助理</view> -->
<view class="tips flex"> </view>
{{tips}} <view class="tips flex">
</view> {{tips}}
</view> </view>
<view class="title flex"> </view>
质检复盘 <view class="title flex">
<block wx:if="{{total}}"> 质检复盘
<view class="num">·{{total}}</view> <block wx:if="{{total}}">
<view class="btn" bind:tap="toDetail">查看接待详情 →</view> <view class="num">·{{total}}</view>
</block> <view class="btn flex" bind:tap="toDetail">
</view> 查看接待详情
<scroll-view scroll-y class="scroll"> <image src="/assets/images/more.png" class="icon" />
<block wx:if="{{loadComplete}}"> </view>
<block wx:if="{{list.length}}"> </block>
<block wx:for="{{list}}" wx:key="index"> </view>
<block wx:for="{{item.sopTaskDetailTagList}}" wx:for-item="i" wx:for-index="ind" wx:key="ind"> <scroll-view scroll-y class="scroll">
<view class="item"> <block wx:if="{{loadComplete}}">
<block wx:if="{{i.status == 2}}"> <block wx:if="{{list.length}}">
<view class="item-status flex">考核通过</view> <block wx:for="{{list}}" wx:key="index">
</block> <block wx:for="{{item.sopTaskDetailTagList}}" wx:for-item="i" wx:for-index="ind" wx:key="ind">
<view class="item-title flex"> <view class="item">
<image src="/assets/images/item-title-icon.png" class="item-icon" /> <block wx:if="{{i.status == 2}}">
{{i.tagName}} <view class="item-status flex">考核通过</view>
</view> </block>
<view class="item-info">{{i.weakness}}</view> <view class="item-title flex">
<view class="item-suggestion"> <image src="/assets/images/item-title-icon.png" class="item-icon" />
<view class="item-suggestion-title flex"> {{i.tagName}}
<image src="/assets/images/item-suggestion-icon.png" class="item-icon" /> </view>
改善意见 <view class="item-info">
</view> <rich-text nodes="{{i.weakness}}"></rich-text>
{{i.suggestion}} </view>
</view> <view class="item-suggestion">
<block wx:if="{{i.status != 2 && AIUrl}}"> <view class="item-suggestion-title flex">
<view class="item-btn flex" bindtap="jumpAI" data-item="{{i}}"> <image src="/assets/images/item-suggestion-icon.png" class="item-icon" />
去考核 改善意见
<image src="/assets/images/item-arrow-icon.png" class="item-arrow-icon" /> </view>
</view> <rich-text nodes="{{i.suggestion}}"></rich-text>
</block> </view>
</view> <block wx:if="{{i.status != 2 && AIUrl}}">
</block> <view class="item-btn flex" bindtap="jumpAI" data-item="{{i}}">
</block> 去考核
<view class="bottom">到底了~</view> <image src="/assets/images/item-arrow-icon.png" class="item-arrow-icon" />
</block> </view>
<block wx:else> </block>
<view class="nothing flex"> </view>
<image class="icon" src="/assets/images/quality-no-data.png" /> </block>
暂无数据 </block>
</view> <view class="bottom">到底了~</view>
</block> </block>
</block> <block wx:else>
</scroll-view> <view class="nothing flex">
<image class="icon" src="/assets/images/quality-no-data.png" />
暂无数据
</view>
</block>
</block>
</scroll-view>
</view> </view>
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!