Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
gl_tape
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
3
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 9cd457b4
authored
Jul 24, 2025
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修复bug、修复话术消息返回的问题
1 parent
82f7cd99
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
60 additions
and
43 deletions
pages/common/messageDetail.vue
pages/common/messageList.vue
pages/common/serviceDetail/index.vue
pages/common/studyDetail/longCourse.vue
pages/common/messageDetail.vue
View file @
9cd457b
<
template
>
<view
class=
"detail-box"
>
<view
class=
"nav-bar"
>
<view
v-if=
"messageInfo.status == 1"
class=
"back"
@
click=
"back
Page(null)
"
>
<view
v-if=
"messageInfo.status == 1"
class=
"back"
@
click=
"back
Arrow
"
>
<uni-icons
type=
"left"
:size=
"20"
color=
"#000"
></uni-icons>
</view>
<view
class=
"title"
>
优秀话术-
{{
messageInfo
.
sceneLabelName
}}
</view>
...
...
@@ -81,33 +81,49 @@ export default {
}
,
// inject: ['showPage'],
methods
:
{
// 返回
back
(
idList
=
null
)
{
console
.
log
(
idList
)
// this.showPage(name, obj)
if
(
idList
)
uni
.
$emit
(
'pageList'
,
idList
[
0
]);
async
backArrow
()
{
const
idList
=
[
this
.
messageInfo
.
scriptId
]
// 埋点
await
uni
.
$api
.
commonApi
.
extractExcellent
({
scriptIdList
:
idList
,
startTime
:
this
.
enterTime
,
endTime
:
dayjs
(
new
Date
()).
format
(
"YYYY-MM-DD HH:mm:ss"
)
}
)
uni
.
navigateBack
({
delta
:
1
,
animationType
:
'pop-out'
,
animationDuration
:
100
}
)
}
,
// 返回
// back(idList = null)
{
// console.log(idList)
// // this.showPage(name, obj)
// // if (idList) uni.$emit('pageList', idList[0]);
// uni.navigateBack(
{
// delta: 1,
// animationType: 'pop-out',
// animationDuration: 100
//
}
)
//
}
,
async
backPage
(
scriptId
=
null
,
ids
=
null
)
{
let
idList
=
scriptId
if
(
!
idList
)
{
idList
=
[
this
.
messageInfo
.
scriptId
];
}
// 埋点
const
result
=
await
uni
.
$api
.
commonApi
.
extractExcellent
({
await
uni
.
$api
.
commonApi
.
extractExcellent
({
scriptIdList
:
idList
,
startTime
:
this
.
enterTime
,
endTime
:
dayjs
(
new
Date
()).
format
(
"YYYY-MM-DD HH:mm:ss"
)
}
)
if
(
ids
)
{
this
.
back
(
ids
)
}
else
{
this
.
handleMoreScript
()
}
// if (ids)
{
// this.back(ids)
//
}
else
{
uni
.
redirectTo
({
url
:
'/pages/common/messageList'
}
);
//
}
// if (type == 'read') this.$emit("backHome")
// else if (type == 'view') this.back('MessageList',
{
firstIndex
:
1
}
)
// this.back('MessageList',
{
firstIndex
:
1
,
tagIndex
:
this
.
tagIndex
}
)
...
...
@@ -130,8 +146,8 @@ export default {
let
scriptId
=
null
if
(
this
.
countFlag
)
{
let
idList
idList
=
[
this
.
messageInfo
.
id
];
scriptId
=
[
this
.
messageInfo
.
scriptId
]
idList
=
[
this
.
messageInfo
.
id
];
scriptId
=
[
this
.
messageInfo
.
scriptId
]
try
{
this
.
isProcessing
=
true
;
// 接口调用
...
...
@@ -146,11 +162,6 @@ export default {
this
.
backPage
(
scriptId
)
}
}
}
,
handleMoreScript
()
{
uni
.
redirectTo
({
url
:
'/pages/common/messageList'
}
);
}
}
}
...
...
@@ -316,6 +327,7 @@ export default {
opacity
:
1
;
}
}
.
more
-
script
{
margin
-
bottom
:
toRpx
(
48
);
}
...
...
pages/common/messageList.vue
View file @
9cd457b
...
...
@@ -64,14 +64,14 @@ export default {
}
},
created
()
{
uni
.
$on
(
'pageList'
,
(
data
)
=>
{
console
.
log
(
'接收到上一个页面返回的数据:'
,
data
);
// 可以在这里添加处理数据的逻辑
if
(
data
)
{
const
message
=
this
.
getList
.
find
(
item
=>
item
.
id
==
data
)
if
(
message
)
message
.
status
=
1
}
});
//
uni.$on('pageList', (data) => {
//
console.log('接收到上一个页面返回的数据:', data);
//
// 可以在这里添加处理数据的逻辑
//
if (data) {
//
const message = this.getList.find(item => item.id == data)
//
if (message) message.status = 1
//
}
//
});
this
.
init
()
},
onLoad
(
options
)
{
...
...
pages/common/serviceDetail/index.vue
View file @
9cd457b
...
...
@@ -109,7 +109,8 @@ export default {
isLoading
:
false
,
userInfo
:
{},
noticeTips
:
false
,
messageList
:
[]
messageList
:
[],
isfirst
:
true
}
},
computed
:
{
...
...
@@ -141,11 +142,14 @@ export default {
this
.
userInfo
=
uni
.
$storage
.
get
(
'userInfo'
)
this
.
getTopInfo
()
this
.
moduleType
=
Number
(
options
.
moduleType
)
this
.
isfirst
=
false
},
onShow
()
{
this
.
getMessageSummary
(
this
.
userInfo
.
sceneType
)
console
.
log
(
this
.
moduleType
,
'moduleType'
)
this
.
getRightList
(
this
.
moduleType
)
if
(
!
this
.
isfirst
)
{
this
.
getMessageSummary
(
this
.
userInfo
.
sceneType
)
console
.
log
(
this
.
moduleType
,
'moduleType'
)
this
.
getRightList
(
this
.
moduleType
)
}
},
methods
:
{
formatTime
(
time
,
formatStr
)
{
...
...
@@ -169,7 +173,6 @@ export default {
this
.
getWarningPage
()
break
case
3
:
console
.
log
(
111
)
this
.
getCourseList
(
3
)
break
case
4
:
...
...
@@ -430,7 +433,7 @@ export default {
case
4
:
console
.
log
(
'长课程学习跳转'
)
uni
.
navigateTo
({
url
:
`/pages/common/studyDetail/longCourse?row=
${
encodeURIComponent
(
JSON
.
stringify
(
item
))}
&completeStatus=
${
item
.
completeStatus
}
`
,
url
:
`/pages/common/studyDetail/longCourse?row=
${
encodeURIComponent
(
JSON
.
stringify
(
item
))}
&completeStatus=
${
item
.
completeStatus
}
&from=service
`
,
fail
:
(
err
)
=>
{
console
.
error
(
'页面跳转失败:'
,
err
);
}
...
...
pages/common/studyDetail/longCourse.vue
View file @
9cd457b
...
...
@@ -120,7 +120,7 @@ export default {
}
,
isTimeout
:
false
,
timer
:
null
,
statusMap
statusMap
,
}
}
,
onLoad
(
options
)
{
...
...
@@ -131,15 +131,15 @@ export default {
if
(
!
this
.
rowData
.
taskDeadline
)
this
.
rowData
.
taskDeadline
=
rowData
.
finishTime
this
.
completeStatus
=
options
.
completeStatus
this
.
punishType
=
options
.
punishType
this
.
getLongCourseDetail
(
rowData
.
id
)
if
(
options
.
from
===
'service'
)
{
this
.
getLongCourseDetail
(
rowData
.
detailId
,
rowData
.
id
)
}
else
{
this
.
getLongCourseDetail
(
rowData
.
id
)
}
if
(
this
.
completeStatus
==
0
)
{
this
.
initCountdown
()
}
}
,
onShow
()
{
console
.
log
(
'onShow'
)
this
.
getLongCourseDetail
(
this
.
rowData
.
id
)
}
,
watch
:
{
// 监听rowData变化,重新初始化倒计时
'rowData.taskDeadline'
(
val
)
{
...
...
@@ -156,10 +156,12 @@ export default {
uni
.
navigateBack
();
uni
.
$emit
(
'backStudyCenter'
)
}
,
async
getLongCourseDetail
(
id
)
{
const
res
=
await
uni
.
$api
.
commonApi
.
getLongCourseDetail
({
id
}
)
async
getLongCourseDetail
(
id
,
boxId
)
{
const
params
=
{
id
}
if
(
boxId
)
{
params
.
boxId
=
boxId
}
const
res
=
await
uni
.
$api
.
commonApi
.
getLongCourseDetail
(
params
)
console
.
log
(
res
,
'res'
)
this
.
courseList
=
res
.
courseList
}
,
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment