Commit f468b208 by 李伟康

commit 提交

1 parent 89559d9c
...@@ -3,6 +3,40 @@ var wxCharts = require("../../../../utils/wxcharts"); ...@@ -3,6 +3,40 @@ var wxCharts = require("../../../../utils/wxcharts");
import aiApi from "../../../aiApi"; import aiApi from "../../../aiApi";
import carLifeApi from "../../../carEquityApi"; import carLifeApi from "../../../carEquityApi";
var windowW = 0; var windowW = 0;
const XYList = [{
x: 200,
y: 62
},
{
x: 20,
y: 144
},
{
x: 406,
y: 32
},
{
x: 430,
y: 206
},
{
x: 26,
y: 364
},
{
x: 236,
y: 402
},
{
x: 486,
y: 404
},
{
x: 0,
y: 0
},
]
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
...@@ -21,55 +55,7 @@ Page({ ...@@ -21,55 +55,7 @@ Page({
tabId: "1", tabId: "1",
sceneType: 1, // 场景值,根据场景显示头像 sceneType: 1, // 场景值,根据场景显示头像
navBarHeight: 0, navBarHeight: 0,
footerHeight: 0, footerHeight: 0
circleList: [{
name: "清晰度",
depict: "xx",
x: 200,
y: 62
},
{
name: "语速",
depict: "xx",
x: 20,
y: 144
},
{
name: "语调",
depict: "xx",
x: 406,
y: 32
},
{
name: "销售技巧",
depict: "xx",
x: 430,
y: 206
},
{
name: "冗余词",
depict: "xx",
x: 26,
y: 364
},
{
name: "服务态度",
depict: "xx",
x: 236,
y: 402
},
{
name: "熟练度",
depict: "xx",
x: 486,
y: 404
},
{
name: "敏感词",
x: 0,
y: 0
},
],
}, },
// 查看报告切换 // 查看报告切换
handleRuselt(e) { handleRuselt(e) {
...@@ -288,23 +274,38 @@ Page({ ...@@ -288,23 +274,38 @@ Page({
id, id,
}) })
.then((res) => { .then((res) => {
let XYListCopy = [...XYList]
const { const {
descriptionList, descriptionList,
reportItem, reportItem,
sparringDuration, sparringDuration,
score score
} = } = res.data || {};
res.data || {};
wx.setStorageSync("reportItem", reportItem);
this.setData({ this.setData({
descriptionList, descriptionList,
reportItem, reportItem,
sparringDuration, sparringDuration,
score score
}); })
//延迟动画
setTimeout(() => { setTimeout(() => {
wx.$router.go("/packageEquity/pages/aiCheck/detail/detail", reportItem) let list = descriptionList.map((desc) => {
}, 3000); const randomIndex = Math.floor(Math.random() * XYListCopy.length);
const selectedXYItem = XYListCopy[randomIndex];
XYListCopy.splice(randomIndex, 1);
return {
...desc,
...selectedXYItem,
className:'move-circle'
};
})
this.setData({
descriptionList: list
})
}, 500)
// setTimeout(() => {
// wx.$router.go("/packageEquity/pages/aiCheck/detail/detail", reportItem)
// }, 3000);
}); });
}, },
handleSave(list, sparringDuration) { handleSave(list, sparringDuration) {
...@@ -424,22 +425,6 @@ Page({ ...@@ -424,22 +425,6 @@ Page({
onShow() { onShow() {
this.drawChart(); this.drawChart();
}, },
isPositionValid(x, y, itemSize, existingPositions) {
for (const {
x: existingX,
y: existingY
} of existingPositions) {
if (
x < existingX + itemSize &&
x + itemSize > existingX &&
y < existingY + itemSize &&
y + itemSize > existingY
) {
return false;
}
}
return true;
},
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
......
...@@ -330,22 +330,6 @@ page { ...@@ -330,22 +330,6 @@ page {
background-image: linear-gradient(90deg, #4D53FF 0%, #389AFF 100%); background-image: linear-gradient(90deg, #4D53FF 0%, #389AFF 100%);
} }
.center {
width: 144rpx;
height: 144rpx;
background-image: linear-gradient(90deg, #4D53FF 0%, #389AFF 100%);
font-weight: 500;
font-size: 28rpx;
color: #FFFFFF;
line-height: 32rpx;
display: flex;
align-items: center;
justify-content: center;
padding: 0 36rpx;
box-sizing: border-box;
border-radius: 100%;
text-align: center;
}
} }
.circle-item { .circle-item {
...@@ -361,6 +345,10 @@ page { ...@@ -361,6 +345,10 @@ page {
justify-content: center; justify-content: center;
border-radius: 100%; border-radius: 100%;
flex-direction: column; flex-direction: column;
top: calc(50% - 72rpx);
left: calc(50% - 72rpx);
transition: all .25s;
.circle-title { .circle-title {
font-size: 28rpx; font-size: 28rpx;
} }
...@@ -369,10 +357,43 @@ page { ...@@ -369,10 +357,43 @@ page {
font-weight: 500; font-weight: 500;
} }
} }
.center {
width: 144rpx;
height: 144rpx;
background-image: linear-gradient(90deg, #4D53FF 0%, #389AFF 100%);
font-weight: 500;
font-size: 28rpx;
color: #FFFFFF;
line-height: 32rpx;
display: flex;
align-items: center;
justify-content: center;
padding: 0 36rpx;
box-sizing: border-box;
border-radius: 100%;
text-align: center;
z-index: 2;
}
.move-circle {
animation: move-circle 2s ease-in-out infinite;
}
.red { .red {
color: #F04853; color: #F04853;
} }
@keyframes move-circle {
0%,
100% {
transform: scale(1) translateY(0);
}
50% {
transform: scale(1.01) translateY(-5rpx);
}
}
} }
} }
......
...@@ -68,13 +68,12 @@ ...@@ -68,13 +68,12 @@
</view> </view>
</view> </view>
<view class="circle-box"> <view class="circle-box">
<view class="circle-bg box-center"> <view class="center box-center">对练总结</view>
<view class="center box-center">对练总结</view> <view class="circle-bg box-center"></view>
</view> <block wx:for="{{descriptionList}}" wx:key="index">
<block wx:for="{{circleList}}" wx:key="index"> <view class="circle-item {{item.dialogueItem != '敏感词'?'':'red'}} {{item.className}}" style="top:{{item.y + 'rpx'}};left:{{item.x + 'rpx'}}">
<view class="circle-item {{item.depict?'':'red'}}" style="top:{{item.y + 'rpx'}};left:{{item.x + 'rpx'}}"> <view class="circle-title">{{item.dialogueItem}}</view>
<view class="circle-title">{{item.name}}</view> <view class="circle-depict">{{item.description}}</view>
<view class="circle-depict">{{item.depict}}</view>
</view> </view>
</block> </block>
</view> </view>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!