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
<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.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!