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
aaf12860
提交
aaf12860
authored
5月 20, 2022
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore: update
上级
b53eb843
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
21 行增加
和
22 行删除
+21
-22
.config.dev.js
.config.dev.js
+1
-1
BuyPopup.vue
src/pages/buy/components/BuyPopup.vue
+16
-17
index.vue
src/pages/buy/index.vue
+4
-4
没有找到文件。
.config.dev.js
浏览文件 @
aaf12860
module
.
exports
=
{
domain
:
'dev.ezijing.com'
,
url
:
'https://
h5-shop
.ezijing.com/api'
,
url
:
'https://
shop-show-h5
.ezijing.com/api'
,
webpack
:
{
externals
:
{
CKEDITOR
:
'window.CKEDITOR'
,
...
...
src/pages/buy/components/BuyPopup.vue
浏览文件 @
aaf12860
...
...
@@ -8,17 +8,12 @@
<div
class=
"price"
>
¥
<span>
{{
price
}}
</span>
</div>
<p
class=
"surplus"
>
剩余
{{
surplus
}}
</p>
<p
class=
"surplus"
v-if=
"pageOptions.hasStock"
>
剩余
{{
surplus
}}
</p>
</div>
</div>
<van-field
:label=
"spec_title"
class=
"tag-item is-vertical"
>
<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
#
extra
v-if=
"options.spare"
>
...
...
@@ -26,7 +21,7 @@
</
template
>
</van-field>
<van-form
:show-error=
"false"
@
submit=
"handleSuccess"
>
<van-field
name=
"count"
label=
"购买数量"
>
<van-field
name=
"count"
label=
"购买数量"
v-if=
"pageOptions.hasBuyCount"
>
<
template
#
input
>
<div
class=
"space-bt"
>
<span
style=
"color: #b4b4b4"
></span>
...
...
@@ -56,13 +51,7 @@
<van-button
type=
"primary"
round
block
color=
"#C01540"
size=
"small"
>
下一步
</van-button>
</div>
</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
name=
"12"
>
支付宝支付
</van-radio>
<van-radio
name=
"4"
>
微信支付
</van-radio>
...
...
@@ -134,6 +123,15 @@ export default {
},
shop_id
()
{
return
this
.
query
.
shop_id
||
'6800681447305773056'
},
pageOptions
()
{
const
query
=
this
.
$route
.
query
return
{
hasShop
:
query
.
has_shop
!==
'0'
,
hasService
:
query
.
has_service
!==
'0'
,
hasStock
:
query
.
has_stock
!==
'0'
,
hasBuyCount
:
query
.
has_buy_count
!==
'0'
}
}
},
watch
:
{
...
...
@@ -206,7 +204,7 @@ export default {
},
assembleFields
(
list
)
{
const
map
=
{
text
:
{
type
:
'text'
,
placeholder
:
'请填写留言'
},
text
:
{
type
:
'text'
},
textarea
:
{
type
:
'textarea'
,
placeholder
:
'请填写留言'
},
number
:
{
type
:
'number'
,
placeholder
:
'请填写数字'
},
email
:
{
type
:
'text'
,
placeholder
:
'请填写邮箱'
,
errorMsg
:
'邮箱格式有误'
},
...
...
@@ -218,13 +216,14 @@ export default {
}
const
fieldsMap
=
{}
list
.
forEach
((
item
,
index
)
=>
{
console
.
log
(
item
)
const
field
=
{
sourceData
:
item
,
label
:
item
.
filed
,
key
:
'field_'
+
index
,
required
:
item
.
required
,
type
:
'text'
,
placeholder
:
'请填写留言'
placeholder
:
`请填写
${
item
.
filed
}
`
}
this
.
$set
(
this
.
form
,
field
.
key
,
''
)
if
(
this
.
validatorMap
[
item
.
type
])
{
...
...
src/pages/buy/index.vue
浏览文件 @
aaf12860
...
...
@@ -13,10 +13,10 @@
<h6><span>
¥
</span>
{{
priceFormat
(
details
.
price_zone
)
}}
</h6>
<p>
<span
class=
"title"
>
{{
details
.
spu_name
||
''
}}
</span>
<span
class=
"surplus"
v-if=
"
o
ptions.hasStock"
>
剩余
{{
details
.
stock
}}
</span>
<span
class=
"surplus"
v-if=
"
pageO
ptions.hasStock"
>
剩余
{{
details
.
stock
}}
</span>
</p>
</div>
<div
class=
"item service-item"
v-if=
"
o
ptions.hasService"
>
<div
class=
"item service-item"
v-if=
"
pageO
ptions.hasService"
>
<!--
<div
class=
"freight"
>
<span>
运费
</span>
<p
class=
"van-hairline--bottom"
>
无需配送
</p>
...
...
@@ -28,7 +28,7 @@
<!--
<van-icon
name=
"arrow"
/>
-->
</div>
</div>
<div
class=
"item shop-item"
v-if=
"
o
ptions.hasShop"
>
<div
class=
"item shop-item"
v-if=
"
pageO
ptions.hasShop"
>
<van-cell
value=
"进店逛逛"
is-link
@
click=
"navShop(shopInfo.shop_id)"
>
<!-- 使用 title 插槽来自定义标题 -->
<template
#
title
>
...
...
@@ -99,7 +99,7 @@ export default {
}
return
{}
},
o
ptions
()
{
pageO
ptions
()
{
const
query
=
this
.
$route
.
query
return
{
hasShop
:
query
.
has_shop
!==
'0'
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论