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
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
24 deletions
login/index/components/Box/Box.wxml
login/loading/loading.js
login/index/components/Box/Box.wxml
View file @
9e4ff0c
...
@@ -84,7 +84,7 @@
...
@@ -84,7 +84,7 @@
hover-class="btn-hover"
hover-class="btn-hover"
open-type="getPhoneNumber"
open-type="getPhoneNumber"
bindgetphonenumber="wxLogin"
bindgetphonenumber="wxLogin"
loading="{{loading}}">
微信
登录
loading="{{loading}}">
授权
登录
</button>
</button>
</block>
</block>
<block wx:else>
<block wx:else>
...
...
login/loading/loading.js
View file @
9e4ff0c
...
@@ -15,19 +15,19 @@ Page({
...
@@ -15,19 +15,19 @@ Page({
/**
/**
* 生命周期函数--监听页面加载
* 生命周期函数--监听页面加载
*/
*/
onLoad
(
options
)
{
},
onLoad
(
options
)
{},
/**
/**
* 生命周期函数--监听页面初次渲染完成
* 生命周期函数--监听页面初次渲染完成
*/
*/
onReady
()
{
},
onReady
()
{},
/**
/**
* 生命周期函数--监听页面显示
* 生命周期函数--监听页面显示
*/
*/
onShow
()
{
onShow
()
{
const
appEnter
=
wx
.
getEnterOptionsSync
()
const
appEnter
=
wx
.
getEnterOptionsSync
()
console
.
log
(
appEnter
,
'appEnter'
);
console
.
log
(
appEnter
,
'appEnter'
)
if
(
appEnter
.
scene
==
1037
)
{
if
(
appEnter
.
scene
==
1037
)
{
if
(
Object
.
keys
(
appEnter
.
referrerInfo
).
length
)
{
if
(
Object
.
keys
(
appEnter
.
referrerInfo
).
length
)
{
const
{
extraData
}
=
appEnter
.
referrerInfo
const
{
extraData
}
=
appEnter
.
referrerInfo
...
@@ -36,27 +36,29 @@ Page({
...
@@ -36,27 +36,29 @@ Page({
}
else
this
.
init
()
}
else
this
.
init
()
}
else
if
([
1047
,
1048
,
1049
].
includes
(
appEnter
.
scene
))
{
}
else
if
([
1047
,
1048
,
1049
].
includes
(
appEnter
.
scene
))
{
// debugger
// 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
)
{
if
(
!
this
.
options
.
scene
)
{
this
.
init
()
this
.
init
()
return
return
}
}
sceneByIdApi
({
sceneByIdApi
({
id
:
decodeURIComponent
(
appEnter
.
query
.
scene
).
split
(
'='
)[
1
]
id
:
decodeURIComponent
(
appEnter
.
query
.
scene
).
split
(
'='
)[
1
]
}).
then
(
res
=>
{
})
.
then
(
res
=>
{
const
url
=
res
.
scene
const
url
=
res
.
scene
const
obj
=
this
.
arrToObj
(
url
.
split
(
'&'
))
const
obj
=
this
.
arrToObj
(
url
.
split
(
'&'
))
if
(
obj
.
hasOwnProperty
(
'userName'
)
&&
obj
.
hasOwnProperty
(
'password'
))
{
if
(
obj
.
hasOwnProperty
(
'userName'
)
&&
obj
.
hasOwnProperty
(
'password'
))
{
wx
.
$storage
.
rm
(
"sessionId"
)
wx
.
$storage
.
rm
(
'sessionId'
)
wx
.
$storage
.
rm
(
"userInfo"
)
wx
.
$storage
.
rm
(
'userInfo'
)
wx
.
$storage
.
rm
(
"auto_login_object"
)
wx
.
$storage
.
rm
(
'auto_login_object'
)
wx
.
$storage
.
rm
(
"posterId"
)
wx
.
$storage
.
rm
(
'posterId'
)
wx
.
$storage
.
rm
(
"mock_data"
)
wx
.
$storage
.
rm
(
'mock_data'
)
wx
.
$storage
.
set
(
"firstLogin"
,
"firstLogin"
)
wx
.
$storage
.
set
(
'firstLogin'
,
'firstLogin'
)
wx
.
$storage
.
set
(
"disLikeRecordFlag"
,
true
)
wx
.
$storage
.
set
(
'disLikeRecordFlag'
,
true
)
this
.
accountLogin
(
obj
)
this
.
accountLogin
(
obj
)
}
else
this
.
init
()
}
else
this
.
init
()
}).
catch
(()
=>
{
})
.
catch
(()
=>
{
this
.
init
()
this
.
init
()
})
})
}
else
this
.
init
()
}
else
this
.
init
()
...
@@ -65,22 +67,22 @@ Page({
...
@@ -65,22 +67,22 @@ Page({
/**
/**
* 生命周期函数--监听页面隐藏
* 生命周期函数--监听页面隐藏
*/
*/
onHide
()
{
},
onHide
()
{},
/**
/**
* 生命周期函数--监听页面卸载
* 生命周期函数--监听页面卸载
*/
*/
onUnload
()
{
},
onUnload
()
{},
/**
/**
* 页面相关事件处理函数--监听用户下拉动作
* 页面相关事件处理函数--监听用户下拉动作
*/
*/
onPullDownRefresh
()
{
},
onPullDownRefresh
()
{},
/**
/**
* 页面上拉触底事件的处理函数
* 页面上拉触底事件的处理函数
*/
*/
onReachBottom
()
{
},
onReachBottom
()
{},
arrToObj
(
list
)
{
arrToObj
(
list
)
{
if
(
!
Array
.
isArray
(
list
))
{
if
(
!
Array
.
isArray
(
list
))
{
return
{}
return
{}
...
@@ -167,12 +169,13 @@ Page({
...
@@ -167,12 +169,13 @@ Page({
userName
:
obj
.
userName
,
userName
:
obj
.
userName
,
password
:
md5
(
obj
.
password
)
password
:
md5
(
obj
.
password
)
}
}
USERAPI
.
accountLogin
(
params
).
then
(({
code
,
data
,
message
})
=>
{
USERAPI
.
accountLogin
(
params
)
.
then
(({
code
,
data
,
message
})
=>
{
if
(
code
==
'0'
)
{
if
(
code
==
'0'
)
{
const
{
sessionId
,
loginUserInfoList
}
=
data
const
{
sessionId
,
loginUserInfoList
}
=
data
var
routeParams
=
{}
var
routeParams
=
{}
var
list
=
[]
var
list
=
[]
console
.
log
(
obj
,
'obj'
);
console
.
log
(
obj
,
'obj'
)
if
(
obj
.
url
==
'/packagesList/packageOutput/pages/summary'
)
{
if
(
obj
.
url
==
'/packagesList/packageOutput/pages/summary'
)
{
routeParams
=
{
routeParams
=
{
merchantId
:
obj
.
merchantId
,
merchantId
:
obj
.
merchantId
,
...
@@ -182,11 +185,12 @@ Page({
...
@@ -182,11 +185,12 @@ Page({
isSuper
:
loginUserInfoList
[
0
].
isSuper
,
isSuper
:
loginUserInfoList
[
0
].
isSuper
,
fixScenceCode
:
obj
.
sceneCode
fixScenceCode
:
obj
.
sceneCode
}
}
Object
.
keys
(
routeParams
).
forEach
((
item
)
=>
{
Object
.
keys
(
routeParams
).
forEach
(
item
=>
{
list
.
push
(
item
+
"="
+
routeParams
[
item
])
list
.
push
(
item
+
'='
+
routeParams
[
item
])
})
})
this
.
options
.
targetPath
=
obj
.
url
+
"?"
+
list
.
join
(
"&"
)
this
.
options
.
targetPath
=
obj
.
url
+
'?'
+
list
.
join
(
'&'
)
this
.
options
.
targetPath
=
'/pages/tab/output/output'
+
"?"
+
list
.
join
(
"&"
)
// this.options.targetPath = '/pages/tab/output/output' + "?" + list.join("&")
this
.
options
.
targetPath
=
'/pages/tab/outputValue/outputValue'
+
'?'
+
list
.
join
(
'&'
)
}
}
setLoginInfo
(
loginUserInfoList
[
0
],
sessionId
)
setLoginInfo
(
loginUserInfoList
[
0
],
sessionId
)
}
else
{
}
else
{
...
...
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