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
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
10 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({
...
@@ -112,10 +112,15 @@ Page({
if
(
res
.
confirm
)
{
if
(
res
.
confirm
)
{
// 创建/编辑接口
// 创建/编辑接口
mineCustomerApi
[
apiNameObj
[
addOrEdit
]](
formData
).
then
(
res
=>
{
mineCustomerApi
[
apiNameObj
[
addOrEdit
]](
formData
).
then
(
res
=>
{
let
{
code
,
message
}
=
res
let
{
code
,
data
,
message
}
=
res
if
(
code
==
'0'
)
{
if
(
code
==
'0'
)
{
if
(
addOrEdit
==
'add'
)
{
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
{
}
else
{
wx
.
$api
.
showToast
(
'修改成功'
)
wx
.
$api
.
showToast
(
'修改成功'
)
setTimeout
(()
=>
{
setTimeout
(()
=>
{
...
...
packageMine/pages/customerManagement/saleList/saleList.js
View file @
536db5f
...
@@ -39,7 +39,7 @@ Page({
...
@@ -39,7 +39,7 @@ Page({
handlePopupConfirm
()
{
handlePopupConfirm
()
{
let
{
popupVal
}
=
this
.
data
let
{
popupVal
}
=
this
.
data
if
(
!
popupVal
)
{
if
(
!
popupVal
)
{
wx
.
$api
.
showToast
(
'请选择邀请方式'
)
wx
.
$api
.
showToast
(
'请选择邀请方式'
)
return
true
return
true
}
}
...
@@ -120,6 +120,17 @@ Page({
...
@@ -120,6 +120,17 @@ Page({
* 生命周期函数--监听页面加载
* 生命周期函数--监听页面加载
*/
*/
onLoad
(
options
)
{
onLoad
(
options
)
{
if
(
options
?.
isRedirect
)
{
let
{
merchantId
}
=
options
this
.
setData
({
customerInfo
:
{
merchantId
,
sceneList
:
options
.
sceneList
.
split
(
','
)
}
})
this
.
getList
()
return
true
}
wx
.
$router
.
getData
(
res
=>
{
wx
.
$router
.
getData
(
res
=>
{
this
.
setData
({
this
.
setData
({
customerInfo
:
res
customerInfo
:
res
...
...
packageMine/pages/successPage/successPage.js
View file @
536db5f
...
@@ -9,7 +9,7 @@ const obj = {
...
@@ -9,7 +9,7 @@ const obj = {
customer
:
{
customer
:
{
navigationTitle
:
'创建客户'
,
navigationTitle
:
'创建客户'
,
primaryBtn
:
'邀请销售顾问'
,
primaryBtn
:
'邀请销售顾问'
,
primaryCallback
:
'packageMine.
editCustomer?addOrEdit=add
'
,
primaryCallback
:
'packageMine.
saleList
'
,
cancelBtn
:
'S后自动跳转我的客户'
cancelBtn
:
'S后自动跳转我的客户'
},
},
staff
:
{
staff
:
{
...
@@ -33,15 +33,17 @@ Page({
...
@@ -33,15 +33,17 @@ Page({
* 生命周期函数--监听页面加载
* 生命周期函数--监听页面加载
*/
*/
onLoad
(
options
)
{
onLoad
(
options
)
{
// this.setData({
if
(
options
)
{
// paramsObj: options
// })
console
.
log
(
options
)
if
(
options
)
{
let
{
page
}
=
options
let
{
page
}
=
options
this
.
setData
({
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
let
{
count
,
paramsObj
}
=
this
.
data
this
.
countDownTime
=
setInterval
(()
=>
{
this
.
countDownTime
=
setInterval
(()
=>
{
...
...
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