Commit 515d0213 by 李伟康

commit 提交

1 parent 2a443750
...@@ -41,36 +41,40 @@ Page({ ...@@ -41,36 +41,40 @@ Page({
const pages = getCurrentPages() const pages = getCurrentPages()
const prevPage = pages[pages.length - 2] const prevPage = pages[pages.length - 2]
console.log(prevPage.route) console.log(prevPage.route)
if(prevPage.route == 'packageEquity/pages/aiCheck/start/start') { if (prevPage.route == 'packageEquity/pages/aiCheck/start/start') {
wx.navigateBack({ wx.navigateBack({
delta: 1 delta: 1
}); });
setTimeout(()=>{ setTimeout(() => {
prevPage.setData({tabIndex:2}) prevPage.setData({
},100) tabIndex: 2
}else { })
}, 100)
} else {
wx.$router.back() wx.$router.back()
} }
}, },
again() { again() {
const {id} = this.data; const {
if(id) { id
} = this.data;
if (id) {
wx.navigateTo({ wx.navigateTo({
url: `/packageEquity/pages/aiCheck/scene/scene` url: `/packageEquity/pages/aiCheck/scene/scene`
}) })
}else { } else {
wx.$router.back() wx.$router.back()
} }
}, },
backHome() { backHome() {
const pages = getCurrentPages() const pages = getCurrentPages()
const prevPage = pages[pages.length - 2] const prevPage = pages[pages.length - 2]
if(prevPage.route == 'packageEquity/pages/aiCheck/start/start') { if (prevPage.route == 'packageEquity/pages/aiCheck/start/start') {
wx.navigateBack({ wx.navigateBack({
delta: 1 delta: 1
}); });
}else { } else {
wx.navigateBack({ wx.navigateBack({
delta: 2 delta: 2
}) })
...@@ -112,14 +116,16 @@ Page({ ...@@ -112,14 +116,16 @@ Page({
roleType, roleType,
id id
} = options; } = options;
this.setData({id}) this.setData({
id
})
this.getAvatar(roleType); this.getAvatar(roleType);
const chatList = wx.getStorageSync("chatList") const chatList = wx.getStorageSync("chatList")
const { const {
uuid uuid
} = wx.$util.getUserInfo(); } = wx.$util.getUserInfo();
if (history_message) { if (history_message) {
this.handleSave(chatList,'',uuid,batch_id) this.handleSave(chatList, '', uuid, batch_id)
wx.showLoading({ wx.showLoading({
title: '加载中', title: '加载中',
}) })
...@@ -151,9 +157,11 @@ Page({ ...@@ -151,9 +157,11 @@ Page({
currentPage: 1, currentPage: 1,
pageSize: 1, pageSize: 1,
roleType roleType
}).then(res=>{ }).then(res => {
const avatar = res.data.list[0].avatar const avatar = res.data.list[0].avatar
this.setData({avatar}) this.setData({
avatar
})
}) })
}, },
setDetail(res) { setDetail(res) {
...@@ -181,8 +189,10 @@ Page({ ...@@ -181,8 +189,10 @@ Page({
} = res.data } = res.data
try { try {
const chatList = JSON.parse(JSON.parse(sparringContent)) const chatList = JSON.parse(JSON.parse(sparringContent))
this.setData({chatList}) this.setData({
this.setDetail(JSON.parse(checkResult.replace(/\'/g,"\""))) chatList
})
this.setDetail(JSON.parse(checkResult.replace(/\'/g, "\"")))
} catch (error) { } catch (error) {
} }
...@@ -218,7 +228,9 @@ Page({ ...@@ -218,7 +228,9 @@ Page({
}, },
drawChart(data) { drawChart(data) {
if(this.a) return
console.log(data, '!!!!!!!!!!!============') console.log(data, '!!!!!!!!!!!============')
this.a =
new wxCharts({ new wxCharts({
canvasId: 'radarCanvas', canvasId: 'radarCanvas',
type: 'radar', type: 'radar',
......
...@@ -55,6 +55,15 @@ page { ...@@ -55,6 +55,15 @@ page {
// margin-top: 200rpx; // margin-top: 200rpx;
// height: calc(100vh - 200rpx); // height: calc(100vh - 200rpx);
overflow-y: auto; overflow-y: auto;
visibility: hidden;
}
.show{
visibility: visible;
}
.dialogue{
position: absolute;
top: 0;
left: 0;
} }
.chat-box { .chat-box {
margin: 24rpx 32rpx; margin: 24rpx 32rpx;
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
</view> </view>
</navigation-bar> </navigation-bar>
<block wx:if="{{duration}}"> <block wx:if="{{duration}}">
<view class="wrapper" style="margin-top: {{navBarHeight}}px;height: calc(100vh - {{navBarHeight}}px - {{footerHeight}}px);" wx:if="{{tabId == 1}}"> <view class="wrapper {{tabId == 1?'show':''}}" style="margin-top: {{navBarHeight}}px;height: calc(100vh - {{navBarHeight}}px - {{footerHeight}}px);" >
<view class="canvas-box"> <view class="canvas-box">
<gl-image class="score-bg" src="/aiCheck/score-bg1.png"></gl-image> <gl-image class="score-bg" src="/aiCheck/score-bg1.png"></gl-image>
<canvas canvas-id="radarCanvas" disable-scroll="{{true}}" class="canvas canvas2"></canvas> <canvas canvas-id="radarCanvas" disable-scroll="{{true}}" class="canvas canvas2"></canvas>
...@@ -46,7 +46,9 @@ ...@@ -46,7 +46,9 @@
<view class="report-box"> <view class="report-box">
<view class="score-box"> <view class="score-box">
<view>总得分</view> <view>总得分</view>
<view class="score"><view class="score-num">{{detailInfo.score}}</view>/100</view> <view class="score">
<view class="score-num">{{detailInfo.score}}</view>/100
</view>
</view> </view>
<view class="report-content"> <view class="report-content">
<view class="report-item"> <view class="report-item">
...@@ -67,8 +69,8 @@ ...@@ -67,8 +69,8 @@
<view class="back-home" bindtap="backHome">返回首页</view> <view class="back-home" bindtap="backHome">返回首页</view>
<view class="again" bindtap="again">再来一次</view> <view class="again" bindtap="again">再来一次</view>
</view> </view>
</view> </view>
<view class="wrapper" style="margin-top: {{navBarHeight}}px;height: calc(100vh - {{navBarHeight}}px - {{footerHeight}}px);" wx:if="{{tabId == 2}}"> <view class="wrapper dialogue {{tabId == 2?'show':''}}" style="margin-top: {{navBarHeight}}px;height: calc(100vh - {{navBarHeight}}px - {{footerHeight}}px);" >
<view class="chat-box" wx:for="{{chatList}}"> <view class="chat-box" wx:for="{{chatList}}">
<view class="chat-item-left" wx:if="{{item.role == 1}}"> <view class="chat-item-left" wx:if="{{item.role == 1}}">
<image class="avatar" src="{{avatar}}"></image> <image class="avatar" src="{{avatar}}"></image>
...@@ -90,12 +92,14 @@ ...@@ -90,12 +92,14 @@
<gl-image class="suggest-icon" src="/aiCheck/polish-icon.png"></gl-image> <gl-image class="suggest-icon" src="/aiCheck/polish-icon.png"></gl-image>
润色表达 润色表达
</view> </view>
<view class="text"><rich-text nodes="{{item.refine_the_expression}}"></rich-text></view> <view class="text">
<rich-text nodes="{{item.refine_the_expression}}"></rich-text>
</view>
</view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</view>
</block> </block>
<block wx:else> <block wx:else>
<view class="loading" style="margin-top: {{navBarHeight}}px"> <view class="loading" style="margin-top: {{navBarHeight}}px">
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!