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 534f690a
authored
Oct 17, 2022
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
提交代码
1 parent
6a49815d
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
193 additions
and
61 deletions
api/mineApi/index.js
api/mineApi/mine.js
login/index/index.js
pages/mineDetail/customerManagement/customerManagement.js
pages/mineDetail/customerManagement/customerManagement.wxml
pages/tab/mine/mine.js
pages/tab/mine/mine.wxml
pages/tab/output/components/accountSwitchingPop/accountSwitchingPop.js
pages/tab/output/components/merchant/mrechant.js
pages/tab/output/components/merchantDataStatistics/merchantDataStatistics.js
pages/tab/output/components/merchantDataStatistics/merchantDataStatistics.scss
pages/tab/output/components/merchantDataStatistics/merchantDataStatistics.wxml
pages/tab/output/output.js
api/mineApi/index.js
0 → 100644
View file @
534f690
import
mineApi
from
'./mine.js'
export
default
new
mineApi
()
api/mineApi/mine.js
0 → 100644
View file @
534f690
import
api
from
'~/utils/request/request'
const
{
appId
}
=
wx
.
getAccountInfoSync
().
miniProgram
const
CODE
=
{
platformEntrance
:
'BUSINESS_ASSISTANT'
,
productCode
:
'PC00c3'
}
class
mineApi
{
/**分页查询客户列表 */
merchantCustomInfo
(
data
)
{
return
api
.
post
(
{
method
:
'scrm.api.boutiquecoupon.merchantCustomInfo.page'
,
...
data
}
// true
)
}
}
export
default
mineApi
login/index/index.js
View file @
534f690
...
@@ -31,6 +31,7 @@ Page({
...
@@ -31,6 +31,7 @@ Page({
* 生命周期函数--监听页面显示
* 生命周期函数--监听页面显示
*/
*/
onShow
(
options
,
refresh
)
{
onShow
(
options
,
refresh
)
{
1
if
(
refresh
)
{
if
(
refresh
)
{
this
.
setData
({
this
.
setData
({
disabled
:
true
disabled
:
true
...
@@ -77,21 +78,16 @@ Page({
...
@@ -77,21 +78,16 @@ Page({
})
})
},
},
checkLoginBtn
(
disabled
=
false
)
{
checkLoginBtn
(
disabled
=
false
)
{
const
{
const
{
loginType
}
=
this
.
data
,
loginType
{
}
=
this
.
data
,
{
data
:
{
formData
},
data
:
{
loginToken
formData
}
=
this
.
selectComponent
(
'#box'
)
},
loginToken
}
=
this
.
selectComponent
(
'#box'
)
if
(
loginType
==
0
)
{
if
(
loginType
==
0
)
{
disabled
=
loginToken
disabled
=
loginToken
}
else
disabled
=
loginType
==
1
?
}
else
disabled
=
loginType
==
1
?
formData
.
phone
&&
this
.
validate
.
methods
.
tel
(
formData
.
phone
)
&&
formData
.
code
:
formData
.
account
&&
formData
.
password
formData
.
phone
&&
this
.
validate
.
methods
.
tel
(
formData
.
phone
)
&&
formData
.
code
:
formData
.
account
&&
formData
.
password
this
.
setData
({
this
.
setData
({
disabled
:
!
disabled
disabled
:
!
disabled
})
})
}
}
})
\ No newline at end of file
\ No newline at end of file
})
pages/mineDetail/customerManagement/customerManagement.js
View file @
534f690
// pages/mineDetail/customerManagement/customerManagement.js
// pages/mineDetail/customerManagement/customerManagement.js
import
mineApi
from
'~/api/mineApi/index'
const
listObj
=
Object
.
freeze
([
const
listObj
=
Object
.
freeze
([
{
{
key
:
'merchantId'
,
key
:
'merchantId'
,
...
@@ -58,6 +59,9 @@ Component({
...
@@ -58,6 +59,9 @@ Component({
* 组件的初始数据
* 组件的初始数据
*/
*/
data
:
{
data
:
{
pageNum
:
1
,
pageSize
:
10
,
pages
:
1
,
customerList
:
[
customerList
:
[
{
{
id
:
0
,
id
:
0
,
...
@@ -105,8 +109,38 @@ Component({
...
@@ -105,8 +109,38 @@ Component({
* 组件的方法列表
* 组件的方法列表
*/
*/
methods
:
{
methods
:
{
refreshList
()
{
restPageNum
()
{
// this.getUserDayReport()
console
.
log
(
'restPageNum'
)
this
.
setData
({
pageNum
:
1
})
this
.
getMerchantCustomInfoList
()
},
scrollonReachBottom
()
{
console
.
log
(
'scrollonReachBottom'
)
let
{
pages
,
pageNum
}
=
this
.
data
// 判断当前页是否是末页
if
(
pages
==
pageNum
)
return
wx
.
$api
.
showToast
(
'列表已到底'
)
this
.
setData
({
pageNum
:
pageNum
+
1
})
this
.
getMerchantCustomInfoList
()
},
// 分页查询客户列表
getMerchantCustomInfoList
()
{
wx
.
$api
.
showLoading
(
'加载中...'
)
let
{
pageNum
,
pageSize
,
customerList
}
=
this
.
data
let
params
=
{
pageNum
,
pageSize
}
mineApi
.
merchantCustomInfo
(
params
)
.
then
(
result
=>
{
console
.
log
(
result
)
})
.
catch
(
err
=>
{})
},
},
changeStatus
(
e
)
{
changeStatus
(
e
)
{
console
.
log
(
e
)
console
.
log
(
e
)
...
...
pages/mineDetail/customerManagement/customerManagement.wxml
View file @
534f690
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
label="{{item.isEdit?childItem.editLabel :childItem.label }}"
label="{{item.isEdit?childItem.editLabel :childItem.label }}"
requiredAfter
requiredAfter
cellHeight="{{false}}"
cellHeight="{{false}}"
labelWidth="
14
0rpx">
labelWidth="
20
0rpx">
<input
<input
placeholder="点击输入"
placeholder="点击输入"
class="input"
class="input"
...
...
pages/tab/mine/mine.js
View file @
534f690
// pages/tab/mine/mine.js
// pages/tab/mine/mine.js
import
{
IMG_URL
}
from
'~/utils/constantData'
import
{
IMG_URL
}
from
'~/utils/constantData'
import
USERAPI
from
'~/api/usersApi/index'
const
IMAGES
=
Object
.
freeze
({
const
IMAGES
=
Object
.
freeze
({
icon0
:
`
${
IMG_URL
}
/personal/icon1.png`
,
icon0
:
`
${
IMG_URL
}
/personal/icon1.png`
,
icon1
:
`
${
IMG_URL
}
/personal/icon2.png`
icon1
:
`
${
IMG_URL
}
/personal/icon2.png`
...
@@ -12,7 +13,24 @@ Page({
...
@@ -12,7 +13,24 @@ Page({
navStyle
:
'background-color: rgba(0,0,0,0);'
,
navStyle
:
'background-color: rgba(0,0,0,0);'
,
IMAGES
IMAGES
},
},
logout
()
{
let
_this
=
this
wx
.
showModal
({
title
:
'温馨提示'
,
content
:
'是否退出当前账号?'
,
confirmColor
:
'#3582EE'
,
success
(
res
)
{
if
(
res
.
confirm
)
{
// _this.showLoading()
wx
.
$api
.
showLoading
()
USERAPI
.
logout
().
then
(
_res_
=>
{
wx
.
$storage
.
rm
(
'sessionId'
)
wx
.
$router
.
go
(
'login.index'
)
})
}
}
})
},
navbarReady
(
e
)
{
navbarReady
(
e
)
{
let
{
height
,
statusBarHeight
}
=
e
.
detail
let
{
height
,
statusBarHeight
}
=
e
.
detail
this
.
setData
({
this
.
setData
({
...
...
pages/tab/mine/mine.wxml
View file @
534f690
...
@@ -50,6 +50,7 @@
...
@@ -50,6 +50,7 @@
type="default"
type="default"
isabled="{{false}}"
isabled="{{false}}"
loading="{{false}}"
loading="{{false}}"
bindtap="logout"
hover-class="button-hover">
hover-class="button-hover">
退出登录
退出登录
</button>
</button>
...
...
pages/tab/output/components/accountSwitchingPop/accountSwitchingPop.js
View file @
534f690
...
@@ -75,9 +75,9 @@ Component({
...
@@ -75,9 +75,9 @@ Component({
wx
.
$api
.
showLoading
(
'加载中...'
)
wx
.
$api
.
showLoading
(
'加载中...'
)
USERAPI
.
switchSubLoginInfo
({
merchantId
}).
then
(
res
=>
{
USERAPI
.
switchSubLoginInfo
({
merchantId
}).
then
(
res
=>
{
console
.
log
(
res
)
console
.
log
(
res
)
this
.
setUserInfo
(
res
)
setUserInfo
(
res
)
this
.
hidePopup
()
this
.
hidePopup
()
this
.
triggerEvent
(
'changeAccount'
)
this
.
triggerEvent
(
'changeAccount'
,
'refresh'
)
// }
// }
wx
.
$api
.
hideLoading
()
wx
.
$api
.
hideLoading
()
})
})
...
...
pages/tab/output/components/merchant/mrechant.js
View file @
534f690
...
@@ -9,7 +9,7 @@ Component({
...
@@ -9,7 +9,7 @@ Component({
* 组件的初始数据
* 组件的初始数据
*/
*/
data
:
{
data
:
{
tabIndx
:
1
,
tabIndx
:
4
,
noProduct
:
false
noProduct
:
false
},
},
...
...
pages/tab/output/components/merchantDataStatistics/merchantDataStatistics.js
View file @
534f690
...
@@ -3,7 +3,8 @@ import { IMG_URL } from '~/utils/constantData'
...
@@ -3,7 +3,8 @@ import { IMG_URL } from '~/utils/constantData'
// import { } from "module";
// import { } from "module";
// ;('https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/')
// ;('https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/')
const
IMAGES
=
{
const
IMAGES
=
{
arrow
:
`
${
IMG_URL
}
/output/arrow.png`
arrow
:
`
${
IMG_URL
}
/output/arrow.png`
,
funnel
:
`
${
IMG_URL
}
/output/funnel.png`
}
}
Component
({
Component
({
// behaviors: [imgUrlMixin],
// behaviors: [imgUrlMixin],
...
@@ -17,7 +18,14 @@ Component({
...
@@ -17,7 +18,14 @@ Component({
*/
*/
data
:
{
data
:
{
IMAGES
,
IMAGES
,
isAct
:
true
sceneIndx
:
1
,
isAct
:
true
,
background
:
[
'demo-text-1'
,
'demo-text-2'
,
'demo-text-3'
],
indicatorDots
:
true
,
vertical
:
false
,
autoplay
:
false
,
interval
:
2000
,
duration
:
500
},
},
/**
/**
...
...
pages/tab/output/components/merchantDataStatistics/merchantDataStatistics.scss
View file @
534f690
...
@@ -39,4 +39,32 @@
...
@@ -39,4 +39,32 @@
}
}
}
}
}
}
}
.outputValueCon
{
.title
{
box-sizing
:
border-box
;
font-weight
:
600
;
font-size
:
32rpx
;
color
:
#323436
;
border-bottom
:
2rpx
dashed
#CCCED1
;
padding
:
12rpx
;
}
.full
{
height
:
800rpx
!
important
;
}
.short
{
height
:
600rpx
!
important
;
}
.bg-image
{
width
:
670rpx
;
height
:
550rpx
;
z-index
:
-1
;
// object-fit: cover;
}
}
}
\ No newline at end of file
\ No newline at end of file
pages/tab/output/components/merchantDataStatistics/merchantDataStatistics.wxml
View file @
534f690
...
@@ -21,25 +21,38 @@
...
@@ -21,25 +21,38 @@
<view class="outputValueCon">
<view class="outputValueCon">
<view class="title">产值图</view>
<view class="title">产值图</view>
<view class="swiperCon">
<view class="swiperCon">
<view class="swiper">轮播图</view>
<swiper
<!-- 统计 -->
indicator-dots="{{indicatorDots}}"
<view class="merchantCount">
class="{{sceneIndx==3? 'short':'full'}}"
<view class="turnover">
autoplay="{{autoplay}}"
<view class="img" />
interval="{{interval}}"
<view class="num">200</view>
duration="{{duration}}">
<view class="label">营业额</view>
<block wx:for="{{background}}" wx:key="*this">
</view>
<swiper-item>
<view class="customerUnitPrice">
<view class="swiper-item ">
<view class="img" />
<image class="bg-image" src="{{IMAGES.funnel}}" />
<view class="num">2000</view>
<!-- 统计 -->
<view class="label">营业额</view>
<view class="merchantCount">
</view>
<view class="turnover">
</view>
<view class="img" />
<!-- 指标诊断 -->
<view class="num">200</view>
<view class="diagnosisCon">
<view class="label">营业额</view>
<view class="img">图片</view>
</view>
<view class="tips">日均升级客单价低于1000/低于上2个月平均日升级客单价的10%,建议梳理驻店销售的技能,以及加强与流量方的互动。</view>
<view class="customerUnitPrice">
</view>
<view class="img" />
<view class="num">2000</view>
<view class="label">营业额</view>
</view>
</view>
<!-- 指标诊断 -->
<view class="diagnosisCon">
<view class="img">图片</view>
<view class="tips">日均升级客单价低于1000/低于上2个月平均日升级客单价的10%,建议梳理驻店销售的技能,以及加强与流量方的互动。</view>
</view>
</view>
</swiper-item>
</block>
</swiper>
</view>
</view>
</view>
</view>
</view>
</view>
...
...
pages/tab/output/output.js
View file @
534f690
...
@@ -46,33 +46,46 @@ Page({
...
@@ -46,33 +46,46 @@ Page({
})
})
},
},
getMerchantRange
()
{
getMerchantRange
(
e
)
{
// 重新刷新
let
{
detail
}
=
e
let
{
userInfo
}
=
wx
.
$storage
.
get
()
let
{
userInfo
}
=
wx
.
$storage
.
get
()
// 有问题 先取反调试
// 有问题 先取反调试
userInfo
=
userInfo
.
loginUserInfoList
[
0
]
// userInfo = userInfo.isSuper ? userInfo :
userInfo.loginUserInfoList[0]
console
.
log
(
userInfo
.
subLoginUser
.
merchantId
)
//
console.log(userInfo.subLoginUser.merchantId)
console
.
log
(
userInfo
)
console
.
log
(
userInfo
)
// userInfo.isSuper &&
// userInfo.isSuper &&
USERAPI
.
adminSelectLogin
()
.
then
(
result
=>
{
// 判断是超管才需要切换账号
console
.
log
(
result
)
if
(
userInfo
.
isSuper
)
{
let
{
merchantList
:
merchantRange
}
=
result
USERAPI
.
adminSelectLogin
()
console
.
log
(
merchantRange
)
.
then
(
result
=>
{
let
subIndex
=
-
1
console
.
log
(
result
)
merchantRange
.
forEach
((
item
,
index
)
=>
{
let
{
merchantList
:
merchantRange
}
=
result
item
.
show
=
true
console
.
log
(
merchantRange
)
if
(
item
.
merchantId
==
userInfo
.
subLoginUser
.
merchantId
)
{
let
subIndex
=
-
1
subIndex
=
index
merchantRange
.
forEach
((
item
,
index
)
=>
{
item
.
act
=
true
item
.
show
=
true
}
if
(
item
.
merchantId
==
userInfo
.
subLoginUser
.
merchantId
)
{
})
subIndex
=
index
console
.
log
(
subIndex
)
item
.
act
=
true
this
.
setData
({
}
merchantRange
,
})
subIndex
console
.
log
(
subIndex
)
this
.
setData
({
merchantRange
,
subIndex
})
})
})
.
catch
(
err
=>
{})
}
else
{
let
merchantRange
=
[{
merchantId
:
userInfo
.
subLoginUser
.
merchantId
,
merchantName
:
userInfo
.
subLoginUser
.
merchantName
}]
this
.
setData
({
merchantRange
,
subIndex
:
0
})
})
.
catch
(
err
=>
{})
}
},
},
/**
/**
* 生命周期函数--监听页面加载
* 生命周期函数--监听页面加载
...
...
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