Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx
/
scrm-wx-merchant-activity
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 73b5812b
authored
Aug 12, 2022
by
李伟康
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
提交代码
1 parent
b14a73f7
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
54 additions
and
40 deletions
src/views/crowdfunding/carSeries.vue
src/views/crowdfunding/components/Action.vue
src/views/crowdfunding/components/PayModal.vue
src/views/crowdfunding/success.vue
src/views/crowdfunding/carSeries.vue
View file @
73b5812
...
@@ -41,8 +41,7 @@
...
@@ -41,8 +41,7 @@
position=
"right"
position=
"right"
class=
"popup"
class=
"popup"
>
>
<div
:class=
"['car-view',{'text-center':!carTypeList.length}]"
>
<div
class=
"car-view"
>
<
template
v-if=
"carTypeList.length"
>
<
template
v-for=
"(i,index) in carTypeList"
>
<
template
v-for=
"(i,index) in carTypeList"
>
<div
<div
:key=
"index"
:key=
"index"
...
@@ -50,15 +49,6 @@
...
@@ -50,15 +49,6 @@
@
click=
"choose(i)"
@
click=
"choose(i)"
>
{{
i
.
name
}}
</div>
>
{{
i
.
name
}}
</div>
</
template
>
</
template
>
</template>
<
template
v-else
>
<van-loading
color=
"#282829"
size=
"40"
text-size=
"12"
vertical
>
加载中...
</van-loading>
</
template
>
</div>
</div>
</van-popup>
</van-popup>
</div>
</div>
...
@@ -107,6 +97,7 @@ export default {
...
@@ -107,6 +97,7 @@ export default {
})
})
},
},
showCarType
(
i
,
item
)
{
showCarType
(
i
,
item
)
{
this
.
showLoading
()
let
{
brandInfo
}
=
this
let
{
brandInfo
}
=
this
this
.
brandInfo
=
{
this
.
brandInfo
=
{
...
brandInfo
,
...
brandInfo
,
...
@@ -116,9 +107,11 @@ export default {
...
@@ -116,9 +107,11 @@ export default {
vehicleSeriesName
:
i
.
name
vehicleSeriesName
:
i
.
name
}
}
this
.
carTypeList
=
[]
this
.
carTypeList
=
[]
this
.
showType
=
true
carLifeApi
.
getCarTypeList
(
i
.
id
).
then
(
data
=>
{
carLifeApi
.
getCarTypeList
(
i
.
id
).
then
(
data
=>
{
this
.
carTypeList
=
data
||
[]
this
.
hideLoading
()
if
(
!
data
||
!
data
.
length
)
this
.
showToast
(
'暂无该车型'
)
else
this
.
carTypeList
=
data
||
[]
this
.
showType
=
(
data
&&
data
.
length
)
?
true
:
false
})
})
},
},
choose
(
i
)
{
choose
(
i
)
{
...
...
src/views/crowdfunding/components/Action.vue
View file @
73b5812
...
@@ -87,10 +87,17 @@ export default {
...
@@ -87,10 +87,17 @@ export default {
maxlength
:
10
,
maxlength
:
10
,
name
:
'车牌号'
name
:
'车牌号'
})
})
if
(
n
.
selectVehicleTypeFlag
&&
n
.
selectVehicleTypeFlag
==
2
)
formList
.
push
({
if
(
n
.
selectVehicleTypeFlag
&&
n
.
selectVehicleTypeFlag
==
2
)
{
formList
.
push
(...[{
route
:
'carBrands'
,
route
:
'carBrands'
,
name
:
'品牌车型'
name
:
'品牌'
,
})
key
:
'carBrandsText'
},
{
route
:
'carSeries'
,
name
:
'车型'
,
key
:
'carTypeText'
}])
}
let
list
=
[{
let
list
=
[{
key
:
'formDescribeFirst'
,
key
:
'formDescribeFirst'
,
maxlength
:
40
,
maxlength
:
40
,
...
...
src/views/crowdfunding/components/PayModal.vue
View file @
73b5812
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
class=
"item flex"
class=
"item flex"
:key=
"index"
:key=
"index"
>
>
<div
class=
"label"
>
<div
class=
"label
text-hide
"
>
<span>
*
</span>
<span>
*
</span>
{{
i
.
name
}}
{{
i
.
name
}}
</div>
</div>
...
@@ -18,10 +18,11 @@
...
@@ -18,10 +18,11 @@
<template
v-if=
"i.route"
>
<template
v-if=
"i.route"
>
<van-field
<van-field
readonly
readonly
placeholder=
"请选择您的品牌车型
"
:placeholder=
"`请选择您的$
{i.name}`
"
@click="jumpCarBrands(i.route)"
@click="jumpCarBrands(i.route)"
v-model=
"
carText
"
v-model="
params[i.key]
"
class="readonly"
class="readonly"
right-icon="arrow"
>
>
</van-field>
</van-field>
</
template
>
</
template
>
...
@@ -95,13 +96,19 @@ export default {
...
@@ -95,13 +96,19 @@ export default {
})
})
this
.
params
=
params
this
.
params
=
params
if
(
!
this
.
params
.
userPhone
)
this
.
params
.
userPhone
=
phone
if
(
!
this
.
params
.
userPhone
)
this
.
params
.
userPhone
=
phone
let
{
hasDefaultBrands
,
brandInfo
}
=
this
.
$parent
.
detail
if
(
hasDefaultBrands
&&
!
this
.
params
.
carBrandsText
)
{
this
.
params
.
carBrandsText
=
`
${
brandInfo
.
vehicleBrandName
}
${
brandInfo
.
vehicleSubBrandName
}
`
}
}
}
},
},
payStatus
(
n
)
{
payStatus
(
n
)
{
this
.
payLoading
=
false
this
.
payLoading
=
false
},
},
carInfo
(
n
)
{
carInfo
(
n
)
{
this
.
carText
=
`
${
n
.
vehicleBrandName
}
${
n
.
vehicleSubBrandName
}
${
n
.
vehicleSeriesName
}
${
n
.
vehicleShapeName
}
`
console
.
log
(
n
)
this
.
params
.
carBrandsText
=
`
${
n
.
vehicleBrandName
}
${
n
.
vehicleSubBrandName
}
`
this
.
params
.
carTypeText
=
`
${
n
.
vehicleSeriesName
}
${
n
.
vehicleShapeName
}
`
}
}
},
},
data
()
{
data
()
{
...
@@ -110,22 +117,24 @@ export default {
...
@@ -110,22 +117,24 @@ export default {
payLoading
:
false
,
payLoading
:
false
,
items
:
[],
items
:
[],
params
:
null
,
params
:
null
,
carText
:
''
,
hasCarBrand
:
false
hasCarBrand
:
false
}
}
},
},
mounted
()
{
mounted
()
{
},
},
methods
:
{
methods
:
{
onCancel
()
{
onCancel
()
{
this
.
$emit
(
'cancel'
)
this
.
$emit
(
'cancel'
)
},
},
pay
()
{
pay
()
{
let
{
params
,
items
,
hasCarBrand
,
car
Text
,
car
Info
}
=
this
,
let
{
params
,
items
,
hasCarBrand
,
carInfo
}
=
this
,
obj
=
{},
obj
=
{},
phoneRex
=
/^
[
1
]([
3-9
])[
0-9
]{9}
$/
,
phoneRex
=
/^
[
1
]([
3-9
])[
0-9
]{9}
$/
,
userInfo
=
this
.
getUserInfo
(),
userInfo
=
this
.
getUserInfo
(),
platNumberRex
=
/^
[
京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z
]{1}[
A-Z
]{1}(([
A-Z0-9
]{4}[
A-Z0-9挂学警港澳
]{1}
$
)
|
([
0-9
]{5}[
DF
]
$
)
|
([
DF
][
A-HJ-NP-Z0-9
][
0-9
]{4}
$
))
/
platNumberRex
=
/^
[
京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z
]{1}[
A-Z
]{1}(([
A-Z0-9
]{4}[
A-Z0-9挂学警港澳
]{1}
$
)
|
([
0-9
]{5}[
DF
]
$
)
|
([
DF
][
A-HJ-NP-Z0-9
][
0-9
]{4}
$
))
/
console
.
log
(
params
)
try
{
try
{
items
.
map
(
e
=>
{
items
.
map
(
e
=>
{
Object
.
keys
(
params
).
map
(
key
=>
{
Object
.
keys
(
params
).
map
(
key
=>
{
...
@@ -140,7 +149,7 @@ export default {
...
@@ -140,7 +149,7 @@ export default {
this
.
showToast
(
'请填写正确的手机号'
)
this
.
showToast
(
'请填写正确的手机号'
)
return
return
}
}
if
(
params
.
plateNo
&&
!
platNumberRex
.
test
(
params
.
plateNo
))
{
if
(
params
.
plateNo
&&
!
platNumberRex
.
test
(
params
.
plateNo
))
{
this
.
showToast
(
'请填写正确的车牌号'
)
this
.
showToast
(
'请填写正确的车牌号'
)
return
return
}
}
...
@@ -148,16 +157,13 @@ export default {
...
@@ -148,16 +157,13 @@ export default {
if
(
params
[
key
])
obj
[
key
]
=
params
[
key
]
if
(
params
[
key
])
obj
[
key
]
=
params
[
key
]
})
})
if
(
hasCarBrand
)
{
if
(
hasCarBrand
)
{
if
(
!
carText
)
{
delete
obj
.
carBrandsText
this
.
showToast
(
'请选择品牌车型'
)
delete
obj
.
carTypeText
return
}
else
{
obj
=
{
obj
=
{
...
obj
,
...
obj
,
...
carInfo
...
carInfo
}
}
}
}
}
if
(
userInfo
.
phone
)
this
.
emit
(
obj
)
if
(
userInfo
.
phone
)
this
.
emit
(
obj
)
else
ssoApi
.
captchaLogin
({
else
ssoApi
.
captchaLogin
({
mobile
:
params
.
userPhone
,
mobile
:
params
.
userPhone
,
...
@@ -179,22 +185,26 @@ export default {
...
@@ -179,22 +185,26 @@ export default {
this
.
$emit
(
'pay'
,
{
obj
,
that
:
this
.
$parent
})
this
.
$emit
(
'pay'
,
{
obj
,
that
:
this
.
$parent
})
},
},
jumpCarBrands
(
name
)
{
jumpCarBrands
(
name
)
{
let
{
hasDefaultBrands
,
brandInfo
}
=
this
.
$parent
.
detail
let
{
hasDefaultBrands
,
brandInfo
}
=
this
.
$parent
.
detail
,
if
(
hasDefaultBrands
)
{
{
carInfo
}
=
this
let
list
=
[
let
chooseItem
=
Object
.
keys
(
carInfo
).
length
{
if
(
name
==
'carSeries'
)
{
id
:
brandInfo
.
vehicleSubBrandId
,
if
(
chooseItem
||
hasDefaultBrands
)
{
name
:
brandInfo
.
vehicleSubBrandName
,
let
id
=
chooseItem
?
carInfo
.
vehicleSubBrandId
:
brandInfo
.
vehicleSubBrandId
let
name
=
chooseItem
?
carInfo
.
vehicleSubBrandName
:
brandInfo
.
vehicleSubBrandName
let
list
=
[{
id
,
name
,
childs
:
null
childs
:
null
}
}]
]
this
.
to
(
'crowdfunding.carSeries'
,
{
this
.
to
(
'crowdfunding.carSeries'
,
{
brandInfo
,
brandInfo
:
chooseItem
?
carInfo
:
brandInfo
,
list
list
})
})
}
else
{
return
this
.
to
(
`crowdfunding.
${
name
}
`
)
}
}
}
this
.
to
(
'crowdfunding.carBrands'
)
}
}
}
}
}
}
...
...
src/views/crowdfunding/success.vue
View file @
73b5812
...
@@ -55,7 +55,11 @@ export default {
...
@@ -55,7 +55,11 @@ export default {
goodsName
:
orderGoods
.
goodsName
,
goodsName
:
orderGoods
.
goodsName
,
createdDate
:
activityJoin
.
createdDate
,
createdDate
:
activityJoin
.
createdDate
,
payPrice
,
payPrice
,
orderStatus
:
1
orderStatus
:
1
,
formContentFirst
:
activityJoin
.
formContentFirst
,
formContentSecond
:
activityJoin
.
formContentSecond
,
formDescribeFirst
:
activityJoin
.
formDescribeFirst
,
formDescribeSecond
:
activityJoin
.
formDescribeSecond
,
}
}
},
},
methods
:
{
methods
:
{
...
...
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