Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
dj-car-boutique-work-wechat
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
1
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit a963d05c
authored
Mar 04, 2023
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
代码合并冲突解决
2 parents
2e86c55f
5b6065f4
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
127 additions
and
6 deletions
api/api.js
api/environment.js
package.json
pages/accountItems/accountItems.js
project.private.config.json
yarn.lock
api/api.js
View file @
a963d05
...
@@ -19,6 +19,12 @@ module.exports = {
...
@@ -19,6 +19,12 @@ module.exports = {
getSMS
(
data
)
{
getSMS
(
data
)
{
return
api
.
post
(
'dj.api.smartcarlife.sms.get.code'
,
data
)
return
api
.
post
(
'dj.api.smartcarlife.sms.get.code'
,
data
)
},
},
/** 免登录 */
noLogin
(
data
)
{
data
.
productCode
=
'PC00c2'
return
api
.
post
(
'dj.api.smartcarlife.sms.not.code.login'
,
data
)
},
/**手机验证码登录 /1.0.0 */
/**手机验证码登录 /1.0.0 */
smsLogin
(
data
=
{})
{
smsLogin
(
data
=
{})
{
data
.
source
=
'MINIAPP'
data
.
source
=
'MINIAPP'
...
...
api/environment.js
View file @
a963d05
...
@@ -65,7 +65,8 @@ const secretKey_items = {
...
@@ -65,7 +65,8 @@ const secretKey_items = {
const
domain_items
=
{
const
domain_items
=
{
// ip: 'http://192.168.2.59:8292',
// ip: 'http://192.168.2.59:8292',
// ip: 'http://192.168.1.129:8392',
// ip: 'http://192.168.1.129:8392',
ip
:
'http://192.168.1.129:8292'
,
// ip: 'http://192.168.1.129:8292',
ip
:
'http://192.168.1.165:8292'
,
// ip: 'http://192.168.2.3:8292',
// ip: 'http://192.168.2.3:8292',
dev
:
'https://dj.dev.glsx.com.cn'
,
dev
:
'https://dj.dev.glsx.com.cn'
,
uat
:
'https://dj.test.glsx.com.cn'
,
uat
:
'https://dj.test.glsx.com.cn'
,
...
...
package.json
0 → 100644
View file @
a963d05
{
"dependencies"
:
{
"bignumber.js"
:
"^9.1.1"
}
}
pages/accountItems/accountItems.js
View file @
a963d05
...
@@ -13,7 +13,95 @@ Page({
...
@@ -13,7 +13,95 @@ Page({
* 生命周期函数--监听页面加载
* 生命周期函数--监听页面加载
*/
*/
onLoad
:
function
(
options
)
{
onLoad
:
function
(
options
)
{
this
.
getListSelectAccount
()
console
.
log
(
options
)
// let { noLogin } = options
let
id
=
decodeURIComponent
(
options
.
scene
).
split
(
'='
)[
1
]
// noLogin
console
.
log
(
id
)
id
?
this
.
qrCodeScene
(
id
)
:
this
.
getListSelectAccount
()
// this.getListSelectAccount()
},
// 免登录逻辑
qrCodeScene
(
id
)
{
api
.
getSceneById
({
id
,
channelType
:
1
})
.
then
(
res
=>
{
// debugger
// res => {
console
.
log
(
res
)
let
{
code
,
data
}
=
res
let
op
=
{}
if
(
code
==
'0'
)
{
if
(
data
)
{
data
.
split
(
'&'
).
map
(
item
=>
{
const
[
key
,
val
]
=
item
.
split
(
'='
)
op
[
key
]
=
val
})
this
.
setData
(
{
...
op
},
()
=>
{
this
.
noLoginFn
()
}
)
console
.
log
(
op
)
}
}
// }
})
.
catch
(
err
=>
{})
},
noLoginFn
()
{
let
that
=
this
let
{
noLogin
}
=
this
.
data
wx
.
$util
.
showLoading
()
api
.
noLogin
({
mobile
:
noLogin
})
.
then
(
result
=>
{
wx
.
$util
.
showLoading
()
if
(
result
.
code
==
0
)
{
let
{
loginUserInfoList
,
sessionId
}
=
result
.
data
if
(
loginUserInfoList
.
length
>
0
)
{
wx
.
$util
.
setSessionId
(
sessionId
)
// loginUserInfoList.map
loginUserInfoList
.
map
(
item
=>
{
if
(
item
.
userType
==
2
)
{
item
.
active
=
true
}
return
item
})
that
.
setData
(
{
loginUserInfoList
},
()
=>
{
that
.
choiceAccountLogin
()
}
)
// else {
// wx.$router.reLaunch('pages.nothing')
// }
}
else
{
wx
.
hideLoading
()
wx
.
showModal
({
title
:
'温馨提示'
,
content
:
result
.
message
,
showCancel
:
false
,
confirmText
:
'知道了'
,
confirmColor
:
'#3582EE'
})
}
}
})
.
catch
(
err
=>
{
wx
.
hideLoading
()
})
},
},
getListSelectAccount
()
{
getListSelectAccount
()
{
wx
.
$util
.
showLoading
(
'加载中...'
)
wx
.
$util
.
showLoading
(
'加载中...'
)
...
@@ -64,14 +152,13 @@ Page({
...
@@ -64,14 +152,13 @@ Page({
let
{
data
,
message
}
=
res
let
{
data
,
message
}
=
res
if
(
data
)
{
if
(
data
)
{
// wx.$util.setWebSocket()
// wx.$util.setWebSocket()
wx
.
$util
.
setUserInfo
(
data
.
loginUserInfoList
[
0
])
wx
.
$util
.
setUserInfo
(
data
.
loginUserInfoList
[
0
])
// console.log(data.loginUserInfoList[0])
// console.log(data.loginUserInfoList[0])
app
.
checkYqdSuper
(
data
.
loginUserInfoList
[
0
])
app
.
checkYqdSuper
(
data
.
loginUserInfoList
[
0
])
const
SCENE
=
wx
.
$SCENE
const
SCENE
=
wx
.
$SCENE
//
console.log(SCENE)
console
.
log
(
SCENE
)
// debugger
// debugger
兼容扫码优惠券进来和免登录逻辑冲突问题
if
(
SCENE
)
{
if
(
SCENE
&&
SCENE
.
path
!=
'pages/accountItems/accountItems'
)
{
let
{
let
{
path
,
path
,
query
query
...
...
project.private.config.json
View file @
a963d05
...
@@ -151,6 +151,20 @@
...
@@ -151,6 +151,20 @@
"query"
:
""
,
"query"
:
""
,
"launchMode"
:
"default"
,
"launchMode"
:
"default"
,
"scene"
:
null
"scene"
:
null
},
{
"name"
:
""
,
"pathName"
:
"pages/wxLogin/wxLogin"
,
"query"
:
"noLogin=15626599738"
,
"launchMode"
:
"default"
,
"scene"
:
null
},
{
"name"
:
""
,
"pathName"
:
"pages/accountItems/accountItems"
,
"query"
:
"noLogin=15626599738"
,
"launchMode"
:
"default"
,
"scene"
:
null
}
}
]
]
}
}
...
...
yarn.lock
0 → 100644
View file @
a963d05
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
bignumber.js@^9.1.1:
version "9.1.1"
resolved "https://registry.npmmirror.com/bignumber.js/-/bignumber.js-9.1.1.tgz#c4df7dc496bd849d4c9464344c1aa74228b4dac6"
integrity sha512-pHm4LsMJ6lzgNGVfZHjMoO8sdoRhOzOH4MLmY65Jg70bpxCKu5iOHNJyfF6OyvYw7t8Fpf35RuzUyqnQsj8Vig==
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