Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
dj-car-boutique-work-wechat
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
1
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit d5365d53
authored
May 27, 2025
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
AI跳转
1 parent
de881de7
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
41 additions
and
4 deletions
packageEquity/pages/sceneMarket/index/index.js
packageEquity/pages/sceneMarket/index/methods.js
packageEquity/pages/sceneMarket/request.js
utils/request/request.js
packageEquity/pages/sceneMarket/index/index.js
View file @
d5365d5
...
@@ -24,6 +24,7 @@ Page({
...
@@ -24,6 +24,7 @@ Page({
onLoad
(
options
)
{
onLoad
(
options
)
{
this
.
getTabHeight
()
this
.
getTabHeight
()
this
.
getSceneMarketMaterialMenu
()
this
.
getSceneMarketMaterialMenu
()
this
.
getAIUrl
()
},
},
/**
/**
...
...
packageEquity/pages/sceneMarket/index/methods.js
View file @
d5365d5
...
@@ -2,6 +2,7 @@ import {
...
@@ -2,6 +2,7 @@ import {
getSceneMarketMaterialMenu
,
getSceneMarketMaterialMenu
,
getSceneMarketMaterialList
,
getSceneMarketMaterialList
,
enterPageTrack
,
enterPageTrack
,
getAiagent
}
from
'../request'
}
from
'../request'
import
dayjs
from
'dayjs'
import
dayjs
from
'dayjs'
export
default
{
export
default
{
...
@@ -148,8 +149,35 @@ export default {
...
@@ -148,8 +149,35 @@ export default {
})
})
},
},
jumpAI
()
{
jumpAI
()
{
wx
.
navigateToMiniProgram
({
if
(
this
.
aiUrl
)
wx
.
navigateTo
({
appId
:
'wx4cc95d0fd0729c32'
url
:
`/pages/webView/webView?url=
${
encodeURIComponent
(
this
.
aiUrl
)}
`
})
})
else
{
wx
.
$util
.
showToast
(
'暂无权限'
)
this
.
getAIUrl
()
}
},
async
getAIUrl
()
{
const
{
phone
,
uuid
}
=
this
.
data
.
userInfo
,
{
code
,
data
}
=
await
getAiagent
({
accountPhone
:
phone
,
ownerShipType
:
0
,
agentCode
:
'AI6'
})
if
(
code
==
0
&&
data
&&
data
.
length
)
{
let
[
item
]
=
data
,
{
ownerPost
,
agentUrl
,
domainName
,
presuppositionProblem
,
accountPhone
}
=
item
this
.
aiUrl
=
`
${
agentUrl
}
?one_id=
${
uuid
}
&platformType=0&phone=
${
accountPhone
}
&position=
${
ownerPost
}
&domain=
${
domainName
}
&presuppositionProblem=
${
presuppositionProblem
}
`
}
}
}
}
}
\ No newline at end of file
\ No newline at end of file
packageEquity/pages/sceneMarket/request.js
View file @
d5365d5
...
@@ -43,7 +43,14 @@ module.exports = {
...
@@ -43,7 +43,14 @@ module.exports = {
leavePageTrack
(
data
=
{})
{
leavePageTrack
(
data
=
{})
{
return
api
.
post
(
'dj.api.customer.dynamic.record.leave'
,
data
)
return
api
.
post
(
'dj.api.customer.dynamic.record.leave'
,
data
)
},
},
getSceneMarketConfig
(){
getSceneMarketConfig
()
{
return
api
.
getMock
(
'scene-market-config'
)
return
api
.
getMock
(
'scene-market-config'
)
}
},
getAiagent
(
data
=
{})
{
return
api
.
post
(
'dj.pad.api.aiagent.get.special.agent'
,
data
,
[],
"/rop-dj-pad/router"
,
"dj"
)
},
}
}
\ No newline at end of file
\ No newline at end of file
utils/request/request.js
View file @
d5365d5
...
@@ -114,6 +114,7 @@ class Request {
...
@@ -114,6 +114,7 @@ class Request {
if
(
!
apiName
)
{
if
(
!
apiName
)
{
throw
new
Error
(
'apiName is null'
)
throw
new
Error
(
'apiName is null'
)
}
}
if
(
apiName
.
split
(
'.'
).
length
>
1
)
apiName
=
apiName
.
split
(
'.'
)[
0
]
if
(
merchant
)
apiName
=
'merchants'
if
(
merchant
)
apiName
=
'merchants'
const
appKey
=
secretKey
[
apiName
].
appKey
const
appKey
=
secretKey
[
apiName
].
appKey
const
secret
=
secretKey
[
apiName
].
secret
const
secret
=
secretKey
[
apiName
].
secret
...
...
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