Commit 5a6eed05 by 胡悦

修复bug

1 parent db28cb03
...@@ -892,7 +892,8 @@ Page({ ...@@ -892,7 +892,8 @@ Page({
entry, entry,
recordName, recordName,
objection_id, objection_id,
title title,
product_name
} = options; } = options;
console.log(recordName) console.log(recordName)
let params = { let params = {
...@@ -931,7 +932,7 @@ Page({ ...@@ -931,7 +932,7 @@ Page({
const findChain = linkChainList.find((link) => link.name == stage); const findChain = linkChainList.find((link) => link.name == stage);
this.setData({ this.setData({
objection_id, objection_id,
stage: findChain.name, stage: product_name || `${findChain.name}环节`,
step: findChain.type, step: findChain.type,
avatar, avatar,
isDemo: isDemo === "true", isDemo: isDemo === "true",
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
<view class="chat-left"> <view class="chat-left">
<image class="avatar-icon" src="{{avatar}}"></image> <image class="avatar-icon" src="{{avatar}}"></image>
<view class="chat-box"> <view class="chat-box">
<view class="content-box">你已选择:<text class="font-b">{{roleName}}、{{stage}}环节</text></view> <view class="content-box">你已选择:<text class="font-b">{{roleName}}、{{stage}}</text></view>
<view class="operation"> <view class="operation">
<view class="operation-top"> <view class="operation-top">
......
...@@ -246,7 +246,7 @@ Component({ ...@@ -246,7 +246,7 @@ Component({
toBottom() { toBottom() {
const pages = getCurrentPages() const pages = getCurrentPages()
const curPage = pages[pages.length - 1]; const curPage = pages[pages.length - 1];
curPage.toBottom() if(curPage) curPage.toBottom()
}, },
setAudio(index, filePath, type) { setAudio(index, filePath, type) {
if (!this.data['ctx_' + index]) if (!this.data['ctx_' + index])
......
...@@ -85,14 +85,16 @@ Page({ ...@@ -85,14 +85,16 @@ Page({
toChat(e) { toChat(e) {
const { id,title } = e.currentTarget.dataset const { id,title } = e.currentTarget.dataset
const objection_id = id.split('-').pop() const objection_id = id.split('-').pop()
const {customeTypeList,isDemo,linkChainList,recordName} = this.data const type_id = id.split('-')[1]
const {customeTypeList,isDemo,linkChainList,recordName, typeList} = this.data
console.log(customeTypeList) console.log(customeTypeList)
const selectedIndex = Math.floor(Math.random()*customeTypeList.length) const selectedIndex = Math.floor(Math.random()*customeTypeList.length)
const linkIndex = Math.floor(Math.random()*linkChainList.length) const linkIndex = Math.floor(Math.random()*linkChainList.length)
const { roleType } = customeTypeList[selectedIndex] const { roleType } = customeTypeList[selectedIndex]
const {name:stage,suggest} = linkChainList[linkIndex] const { name: stage, suggest } = linkChainList[linkIndex]
const product_name = typeList.find(item => item.id == type_id)?.name
wx.navigateTo({ wx.navigateTo({
url: `/packageEquity/pages/aiCheck/chat/chat?roleType=${roleType}&stage=${stage}&suggest=${suggest}&isDemo=${isDemo}&isInspiration=1&objection_id=${objection_id}&recordName=${recordName}&title=${title}` url: `/packageEquity/pages/aiCheck/chat/chat?roleType=${roleType}&stage=${stage}&suggest=${suggest}&isDemo=${isDemo}&isInspiration=1&objection_id=${objection_id}&recordName=${recordName}&title=${title}&product_name=${product_name}`
}) })
// wx.navigateTo({ // wx.navigateTo({
// url: `/packageEquity/pages/aiCheck/chat/chat?id=${id}` // url: `/packageEquity/pages/aiCheck/chat/chat?id=${id}`
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!