Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
P
pica.cloud.web-education-admin
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
Close sidebar
动态
分支图
统计图
创建新议题
提交
议题看板
打开侧边栏
jingqi.liu
pica.cloud.web-education-admin
提交
d7b75851
提交
d7b75851
编写于
1月 03, 2024
作者:
xinglee23
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'release' into feature/wxl
上级
c53e4f57
74fd6b2a
变更
3
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
51 行增加
和
31 行删除
+51
-31
index.html
index.html
+2
-1
create-good-new.scss
src/views/goods/create-good-new.scss
+17
-9
create-good-new.vue
src/views/goods/create-good-new.vue
+32
-21
未找到文件。
index.html
浏览文件 @
d7b75851
...
@@ -17,7 +17,8 @@
...
@@ -17,7 +17,8 @@
<div
id=
"app"
>
<div
id=
"app"
>
<router-view></router-view>
<router-view></router-view>
</div>
</div>
<script
src=
"https://unpkg.com/qiniu-js@2.2.0/dist/qiniu.min.js"
></script>
<!-- <script src="https://unpkg.com/qiniu-js@2.2.0/dist/qiniu.min.js"></script> -->
<script
src=
"https://pica-h5.yunqueyi.com/static/js/qiniu2.5.4.min.js"
></script>
<script
src=
"https://cdn.bootcss.com/downloadjs/1.4.8/download.min.js"
></script>
<script
src=
"https://cdn.bootcss.com/downloadjs/1.4.8/download.min.js"
></script>
<script
src=
"https://pv.sohu.com/cityjson?ie=utf-8"
></script>
<script
src=
"https://pv.sohu.com/cityjson?ie=utf-8"
></script>
<script
src=
"https://gosspublic.alicdn.com/aliyun-oss-sdk-5.1.1.min.js"
></script>
<script
src=
"https://gosspublic.alicdn.com/aliyun-oss-sdk-5.1.1.min.js"
></script>
...
...
src/views/goods/create-good-new.scss
浏览文件 @
d7b75851
...
@@ -14,6 +14,7 @@
...
@@ -14,6 +14,7 @@
}
}
.word-tip
{
.word-tip
{
color
:
#e6af7a
;
color
:
#e6af7a
;
line-height
:
32px
;
}
}
.word-show
{
.word-show
{
color
:
#449284
;
color
:
#449284
;
...
@@ -49,8 +50,9 @@
...
@@ -49,8 +50,9 @@
color
:
#f56c6c
;
color
:
#f56c6c
;
margin-right
:
4px
;
margin-right
:
4px
;
}
}
.required-label
.el-form-item__content
.bg-uploader
.el-upload
{
.required-label
.el-form-item__content
.bg-uploader
.el-upload
{
width
:
100%
;
width
:
100%
;
line-height
:
32px
;
}
}
.goods-category
,
.goods-category
,
.project-req
{
.project-req
{
...
@@ -101,11 +103,9 @@
...
@@ -101,11 +103,9 @@
color
:
#f56c6c
;
color
:
#f56c6c
;
}
}
.upload-message
{
.upload-message
{
position
:
absolute
;
left
:
0
;
top
:
105px
;
font-size
:
12px
;
font-size
:
12px
;
color
:
#f56c6c
;
color
:
#f56c6c
;
line-height
:
24px
;
}
}
.backTip
{
.backTip
{
font-size
:
12px
;
font-size
:
12px
;
...
@@ -123,7 +123,7 @@
...
@@ -123,7 +123,7 @@
height
:
100%
;
height
:
100%
;
background
:
#000
;
background
:
#000
;
opacity
:
0
.7
;
opacity
:
0
.7
;
transform
:
translate
(
-50%
,-
50%
);
transform
:
translate
(
-50%
,
-50%
);
z-index
:
999
;
z-index
:
999
;
i
{
i
{
...
@@ -146,6 +146,7 @@
...
@@ -146,6 +146,7 @@
}
}
.bg-uploader
{
.bg-uploader
{
line-height
:
1
;
.bg-img
{
.bg-img
{
float
:
left
;
float
:
left
;
width
:
84px
;
width
:
84px
;
...
@@ -155,12 +156,12 @@
...
@@ -155,12 +156,12 @@
.limit-text
{
.limit-text
{
float
:
left
;
float
:
left
;
margin-left
:
10px
;
margin-left
:
10px
;
margin-top
:
-10px
;
p
{
p
{
font-size
:
12px
;
font-size
:
12px
;
color
:
#999
;
color
:
#999
;
text-align
:
left
;
text-align
:
left
;
line-height
:
32px
;
}
}
}
}
}
}
...
@@ -245,13 +246,20 @@
...
@@ -245,13 +246,20 @@
cursor
:
pointer
;
cursor
:
pointer
;
color
:
#449284
;
color
:
#449284
;
}
}
.file-pics
{
.img-box
{
display
:
inline-block
;
width
:
84px
;
width
:
84px
;
height
:
1
0
0px
;
height
:
1
3
0px
;
float
:
left
;
float
:
left
;
margin-right
:
15px
;
margin-right
:
15px
;
position
:
relative
;
position
:
relative
;
.checkbox
{
line-height
:
32px
;
}
}
.file-pics
{
width
:
84px
;
height
:
100px
;
position
:
relative
;
}
}
.el-input-number__decrease
,
.el-input-number__decrease
,
.el-input-number__increase
{
.el-input-number__increase
{
...
...
src/views/goods/create-good-new.vue
浏览文件 @
d7b75851
...
@@ -131,15 +131,20 @@
...
@@ -131,15 +131,20 @@
:limit=
"6"
:limit=
"6"
>
>
<div
:key=
"index"
v-for=
"(item,index) in fileGoodsList"
>
<div
:key=
"index"
v-for=
"(item,index) in fileGoodsList"
>
<div
class=
"file-pics"
v-if=
"fileGoodsList.length > 0"
>
<div
class=
"img-box"
>
<img
:src=
"item.url"
@
mouseover
.
stop=
"headIndex=index"
class=
"bg-img"
/>
<div
class=
"file-pics"
v-if=
"fileGoodsList.length > 0"
>
<div
<img
:src=
"item.url"
@
mouseover
.
stop=
"headIndex=index"
class=
"bg-img"
/>
class=
"img-delete"
<div
v-if=
"headIndex==index"
class=
"img-delete"
@
click
.
stop=
"deleteImg(item,fileGoodsList)"
v-if=
"headIndex==index"
@
mouseout
.
stop=
"headIndex=-1"
@
click
.
stop=
"deleteImg(item,fileGoodsList)"
>
@
mouseout
.
stop=
"headIndex=-1"
<i
class=
"el-icon-delete"
></i>
>
<i
class=
"el-icon-delete"
></i>
</div>
</div>
<div
class=
"checkbox"
@
click
.
stop
>
<el-checkbox
:true-label=
"0"
:false-label=
"1"
v-model=
"fileGoodsList[index].miniProgramShow"
></el-checkbox>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -151,6 +156,7 @@
...
@@ -151,6 +156,7 @@
</div>
</div>
</el-upload>
</el-upload>
<p
class=
"upload-message"
v-if=
"!isgoodsImages"
>
请上传商品头图
</p>
<p
class=
"upload-message"
v-if=
"!isgoodsImages"
>
请上传商品头图
</p>
<p
class=
"word-tip"
>
勾选的头图在云鹊健康小程序不可见
</p>
<!--
<p
class=
"upload-message"
v-if=
"uploadImgMessage1"
>
请上传商品头图
</p>
-->
<!--
<p
class=
"upload-message"
v-if=
"uploadImgMessage1"
>
请上传商品头图
</p>
-->
</el-form-item>
</el-form-item>
...
@@ -191,8 +197,8 @@
...
@@ -191,8 +197,8 @@
:show-file-list=
"false"
:show-file-list=
"false"
:before-upload=
"beforeUploadPic1"
:before-upload=
"beforeUploadPic1"
>
>
<div
v-if=
"fileIntrList.length > 0
"
>
<div
:key=
"index"
v-for=
"(item,index) in fileIntrList
"
>
<div
:key=
"index"
v-for=
"(item,index) in fileIntrList
"
>
<div
class=
"img-box
"
>
<div
class=
"file-pics"
v-if=
"item.url||item.imageUrl"
>
<div
class=
"file-pics"
v-if=
"item.url||item.imageUrl"
>
<img
v-if=
"item.imageType==4"
:src=
"item.url"
@
mouseover
.
stop=
"intrIndex=index"
class=
"bg-img"
/>
<img
v-if=
"item.imageType==4"
:src=
"item.url"
@
mouseover
.
stop=
"intrIndex=index"
class=
"bg-img"
/>
<video
v-if=
"item.imageType==5"
@
mouseover
.
stop=
"intrIndex=index"
:src=
"item.imageUrl"
controls
preload
style=
"width: 100%;height:100%; object-fit:fill"
>
<video
v-if=
"item.imageType==5"
@
mouseover
.
stop=
"intrIndex=index"
:src=
"item.imageUrl"
controls
preload
style=
"width: 100%;height:100%; object-fit:fill"
>
...
@@ -207,6 +213,9 @@
...
@@ -207,6 +213,9 @@
<i
class=
"el-icon-delete"
></i>
<i
class=
"el-icon-delete"
></i>
</div>
</div>
</div>
</div>
<div
class=
"checkbox"
@
click
.
stop
>
<el-checkbox
:true-label=
"0"
:false-label=
"1"
v-model=
"fileIntrList[index].miniProgramShow"
></el-checkbox>
</div>
</div>
</div>
</div>
</div>
...
@@ -217,6 +226,7 @@
...
@@ -217,6 +226,7 @@
</div>
</div>
</el-upload>
</el-upload>
<p
class=
"upload-message"
v-if=
"!isSpecification_url"
>
请上传商品详情图片
</p>
<p
class=
"upload-message"
v-if=
"!isSpecification_url"
>
请上传商品详情图片
</p>
<p
class=
"word-tip"
>
勾选的详情在云鹊健康小程序不可见
</p>
</el-form-item>
</el-form-item>
</div>
</div>
...
@@ -566,15 +576,15 @@
...
@@ -566,15 +576,15 @@
</
template
>
</
template
>
<
script
>
<
script
>
import
BreadCrumb
from
"@/components/breadcrumb.vue"
;
import
BreadCrumb
from
"@/components/breadcrumb.vue"
;
import
Cropper
from
'@/components/common/cropper.vue'
;
import
{
getBarcodeData
,
getCategorysList
,
getContractList
,
getCooperationProjectList
,
getGoodsList
,
getGoodsListAll
,
getMedList
,
saveMedList
,
updateGoods
,
updateStock
}
from
'@/utils/goods'
;
import
{
isEmptyUtils
}
from
"@/utils/index"
;
import
{
createFilePath
,
doUpload
,
getFilePath
}
from
"@/utils/qiniu-util"
;
import
{
getStoreAdressRepot
}
from
"@/utils/shop"
;
import
{
closeLoading
,
openLoading
,
signFigures
}
from
"@/utils/utils"
;
import
{
originForm
,
originForm1
,
originForm3
}
from
'./common/forms'
;
import
{
originRules
,
originRules1
,
originRules3
}
from
'./common/rules'
;
let
vm
=
null
;
let
vm
=
null
;
import
{
openLoading
,
closeLoading
,
signFigures
}
from
"@/utils/utils"
;
import
{
isEmptyUtils
}
from
"@/utils/index"
;
import
{
doUpload
,
getFilePath
,
createFilePath
}
from
"@/utils/qiniu-util"
;
import
{
updateGoods
,
updateStock
,
getGoodsList
,
getGoodDetails
,
updateGoodsV2
,
getContractList
,
getCooperationProjectList
,
getMedList
,
getCategorysList
,
saveMedList
,
getGoodsListAll
,
getBarcodeData
}
from
'@/utils/goods'
;
import
{
getStoreAdressRepot
}
from
"@/utils/shop"
;
import
Cropper
from
'@/components/common/cropper.vue'
import
{
originRules1
,
originRules
,
originRules3
}
from
'./common/rules'
;
import
{
originForm1
,
originForm
,
originForm3
}
from
'./common/forms'
;
export
default
{
export
default
{
components
:
{
components
:
{
...
@@ -1108,6 +1118,7 @@
...
@@ -1108,6 +1118,7 @@
imageSort
:
d
[
i
].
imageSort
,
imageSort
:
d
[
i
].
imageSort
,
imgSort
:
d
[
i
].
imgSort
,
imgSort
:
d
[
i
].
imgSort
,
imageType
:
type
==
1
?
d
[
i
].
imgType
:
d
[
i
].
imageType
,
imageType
:
type
==
1
?
d
[
i
].
imgType
:
d
[
i
].
imageType
,
miniProgramShow
:
d
[
i
].
miniProgramShow
===
0
?
0
:
1
,
})
})
}
}
}
}
...
@@ -1336,7 +1347,7 @@
...
@@ -1336,7 +1347,7 @@
closeLoading
(
vm
);
closeLoading
(
vm
);
console
.
log
(
'上传成功后路径'
,
path
);
console
.
log
(
'上传成功后路径'
,
path
);
let
len
=
vm
.
fileGoodsList
.
length
;
let
len
=
vm
.
fileGoodsList
.
length
;
vm
.
fileGoodsList
.
push
({
url
:
path
.
fullPath
,
goodsImgUrl
:
path
.
fullPath
,
imageUrl
:
path
.
fullPath
,
imgSort
:
len
+
1
,
imageSort
:
len
+
1
,
goodsId
:
vm
.
formData
.
goodsId
});
vm
.
fileGoodsList
.
push
({
miniProgramShow
:
1
,
url
:
path
.
fullPath
,
goodsImgUrl
:
path
.
fullPath
,
imageUrl
:
path
.
fullPath
,
imgSort
:
len
+
1
,
imageSort
:
len
+
1
,
goodsId
:
vm
.
formData
.
goodsId
});
vm
.
isgoodsImages
=
true
;
vm
.
isgoodsImages
=
true
;
// vm.fileGoodsList.push({url:path.fullPath,goodsImgUrl: path.fullPath,imageUrl:path.fullPath,imageName:'',imageSort: len+1,imageType: 2,id: null,})
// vm.fileGoodsList.push({url:path.fullPath,goodsImgUrl: path.fullPath,imageUrl:path.fullPath,imageName:'',imageSort: len+1,imageType: 2,id: null,})
...
@@ -1430,7 +1441,7 @@
...
@@ -1430,7 +1441,7 @@
doUpload
(
vm
,
file
,
getFilePath
(
file
,
null
),
"preview4"
,
"progress1"
,
1
).
then
(
function
(
path
)
{
doUpload
(
vm
,
file
,
getFilePath
(
file
,
null
),
"preview4"
,
"progress1"
,
1
).
then
(
function
(
path
)
{
closeLoading
(
vm
);
closeLoading
(
vm
);
let
len
=
vm
.
fileIntrList
.
length
;
let
len
=
vm
.
fileIntrList
.
length
;
vm
.
fileIntrList
.
push
({
url
:
path
.
fullPath
,
imageUrl
:
path
.
fullPath
,
imageSort
:
len
+
1
,
id
:
null
,
imageType
:
4
})
vm
.
fileIntrList
.
push
({
miniProgramShow
:
1
,
url
:
path
.
fullPath
,
imageUrl
:
path
.
fullPath
,
imageSort
:
len
+
1
,
id
:
null
,
imageType
:
4
})
vm
.
isSpecification_url
=
true
;
vm
.
isSpecification_url
=
true
;
vm
.
$message
.
success
(
"上传成功"
);
vm
.
$message
.
success
(
"上传成功"
);
});
});
...
...
写
预览
Markdown
格式
0%
请重试
or
附加一个文件
附加文件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录