Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Y
yongxinda-admin
Project
Project
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
Graph
比较
统计图
议题
0
议题
0
列表
看板
标记
Milestones
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
刘旭
yongxinda-admin
Commits
3b0ddb49
提交
3b0ddb49
authored
10月 28, 2022
作者:
刘旭
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
优化图片格式
上级
1c4c3af1
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
23 行增加
和
41 行删除
+23
-41
.env.development
.env.development
+2
-2
.env.production
.env.production
+2
-2
default.conf
nginx/default.conf
+6
-1
edit.vue
src/views/commodityManage/edit.vue
+2
-3
list.vue
src/views/commodityManage/list.vue
+1
-4
shelves.vue
src/views/commodityManage/shelves.vue
+6
-29
vite.config.ts
vite.config.ts
+4
-0
没有找到文件。
.env.development
浏览文件 @
3b0ddb49
...
...
@@ -4,4 +4,4 @@ VITE_APP_PORT = 3003
# 请求接口
VITE_APP_BASE_URL = "/admin"
VITE_APP_BASE_IMG = "http://192.168.0.23/wx/storage/fetch/"
\ No newline at end of file
VITE_APP_BASE_IMG = "/wx/storage/fetch/"
\ No newline at end of file
.env.production
浏览文件 @
3b0ddb49
...
...
@@ -4,4 +4,4 @@ VITE_APP_PORT = 3002
# 请求接口
VITE_APP_BASE_URL = "/admin"
VITE_APP_BASE_IMG = "http://192.168.0.23/wx/storage/fetch/"
\ No newline at end of file
VITE_APP_BASE_IMG = "/wx/storage/fetch/"
\ No newline at end of file
nginx/default.conf
浏览文件 @
3b0ddb49
...
...
@@ -16,6 +16,10 @@ server {
}
location
/
admin
{
proxy_pass
http
://
yongxingda
:
80
;
proxy_pass
http
://
yongxingda
;
}
location
/
wx
{
proxy_pass
http
://
yongxingda
;
}
}
\ No newline at end of file
src/views/commodityManage/edit.vue
浏览文件 @
3b0ddb49
...
...
@@ -38,7 +38,7 @@
<el-upload
:action=
"uploadPath"
:show-file-list=
"false"
:headers=
"headers"
:on-success=
"uploadPicUrl"
class=
"avatar-uploader"
accept=
".jpg,.jpeg,.png,.gif"
>
<!-- <img v-if="goods.picUrl" :src="goods.picUrl" class="avatar" /> -->
<img
v-if=
"goods.picUrl"
:src=
"
'http://192.168.0.23' +
goods.picUrl"
class=
"avatar"
/>
<img
v-if=
"goods.picUrl"
:src=
"goods.picUrl"
class=
"avatar"
/>
<el-icon
v-else
class=
"avatar-uploader-icon"
>
<Plus
/>
</el-icon>
...
...
@@ -159,7 +159,7 @@
<el-upload
:action=
"uploadPath"
:show-file-list=
"false"
:headers=
"headers"
:on-success=
"uploadSpecPicUrl"
class=
"avatar-uploader"
accept=
".jpg,.jpeg,.png,.gif"
>
<div
v-if=
"specForm.picUrl"
>
<img
:src=
"
'http://192.168.0.23' +
specForm.picUrl"
class=
"avatar"
/>
<img
:src=
"specForm.picUrl"
class=
"avatar"
/>
</div>
<el-icon
v-else
class=
"avatar-uploader-icon"
>
<Plus
/>
...
...
@@ -284,7 +284,6 @@ let initList = () => {
}).
then
((
res
:
any
)
=>
{
if
(
res
.
code
===
200
)
{
partsList
.
value
=
res
.
data
.
list
;
console
.
log
(
partsList
.
value
,
'....'
);
}
})
}
...
...
src/views/commodityManage/list.vue
浏览文件 @
3b0ddb49
...
...
@@ -53,10 +53,7 @@
<
template
#
default=
"scope"
>
<el-image
v-if=
"scope.row.picUrl.split('http').length > 1"
:src=
"scope.row.picUrl"
style=
"width: 40px; height: 40px"
></el-image>
<img
v-else
:src=
"'http://192.168.0.23' + scope.row.picUrl"
style=
"width: 40px; height: 40px"
/>
<!--
<el-image
:src=
"thumbnail(scope.row.picUrl)"
:preview-src-list=
"toPreview(scope.row, scope.row.picUrl)"
style=
"width: 40px; height: 40px"
/>
-->
<img
v-else
:src=
"scope.row.picUrl"
style=
"width: 40px; height: 40px"
/>
</
template
>
</el-table-column>
...
...
src/views/commodityManage/shelves.vue
浏览文件 @
3b0ddb49
...
...
@@ -38,7 +38,7 @@
<el-upload
:action=
"uploadPath"
:limit=
"1"
:show-file-list=
"false"
:headers=
"headers"
:on-success=
"uploadPicUrl"
list-type=
"picture"
class=
"avatar-uploader"
accept=
".jpg,.jpeg,.png,.gif"
>
<img
v-if=
"goods.picUrl"
:src=
"
'http://192.168.0.23' +
goods.picUrl"
class=
"avatar"
/>
<img
v-if=
"goods.picUrl"
:src=
"goods.picUrl"
class=
"avatar"
/>
<el-icon
v-else
class=
"avatar-uploader-icon"
>
<Plus
/>
</el-icon>
...
...
@@ -156,7 +156,7 @@
<el-upload
:action=
"uploadPath"
:show-file-list=
"false"
:headers=
"headers"
:on-success=
"uploadSpecPicUrl"
class=
"avatar-uploader"
accept=
".jpg,.jpeg,.png,.gif"
>
<div
v-if=
"specForm.picUrl"
>
<img
:src=
"
'http://192.168.0.23' +
specForm.picUrl"
class=
"avatar"
/>
<img
:src=
"specForm.picUrl"
class=
"avatar"
/>
</div>
<el-icon
v-else
class=
"avatar-uploader-icon"
>
<Plus
/>
...
...
@@ -256,9 +256,7 @@ let productForm = ref({
});
let
headers
=
ref
({
'Authorization'
:
sessionStorage
.
getItem
(
"token"
)
})
let
products
=
ref
([
{
id
:
0
,
specifications
:
[
"标准"
],
price
:
0.0
,
number
:
0
,
url
:
""
},
]);
let
products
=
ref
([]);
let
attributeVisiable
=
ref
(
false
);
let
attributeForm
=
ref
({
attribute
:
""
,
value
:
""
}
as
any
);
...
...
@@ -316,7 +314,7 @@ let handleCancel = () => {
keywords
:
undefined
,
}
specifications
.
value
=
[]
products
.
value
=
[
{
id
:
0
,
specifications
:
[
"标准"
],
price
:
0.0
,
number
:
0
,
url
:
""
},
]
products
.
value
=
[]
goodsParts
.
value
=
[]
attributes
.
value
=
[]
shelvesDrawer
.
value
=
false
...
...
@@ -401,12 +399,8 @@ let handleRemove = (file: any, fileList: any) => {
}
let
specChanged
=
(
label
:
any
)
=>
{
if
(
label
===
false
)
{
specifications
.
value
=
[
{
specification
:
"规格"
,
value
:
"标准"
,
picUrl
:
""
},
];
products
.
value
=
[
{
id
:
0
,
specifications
:
[
"标准"
],
price
:
0.0
,
number
:
0
,
url
:
""
},
];
specifications
.
value
=
[];
products
.
value
=
[];
}
else
{
specifications
.
value
=
[];
products
.
value
=
[];
...
...
@@ -540,23 +534,6 @@ let specToProduct = () => {
products
=
products
;
}
let
handleProductShow
=
(
row
:
any
)
=>
{
productForm
=
Object
.
assign
({},
row
);
productVisiable
.
value
=
true
;
}
let
uploadProductUrl
=
(
res
:
any
)
=>
{
productForm
.
value
.
url
=
res
.
data
.
url
;
}
let
handleProductEdit
=
()
=>
{
for
(
let
i
=
0
;
i
<
products
.
value
.
length
;
i
++
)
{
const
v
=
products
.
value
[
i
];
if
(
v
.
id
===
productForm
.
value
.
id
)
{
products
.
value
.
splice
(
i
,
1
,
productForm
.
value
);
break
;
}
}
productVisiable
.
value
=
false
;
}
let
handleAttributeShow
=
()
=>
{
attributeForm
.
value
=
{};
attributeVisiable
.
value
=
true
;
...
...
vite.config.ts
浏览文件 @
3b0ddb49
...
...
@@ -92,6 +92,10 @@ export default ({ command, mode }) => {
target
:
"http://192.168.0.23/"
,
// rewrite: (path) => path.replace(/^\/api/, '')
},
"/wx"
:
{
target
:
"http://192.168.0.23/"
,
// rewrite: (path) => path.replace(/^\/api/, '')
},
// 正则表达式写法
// '^/fallback/.*': {
// target: 'http://jsonplaceholder.typicode.com',
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论