Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
张身仁
/
mp-car-evaluate
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
19964db9
authored
Jun 27, 2019
by
null
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init
parent
054c4381
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
66 additions
and
23 deletions
+66
-23
app.js
+1
-1
pages/index/index.js
+28
-1
pages/result/result.js
+1
-7
pages/sellcar/sellcar.js
+36
-9
pages/sellcar/sellcar.wxml
+0
-0
pages/submit/submit.js
+0
-5
No files found.
app.js
View file @
19964db9
...
...
@@ -9,7 +9,7 @@ App({
enter
:
''
,
result
:
''
,
link
:
'2019062
353971015
'
,
link
:
'2019062
610199102
'
,
provinceList
:
[],
tiantianpaiche_cityList
:
[
'南京'
,
'无锡'
,
'合肥'
,
'南昌'
,
'苏州'
,
'绍兴'
,
...
...
pages/index/index.js
View file @
19964db9
...
...
@@ -35,6 +35,9 @@ Page({
province_index
:
wx
.
getStorageSync
(
'province_index'
),
city_index
:
wx
.
getStorageSync
(
'city_index'
)
},
()
=>
{
if
(
_this
.
data
.
provinceList
.
length
===
0
)
{
_this
.
getProvinceList
()
}
else
{
let
index
=
wx
.
getStorageSync
(
'province_index'
)
let
id
=
wx
.
getStorageSync
(
'province_id'
)
if
(
index
)
{
...
...
@@ -43,6 +46,7 @@ Page({
})
_this
.
getCityList
(
id
,
_this
)
}
}
})
let
years
=
wx
.
getStorageSync
(
'years'
)
let
startTime
,
endTime
...
...
@@ -77,6 +81,29 @@ Page({
this
.
data
.
terminal_names
=
[]
},
// 获取省份
getProvinceList
:
function
()
{
let
_this
=
this
;
wx
.
request
({
url
:
app
.
globalData
.
url
+
'assess/provinces'
,
success
:
function
(
res
)
{
if
(
res
.
data
&&
res
.
data
.
length
>
0
)
{
let
data
=
res
.
data
let
arr
=
[]
for
(
let
key
in
data
)
{
if
(
data
[
key
].
id
===
32
)
{
continue
}
arr
.
push
(
data
[
key
])
}
_this
.
setData
({
provinceList
:
arr
})
}
}
})
},
// 城市列表
getCityList
:
function
(
parent_id
,
_this
)
{
wx
.
request
({
...
...
@@ -373,7 +400,7 @@ Page({
let
_this
=
this
;
if
(
this
.
checkValue
())
{
wx
.
showLoading
({
title
:
'
请求加载
中'
,
title
:
'
估价
中'
,
mask
:
true
})
_this
.
data
.
terminal_names
.
push
(
'瓜子二手车'
,
'精真估'
)
...
...
pages/result/result.js
View file @
19964db9
...
...
@@ -25,11 +25,6 @@ Page({
},
onShow
:
function
()
{
if
(
app
.
globalData
.
result
)
{
wx
.
showLoading
({
title
:
'查询中'
,
})
}
this
.
getItem
(
'specification_name'
)
this
.
getItem
(
'buy_time'
)
this
.
getItem
(
'mileage'
)
...
...
@@ -44,7 +39,6 @@ Page({
time
:
carInfo
.
created_at
.
substr
(
0
,
10
)
},
()
=>
{
if
(
app
.
globalData
.
result
)
{
wx
.
hideLoading
()
wx
.
showToast
({
icon
:
'none'
,
title
:
'查询成功!'
,
...
...
@@ -90,7 +84,7 @@ Page({
// 更新卖车状态
updateStatus
:
function
()
{
wx
.
showLoading
({
title
:
'
请求加载
中'
,
title
:
'
卖车
中'
,
mask
:
true
})
let
_this
=
this
;
...
...
pages/sellcar/sellcar.js
View file @
19964db9
...
...
@@ -66,6 +66,9 @@ Page({
province_index
:
wx
.
getStorageSync
(
'province_index'
),
city_index
:
wx
.
getStorageSync
(
'city_index'
)
},
()
=>
{
if
(
_this
.
data
.
provinceList
.
length
===
0
)
{
_this
.
getProvinceList
()
}
else
{
let
index
=
wx
.
getStorageSync
(
'province_index'
)
let
id
=
wx
.
getStorageSync
(
'province_id'
)
if
(
index
)
{
...
...
@@ -74,6 +77,7 @@ Page({
})
_this
.
getCityList
(
id
,
_this
)
}
}
})
let
years
=
wx
.
getStorageSync
(
'years'
)
let
startTime
,
endTime
...
...
@@ -108,6 +112,29 @@ Page({
},
// 获取省份
getProvinceList
:
function
()
{
let
_this
=
this
;
wx
.
request
({
url
:
app
.
globalData
.
url
+
'assess/provinces'
,
success
:
function
(
res
)
{
if
(
res
.
data
&&
res
.
data
.
length
>
0
)
{
let
data
=
res
.
data
let
arr
=
[]
for
(
let
key
in
data
)
{
if
(
data
[
key
].
id
===
32
)
{
continue
}
arr
.
push
(
data
[
key
])
}
_this
.
setData
({
provinceList
:
arr
})
}
}
})
},
// 城市列表
getCityList
:
function
(
parent_id
,
_this
)
{
wx
.
request
({
...
...
@@ -187,7 +214,7 @@ Page({
this
.
setData
({
[
'userForms.'
+
item
]:
data
?
data
:
''
},
()
=>
{
if
(
item
===
'phone'
&&
data
)
{
if
(
item
===
'phone'
&&
data
)
{
_this
.
setData
({
showPhoneInput
:
true
})
...
...
@@ -214,7 +241,7 @@ Page({
},
// 输入手机号
phoneInput
:
function
(
e
)
{
phoneInput
:
function
(
e
)
{
let
phone
=
e
.
detail
.
value
this
.
setData
({
[
'userForms.phone'
]:
phone
...
...
@@ -226,7 +253,7 @@ Page({
},
// 获取手机号
getPhone
:
function
(
e
)
{
getPhone
:
function
(
e
)
{
let
_this
=
this
let
errMsg
=
e
.
detail
.
errMsg
if
(
errMsg
===
'getPhoneNumber:ok'
)
{
...
...
@@ -241,7 +268,7 @@ Page({
url
:
app
.
globalData
.
url
+
'decode-phone'
,
data
:
data
,
method
:
'POST'
,
success
:
function
(
res
)
{
success
:
function
(
res
)
{
if
(
res
.
data
.
message
!==
'解密失败'
)
{
let
phone
=
res
.
data
.
purePhoneNumber
_this
.
setData
({
...
...
@@ -268,10 +295,10 @@ Page({
},
// 重新获取code
login
:
function
(
e
)
{
login
:
function
(
e
)
{
let
_this
=
this
wx
.
login
({
success
:
function
(
res
)
{
success
:
function
(
res
)
{
if
(
res
.
errMsg
===
'login:ok'
)
{
let
data
=
{
code
:
res
.
code
,
...
...
@@ -280,7 +307,7 @@ Page({
wx
.
request
({
url
:
app
.
globalData
.
url
+
'user-code'
,
data
:
data
,
success
:
function
(
res
)
{
success
:
function
(
res
)
{
let
data
=
{
session_key
:
res
.
data
.
session_key
,
encrypted_data
:
e
.
detail
.
encryptedData
,
...
...
@@ -291,7 +318,7 @@ Page({
url
:
app
.
globalData
.
url
+
'decode-phone'
,
data
:
data
,
method
:
'POST'
,
success
:
function
(
res
)
{
success
:
function
(
res
)
{
if
(
res
.
data
.
message
!==
'解密失败'
)
{
let
phone
=
res
.
data
.
purePhoneNumber
_this
.
setData
({
...
...
@@ -448,7 +475,7 @@ Page({
let
_this
=
this
;
if
(
this
.
checkValue
())
{
wx
.
showLoading
({
title
:
'
请求加载
中'
,
title
:
'
卖车
中'
,
mask
:
true
})
_this
.
data
.
terminal_names
.
push
(
'精真估'
)
...
...
pages/sellcar/sellcar.wxml
View file @
19964db9
pages/submit/submit.js
View file @
19964db9
...
...
@@ -6,14 +6,10 @@ Page({
},
onShow
:
function
()
{
wx
.
showLoading
({
title
:
'提交中'
,
})
if
(
app
.
globalData
.
enter
===
'index'
)
{
this
.
setData
({
submitText
:
'爱车估值'
},
()
=>
{
wx
.
hideLoading
()
wx
.
showToast
({
icon
:
'none'
,
title
:
'提交成功!'
,
...
...
@@ -23,7 +19,6 @@ Page({
this
.
setData
({
submitText
:
'高价卖车'
},
()
=>
{
wx
.
hideLoading
()
wx
.
showToast
({
icon
:
'none'
,
title
:
'提交成功!'
,
...
...
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