Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
大佬腿好粗
vue2-manage
提交
7d93e017
V
vue2-manage
项目概览
大佬腿好粗
/
vue2-manage
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vue2-manage
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
7d93e017
编写于
5月 11, 2017
作者:
M
maguohua
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
上传图片
上级
d8e827ad
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
47 addition
and
12 deletion
+47
-12
LICENSE
LICENSE
+21
-0
README.md
README.md
+1
-1
src/page/addShop.vue
src/page/addShop.vue
+25
-11
未找到文件。
LICENSE
0 → 100644
浏览文件 @
7d93e017
MIT License
Copyright (c) 2017 cangdu
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
\ No newline at end of file
README.md
浏览文件 @
7d93e017
...
...
@@ -66,4 +66,4 @@ npm run dev
### License
[
MIT
](
https://
mit-license.org/
)
[
MIT
](
https://
github.com/bailicangdu/vue2-manage/blob/master/LICENSE
)
src/page/addShop.vue
浏览文件 @
7d93e017
...
...
@@ -72,33 +72,33 @@
<el-form-item
label=
"上传店铺头像"
>
<el-upload
class=
"avatar-uploader"
action=
"//jsonplaceholder.typicode.com/posts/
"
:action=
"baseUrl + '/shopping/addimg'
"
:show-file-list=
"false"
:on-success=
"handleShopAvatarScucess"
:before-upload=
"beforeAvatarUpload"
>
<img
v-if=
"formData.image_path"
:src=
"formData.image_path"
class=
"avatar"
>
<img
v-if=
"formData.image_path"
:src=
"
baseUrl +
formData.image_path"
class=
"avatar"
>
<i
v-else
class=
"el-icon-plus avatar-uploader-icon"
></i>
</el-upload>
</el-form-item>
<el-form-item
label=
"上传营业执照"
>
<el-upload
class=
"avatar-uploader"
action=
"//jsonplaceholder.typicode.com/posts/
"
:action=
"baseUrl + '/shopping/addimg'
"
:show-file-list=
"false"
:on-success=
"handleBusinessAvatarScucess"
:before-upload=
"beforeAvatarUpload"
>
<img
v-if=
"formData.business_license_image"
:src=
"formData.business_license_image"
class=
"avatar"
>
<img
v-if=
"formData.business_license_image"
:src=
"
baseUrl +
formData.business_license_image"
class=
"avatar"
>
<i
v-else
class=
"el-icon-plus avatar-uploader-icon"
></i>
</el-upload>
</el-form-item>
<el-form-item
label=
"上传餐饮服务许可证"
>
<el-upload
class=
"avatar-uploader"
action=
"//jsonplaceholder.typicode.com/posts/
"
:action=
"baseUrl + '/shopping/addimg'
"
:show-file-list=
"false"
:on-success=
"handleServiceAvatarScucess"
:before-upload=
"beforeAvatarUpload"
>
<img
v-if=
"formData.catering_service_license_image"
:src=
"formData.catering_service_license_image"
class=
"avatar"
>
<img
v-if=
"formData.catering_service_license_image"
:src=
"
baseUrl +
formData.catering_service_license_image"
class=
"avatar"
>
<i
v-else
class=
"el-icon-plus avatar-uploader-icon"
></i>
</el-upload>
</el-form-item>
...
...
@@ -157,6 +157,7 @@
<
script
>
import
headTop
from
'
@/components/headTop
'
import
{
cityGuess
,
addShop
,
searchplace
}
from
'
@/api/getData
'
import
{
baseUrl
}
from
'
@/config/env
'
export
default
{
data
(){
return
{
...
...
@@ -213,7 +214,8 @@
icon_name
:
'
减
'
,
name
:
'
满减优惠
'
,
description
:
'
满30减5,满60减8
'
,
}]
}],
baseUrl
,
}
},
components
:
{
...
...
@@ -252,13 +254,25 @@
console
.
log
(
address
)
},
handleShopAvatarScucess
(
res
,
file
)
{
this
.
formData
.
image_path
=
URL
.
createObjectURL
(
file
.
raw
);
if
(
res
.
status
==
1
)
{
this
.
formData
.
image_path
=
res
.
image_path
;
}
else
{
this
.
$message
.
error
(
'
上传图片失败!
'
);
}
},
handleBusinessAvatarScucess
(
res
,
file
)
{
this
.
formData
.
business_license_image
=
URL
.
createObjectURL
(
file
.
raw
);
if
(
res
.
status
==
1
)
{
this
.
formData
.
business_license_image
=
res
.
image_path
;
}
else
{
this
.
$message
.
error
(
'
上传图片失败!
'
);
}
},
handleServiceAvatarScucess
(
res
,
file
)
{
this
.
formData
.
catering_service_license_image
=
URL
.
createObjectURL
(
file
.
raw
);
if
(
res
.
status
==
1
)
{
this
.
formData
.
catering_service_license_image
=
res
.
image_path
;
}
else
{
this
.
$message
.
error
(
'
上传图片失败!
'
);
}
},
beforeAvatarUpload
(
file
)
{
const
isRightType
=
(
file
.
type
===
'
image/jpeg
'
)
||
(
file
.
type
===
'
image/png
'
);
...
...
@@ -270,7 +284,7 @@
if
(
!
isLt2M
)
{
this
.
$message
.
error
(
'
上传头像图片大小不能超过 2MB!
'
);
}
return
is
JPG
&&
isLt2M
;
return
is
RightType
&&
isLt2M
;
},
tableRowClassName
(
row
,
index
)
{
if
(
index
===
1
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录