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 e43d8250
authored
Feb 28, 2024
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
feat 用户协议添加
1 parent
ff257415
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
64 additions
and
18 deletions
login/index/components/Box/Box.js
login/lib/index.js
pages/tab/mine/mine.js
pages/tab/mine/mine.scss
pages/tab/mine/mine.wxml
login/index/components/Box/Box.js
View file @
e43d825
...
...
@@ -159,17 +159,19 @@ Component({
obj
=
loginType
==
1
?
{
mobile
:
formData
.
phone
,
code
:
formData
.
code
}
mobile
:
formData
.
phone
,
code
:
formData
.
code
}
:
{
userName
:
formData
.
account
,
password
:
md5
(
formData
.
password
)
}
userName
:
formData
.
account
,
password
:
md5
(
formData
.
password
)
}
this
.
setBtnLoading
()
USERAPI
[
target
](
obj
)
.
then
(({
code
,
data
,
message
})
=>
{
this
.
setBtnLoading
(
false
)
// console.log(code, 'code');
// debugger
if
(
code
==
'0'
)
{
const
thisPage
=
wx
.
$router
.
getPageInstance
()
if
(
loginType
==
1
)
checkLoginUserInfo
(
data
)
...
...
@@ -202,8 +204,8 @@ Component({
},
/**微信登录 */
wxLogin
({
detail
})
{
console
.
log
(
detail
,
'detail'
);
if
(
detail
.
errno
==
104
||!
detail
.
code
)
return
//用户手动拒绝
console
.
log
(
detail
,
'detail'
);
if
(
detail
.
errno
==
104
||
!
detail
.
code
)
return
//用户手动拒绝
// if (!detail.code) {
// // wx.$api.showToast('当前微信版本过低,无法使用该功能,请升级到最新微信版本后重试。')
// return
...
...
@@ -237,7 +239,7 @@ Component({
/**页面初始化 */
async
init
()
{
this
.
setData
({
code
:
3
code
:
3
})
network
.
getNetworkType
()
try
{
...
...
@@ -246,7 +248,7 @@ Component({
if
(
code
==
'0'
)
{
thisPage
.
setData
({
disabled
:
false
,
loginToken
:
data
loginToken
:
data
})
this
.
loginToken
=
data
}
else
this
.
reLogin
(
message
)
...
...
login/lib/index.js
View file @
e43d825
...
...
@@ -33,16 +33,20 @@ const setLoginInfo = (userInfo, sessionId) => {
wx
.
$api
.
showToast
(
'仅支持服务商类型账户登录'
)
return
}
console
.
log
(
'wx.$router.getPageInstance()'
,
wx
.
$router
.
getPageInstance
());
const
{
options
:
{
reportDate
}
options
:
{
reportDate
},
options
}
=
wx
.
$router
.
getPageInstance
()
// 跳转别的小程序
// debugger
if
(
reportDate
)
{
let
params
=
`approvedBy=
${
userInfo
.
name
}
&`
for
(
const
key
in
options
)
{
params
+=
`
${
key
}
=
${
options
[
key
]}
&`
}
console
.
log
(
params
);
return
wx
.
navigateToMiniProgram
({
appId
:
'wx570d9331f9ace0bd'
,
path
:
`tabWorkOrder/pages/staffDaily/staffDaily`
+
'?'
+
params
,
...
...
pages/tab/mine/mine.js
View file @
e43d825
...
...
@@ -49,9 +49,9 @@ Page({
name
:
'更新日志'
,
path
:
'packageMine.log'
,
isHide
:
false
,
newTips
:
true
newTips
:
true
}
],
],
isShowService
:
false
,
},
navGO
(
e
)
{
...
...
@@ -106,7 +106,7 @@ Page({
},
messageBoxPageIsRead
()
{
let
{
serviceMerchantId
}
=
this
.
data
console
.
log
(
serviceMerchantId
,
'serviceMerchantId'
);
console
.
log
(
serviceMerchantId
,
'serviceMerchantId'
);
const
idx
=
this
.
data
.
boxItemList
.
findIndex
(
item
=>
item
.
name
==
'消息盒子'
)
mineApi
.
messageBoxPageIsRead
({
...
...
@@ -155,7 +155,7 @@ Page({
judgeIsHide
()
{
let
{
boxItemList
,
userInfo
}
=
this
.
data
let
nameList
=
[
'服务中心管理'
,
'员工管理'
,
'客户管理'
]
if
(
!
userInfo
.
isSuper
)
{
if
(
!
userInfo
.
isSuper
)
{
nameList
.
forEach
(
item
=>
{
let
idx
=
boxItemList
.
findIndex
(
k
=>
k
.
name
==
item
)
this
.
setData
({
...
...
@@ -170,12 +170,35 @@ Page({
versionData
})
},
jump
(
e
)
{
console
.
log
(
e
)
let
{
url
}
=
e
.
currentTarget
.
dataset
const
baseUrl
=
'https://img01.glsx.com.cn/weapp/resource/saas/scrm/html/'
const
path
=
`
${
baseUrl
}${
url
}
.html`
// private user
wx
.
navigateTo
({
url
:
`/pages/webView/webView?url=
${
encodeURIComponent
(
path
)}
`
})
// var globalData = appInstance.globalData.extConfig
// restapi.getMerchantBussiness(globalData.merchantId, function (res) {
// console.log(res);
// if (res.returnCode == '0') {
// let path = `https://dj.glsx.com.cn/agreement/djUserPolicy.html?merchantName=${globalData.merchantName}&phone=${res.data.phone}`
// wx.navigateTo({
// url: `/pages/webpage/webpage?path=${encodeURIComponent(path)}`
// })
// }
// }, function (res) {
// console.log(res);
// })
},
/**
* 生命周期函数--监听页面加载
*/
onLoad
:
async
function
(
options
)
{
let
{
userInfo
}
=
wx
.
$storage
.
get
()
let
serviceMerchantId
=
userInfo
.
subLoginUser
?.
merchantId
//解决因为使用await 异步导致数据没同步已经开始调用onshow方法
this
.
setData
({
...
...
@@ -183,7 +206,7 @@ Page({
// userInfo: userInfo.subLoginUser
userInfo
})
let
{
serviceMerchatList
}
=
await
getMockData
()
||
{
serviceMerchatList
:
[]
}
// v4.27.0_0831版本隐藏加微入口
// this.setData({
...
...
@@ -202,7 +225,7 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow
:
function
()
{
this
.
messageBoxPageIsRead
()
this
.
getUnreadApi
()
let
{
...
...
pages/tab/mine/mine.scss
View file @
e43d825
...
...
@@ -203,4 +203,15 @@ page {
width
:
336rpx
;
height
:
88rpx
;
line-height
:
88rpx
;
}
.message-box
{
position
:
fixed
;
bottom
:
30rpx
;
left
:
50%
;
transform
:
translateX
(
-50%
);
}
.message-box
text
{
color
:
#5092FF
;
}
\ No newline at end of file
pages/tab/mine/mine.wxml
View file @
e43d825
...
...
@@ -40,6 +40,12 @@
<button class="logoutBtn" size="default" type="default" isabled="{{false}}" loading="{{false}}" bindtap="logout" hover-class="button-hover">
退出登录
</button>
<view class="message-box">
<!-- <view class="message">为保障你的合法权益,请阅读并同意</view> -->
<text catchtap="jump" data-url="privacy">《隐私协议》</text>
和
<text catchtap="jump" data-url="agreement">《用户协议》</text>
</view>
</view>
<!-- 加微 -->
<service wx:if="{{isShowService}}"></service>
\ 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