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 9e4ff0cf
authored
Sep 15, 2023
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
线上二维码bug修复
1 parent
3fb5ed9f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
55 additions
and
51 deletions
login/index/components/Box/Box.wxml
login/loading/loading.js
login/index/components/Box/Box.wxml
View file @
9e4ff0c
...
...
@@ -84,7 +84,7 @@
hover-class="btn-hover"
open-type="getPhoneNumber"
bindgetphonenumber="wxLogin"
loading="{{loading}}">
微信
登录
loading="{{loading}}">
授权
登录
</button>
</block>
<block wx:else>
...
...
login/loading/loading.js
View file @
9e4ff0c
...
...
@@ -15,19 +15,19 @@ Page({
/**
* 生命周期函数--监听页面加载
*/
onLoad
(
options
)
{
},
onLoad
(
options
)
{},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady
()
{
},
onReady
()
{},
/**
* 生命周期函数--监听页面显示
*/
onShow
()
{
const
appEnter
=
wx
.
getEnterOptionsSync
()
console
.
log
(
appEnter
,
'appEnter'
);
console
.
log
(
appEnter
,
'appEnter'
)
if
(
appEnter
.
scene
==
1037
)
{
if
(
Object
.
keys
(
appEnter
.
referrerInfo
).
length
)
{
const
{
extraData
}
=
appEnter
.
referrerInfo
...
...
@@ -36,51 +36,53 @@ Page({
}
else
this
.
init
()
}
else
if
([
1047
,
1048
,
1049
].
includes
(
appEnter
.
scene
))
{
// debugger
console
.
log
(
!
this
.
options
.
scene
,
this
.
options
,
'!this.options.scene'
);
console
.
log
(
!
this
.
options
.
scene
,
this
.
options
,
'!this.options.scene'
)
if
(
!
this
.
options
.
scene
)
{
this
.
init
()
return
}
sceneByIdApi
({
id
:
decodeURIComponent
(
appEnter
.
query
.
scene
).
split
(
'='
)[
1
]
}).
then
(
res
=>
{
const
url
=
res
.
scene
const
obj
=
this
.
arrToObj
(
url
.
split
(
'&'
))
if
(
obj
.
hasOwnProperty
(
'userName'
)
&&
obj
.
hasOwnProperty
(
'password'
))
{
wx
.
$storage
.
rm
(
"sessionId"
)
wx
.
$storage
.
rm
(
"userInfo"
)
wx
.
$storage
.
rm
(
"auto_login_object"
)
wx
.
$storage
.
rm
(
"posterId"
)
wx
.
$storage
.
rm
(
"mock_data"
)
wx
.
$storage
.
set
(
"firstLogin"
,
"firstLogin"
)
wx
.
$storage
.
set
(
"disLikeRecordFlag"
,
true
)
this
.
accountLogin
(
obj
)
}
else
this
.
init
()
}).
catch
(()
=>
{
this
.
init
()
})
.
then
(
res
=>
{
const
url
=
res
.
scene
const
obj
=
this
.
arrToObj
(
url
.
split
(
'&'
))
if
(
obj
.
hasOwnProperty
(
'userName'
)
&&
obj
.
hasOwnProperty
(
'password'
))
{
wx
.
$storage
.
rm
(
'sessionId'
)
wx
.
$storage
.
rm
(
'userInfo'
)
wx
.
$storage
.
rm
(
'auto_login_object'
)
wx
.
$storage
.
rm
(
'posterId'
)
wx
.
$storage
.
rm
(
'mock_data'
)
wx
.
$storage
.
set
(
'firstLogin'
,
'firstLogin'
)
wx
.
$storage
.
set
(
'disLikeRecordFlag'
,
true
)
this
.
accountLogin
(
obj
)
}
else
this
.
init
()
})
.
catch
(()
=>
{
this
.
init
()
})
}
else
this
.
init
()
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide
()
{
},
onHide
()
{},
/**
* 生命周期函数--监听页面卸载
*/
onUnload
()
{
},
onUnload
()
{},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh
()
{
},
onPullDownRefresh
()
{},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom
()
{
},
onReachBottom
()
{},
arrToObj
(
list
)
{
if
(
!
Array
.
isArray
(
list
))
{
return
{}
...
...
@@ -167,35 +169,37 @@ Page({
userName
:
obj
.
userName
,
password
:
md5
(
obj
.
password
)
}
USERAPI
.
accountLogin
(
params
).
then
(({
code
,
data
,
message
})
=>
{
if
(
code
==
'0'
)
{
const
{
sessionId
,
loginUserInfoList
}
=
data
var
routeParams
=
{}
var
list
=
[]
console
.
log
(
obj
,
'obj'
);
if
(
obj
.
url
==
'/packagesList/packageOutput/pages/summary'
)
{
routeParams
=
{
merchantId
:
obj
.
merchantId
,
merchantName
:
obj
.
merchantName
,
pMerchantId
:
loginUserInfoList
[
0
].
subLoginUser
.
merchantId
,
pMerchantName
:
loginUserInfoList
[
0
].
subLoginUser
.
merchantName
,
isSuper
:
loginUserInfoList
[
0
].
isSuper
,
fixScenceCode
:
obj
.
sceneCode
USERAPI
.
accountLogin
(
params
)
.
then
(({
code
,
data
,
message
})
=>
{
if
(
code
==
'0'
)
{
const
{
sessionId
,
loginUserInfoList
}
=
data
var
routeParams
=
{}
var
list
=
[]
console
.
log
(
obj
,
'obj'
)
if
(
obj
.
url
==
'/packagesList/packageOutput/pages/summary'
)
{
routeParams
=
{
merchantId
:
obj
.
merchantId
,
merchantName
:
obj
.
merchantName
,
pMerchantId
:
loginUserInfoList
[
0
].
subLoginUser
.
merchantId
,
pMerchantName
:
loginUserInfoList
[
0
].
subLoginUser
.
merchantName
,
isSuper
:
loginUserInfoList
[
0
].
isSuper
,
fixScenceCode
:
obj
.
sceneCode
}
Object
.
keys
(
routeParams
).
forEach
(
item
=>
{
list
.
push
(
item
+
'='
+
routeParams
[
item
])
})
this
.
options
.
targetPath
=
obj
.
url
+
'?'
+
list
.
join
(
'&'
)
// this.options.targetPath = '/pages/tab/output/output' + "?" + list.join("&")
this
.
options
.
targetPath
=
'/pages/tab/outputValue/outputValue'
+
'?'
+
list
.
join
(
'&'
)
}
Object
.
keys
(
routeParams
).
forEach
((
item
)
=>
{
list
.
push
(
item
+
"="
+
routeParams
[
item
])
})
this
.
options
.
targetPath
=
obj
.
url
+
"?"
+
list
.
join
(
"&"
)
this
.
options
.
targetPath
=
'/pages/tab/output/output'
+
"?"
+
list
.
join
(
"&"
)
setLoginInfo
(
loginUserInfoList
[
0
],
sessionId
)
}
else
{
wx
.
$api
.
showToast
(
message
||
'系统异常'
)
setTimeout
(()
=>
{
wx
.
$router
.
reLaunch
(
'login.index'
)
},
1
e3
)
}
setLoginInfo
(
loginUserInfoList
[
0
],
sessionId
)
}
else
{
wx
.
$api
.
showToast
(
message
||
'系统异常'
)
setTimeout
(()
=>
{
wx
.
$router
.
reLaunch
(
'login.index'
)
},
1
e3
)
}
})
})
.
catch
(
err
=>
{
wx
.
$api
.
showToast
(
'系统异常'
)
setTimeout
(()
=>
{
...
...
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