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 52a55213
authored
Oct 20, 2022
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
bug修改
1 parent
c2b7072e
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
55 additions
and
41 deletions
pages/tab/mine/mine.js
pages/tab/output/components/merchant/mrechant.js
pages/tab/output/output.js
utils/cache/storageApi.js
utils/request/environment.js
pages/tab/mine/mine.js
View file @
52a5521
...
...
@@ -33,6 +33,7 @@ Page({
USERAPI
.
logout
().
then
(
_res_
=>
{
wx
.
$storage
.
rm
(
'sessionId'
)
wx
.
$storage
.
rm
(
'auto_login_object'
)
wx
.
$storage
.
rm
(
'userInfo'
)
wx
.
$router
.
go
(
'login.index'
)
})
}
...
...
pages/tab/output/components/merchant/mrechant.js
View file @
52a5521
...
...
@@ -56,10 +56,13 @@ Component({
}
// showNothingSceneCon: false
},
attached
()
{
this
.
initTime
()
this
.
init
()
lifetimes
:
{
attached
()
{
this
.
initTime
()
this
.
init
()
}
},
/**
* 组件的方法列表
*/
...
...
@@ -125,50 +128,58 @@ Component({
})
},
getTotalMerchantCount
(
type
)
{
let
{
userInfo
}
=
wx
.
$storage
.
get
()
let
{
current
}
=
this
.
data
// let { } = this.data
let
{
current
,
userInfo
}
=
this
.
data
// let { merchantId } = userInfo.subLoginUser
// console.log('merchantId', merchantId)
console
.
log
(
'test'
,
userInfo
.
merchantId
)
// console.log('test', userInfo.merchantId)
// debugger
// 默认返回2前两条的具体数据 剩下需要自己手动查询
// console.log(outputApi.partnerMerchantTotal)
outputApi
.
partnerMerchantTotal
({
merchantId
:
userInfo
.
merchantId
})
.
then
(
result
=>
{
debugger
console
.
log
(
result
)
// 44211548
try
{
outputApi
.
partnerMerchantTotal
({
merchantId
:
userInfo
.
merchantId
})
.
then
(
result
=>
{
// debugger
// console.log('result', result)
let
{
dataList
,
yqMerchantIds
}
=
result
const
list
=
yqMerchantIds
.
reduce
((
list
,
item
,
index
)
=>
{
let
obj
=
{}
obj
.
totalMoney
=
dataList
[
index
]?.
totalMoney
||
0
obj
.
totalOrder
=
dataList
[
index
]?.
totalOrder
||
0
obj
.
merchantName
=
dataList
[
index
].
merchantName
obj
.
merchantId
=
item
obj
.
startInd
=
dataList
[
index
]?.
sceneList
.
findIndex
(
item
=>
{
return
item
!=
null
})
||
-
1
obj
.
showNothingSceneCon
=
item
.
startInd
==
-
1
obj
.
showList
=
dataList
[
index
]?.
sceneList
||
[]
// obj.norList = type?obj.
obj
.
norList
=
item
.
sceneList
let
{
dataList
,
yqMerchantIds
}
=
result
const
list
=
yqMerchantIds
.
reduce
((
list
,
item
,
index
)
=>
{
let
obj
=
{}
obj
.
totalMoney
=
dataList
[
index
]?.
totalMoney
||
0
obj
.
totalOrder
=
dataList
[
index
]?.
totalOrder
||
0
obj
.
merchantName
=
dataList
[
index
].
merchantName
obj
.
merchantId
=
item
obj
.
startInd
=
dataList
[
index
]?.
sceneList
.
findIndex
(
item
=>
{
return
item
!=
null
})
||
-
1
obj
.
showNothingSceneCon
=
item
.
startInd
==
-
1
obj
.
showList
=
dataList
[
index
]?.
sceneList
||
[]
// obj.norList = type?obj.
obj
.
norList
=
item
.
sceneList
list
.
push
(
obj
)
return
list
},
[])
// console.log('list', list)
// this.
// this
// totalMoney = list[current].totalMoney
this
.
setData
({
list
,
yqMerchantIds
,
totalMoney
:
list
[
current
].
totalMoney
,
totalOrder
:
list
[
current
].
totalOrder
list
.
push
(
obj
)
return
list
},
[])
// console.log('list', list)
// this.
// this
// totalMoney = list[current].totalMoney
this
.
setData
({
list
,
yqMerchantIds
,
totalMoney
:
list
[
current
].
totalMoney
,
totalOrder
:
list
[
current
].
totalOrder
})
})
})
.
catch
(
err
=>
{})
.
catch
(
err
=>
{
console
.
log
(
err
)
})
}
catch
(
error
)
{
console
.
log
(
error
)
}
},
handleSceneChange
(
e
)
{
console
.
log
(
e
)
...
...
pages/tab/output/output.js
View file @
52a5521
...
...
@@ -70,6 +70,7 @@ Page({
merchantModule
.
init
&&
merchantModule
.
init
()
}
let
{
isSuper
,
userInfo
}
=
this
.
data
console
.
log
(
isSuper
)
// 判断是超管才需要切换账号
if
(
isSuper
)
{
USERAPI
.
adminSelectLogin
()
...
...
utils/cache/storageApi.js
View file @
52a5521
...
...
@@ -13,6 +13,7 @@ export function getUserInfo() {
return
$Storage
.
get
(
'userInfo'
)
}
export
function
setUserInfo
(
data
)
{
console
.
log
(
data
)
$Storage
.
set
(
'userInfo'
,
data
)
}
export
function
removeSystemStorage
()
{
...
...
utils/request/environment.js
View file @
52a5521
...
...
@@ -6,7 +6,7 @@ const target = ['ip', 'dev', 'uat', 'prod']
2测试
3生产
*/
const
index
=
1
const
index
=
2
const
secretKey
=
{
ip
:
{},
...
...
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