Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Y
yongxinda-h5
Project
Project
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
Graph
比较
统计图
议题
0
议题
0
列表
看板
标记
Milestones
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
刘旭
yongxinda-h5
Commits
15096493
提交
15096493
authored
12月 26, 2022
作者:
刘旭
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
完成导入产品线功能
上级
ab31c6be
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
155 行增加
和
81 行删除
+155
-81
productLine.ts
src/api/productLine.ts
+5
-1
vk-data-goods-sku-popup.vue
...nents/vk-data-goods-sku-popup/vk-data-goods-sku-popup.vue
+0
-2
importProductLine.vue
src/pages/productLine/importProductLine.vue
+109
-65
productLine.vue
src/pages/productLine/productLine.vue
+35
-8
index.vue
src/pages/profile/index.vue
+1
-1
config.ts
src/utils/config.ts
+2
-2
request.ts
src/utils/request.ts
+3
-2
没有找到文件。
src/api/productLine.ts
浏览文件 @
15096493
...
...
@@ -34,7 +34,10 @@ export const getProductLineItemAdd = (data: any) =>
// 产品线-删除组成商品
export
const
getProductLineReAdd
=
(
data
:
any
)
=>
request
(
'/wx/productLine/reAdd'
,
'POST'
,
data
);
// 产品线-导入
export
const
productLineUpload
=
(
data
:
any
)
=>
request
(
'/wx/productLine/upload'
,
'POST'
,
data
);
export
const
getLineSpecification
=
(
data
:
any
)
=>
request
(
'/wx/productLine/getSpecification'
,
'POST'
,
data
);
\ No newline at end of file
src/components/vk-data-goods-sku-popup/vk-data-goods-sku-popup.vue
浏览文件 @
15096493
...
...
@@ -724,8 +724,6 @@ export default {
that
.
checkInpath
(
index1
);
// 如果全部选完
that
.
checkSelectShop
();
console
.
log
(
this
.
goodsInfo
,
'all'
);
}
},
// 检测是否已经选完sku
...
...
src/pages/productLine/importProductLine.vue
浏览文件 @
15096493
差异被折叠。
点击展开。
src/pages/productLine/productLine.vue
浏览文件 @
15096493
...
...
@@ -177,7 +177,18 @@ let initProductLine = (lineId: number) => {
// 获取产品线详细数据
getProductLineIndex
({
lineId
}).
then
((
res
:
any
)
=>
{
if
(
res
.
data
.
code
===
200
)
{
handleEditProductLineData
(
res
.
data
.
data
)
console
.
log
(
res
.
data
.
data
);
if
(
res
.
data
.
data
.
cartList
.
length
>
20
)
{
uni
.
navigateTo
({
url
:
'./importProductLine'
,
success
:
()
=>
{
setTimeout
(()
=>
{
uni
.
$emit
(
'importProductLineData'
,
{
data
:
res
.
data
.
data
})
},
300
);
}
})
}
else
handleEditProductLineData
(
res
.
data
.
data
)
}
});
};
...
...
@@ -606,6 +617,7 @@ let uploadLine = () => {
count
:
0
,
extension
:
[
'.xlsx'
],
success
(
res
:
any
)
{
let
fileName
=
res
.
tempFiles
[
0
].
name
flag
.
value
=
false
;
uni
.
showLoading
({
title
:
'加载中'
...
...
@@ -617,18 +629,17 @@ let uploadLine = () => {
header
:
{
Authorization
:
uni
.
getStorageSync
(
'token'
)
},
success
(
uploadFileRes
:
any
)
{
uni
.
hideLoading
()
let
res
=
JSON
.
parse
(
uploadFileRes
.
data
)
if
(
res
.
code
===
200
)
{
if
(
res
.
data
.
cartList
.
length
<=
20
)
{
console
.
log
(
res
);
let
fileRes
=
JSON
.
parse
(
uploadFileRes
.
data
)
if
(
!
fileRes
.
data
.
isError
)
{
if
(
fileRes
.
data
.
cartList
.
length
<=
20
)
{
// 判断是否为导入产品线
isUpload
.
value
=
r
es
.
data
.
isUpload
isUpload
.
value
=
fileR
es
.
data
.
isUpload
// 清空标题
store
.
title
=
''
;
setTitleRef
.
value
.
title
=
store
.
title
;
lineId
.
value
=
null
// console.log(res.data.isUpload);
handleEditProductLineData
(
r
es
.
data
)
handleEditProductLineData
(
fileR
es
.
data
)
}
else
{
uni
.
showToast
({
title
:
'导入商品数量超出上限,跳转页面后,将只用于下单或加入购物车'
,
...
...
@@ -638,13 +649,29 @@ let uploadLine = () => {
url
:
'./importProductLine'
,
success
:
()
=>
{
setTimeout
(()
=>
{
uni
.
$emit
(
'importProductLineData'
,
{
data
:
r
es
.
data
})
uni
.
$emit
(
'importProductLineData'
,
{
data
:
fileR
es
.
data
})
},
300
);
}
})
}
})
}
}
else
{
flag
.
value
=
true
;
let
key
=
fileRes
.
data
.
key
uni
.
downloadFile
({
url
:
baseUrl
+
'/wx/productLine/error/download/'
+
key
,
header
:
{
'Authorization'
:
uni
.
getStorageSync
(
'token'
)
},
success
:
(
res
:
any
)
=>
{
let
downloadElement
=
document
.
createElement
(
'a'
);
downloadElement
.
href
=
res
.
tempFilePath
;
downloadElement
.
download
=
fileName
;
//下载后文件名
document
.
body
.
appendChild
(
downloadElement
);
downloadElement
.
click
();
//点击下载
document
.
body
.
removeChild
(
downloadElement
);
//下载完成移除元素
window
.
URL
.
revokeObjectURL
(
res
.
tempFilePath
);
//释放掉blob对象
}
})
}
},
fail
()
{
...
...
src/pages/profile/index.vue
浏览文件 @
15096493
...
...
@@ -77,7 +77,7 @@ let orderBtnList = ref([
},
{
url
:
'/static/my/wenjianshengchengguize.png'
,
text
:
'待生
成
'
,
text
:
'待生
产
'
,
badge
:
1
,
type
:
'error'
,
},
...
...
src/utils/config.ts
浏览文件 @
15096493
...
...
@@ -2,8 +2,8 @@ const CONFIG: any = {
// 开发环境配置
development
:
{
assetsPath
:
'http://192.168.60:81'
,
// 静态资源路径
//
baseUrl: 'http://192.168.0.9:8089', // 后台接口请求地址
baseUrl
:
'http://192.168.0.60:81'
,
// 后台接口请求地址
baseUrl
:
'http://192.168.0.9:8089'
,
// 后台接口请求地址
//
baseUrl: 'http://192.168.0.60:81', // 后台接口请求地址
hostUrl
:
'http://192.168.0.60:81'
,
// H5地址(前端运行地址)
websocketUrl
:
''
,
// websocket服务端地址
},
...
...
src/utils/request.ts
浏览文件 @
15096493
...
...
@@ -2,8 +2,8 @@ import config from './config';
const
baseUrl
=
config
.
baseUrl
;
// 封装公共申请办法
function
request
(
url
:
string
,
method
:
'GET'
|
'POST'
|
'PUT'
|
'DELETE'
,
data
?:
object
|
any
)
{
return
new
Promise
(
function
(
resolve
,
reject
)
{
function
request
(
url
:
string
,
method
:
'GET'
|
'POST'
|
'PUT'
|
'DELETE'
,
data
?:
object
|
any
,
responseType
?:
string
)
{
return
new
Promise
(
function
(
resolve
,
reject
)
{
let
header
:
any
;
uni
.
showLoading
({
title
:
'加载中...'
,
...
...
@@ -34,6 +34,7 @@ function request(url: string, method: 'GET' | 'POST' | 'PUT' | 'DELETE', data?:
method
:
method
,
data
:
data
,
header
:
header
,
responseType
,
success
(
res
:
any
)
{
uni
.
hideLoading
();
if
(
res
.
data
.
code
==
200
)
{
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论