Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
J
jd-vx-app
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
jd-vx-app
Commits
681485b2
Commit
681485b2
authored
Jul 07, 2022
by
lijiongliang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
接口修改
parent
526e7290
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
96 additions
and
52 deletions
+96
-52
main.js
main.js
+1
-1
index.vue
pages/binding/index.vue
+3
-3
moveCar.vue
pages/binding/moveCar.vue
+1
-1
main.vue
pages/main.vue
+3
-3
moveCar.vue
pages/moveCar.vue
+1
-1
loveCar.vue
pagesB/pages/move-car/loveCar.vue
+0
-11
scan.vue
pagesB/pages/move-car/scan.vue
+87
-32
No files found.
main.js
View file @
681485b2
...
@@ -5,7 +5,7 @@ import store from "./store";
...
@@ -5,7 +5,7 @@ import store from "./store";
Vue
.
prototype
.
$store
=
store
;
Vue
.
prototype
.
$store
=
store
;
import
http
from
"./common/api/api.js"
import
http
from
"./common/api/api.js"
import
$http
from
'@/common/
zhouWei-
request/requestConfig'
;
import
$http
from
'@/common/request/requestConfig'
;
Vue
.
config
.
productionTip
=
false
Vue
.
config
.
productionTip
=
false
import
ActiveForm
from
"@/common/active-form/active-form"
;
import
ActiveForm
from
"@/common/active-form/active-form"
;
...
...
pages/binding/index.vue
View file @
681485b2
...
@@ -80,7 +80,7 @@
...
@@ -80,7 +80,7 @@
//检查挪车码存在、是否绑定
//检查挪车码存在、是否绑定
getCheckMoveCode
()
{
getCheckMoveCode
()
{
let
opts
=
{
let
opts
=
{
url
:
'/app/user/c
heck/move/code
'
,
url
:
'/app/user/c
/m/c
'
,
method
:
'post'
method
:
'post'
};
};
this
.
http
.
httpTokenRequest
(
opts
,
{
this
.
http
.
httpTokenRequest
(
opts
,
{
...
@@ -170,7 +170,7 @@
...
@@ -170,7 +170,7 @@
code
:
this
.
scene
code
:
this
.
scene
}
}
opts
=
{
opts
=
{
url
:
'/app/user/c
heck/move/code
'
,
url
:
'/app/user/c
/m/c
'
,
method
:
'post'
method
:
'post'
}
}
that
.
http
.
httpTokenRequest
(
opts
,
param
).
then
(
res
=>
{
that
.
http
.
httpTokenRequest
(
opts
,
param
).
then
(
res
=>
{
...
@@ -306,7 +306,7 @@
...
@@ -306,7 +306,7 @@
code
:
this
.
scene
code
:
this
.
scene
}
}
opts
=
{
opts
=
{
url
:
'/app/user/c
heck/move/code
'
,
url
:
'/app/user/c
/m/c
'
,
method
:
'post'
method
:
'post'
}
}
that
.
http
.
httpTokenRequest
(
opts
,
param
).
then
(
res
=>
{
that
.
http
.
httpTokenRequest
(
opts
,
param
).
then
(
res
=>
{
...
...
pages/binding/moveCar.vue
View file @
681485b2
...
@@ -81,7 +81,7 @@ export default {
...
@@ -81,7 +81,7 @@ export default {
code
:
scene
code
:
scene
}
}
let
opts
=
{
let
opts
=
{
url
:
'/app/user/c
heck/move/code
'
,
url
:
'/app/user/c
/m/c
'
,
method
:
'post'
method
:
'post'
}
}
...
...
pages/main.vue
View file @
681485b2
...
@@ -102,7 +102,7 @@
...
@@ -102,7 +102,7 @@
let
paths
=
path
.
split
(
'?'
)[
1
]
let
paths
=
path
.
split
(
'?'
)[
1
]
let
scene
=
paths
.
split
(
"="
)[
1
]
let
scene
=
paths
.
split
(
"="
)[
1
]
// this.$http.request({
// this.$http.request({
// url:'/app/user/c
heck/move/code
',
// url:'/app/user/c
/m/c
',
// method:'post',
// method:'post',
// data:{
// data:{
// code: scene
// code: scene
...
@@ -229,7 +229,7 @@
...
@@ -229,7 +229,7 @@
// 扫一扫
// 扫一扫
goScene
(
scene
){
goScene
(
scene
){
this
.
$http
.
request
({
this
.
$http
.
request
({
url
:
'/app/user/c
heck/move/code
'
,
url
:
'/app/user/c
/m/c
'
,
method
:
'post'
,
method
:
'post'
,
data
:{
data
:{
code
:
scene
code
:
scene
...
@@ -323,7 +323,7 @@
...
@@ -323,7 +323,7 @@
//扫码后得到的参数
//扫码后得到的参数
this
.
goScene
(
that
.
scene
)
this
.
goScene
(
that
.
scene
)
// that.http.httpTokenRequest({
// that.http.httpTokenRequest({
// url: '/app/user/c
heck/move/code
',
// url: '/app/user/c
/m/c
',
// method: 'post'
// method: 'post'
// }, {
// }, {
// code: that.scene
// code: that.scene
...
...
pages/moveCar.vue
View file @
681485b2
...
@@ -88,7 +88,7 @@
...
@@ -88,7 +88,7 @@
let
paths
=
path
.
split
(
'?'
)[
1
]
let
paths
=
path
.
split
(
'?'
)[
1
]
let
scene
=
paths
.
split
(
"="
)[
1
]
let
scene
=
paths
.
split
(
"="
)[
1
]
this
.
$http
.
request
({
this
.
$http
.
request
({
url
:
'/app/user/c
heck/move/code
'
,
url
:
'/app/user/c
/m/c
'
,
method
:
'post'
,
method
:
'post'
,
data
:{
data
:{
code
:
scene
code
:
scene
...
...
pagesB/pages/move-car/loveCar.vue
View file @
681485b2
...
@@ -110,17 +110,6 @@ export default {
...
@@ -110,17 +110,6 @@ export default {
this
.
deleteShow
=
false
this
.
deleteShow
=
false
},
},
getCarList
(){
getCarList
(){
// uni.showLoading({
// title: '加载中',
// mask:true
// });
// let opts = { url: '/app/vehicleAdmin/list', method: 'get' };
// this.http.httpTokenRequest(opts, {}).then(res => {
// if (res.statusCode == 200) {
// uni.hideLoading()
// this.carList = res.data || []
// }
// })
this
.
$http
.
request
({
this
.
$http
.
request
({
url
:
'/app/vehicleAdmin/list'
,
url
:
'/app/vehicleAdmin/list'
,
method
:
'get'
,
method
:
'get'
,
...
...
pagesB/pages/move-car/scan.vue
View file @
681485b2
...
@@ -138,7 +138,8 @@
...
@@ -138,7 +138,8 @@
<
script
>
<
script
>
import
CarNumber
from
"@/common/codecook-carnumber/codecook-carnumber.vue"
;
import
CarNumber
from
"@/common/codecook-carnumber/codecook-carnumber.vue"
;
import
tools
from
"@/static/js/crypto-js.js"
;
import
CryptoJS
from
"crypto-js"
;
export
default
{
export
default
{
components
:
{
components
:
{
CarNumber
,
CarNumber
,
...
@@ -169,6 +170,8 @@ export default {
...
@@ -169,6 +170,8 @@ export default {
codeTime
:
60
codeTime
:
60
},
// 验证码
},
// 验证码
clickStatus
:
false
,
// 节流
clickStatus
:
false
,
// 节流
key
:
null
,
// 加密key
iv
:
null
// 加密iv
}
}
},
},
methods
:
{
methods
:
{
...
@@ -286,32 +289,37 @@ export default {
...
@@ -286,32 +289,37 @@ export default {
return
;
return
;
}
}
this
.
$http
.
request
({
this
.
$http
.
request
({
url
:
'/app/moveCode/bind
ing
'
,
url
:
'/app/moveCode/bind'
,
method
:
'put'
,
method
:
'put'
,
data
:
this
.
model1
,
data
:
this
.
model1
,
isFactory
:
false
,
}).
then
(
res
=>
{
}).
then
(
res
=>
{
uni
.
showToast
({
if
(
res
.
data
.
code
==
200
)
{
title
:
"绑定成功"
,
//展示绑定成功
icon
:
"success"
,
uni
.
showToast
({
});
title
:
"绑定成功"
,
setTimeout
(()
=>
{
icon
:
"success"
,
uni
.
navigateTo
({
});
url
:
'/pagesB/pages/move-car/myMoveCar'
setTimeout
(()
=>
{
})
uni
.
navigateTo
({
},
500
)
url
:
'/pagesB/pages/move-car/myMoveCar'
})
},
500
)
}
else
if
(
res
.
data
.
code
==
1000000002
){
uni
.
showToast
({
title
:
res
.
data
.
msg
,
icon
:
"none"
,
});
this
.
setAES
(
this
.
moveCode
,
this
.
key
)
}
else
{
//绑定失败,展示失败信息
uni
.
hideLoading
()
uni
.
showToast
({
title
:
res
.
data
.
msg
,
icon
:
"none"
,
});
}
})
})
},
getCarInfo
()
{
if
(
this
.
carId
)
{
this
.
$http
.
request
({
url
:
'/app/vehicleAdmin/'
+
this
.
carId
,
method
:
'get'
,
data
:{},
isFactory
:
false
,
}).
then
(
res
=>
{
this
.
model1
.
carInfo
=
res
})
}
},
},
// 跳转协议政策页面
// 跳转协议政策页面
goArticle
(
index
)
{
goArticle
(
index
)
{
...
@@ -340,18 +348,65 @@ export default {
...
@@ -340,18 +348,65 @@ export default {
});
});
}
}
})
})
}
},
// 获取加密key
getKey
(){
this
.
$http
.
request
({
url
:
'/app/user/c/i'
,
method
:
'get'
,
data
:{},
isFactory
:
false
,
}).
then
(
res
=>
{
if
(
res
.
data
.
code
==
200
)
{
let
data
=
res
.
data
.
data
try
{
let
str
=
data
.
s3
.
padStart
(
8
,
0
)
let
ivs
=
data
.
s3
let
str2
=
data
.
l1
if
(
str2
.
length
==
4
){
let
str3
=
str2
.
substring
(
0
,
2
)
let
str4
=
str2
.
substring
(
2
,
4
)
this
.
key
=
str
.
substring
(
str3
,
str4
)
let
str5
;
if
(
ivs
.
length
>
8
){
str5
=
ivs
.
substring
(
ivs
.
length
-
8
,
ivs
.
length
)
this
.
iv
=
String
(
str2
+
str5
).
padStart
(
16
,
0
)
}
else
{
str5
=
ivs
.
padStart
(
8
,
0
)
this
.
iv
=
String
(
str2
+
str5
).
padStart
(
16
,
0
)
}
this
.
setAES
(
this
.
moveCode
,
this
.
key
)
}
}
catch
(
err
){
}
}
else
{
uni
.
showToast
({
title
:
res
.
data
.
msg
,
icon
:
"none"
,
});
}
})
},
// 加密
setAES
(
str
,
keys
)
{
// const data = CryptoJS.enc.Utf8.parse(str);
const
key
=
CryptoJS
.
enc
.
Utf8
.
parse
(
keys
);
const
iv
=
CryptoJS
.
enc
.
Utf8
.
parse
(
this
.
iv
);
var
option
=
{
iv
:
iv
,
mode
:
CryptoJS
.
mode
[
'CBC'
],
//看需求变“CBC”
padding
:
CryptoJS
.
pad
[
'Pkcs7'
]
//看需求变“ZeroPadding”
};
var
encrypted
=
CryptoJS
.
AES
.
encrypt
(
str
,
key
,
option
);
const
words
=
encrypted
.
ciphertext
.
toString
();
// console.log(words,'加密后222222')
this
.
model1
.
moveCode
=
words
},
},
},
onLoad
(
option
)
{
onLoad
(
option
)
{
this
.
moveCode
=
option
.
moveCode
this
.
moveCode
=
option
.
moveCode
this
.
model1
.
moveCode
=
option
.
moveCode
this
.
getKey
()
let
datajAes
=
tools
.
setAES
(
'69703333'
);
console
.
log
(
datajAes
,
88888888888888
)
},
onShow
:
function
(){
this
.
getCarInfo
()
//console.log( this.$store.state.selectedCar);
}
}
}
}
</
script
>
</
script
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment