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
cd40620b
提交
cd40620b
authored
4月 06, 2023
作者:
刘旭
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
恢复删除文件
上级
f033fcb3
隐藏空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
242 行增加
和
4 行删除
+242
-4
pages.json
src/pages.json
+7
-0
index.vue
src/pages/productLine/index.vue
+2
-2
productLineDetails.vue
src/pages/productLine/productLineDetails.vue
+231
-0
config.ts
src/utils/config.ts
+2
-2
没有找到文件。
src/pages.json
浏览文件 @
cd40620b
...
...
@@ -39,6 +39,13 @@
}
},
{
"path"
:
"pages/productLine/productLineDetails"
,
"style"
:
{
"navigationBarTitleText"
:
"产品线详情"
,
"navigationBarBackgroundColor"
:
"#fff"
}
},
{
"path"
:
"pages/cart/index"
,
"style"
:
{
"navigationBarTitleText"
:
"购物车"
,
...
...
src/pages/productLine/index.vue
浏览文件 @
cd40620b
...
...
@@ -4,7 +4,7 @@
<template
#
default
>
<view
style=
"display: flex; flex-direction: row; margin-left: 30rpx;"
>
<!--
<view
style=
"margin-right: 30rpx"
@
tap=
"selectLineBody"
>
{{
body
?
'双线体'
:
'单线体'
}}
</view>
-->
<view
style=
"margin-right: 30rpx"
@
tap=
"selectFlowDirection"
>
流
向(
{{
flow
?
'右到左'
:
'左到右'
}}
)
</view>
<view
style=
"margin-right: 30rpx"
@
tap=
"selectFlowDirection"
>
拼接方
向(
{{
flow
?
'右到左'
:
'左到右'
}}
)
</view>
</view>
</
template
>
<
template
#
right
>
...
...
@@ -161,7 +161,7 @@ onLoad((options: any) => {
let
addTabs
=
()
=>
{
if
(
lineList
.
value
.
length
===
0
)
{
model
.
value
.
show
=
true
model
.
value
.
content
=
flow
.
value
?
'确定
流向为从右到左?'
:
'确定流
向为从左到右?'
model
.
value
.
content
=
flow
.
value
?
'确定
产品线拼接方向为从右到左?'
:
'确定产品线拼接方
向为从左到右?'
return
}
goodsSkuRef
.
value
.
goodsInfoCopy
=
null
// 防止sku直接赋值
...
...
src/pages/productLine/productLineDetails.vue
0 → 100644
浏览文件 @
cd40620b
<
template
>
<view
class=
"container"
>
<block
v-for=
"res in detailData"
>
<view
style=
"margin-bottom: 20rpx; background-color: #fff;"
>
<view
style=
"width: 100%; text-align: end; padding: 20rpx 20rpx 0 0;"
>
{{
res
.
name
}}
</view>
<block
v-for=
"(item, index) in res.values"
>
<view
class=
"details"
>
<u-image
width=
"140rpx"
height=
"200rpx"
:src=
"
item.picUrl.split('http').length > 1
? item.picUrl
: baseUrl + item.picUrl
"
class=
"img"
></u-image>
<view
class=
"right"
>
<view
class=
"name"
>
{{
item
.
goodsName
}}
</view>
<view
class=
"tag"
>
<block
v-for=
"(item1, index1) in item.specifications?.length"
:key=
"index1"
>
<u-tag
:text=
"item.specifications[index1]"
type=
"info"
size=
"mini"
style=
"margin: 8rpx 8rpx 8rpx 0;"
/>
</block>
</view>
<text
style=
"display: flex; justify-content: flex-end; color: #969799; font-size: 12px;"
>
x
{{
item
.
number
}}
</text>
</view>
</view>
<u-line
v-if=
"res.values.length >= 1"
color=
"#e8e8e8"
/>
</block>
</view>
</block>
<view
class=
"content-footer"
>
<u-button
shape=
"circle"
type=
"error"
size=
"mini"
style=
"margin-right: 30;"
@
tap=
"toIndex"
>
返回首页
</u-button>
<view>
<u-button
shape=
"circle"
size=
"mini"
@
tap=
"generateQuote"
>
生成报价
</u-button>
<u-button
shape=
"circle"
size=
"mini"
style=
"margin-left: 20rpx;"
@
tap=
"download"
>
下载技术规格书
</u-button>
</view>
</view>
</view>
<view
style=
"height: 100rpx;"
></view>
</
template
>
<
script
setup
lang=
"ts"
>
import
{
ref
}
from
'vue'
;
import
{
onLoad
,
onBackPress
}
from
'@dcloudio/uni-app'
;
import
{
orderDetail
}
from
'@/api/index'
;
import
{
getProductLineMultipleDetail
}
from
'@/api/productLine'
;
import
{
useLineStore
}
from
'@/store/useStore'
;
import
config
from
'@/utils/config'
;
let
store
=
useLineStore
();
let
baseUrl
=
config
.
baseUrl
;
let
enclosure
=
ref
(
''
);
// pdf key值
let
detailData
=
ref
([]
as
any
);
let
type
=
ref
();
let
orderId
=
ref
();
onLoad
((
options
:
any
)
=>
{
type
.
value
=
options
.
type
;
orderId
.
value
=
options
.
orderId
;
// console.log(type.value, 'type.value');
initOrderData
(
options
.
orderId
);
});
// 返回首页
let
toIndex
=
()
=>
{
uni
.
reLaunch
({
url
:
'../index/index'
,
success
()
{
if
(
type
.
value
===
'productline'
)
{
store
.
$reset
();
// 重置pinia数据
}
},
});
};
// 生成报价
let
generateQuote
=
()
=>
{
uni
.
navigateTo
({
url
:
`../order/quotation?orderId=
${
orderId
.
value
}
&lineId=
${
0
}
`
,
});
};
// 下载技术规格书pdf
let
download
=
()
=>
{
open
(
baseUrl
+
'/wx/storage/downloadFile/'
+
enclosure
.
value
)
};
let
lineNames
=
ref
([]
as
any
)
// 获取goodsId
let
initOrderData
=
(
orderId
:
number
)
=>
{
orderDetail
({
orderId
}).
then
((
res
:
any
)
=>
{
if
(
res
.
data
.
code
===
200
)
{
enclosure
.
value
=
res
.
data
.
data
.
orderInfo
.
enclosure
;
let
lineArr
=
[]
as
any
res
.
data
.
data
.
orderGoods
.
map
((
item
:
any
,
i
:
number
)
=>
{
if
(
item
.
goodsId
)
{
lineArr
.
push
(
item
.
goodsId
)
lineNames
.
value
.
push
({
id
:
item
.
goodsId
,
name
:
item
.
goodsName
})
}
});
initProductLineMultipleDetail
(
lineArr
)
}
});
};
let
initProductLineMultipleDetail
=
(
lineArr
:
[])
=>
{
getProductLineMultipleDetail
(
lineArr
).
then
((
res
:
any
)
=>
{
if
(
res
.
data
.
code
===
200
)
{
for
(
const
key
in
res
.
data
.
data
)
{
lineNames
.
value
.
map
((
item
:
any
)
=>
{
if
(
key
==
item
.
id
)
{
detailData
.
value
.
push
({
name
:
item
.
name
,
values
:
res
.
data
.
data
[
key
]
})
}
})
}
// console.log(detailData.value, 'getProductLineMultipleDetail', lineNames.value);
}
})
}
// 通过type判断返回页面
onBackPress
((
options
:
any
)
=>
{
if
(
type
.
value
===
'productline'
)
{
if
(
options
.
from
===
'navigateBack'
)
{
return
false
;
}
uni
.
switchTab
({
url
:
'../productLine1/index'
,
success
()
{
store
.
$reset
();
// 重置pinia数据
let
pages
=
getCurrentPages
();
//获取所有页面的数组对象
let
currPage
:
any
=
pages
[
pages
.
length
-
1
];
//当前页面
uni
.
reLaunch
({
url
:
'/'
+
currPage
.
route
,
});
},
});
return
true
;
}
else
if
(
type
.
value
===
'productLineCart'
)
{
if
(
options
.
from
===
'navigateBack'
)
{
return
false
;
}
uni
.
switchTab
({
url
:
'../cart/index'
,
success
()
{
let
pages
=
getCurrentPages
();
//获取所有页面的数组对象
let
currPage
:
any
=
pages
[
pages
.
length
-
1
];
//当前页面
uni
.
reLaunch
({
url
:
'/'
+
currPage
.
route
,
});
},
});
return
true
;
}
});
</
script
>
<
style
lang=
"scss"
scoped
>
.container
{
box-sizing
:
border-box
;
margin
:
16rpx
;
// background-color: #fff;
.details
{
width
:
100%
;
padding
:
16rpx
32rpx
;
display
:
flex
;
flex-direction
:
row
;
justify-content
:
flex-start
;
align-items
:
center
;
background-color
:
#fff
;
.img
{
margin-right
:
20rpx
;
}
.tag
{
margin-top
:
1%
;
display
:
flex
;
flex-direction
:
row
;
flex-wrap
:
wrap
;
margin-bottom
:
5%
;
}
.right
{
width
:
80%
;
.sum-price
{
display
:
flex
;
justify-content
:
space-between
;
}
}
}
.content-footer
{
// margin-top: 50rpx;
padding
:
50rpx
;
width
:
100%
;
display
:
flex
;
justify-content
:
space-between
;
align-items
:
center
;
background-color
:
#fff
;
}
}
.footer
{
position
:
fixed
;
bottom
:
0
;
z-index
:
99
;
width
:
100%
;
height
:
100rpx
;
background-color
:
#fff
;
padding
:
0
32rpx
;
line-height
:
100rpx
;
font-size
:
30rpx
;
font-weight
:
600
;
display
:
flex
;
justify-content
:
space-between
;
}
</
style
>
src/utils/config.ts
浏览文件 @
cd40620b
...
...
@@ -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.10
:8089'
,
// 后台接口请求地址
//
baseUrl: 'http://192.168.0.60:81', // 后台接口请求地址
hostUrl
:
'http://192.168.0.60:81'
,
// H5地址(前端运行地址)
websocketUrl
:
''
,
// websocket服务端地址
},
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论