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 d79cc5bb
authored
Nov 11, 2022
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
bug修复
1 parent
6edf27d7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
64 deletions
login/loading/loading.js
packagesList/mineDetail/pages/customerManagement.js
project.private.config.json
login/loading/loading.js
View file @
d79cc5b
import
{
checkLoginUserInfo
,
setRouteData
,
setLoginInfo
,
loginModal
}
from
'../lib/index'
import
{
getSessionId
,
}
from
'~/utils/cache/storageApi'
import
{
checkLoginUserInfo
,
setRouteData
,
setLoginInfo
,
loginModal
}
from
'../lib/index'
import
{
getSessionId
}
from
'~/utils/cache/storageApi'
import
USERAPI
from
'~/api/usersApi/index'
import
{
IMG_URL
}
from
'~/utils/constantData'
Page
({
/**
* 页面的初始数据
*/
data
:
{
IMG_URL
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
(
options
)
{
},
onLoad
(
options
)
{},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady
()
{
},
onReady
()
{},
/**
* 生命周期函数--监听页面显示
...
...
@@ -39,9 +27,7 @@ Page({
const
appEnter
=
wx
.
getEnterOptionsSync
()
if
(
appEnter
.
scene
==
1037
)
{
if
(
Object
.
keys
(
appEnter
.
referrerInfo
).
length
)
{
const
{
extraData
}
=
appEnter
.
referrerInfo
const
{
extraData
}
=
appEnter
.
referrerInfo
if
(
extraData
&&
Object
.
keys
(
extraData
).
length
)
this
.
phoneSmsLogin
(
extraData
)
else
this
.
init
()
}
else
this
.
init
()
...
...
@@ -51,44 +37,31 @@ Page({
/**
* 生命周期函数--监听页面隐藏
*/
onHide
()
{
},
onHide
()
{},
/**
* 生命周期函数--监听页面卸载
*/
onUnload
()
{
},
onUnload
()
{},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh
()
{
},
onPullDownRefresh
()
{},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom
()
{
},
onReachBottom
()
{},
init
()
{
wx
.
nextTick
(()
=>
{
const
sessionId
=
getSessionId
(),
{
url
,
targetPath
=
url
?
decodeURIComponent
(
url
)
:
''
}
=
this
.
options
{
url
,
targetPath
=
url
?
decodeURIComponent
(
url
)
:
''
}
=
this
.
options
let
path
=
'pages.index'
,
obj
=
{}
if
(
targetPath
)
obj
.
targetPath
=
targetPath
if
(
sessionId
)
{
USERAPI
.
checkSession
().
then
(({
code
})
=>
{
USERAPI
.
checkSession
().
then
(({
code
})
=>
{
if
(
code
==
'0'
)
{
if
(
targetPath
)
{
path
=
setRouteData
(
targetPath
).
url
...
...
@@ -103,25 +76,14 @@ Page({
autoLogin
(
obj
)
{
const
autoLoginObject
=
wx
.
$storage
.
get
(
'auto_login_object'
)
if
(
autoLoginObject
)
{
const
{
failureTime
,
userName
,
password
}
=
autoLoginObject
const
{
failureTime
,
userName
,
password
}
=
autoLoginObject
if
(
Date
.
now
()
<
failureTime
)
{
USERAPI
.
accountLogin
({
userName
,
password
}).
then
(
async
({
data
,
code
,
message
})
=>
{
}).
then
(
async
({
data
,
code
,
message
})
=>
{
if
(
code
==
'0'
&&
data
.
loginUserInfoList
.
length
)
{
const
{
sessionId
,
loginUserInfoList
}
=
data
const
{
sessionId
,
loginUserInfoList
}
=
data
setLoginInfo
(
loginUserInfoList
[
0
],
sessionId
)
}
else
{
try
{
...
...
@@ -142,13 +104,10 @@ Page({
phoneSmsLogin
(
extraData
)
{
console
.
log
(
extraData
)
USERAPI
.
phoneSmsLogin
({
mobile
:
extraData
.
phone
,
code
:
extraData
.
smscode
}).
then
(({
code
,
data
,
message
})
=>
{
mobile
:
extraData
.
phone
,
code
:
extraData
.
smscode
})
.
then
(({
code
,
data
,
message
})
=>
{
if
(
code
==
'0'
)
checkLoginUserInfo
(
data
)
else
{
wx
.
$api
.
showToast
(
message
||
'系统异常'
)
...
...
@@ -164,4 +123,4 @@ Page({
},
1
e3
)
})
}
})
\ No newline at end of file
})
packagesList/mineDetail/pages/customerManagement.js
View file @
d79cc5b
...
...
@@ -10,6 +10,13 @@ const listObj = Object.freeze([
editLabel
:
'商户号'
},
{
key
:
'actualContactName'
,
label
:
'商户账号:'
// placeholder: '请输入您的商户账号',
// editLabel: '商户账号',
// maxLength: 20
},
{
key
:
'merchantName'
,
label
:
'门店名称:'
,
placeholder
:
'请输入您的客户门店简称'
,
...
...
@@ -128,12 +135,15 @@ Component({
.
then
(
result
=>
{
console
.
log
(
result
)
let
{
pages
,
list
,
total
}
=
result
console
.
log
(
list
)
list
=
list
.
map
(
item
=>
{
item
.
merchantName
=
item
.
merchantName
||
item
.
actualMerchantName
item
.
phone
=
item
.
phone
||
item
.
actualPhone
item
.
contactName
=
item
.
contactName
||
item
.
actualContactName
// || item.actualContactName
item
.
contactName
=
item
.
contactName
||
item
.
actualAccountName
return
item
})
console
.
log
(
list
)
this
.
setData
({
customerList
:
pageNum
==
1
?
list
:
[...
customerList
,
...
list
],
triggered
:
false
,
...
...
project.private.config.json
View file @
d79cc5b
...
...
@@ -41,7 +41,7 @@
},
{
"name"
:
"客户管理"
,
"pathName"
:
"pa
ges/mineDetail/customerManagement
/customerManagement"
,
"pathName"
:
"pa
ckagesList/mineDetail/pages
/customerManagement"
,
"query"
:
""
,
"launchMode"
:
"default"
,
"scene"
:
null
...
...
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