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 5facc217
authored
Oct 20, 2022
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
功能开发完成
1 parent
b698e735
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
92 additions
and
39 deletions
api/usersApi/UsersApi.js
pages/mineDetail/messageBox/messageBox.js
pages/mineDetail/messageBox/messageBox.scss
pages/mineDetail/messageBox/messageBox.wxml
pages/tab/output/output.js
pages/webView/webView.js
密码.txt
api/usersApi/UsersApi.js
View file @
5facc21
import
api
from
'~/utils/request/request'
const
{
appId
}
=
wx
.
getAccountInfoSync
().
miniProgram
const
{
appId
}
=
wx
.
getAccountInfoSync
().
miniProgram
const
CODE
=
{
platformEntrance
:
'BUSINESS_ASSISTANT'
,
productCode
:
'PC00c3'
...
...
@@ -9,10 +7,9 @@ const CODE = {
class
UsersApi
{
/**调用后台接口获取用户信息js_code换取sessionId */
async
wxCodeLogin
()
{
const
{
code
}
=
await
this
.
getWxCode
()
return
await
api
.
post
({
const
{
code
}
=
await
this
.
getWxCode
()
return
await
api
.
post
(
{
method
:
'scrm.api.sso.wechat.applets.jscode.login'
,
appId
,
code
...
...
@@ -22,7 +19,8 @@ class UsersApi {
}
/**退出登录 */
logout
()
{
return
api
.
post
({
return
api
.
post
(
{
method
:
'scrm.api.sso.wechat.applets.logout'
},
true
...
...
@@ -48,7 +46,8 @@ class UsersApi {
delete
detail
.
errMsg
if
(
detail
.
iv
&&
detail
.
encryptedData
)
{
detail
.
loginToken
=
loginToken
return
api
.
post
({
return
api
.
post
(
{
method
:
'scrm.api.sso.wechat.applets.auth.phone'
,
...
detail
,
platformEntrance
:
'BUSINESS_ASSISTANT'
// 平台标识:生意助手-BUSINESS_ASSISTANT,门店助手-STORE_ASSISTANT
...
...
@@ -59,7 +58,8 @@ class UsersApi {
}
/**账号密码登录 */
async
accountLogin
(
data
=
{})
{
return
api
.
post
({
return
api
.
post
(
{
method
:
'scrm.api.sso.wechat.applets.password.login'
,
...
data
,
...
CODE
...
...
@@ -69,7 +69,8 @@ class UsersApi {
}
/** 手机号获取短信验证码 */
getSmsCode
(
mobile
)
{
return
api
.
post
({
return
api
.
post
(
{
method
:
'scrm.api.sso.wechat.applets.sms.get.code'
,
mobile
},
...
...
@@ -78,7 +79,8 @@ class UsersApi {
}
/** 手机号短信验证码登录 */
phoneSmsLogin
(
data
=
{})
{
return
api
.
post
({
return
api
.
post
(
{
method
:
'scrm.api.sso.wechat.applets.sms.login'
,
...
data
,
source
:
'MINIAPP'
,
...
...
@@ -89,7 +91,8 @@ class UsersApi {
}
/** 获取登录账号列表 */
getAccountList
(
sessionId
)
{
return
api
.
post
({
return
api
.
post
(
{
method
:
'scrm.api.sso.wechat.applets.listSelectAccount'
,
...
CODE
,
sessionId
...
...
@@ -100,7 +103,8 @@ class UsersApi {
/**
* 选择账号登录(手机绑定多个账号时) */
selectAccountLogin
(
data
)
{
return
api
.
post
({
return
api
.
post
(
{
method
:
'scrm.api.sso.wechat.applets.selectAccountLogin'
,
...
CODE
,
...
data
...
...
@@ -110,7 +114,8 @@ class UsersApi {
}
/**检查sessionId 是否过期 */
checkSession
()
{
return
api
.
post
({
return
api
.
post
(
{
method
:
'scrm.api.sso.login.status.check'
},
true
...
...
@@ -118,7 +123,8 @@ class UsersApi {
}
/** 超级管理员切换账号 */
adminSelectLogin
(
data
)
{
return
api
.
post
({
return
api
.
post
(
{
method
:
'scrm.api.sso.super.administrator.select.login'
,
...
CODE
,
...
data
...
...
@@ -134,15 +140,7 @@ class UsersApi {
...
data
})
}
<<<<<<<
HEAD
/** 退出登录 */
logout
(
data
)
{
return
api
.
post
({
method
:
'scrm.api.sso.wechat.applets.logout'
,
...
CODE
,
...
data
=======
/** 手机号授权解析(单纯解析内容返回前端)
/** 手机号授权解析(单纯解析内容返回前端)
* 只传loginToken就返回unionId和openid
* 传加密信息就解析手机号
*/
...
...
@@ -167,8 +165,7 @@ class UsersApi {
method
:
'scrm.api.sso.wechat.applets.phone.grant.analysis'
,
...
detail
,
platformEntrance
:
'BUSINESS_ASSISTANT'
>>>>>>>
453
f605c17f20f69b383822ce6981abe179f022b
})
}
}
export
default
UsersApi
\ No newline at end of file
export
default
UsersApi
pages/mineDetail/messageBox/messageBox.js
View file @
5facc21
...
...
@@ -48,6 +48,10 @@ Component({
* 组件的方法列表
*/
methods
:
{
navWebView
(
e
)
{
let
{
valueUrl
}
=
e
.
currentTarget
.
dataset
wx
.
$router
.
jumpH5
(
valueUrl
)
},
copyLink
(
e
)
{
console
.
log
(
e
)
let
{
url
}
=
e
.
currentTarget
.
dataset
...
...
@@ -100,10 +104,10 @@ Component({
let
{
serviceMerchantId
,
type
,
warReportList
,
messageList
}
=
this
.
data
let
list
=
type
[
typeName
][
'list'
]
console
.
log
(
'list'
,
this
.
data
[
list
])
//
console.log('list', this.data[list])
// return
let
params
=
{
serviceMerchantId
,
serviceMerchantId
:
'44211459'
,
...
type
[
typeName
]
}
// console.log(Math.ceil(2.8))
...
...
pages/mineDetail/messageBox/messageBox.scss
View file @
5facc21
...
...
@@ -51,6 +51,38 @@
color
:
#323436
;
}
.warReportBox
{
box-sizing
:
border-box
;
display
:
flex
;
padding
:
32rpx
0
;
.item
{
width
:
50%
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
flex-direction
:
column
;
margin
:
auto
;
.num
{
margin-top
:
8rpx
;
font-weight
:
500
;
font-size
:
32rpx
;
color
:
#323436
;
}
}
}
.warReportLink
{
display
:
flex
;
.label
{
font-size
:
24rpx
;
color
:
#8A8C90
;
margin-right
:
5rpx
;
}
}
.link
{
margin-left
:
10rpx
;
font-weight
:
400
;
...
...
pages/mineDetail/messageBox/messageBox.wxml
View file @
5facc21
...
...
@@ -28,20 +28,31 @@
data-typeName="warReport"
refresher-triggered="{{triggered}}">
<!-- -->
<msg-box wx:for="{{warReportList}}" wx:key='index' messageT>
<view class="warReportBox">
<msg-box
wx:for="{{warReportList}}"
wx:key='index'
merchantName="{{item.merchantName}}"
messageType="{{item.messageType}}"
time="{{item.updatedTime}}">
<view class="warReportBox" wx:if="{{item.messageType == 2}}">
<view class="item">
<view class="label">当前产值</view>
<view class="num">
225000
</view>
<view class="num">
{{item.currentValue}}元
</view>
</view>
</view>
<view class="warReportBox" wx:if="{{item.messageType == 3}}">
<view class="item">
<view class="label">当前产值</view>
<view class="num">225000</view>
<view class="label">总产值</view>
<view class="num">{{item.totalValue}}元</view>
</view>
<view class="item">
<view class="label">完成目标</view>
<view class="num">{{item.completeRate}}%</view>
</view>
</view>
<view class="
l
ink">
点击了解详情:
<view>战报详情</view>
<view class="
warReportL
ink">
<view class="label">点击了解详情:</view>
<view
class="link" data-valueUrl="{{item.valueUrl}}" bind:tap="navWebView"
>战报详情</view>
</view>
</msg-box>
</scroll-view>
...
...
pages/tab/output/output.js
View file @
5facc21
...
...
@@ -49,6 +49,7 @@ Page({
},
init
()
{
let
{
userInfo
}
=
wx
.
$storage
.
get
()
console
.
log
(
userInfo
)
this
.
setData
({
userInfo
,
isSuper
:
userInfo
.
subLoginUser
.
isSuper
...
...
@@ -57,8 +58,14 @@ Page({
},
getMerchantRange
(
e
)
{
// 重新刷新
// let { detail } = e
// let { detail } = e || null
// console.log(detail)
if
(
e
)
{
let
clientModule
=
this
.
selectAllComponents
(
'client'
)
let
merchantModule
=
this
.
selectAllComponents
(
'merchant'
)
clientModule
.
getClientApi
()
merchantModule
.
init
()
}
let
{
isSuper
,
userInfo
}
=
this
.
data
// 判断是超管才需要切换账号
if
(
isSuper
)
{
...
...
pages/webView/webView.js
View file @
5facc21
...
...
@@ -31,6 +31,7 @@ Page({
let
query
=
JSON
.
parse
(
param
.
urlParam
)
this
.
refresh
=
query
.
refresh
}
console
.
log
(
decodeUrl
)
this
.
setData
({
url
:
decodeUrl
})
...
...
密码.txt
0 → 100644
View file @
5facc21
账号登录: 10988866666(超管)xiong110
\ No newline at end of file
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