Commit 7af1e439 by 张立顺

Merge branch 'SAAS+V4.43-0807' of http://192.168.3.233:8090/saas_plus/dj-car-bou…

…tique-work-wechat into SAAS+V4.43-0807
2 parents a337f4a4 52e33343
// packageEquity/pages/aiCheck/chat/chat.js // packageEquity/pages/aiCheck/chat/chat.js
import carLifeApi from "../../../carEquityApi"; import carLifeApi from "../../../carEquityApi";
import api from '~/api/api.js'
const VOICE = { const VOICE = {
1: "zhifeng_emo", 1: "zhifeng_emo",
2: "stanley", 2: "stanley",
...@@ -264,7 +265,27 @@ Page({ ...@@ -264,7 +265,27 @@ Page({
content, content,
}; };
}, },
handleSave(list, sparringDuration, triggerSensitive) { getOpenId() {
return new Promise((resolve)=>{
wx.login({
success({
code
}) {
if (code) {
api
.ssoLogin({
code,
appId: wx.getAccountInfoSync().miniProgram.appId
}).then(res => {
resolve(res.data.openId)
})
}
},
})
})
},
async handleSave(list, sparringDuration, triggerSensitive) {
let totalTime = 0; let totalTime = 0;
let Sentences = []; let Sentences = [];
let content = ""; let content = "";
...@@ -329,8 +350,10 @@ Page({ ...@@ -329,8 +350,10 @@ Page({
redundant, redundant,
}; };
}); });
const openId = wx.$util.getOpenId(); let openId = wx.$util.getOpenId();
console.log(openId,'openId') if(!openId) {
openId = await this.getOpenId()
}
carLifeApi carLifeApi
.sparringCommit({ .sparringCommit({
openId, openId,
......
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
<view class="wrapper-content"> <view class="wrapper-content">
<gl-image class="icon-tips" webp src="/aiCheck/icon-tips.webp"></gl-image> <gl-image class="icon-tips" webp src="/aiCheck/icon-tips.webp"></gl-image>
<view class="title">温馨提示</view> <view class="title">温馨提示</view>
<view class="content">点击确定按钮,您将结束此次对练并订阅生成报告提醒</view> <view class="content">点击确定按钮,您将结束此次对练并订阅生成报告提醒!</view>
<view class="footer"> <view class="footer">
<view class="btn cancel" bind:tap="handleCancel">取消</view> <view class="btn cancel" bind:tap="handleCancel">取消</view>
<view class="btn sure" bind:tap="handleSure">确定</view> <view class="btn sure" bind:tap="handleSure">确定</view>
......
...@@ -265,6 +265,10 @@ Page({ ...@@ -265,6 +265,10 @@ Page({
id, id,
}) })
.then((res) => { .then((res) => {
if(!res.data) {
wx.$router.reLaunch('packageEquity.equityPage')
return
}
const { descriptionList, reportItem, sparringDuration, score } = const { descriptionList, reportItem, sparringDuration, score } =
res.data || {}; res.data || {};
let { minutes, seconds } = this.formatTime(sparringDuration || 0); let { minutes, seconds } = this.formatTime(sparringDuration || 0);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!