Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
business-assistant
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 536db5f1
authored
Mar 28, 2023
by
chenwq
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
successpage,创建客户成功后跳转
1 parent
2249e460
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
11 deletions
packageMine/pages/customerManagement/editCustomer/editCustomer.js
packageMine/pages/customerManagement/saleList/saleList.js
packageMine/pages/successPage/successPage.js
packageMine/pages/customerManagement/editCustomer/editCustomer.js
View file @
536db5f
...
...
@@ -112,10 +112,15 @@ Page({
if
(
res
.
confirm
)
{
// 创建/编辑接口
mineCustomerApi
[
apiNameObj
[
addOrEdit
]](
formData
).
then
(
res
=>
{
let
{
code
,
message
}
=
res
let
{
code
,
data
,
message
}
=
res
if
(
code
==
'0'
)
{
if
(
addOrEdit
==
'add'
)
{
wx
.
$router
.
redirectTo
(
'packageMine.successPage?page=customer'
)
if
(
data
)
{
let
params
=
'&merchantId='
+
data
.
merchantId
+
'&sceneList='
+
data
.
sceneList
wx
.
$router
.
redirectTo
(
`packageMine.successPage?page=customer
${
params
}
`
)
}
else
{
wx
.
$api
.
showToast
(
'返回参数有误'
)
}
}
else
{
wx
.
$api
.
showToast
(
'修改成功'
)
setTimeout
(()
=>
{
...
...
packageMine/pages/customerManagement/saleList/saleList.js
View file @
536db5f
...
...
@@ -39,7 +39,7 @@ Page({
handlePopupConfirm
()
{
let
{
popupVal
}
=
this
.
data
if
(
!
popupVal
)
{
if
(
!
popupVal
)
{
wx
.
$api
.
showToast
(
'请选择邀请方式'
)
return
true
}
...
...
@@ -120,6 +120,17 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad
(
options
)
{
if
(
options
?.
isRedirect
)
{
let
{
merchantId
}
=
options
this
.
setData
({
customerInfo
:
{
merchantId
,
sceneList
:
options
.
sceneList
.
split
(
','
)
}
})
this
.
getList
()
return
true
}
wx
.
$router
.
getData
(
res
=>
{
this
.
setData
({
customerInfo
:
res
...
...
packageMine/pages/successPage/successPage.js
View file @
536db5f
...
...
@@ -9,7 +9,7 @@ const obj = {
customer
:
{
navigationTitle
:
'创建客户'
,
primaryBtn
:
'邀请销售顾问'
,
primaryCallback
:
'packageMine.
editCustomer?addOrEdit=add
'
,
primaryCallback
:
'packageMine.
saleList
'
,
cancelBtn
:
'S后自动跳转我的客户'
},
staff
:
{
...
...
@@ -33,15 +33,17 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad
(
options
)
{
// this.setData({
// paramsObj: options
// })
console
.
log
(
options
)
if
(
options
)
{
if
(
options
)
{
let
{
page
}
=
options
this
.
setData
({
paramsObj
:
obj
[
page
]
paramsObj
:
JSON
.
parse
(
JSON
.
stringify
(
obj
[
page
]))
})
if
(
page
==
'customer'
)
{
let
{
merchantId
,
sceneList
}
=
options
this
.
setData
({
[
'paramsObj.primaryCallback'
]:
JSON
.
parse
(
JSON
.
stringify
(
obj
[
page
].
primaryCallback
))
+
'?merchantId='
+
merchantId
+
'&sceneList='
+
sceneList
+
'&isRedirect=true'
})
}
}
let
{
count
,
paramsObj
}
=
this
.
data
this
.
countDownTime
=
setInterval
(()
=>
{
...
...
@@ -67,7 +69,7 @@ Page({
}
else
{
wx
.
$router
.
back
()
}
},
/**
...
...
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