Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
center-shop-show-h5
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
center-shop-show-h5
Commits
409caec2
提交
409caec2
authored
8月 05, 2021
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
style: 修改购买弹窗CSS样式
上级
09c56a33
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
98 行增加
和
63 行删除
+98
-63
TagSelection.vue
src/components/TagSelection.vue
+2
-3
BuyPopup.vue
src/pages/buy/components/BuyPopup.vue
+96
-60
没有找到文件。
src/components/TagSelection.vue
浏览文件 @
409caec2
...
@@ -71,7 +71,7 @@ export default {
...
@@ -71,7 +71,7 @@ export default {
display
:
flex
;
display
:
flex
;
flex-wrap
:
wrap
;
flex-wrap
:
wrap
;
span
{
span
{
margin
:
0
0
.15rem
0
.2rem
0
.15rem
;
margin
:
0
0
.15rem
0
.2rem
0
;
padding
:
4px
10px
;
padding
:
4px
10px
;
background
:
#F5F5F5
;
background
:
#F5F5F5
;
color
:
#4D4D4D
;
color
:
#4D4D4D
;
...
@@ -84,4 +84,4 @@ export default {
...
@@ -84,4 +84,4 @@ export default {
color
:
#fff
;
color
:
#fff
;
}
}
}
}
</
style
>
</
style
>
\ No newline at end of file
src/pages/buy/components/BuyPopup.vue
浏览文件 @
409caec2
<
template
>
<
template
>
<van-popup
v-model=
"popupVisiable"
position=
"bottom"
class=
"buy-popup"
:style=
"
{ height: '60%' }"
>
<van-popup
v-model=
"popupVisiable"
position=
"bottom"
class=
"buy-popup"
:style=
"
{ height: '60%' }">
<div
class=
"goods-card van-hairline--bottom"
>
<div
class=
"goods-card van-hairline--bottom"
>
<div
class=
"thumb"
>
<div
class=
"thumb"
>
<img
:src=
"thumb"
>
<img
:src=
"thumb"
/
>
</div>
</div>
<div
class=
"content"
>
<div
class=
"content"
>
<div
class=
"price"
>
¥
<span>
{{
price
}}
</span></div>
<div
class=
"price"
>
<p
class=
"surplus"
>
剩余
{{
surplus
}}
</p>
¥
<span>
{{
price
}}
</span>
</div>
<p
class=
"surplus"
>
剩余
{{
surplus
}}
</p>
</div>
</div>
</div>
</div>
<van-field
:label=
"spec_title"
class=
"tag-item"
>
<van-field
:label=
"spec_title"
class=
"tag-item
is-vertical
"
>
<template
#
input
>
<template
#
input
>
<tag-selection
v-model=
"spec"
:data=
"specList"
:options=
"
{ label: 'spec_values', value: 'sku_id'}" @currentSelected="handleTagSelected"/>
<tag-selection
v-model=
"spec"
:data=
"specList"
:options=
"
{ label: 'spec_values', value: 'sku_id' }"
@currentSelected="handleTagSelected"
/>
</
template
>
</
template
>
</van-field>
</van-field>
<van-form
:show-error=
"false"
@
submit=
"handleSuccess"
>
<van-form
:show-error=
"false"
@
submit=
"handleSuccess"
>
<van-field
name=
"count"
label=
"购买数量"
>
<van-field
name=
"count"
label=
"购买数量"
>
<
template
#
input
>
<
template
#
input
>
<div
class=
"space-bt"
>
<div
class=
"space-bt"
>
<span
style=
"color:
#B4B4B4;
"
></span>
<span
style=
"color:
#b4b4b4
"
></span>
<van-stepper
v-model=
"form.count"
/>
<van-stepper
v-model=
"form.count"
/>
</div>
</div>
</
template
>
</
template
>
</van-field>
</van-field>
<van-field
v-for=
"item in fieldsMap"
v-model=
"form[item.key]"
:key=
"item.key"
:name=
"item.key"
:label=
"item.label"
:type=
"item.type"
:placeholder=
"item.placeholder"
:rules=
"[{ required: item.required, message: item.placeholder }, { validator: item.validator, message: item.errorMsg || '输入格式有误' }]"
>
<van-field
v-for=
"item in fieldsMap"
v-model=
"form[item.key]"
:key=
"item.key"
:name=
"item.key"
:label=
"item.label"
:type=
"item.type"
:placeholder=
"item.placeholder"
:rules=
"[
{ required: item.required, message: item.placeholder },
{ validator: item.validator, message: item.errorMsg || '输入格式有误' }
]"
class=
"is-vertical"
>
<
template
#
input
v-if=
"item.type === 'image'"
>
<
template
#
input
v-if=
"item.type === 'image'"
>
<app-upload
v-model=
"form[item.key]"
:max-count=
"1"
></app-upload>
<app-upload
v-model=
"form[item.key]"
:max-count=
"1"
></app-upload>
</
template
>
</
template
>
</van-field>
</van-field>
<div
style=
"margin: 16px
;
"
>
<div
style=
"margin: 16px"
>
<van-button
type=
"primary"
round
block
color=
"#C01540"
size=
"small"
>
下一步
</van-button>
<van-button
type=
"primary"
round
block
color=
"#C01540"
size=
"small"
>
下一步
</van-button>
</div>
</div>
</van-form>
</van-form>
<van-dialog
v-model=
"dialogVisiable"
title=
"请选择支付方式"
show-cancel-button
getContainer=
"body"
@
confirm=
"handleDialogConfirm"
>
<van-dialog
v-model=
"dialogVisiable"
title=
"请选择支付方式"
show-cancel-button
getContainer=
"body"
@
confirm=
"handleDialogConfirm"
>
<van-radio-group
v-model=
"payType"
>
<van-radio-group
v-model=
"payType"
>
<van-radio
name=
"12"
>
支付宝支付
</van-radio>
<van-radio
name=
"12"
>
支付宝支付
</van-radio>
<van-radio
name=
"4"
>
微信支付
</van-radio>
<van-radio
name=
"4"
>
微信支付
</van-radio>
...
@@ -73,17 +99,20 @@ export default {
...
@@ -73,17 +99,20 @@ export default {
},
},
fieldsMap
:
{},
fieldsMap
:
{},
validatorMap
:
{
validatorMap
:
{
phone
:
(
val
)
=>
{
phone
:
val
=>
{
if
(
val
===
''
)
return
true
if
(
val
===
''
)
return
true
return
/^1
(
3
[
0-9
]
|4
[
01456879
]
|5
[
0-35-9
]
|6
[
2567
]
|7
[
0-8
]
|8
[
0-9
]
|9
[
0-35-9
])\d{8}
$/
.
test
(
val
)
;
return
/^1
(
3
[
0-9
]
|4
[
01456879
]
|5
[
0-35-9
]
|6
[
2567
]
|7
[
0-8
]
|8
[
0-9
]
|9
[
0-35-9
])\d{8}
$/
.
test
(
val
)
},
},
email
:
(
val
)
=>
{
email
:
val
=>
{
if
(
val
===
''
)
return
true
if
(
val
===
''
)
return
true
return
/^
[
A-Za-z0-9
]
+
([
_.-
][
A-Za-z0-9
]
+
)
*@
[
A-Za-z0-9-.
]
+$/
.
test
(
val
)
;
return
/^
[
A-Za-z0-9
]
+
([
_.-
][
A-Za-z0-9
]
+
)
*@
[
A-Za-z0-9-.
]
+$/
.
test
(
val
)
},
},
idCard
:
(
val
)
=>
{
idCard
:
val
=>
{
if
(
val
===
''
)
return
true
if
(
val
===
''
)
return
true
return
/^
[
1-9
]\d{5}(
18|19|
([
23
]\d))\d{2}((
0
[
1-9
])
|
(
10|11|12
))(([
0-2
][
1-9
])
|10|20|30|31
)\d{3}[
0-9Xx
]
$/
.
test
(
val
)
||
/^
[
1-9
]\d{5}\d{2}((
0
[
1-9
])
|
(
10|11|12
))(([
0-2
][
1-9
])
|10|20|30|31
)\d{2}
$/
.
test
(
val
)
return
(
/^
[
1-9
]\d{5}(
18|19|
([
23
]\d))\d{2}((
0
[
1-9
])
|
(
10|11|12
))(([
0-2
][
1-9
])
|10|20|30|31
)\d{3}[
0-9Xx
]
$/
.
test
(
val
)
||
/^
[
1-9
]\d{5}\d{2}((
0
[
1-9
])
|
(
10|11|12
))(([
0-2
][
1-9
])
|10|20|30|31
)\d{2}
$/
.
test
(
val
)
)
}
}
},
},
dialogVisiable
:
false
,
dialogVisiable
:
false
,
...
@@ -96,10 +125,10 @@ export default {
...
@@ -96,10 +125,10 @@ export default {
query
()
{
query
()
{
return
this
.
$route
.
query
return
this
.
$route
.
query
},
},
spu_id
()
{
spu_id
()
{
return
this
.
query
.
spu_id
||
'6805043172159258624'
return
this
.
query
.
spu_id
||
'6805043172159258624'
},
},
shop_id
()
{
shop_id
()
{
return
this
.
query
.
shop_id
||
'6800681447305773056'
return
this
.
query
.
shop_id
||
'6800681447305773056'
}
}
},
},
...
@@ -221,58 +250,65 @@ export default {
...
@@ -221,58 +250,65 @@ export default {
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.buy-popup
{
.is-vertical
{
box-sizing
:border-box
;
flex-direction
:
column
;
::v-deep
.van-field__label
{
width
:
auto
;
margin-right
:
0
;
}
}
.buy-popup
{
box-sizing
:
border-box
;
}
}
.goods-card
{
.goods-card
{
position
:relative
;
position
:
relative
;
box-sizing
:border-box
;
box-sizing
:
border-box
;
padding
:
2
.6vw
0
2
.6vw
30vw
;
padding
:
2
.6vw
0
2
.6vw
30vw
;
height
:
26vw
;
height
:
26vw
;
margin
:
0
0
.24rem
10px
;
margin
:
0
0
.24rem
10px
;
border-radius
:
3px
;
border-radius
:
3px
;
.thumb
{
.thumb
{
width
:
26vw
;
width
:
26vw
;
height
:
26vw
;
height
:
26vw
;
position
:absolute
;
position
:
absolute
;
left
:
0
;
left
:
0
;
top
:
0
;
top
:
0
;
img
{
img
{
width
:
80%
;
width
:
80%
;
display
:block
;
display
:
block
;
margin
:
10%
auto
;
margin
:
10%
auto
;
}
}
}
}
.content
{
.content
{
display
:flex
;
display
:
flex
;
flex-direction
:column
;
flex-direction
:
column
;
height
:
100%
;
height
:
100%
;
padding-right
:
10px
;
padding-right
:
10px
;
.price
{
.price
{
color
:
#C
01540
;
color
:
#c
01540
;
font-size
:
12px
;
font-size
:
12px
;
line-height
:
0
.64rem
;
line-height
:
0
.64rem
;
flex
:
1
;
flex
:
1
;
span
{
span
{
font-size
:
0
.4rem
;
font-size
:
0
.4rem
;
}
}
}
}
.surplus
{
.surplus
{
line-height
:
0
.64rem
;
line-height
:
0
.64rem
;
color
:
#B4B4B
4
;
color
:
#b4b4b
4
;
}
}
}
}
}
}
.tag-item
{
.tag-item
{
display
:block
;
display
:
block
;
::v-deep
.van-field__value
{
::v-deep
.van-field__value
{
margin-top
:
8px
;
margin-top
:
8px
;
}
}
}
}
.van-radio-group
{
.van-radio-group
{
padding
:
0
.4rem
;
padding
:
0
.4rem
;
.van-radio
{
.van-radio
{
padding
:
0
.2rem
;
padding
:
0
.2rem
;
}
}
}
}
</
style
>
</
style
>
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论