Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
center-shop
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
EzijingWeb
center-shop
Commits
6a6fb4a8
提交
6a6fb4a8
authored
6月 03, 2021
作者:
王鹏飞
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
bug fixes
上级
00aa690f
显示空白字符变更
内嵌
并排
正在显示
11 个修改的文件
包含
77 行增加
和
17 行删除
+77
-17
element-icons.ttf
src/assets/theme/fonts/element-icons.ttf
+0
-0
element-icons.woff
src/assets/theme/fonts/element-icons.woff
+0
-0
index.css
src/assets/theme/index.css
+0
-0
upload.vue
src/components/base/upload.vue
+23
-3
main.js
src/main.js
+1
-1
index.vue
src/pages/order/index.vue
+0
-1
contact.vue
src/pages/setting/contact.vue
+45
-3
goods.vue
src/pages/setting/goods.vue
+5
-1
info.vue
src/pages/setting/info.vue
+1
-1
add.vue
src/pages/shop/add.vue
+1
-1
style.scss
src/style.scss
+1
-6
没有找到文件。
src/assets/theme/fonts/element-icons.ttf
0 → 100644
浏览文件 @
6a6fb4a8
File added
src/assets/theme/fonts/element-icons.woff
0 → 100644
浏览文件 @
6a6fb4a8
File added
src/assets/theme/index.css
0 → 100644
浏览文件 @
6a6fb4a8
This source diff could not be displayed because it is too large. You can
view the blob
instead.
src/components/base/upload.vue
浏览文件 @
6a6fb4a8
...
...
@@ -82,17 +82,22 @@ export default {
})
},
handleSuccess
(
response
,
file
)
{
let
value
=
null
if
(
this
.
isMultiple
)
{
this
.
fileList
.
push
({
name
:
file
.
name
,
url
:
file
.
raw
.
url
})
this
.
$emit
(
'input'
,
this
.
fileList
)
value
=
this
.
fileList
}
else
{
this
.
fileList
=
[
file
.
raw
.
url
]
this
.
$emit
(
'input'
,
file
.
raw
.
url
)
value
=
file
.
raw
.
url
}
this
.
$emit
(
'input'
,
value
)
this
.
dispatch
(
'ElFormItem'
,
'el.form.change'
,
value
)
},
// 删除
handleRemove
(
file
,
fileList
)
{
this
.
$emit
(
'input'
,
this
.
isMultiple
?
fileList
:
''
)
const
value
=
this
.
isMultiple
?
fileList
:
''
this
.
$emit
(
'input'
,
value
)
this
.
dispatch
(
'ElFormItem'
,
'el.form.change'
,
value
)
},
// 预览
handlePreview
(
file
)
{
...
...
@@ -101,6 +106,21 @@ export default {
},
handleExceed
(
file
,
fileList
)
{
this
.
$message
({
type
:
'error'
,
message
:
'文件超出个数限制'
})
},
dispatch
(
componentName
,
eventName
,
params
)
{
var
parent
=
this
.
$parent
||
this
.
$root
var
name
=
parent
.
$options
.
componentName
while
(
parent
&&
(
!
name
||
name
!==
componentName
))
{
parent
=
parent
.
$parent
if
(
parent
)
{
name
=
parent
.
$options
.
componentName
}
}
if
(
parent
)
{
parent
.
$emit
.
apply
(
parent
,
[
eventName
].
concat
(
params
))
}
}
}
}
...
...
src/main.js
浏览文件 @
6a6fb4a8
...
...
@@ -2,8 +2,8 @@ import Vue from 'vue'
import
router
from
'./router'
import
store
from
'./store'
import
App
from
'./app.vue'
import
'./style.scss'
import
ElementUI
from
'element-ui'
import
'./style.scss'
import
BeforeEnter
from
'./utils/beforeEnter'
const
before
=
new
BeforeEnter
()
...
...
src/pages/order/index.vue
浏览文件 @
6a6fb4a8
...
...
@@ -228,7 +228,6 @@ export default {
.filter-time
{
.el-radio
{
margin
:
0
10px
0
0
!
important
;
border-radius
:
0
;
}
::v-deep
.el-radio__input
{
display
:
none
!
important
;
...
...
src/pages/setting/contact.vue
浏览文件 @
6a6fb4a8
...
...
@@ -2,7 +2,15 @@
<app-card>
<el-form
:model=
"ruleForm"
:rules=
"rules"
ref=
"ruleForm"
label-width=
"100px"
>
<el-form-item
label=
"客户电话"
prop=
"shop_tel"
>
<el-input
v-model=
"ruleForm.shop_tel"
></el-input>
<el-radio-group
v-model=
"telRadio"
@
change=
"radioChange"
>
<el-radio
:label=
"1"
>
普通座机号
</el-radio>
<el-radio
:label=
"2"
>
手机号
</el-radio>
</el-radio-group>
<div
class=
"tel-group"
v-if=
"telRadio === 1"
>
<el-input
placeholder=
"区号"
maxlength=
"3"
v-model=
"telCode"
style=
"width: 80px"
></el-input>
-
<el-input
placeholder=
"座机号"
maxlength=
"8"
v-model=
"telNumber"
></el-input>
</div>
<el-input
v-model=
"ruleForm.shop_tel"
maxlength=
"11"
v-else
></el-input>
</el-form-item>
<el-form-item
label=
"详细地址"
prop=
"shop_address"
>
<el-input
v-model=
"ruleForm.shop_address"
>
...
...
@@ -28,10 +36,22 @@ import { updateShop } from '@/api/shop'
export
default
{
components
:
{
AppCard
},
data
()
{
const
telValid
=
(
rule
,
value
,
callback
)
=>
{
if
(
this
.
telRadio
===
1
&&
!
(
this
.
telCode
||
this
.
telNumber
))
{
callback
(
new
Error
(
'请输入区号和座机号'
))
}
else
if
(
this
.
telRadio
===
2
&&
!
value
)
{
callback
(
new
Error
(
'请输入手机号'
))
}
else
{
callback
()
}
}
return
{
telRadio
:
1
,
telCode
:
''
,
telNumber
:
''
,
ruleForm
:
{
shop_tel
:
''
,
shop_address
:
''
,
shop_pos
:
''
},
rules
:
{
shop_tel
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}],
shop_tel
:
[{
validator
:
telValid
,
trigger
:
'blur'
}],
shop_address
:
[{
required
:
true
,
message
:
'必填'
,
trigger
:
'blur'
}]
},
map
:
null
,
...
...
@@ -48,15 +68,34 @@ export default {
immediate
:
true
,
handler
(
data
)
{
this
.
ruleForm
=
Object
.
assign
({},
data
)
if
(
!
this
.
ruleForm
.
shop_tel
)
{
return
}
const
tel
=
this
.
ruleForm
.
shop_tel
.
split
(
'-'
)
if
(
tel
.
length
===
2
)
{
this
.
telRadio
=
1
this
.
telCode
=
tel
[
0
]
this
.
telNumber
=
tel
[
1
]
}
else
{
this
.
telRadio
=
2
}
}
}
},
methods
:
{
radioChange
()
{
this
.
ruleForm
.
shop_tel
=
''
this
.
$refs
.
ruleForm
.
clearValidate
(
'shop_tel'
)
},
onSubmit
()
{
this
.
$refs
.
ruleForm
.
validate
().
then
(
this
.
updateShop
)
},
updateShop
()
{
updateShop
(
this
.
ruleForm
).
then
(
resp
=>
{
const
params
=
this
.
ruleForm
if
(
this
.
telRadio
===
1
)
{
params
.
shop_tel
=
`
${
this
.
telCode
}
-
${
this
.
telNumber
}
`
}
updateShop
(
params
).
then
(
resp
=>
{
this
.
$message
({
type
:
'success'
,
message
:
'修改成功'
})
this
.
dialogVisible
=
false
this
.
$store
.
dispatch
(
'getShop'
)
...
...
@@ -100,6 +139,9 @@ export default {
</
script
>
<
style
lang=
"scss"
scoped
>
.tel-group
{
display
:
flex
;
}
.map
{
position
:
relative
;
height
:
480px
;
...
...
src/pages/setting/goods.vue
浏览文件 @
6a6fb4a8
...
...
@@ -41,9 +41,13 @@ export default {
},
methods
:
{
getSkuNameList
()
{
getSkuNameList
({
shop_id
:
this
.
shopId
}).
then
(
res
=>
{
getSkuNameList
({
shop_id
:
this
.
shopId
})
.
then
(
res
=>
{
this
.
skuList
=
res
.
data
})
.
catch
(()
=>
{
this
.
skuList
=
[]
})
},
// 添加规格
addSku
()
{
...
...
src/pages/setting/info.vue
浏览文件 @
6a6fb4a8
...
...
@@ -43,7 +43,7 @@
></el-input>
</el-form-item>
<el-form-item
label=
"联系电话"
prop=
"shop_tel"
>
<el-input
v-model=
"ruleForm.shop_tel"
></el-input>
<el-input
v-model=
"ruleForm.shop_tel"
maxlength=
"11"
></el-input>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
@
click=
"dialogVisible = false"
>
取消
</el-button>
...
...
src/pages/shop/add.vue
浏览文件 @
6a6fb4a8
...
...
@@ -49,7 +49,7 @@
>
</el-input>
</el-form-item>
<el-form-item
label=
"联系电话"
prop=
"shop_tel"
>
<el-input
v-model=
"ruleForm.shop_tel"
></el-input>
<el-input
v-model=
"ruleForm.shop_tel"
maxlength=
"11"
></el-input>
</el-form-item>
<el-form-item>
<el-button
type=
"primary"
@
click=
"onSubmit"
>
创建店铺
</el-button>
...
...
src/style.scss
浏览文件 @
6a6fb4a8
$--color-primary
:
#3276fc
;
// $--border-radius-base: 8px;
/* 改变 icon 字体路径变量,必需 */
$--font-path
:
'~element-ui/lib/theme-chalk/fonts'
;
@import
'~element-ui/packages/theme-chalk/src/index'
;
@import
'@/assets/theme/index.css'
;
body
,
h1
,
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论