Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
center-shop
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
center-shop
Commits
5e7f3928
提交
5e7f3928
authored
6月 01, 2021
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
创建店铺增加店铺类型选择
上级
51b5c2e1
显示空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
112 行增加
和
9 行删除
+112
-9
shop_choose_bg.png
src/assets/images/shop_choose_bg.png
+0
-0
shop_create_success_icon.png
src/assets/images/shop_create_success_icon.png
+0
-0
pageMain.vue
src/components/common/pageMain.vue
+3
-3
info.vue
src/pages/setting/info.vue
+4
-1
add.vue
src/pages/shop/add.vue
+105
-5
没有找到文件。
src/assets/images/shop_choose_bg.png
0 → 100644
浏览文件 @
5e7f3928
67.9 KB
src/assets/images/shop_create_success_icon.png
0 → 100644
浏览文件 @
5e7f3928
94.9 KB
src/components/common/pageMain.vue
浏览文件 @
5e7f3928
...
...
@@ -66,9 +66,9 @@ export default {
display
:
block
;
height
:
100%
;
}
/*
.main-content {
min-height: 50
0px;
}
*/
.main-content
{
padding-bottom
:
4
0px
;
}
.main-content
.form-container
{
width
:
600px
;
margin
:
0
auto
;
...
...
src/pages/setting/info.vue
浏览文件 @
5e7f3928
...
...
@@ -62,7 +62,10 @@ export default {
shop_name
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}],
shop_logo
:
[{
required
:
true
,
message
:
'请上传'
,
trigger
:
'change'
}],
end_time
:
[{
required
:
true
,
message
:
'请选择'
,
trigger
:
'change'
}],
shop_desc
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}],
shop_desc
:
[
{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
},
{
max
:
100
,
message
:
'最多输入100个字符'
,
trigger
:
'blur'
}
],
shop_tel
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}]
},
dialogVisible
:
false
...
...
src/pages/shop/add.vue
浏览文件 @
5e7f3928
<
template
>
<page-main
title=
"创建店铺"
>
<el-card
class=
"box-card"
>
<div
class=
"form-container"
>
<el-form
:model=
"ruleForm"
:rules=
"rules"
ref=
"ruleForm"
label-width=
"100px"
>
<el-button
type=
"text"
@
click=
"$router.replace('/shop')"
><i
class=
"el-icon-arrow-left"
></i>
返回
</el-button>
<div
class=
"choose"
v-if=
"shopTypeChooseVisible"
>
<h4
class=
"choose-title"
>
请选择需要创建的店铺类型
</h4>
<div
class=
"choose-list"
>
<div
class=
"choose-item"
>
<div
class=
"choose-item-pic"
>
<h5>
紫荆教育
</h5>
<p>
招生教学一站式解决方案
</p>
</div>
<div
class=
"choose-item-content"
>
<p>
适用于
<br
/>
教育培训机构,知识付费专家
</p>
<el-button
type=
"primary"
size=
"medium"
plain
@
click=
"handleChoose('1')"
>
立即开店
</el-button>
</div>
</div>
</div>
</div>
<div
class=
"form-container"
v-else
>
<div
class=
"shop-add-success"
v-if=
"addSuccessVisible"
>
<img
src=
"../../assets/images/shop_create_success_icon.png"
width=
"300"
/>
<p>
店铺创建成功,请前往设置店铺相关信息
</p>
<el-button
type=
"primary"
@
click=
"entryShop"
>
前往设置
</el-button>
</div>
<el-form
:model=
"ruleForm"
:rules=
"rules"
ref=
"ruleForm"
label-width=
"100px"
v-else
>
<el-form-item
label=
"店铺名称"
prop=
"shop_name"
>
<el-input
v-model=
"ruleForm.shop_name"
placeholder=
"请输入店铺、品牌、机构的全称"
></el-input>
</el-form-item>
...
...
@@ -49,9 +70,15 @@ export default {
shop_name
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}],
shop_logo
:
[{
required
:
true
,
message
:
'请上传'
,
trigger
:
'change'
}],
end_time
:
[{
required
:
true
,
message
:
'请选择'
,
trigger
:
'change'
}],
shop_desc
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}],
shop_desc
:
[
{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
},
{
max
:
100
,
message
:
'最多输入100个字符'
,
trigger
:
'blur'
}
],
shop_tel
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}]
}
},
shopTypeChooseVisible
:
true
,
addSuccessVisible
:
false
,
shopId
:
''
}
},
methods
:
{
...
...
@@ -60,10 +87,83 @@ export default {
},
addShop
()
{
addShop
(
this
.
ruleForm
).
then
(
response
=>
{
this
.
shopId
=
response
.
shop_id
this
.
addSuccessVisible
=
true
// 进入店铺列表
this
.
$router
.
push
({
path
:
'/shop'
})
//
this.$router.push({ path: '/shop' })
})
},
// 选择店铺类型
handleChoose
(
type
)
{
this
.
ruleForm
.
shop_type
=
type
this
.
shopTypeChooseVisible
=
false
},
// 进入商铺
entryShop
()
{
this
.
$store
.
dispatch
(
'setShopId'
,
this
.
shopId
)
// 进入店铺设置
this
.
$router
.
replace
({
path
:
'/setting/info'
})
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.choose-title
{
font-size
:
16px
;
font-weight
:
400
;
text-align
:
center
;
padding
:
20px
0
;
}
.choose-list
{
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
}
.choose-item
{
width
:
298px
;
border
:
1px
solid
#bababa
;
border-radius
:
8px
;
margin-bottom
:
20px
;
}
.choose-item-pic
{
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
flex-direction
:
column
;
height
:
286px
;
background
:
url('../../assets/images/shop_choose_bg.png')
no-repeat
;
background-size
:
cover
;
h5
{
font-size
:
24px
;
color
:
#fff
;
}
p
{
margin-top
:
25px
;
font-size
:
20px
;
color
:
#fff
;
}
}
.choose-item-content
{
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
flex-direction
:
column
;
text-align
:
center
;
height
:
184px
;
p
{
margin-bottom
:
20px
;
font-size
:
20px
;
}
}
.shop-add-success
{
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
flex-direction
:
column
;
p
{
padding
:
20px
0
;
font-size
:
20px
;
}
}
</
style
>
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论