Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
H
hs-app-project
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李星剑
hs-app-project
Commits
4c367dcc
Commit
4c367dcc
authored
Feb 17, 2022
by
Zheng Shang Jun
Browse files
Options
Browse Files
Download
Plain Diff
冲突解决1
parents
77364ced
e2477f84
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
121 additions
and
55 deletions
+121
-55
fabricTitle.vue
src/pages/home/components/fabricTitle.vue
+3
-2
detail.vue
src/pages/home/detail.vue
+69
-35
editFabric.vue
src/pages/home/editFabric.vue
+4
-3
fabricList.vue
src/pages/home/fabricList.vue
+2
-2
index.vue
src/pages/home/index.vue
+29
-6
search.vue
src/pages/home/search.vue
+14
-7
No files found.
src/pages/home/components/fabricTitle.vue
View file @
4c367dcc
...
...
@@ -11,8 +11,9 @@
</span>
</view>
<view
class=
"u-font-24 u-m-t-20 color_6F6F72"
>
<span
v-for=
"itemMater in dataList"
:key=
"indexMater"
>
<span
class=
"u-m-r-10"
v-if=
"itemMater.id==item.category"
>
{{
itemMater
.
name
}}
</span></span>
<span
v-if=
"dataList.length>0"
>
<span
v-for=
"(itemMater,indexMater) in dataList"
:key=
"indexMater"
>
<span
class=
"u-m-r-10"
v-if=
"itemMater.id==item.category"
>
{{
itemMater
.
name
}}
</span></span></span>
|
<span
class=
"u-m-l-10 u-m-r-10"
>
{{
item
.
clothWidth
}}
cm
</span>
|
...
...
src/pages/home/detail.vue
View file @
4c367dcc
<
template
>
<view
class=
"whole"
>
<view
class=
"back"
>
<view
class=
"back"
:style=
"topHeight==0?'':
{'padding-top':resultpx}">
<!--
<view
class=
"back"
>
-->
<view
class=
"u-flex"
>
<u-navbar
:is-back=
"true"
:background=
"
{ backgroundColor: '#F5F5F5' }" title="面料详情">
<template
v-slot:right
>
...
...
@@ -10,7 +11,8 @@
</u-navbar>
</view>
<view
:class=
"fabricObj.materialPictureVOList.length>4?'back-two':'back-back'"
>
<view
:class=
"fabricObj.materialPictureVOList!=undefined&&fabricObj.materialPictureVOList.length>4?'back-two':'back-back'"
>
<view
class=
"row"
style=
"color:#F5B674"
>
{{fabricObj.materialName}}
</view>
<view
class=
"row"
style=
"color:#fff"
>
...
...
@@ -30,13 +32,14 @@
</view>
</view>
</view>
<view
class=
"whole-bottom"
>
<view
:class=
"fabricObj.materialPictureVOList.length>4?'body-two':'body'"
>
<view
class=
"whole-whole"
>
<view
:class=
"fabricObj.materialPictureVOList!=undefined&&fabricObj.materialPictureVOList.length>4?'body-two':'body'"
>
<view
class=
"font"
><strong>
已上架款式
</strong></view>
<view
class=
"item"
v-for=
"itemTab,indexTab in tableList"
:key=
"indexTab"
>
<view
class=
"item-left"
>
<view
@
click=
"previewImage(`${imgUrl}${itemTab.
originalImag
eCode}`)"
>
<image
class=
"item-img"
:src=
"`${imgUrl}${itemTab.
originalImag
eCode}`"
mode=
"aspectFill"
>
<view
@
click=
"previewImage(`${imgUrl}${itemTab.
effectPictur
eCode}`)"
>
<image
class=
"item-img"
:src=
"`${imgUrl}${itemTab.
effectPictur
eCode}`"
mode=
"aspectFill"
>
</image>
</view>
<!-- <image class="item-img" src="../../static/images/home/1@2x.png" mode=""></image> -->
...
...
@@ -77,6 +80,9 @@
return
{
imgUrl
:
this
.
$IMG_URL
,
id
:
""
,
topHeight
:
null
,
heightpx
:
null
,
resultpx
:
""
,
fabricObj
:
{},
tableList
:
[],
dataList
:
[],
...
...
@@ -90,6 +96,21 @@
}
}
},
computed
:
{
// heightpx() {
// return uni.upx2px(100) + 'px'
// },
// topHeight() {
// uni.getSystemInfo({
// success: (result) => {
// // this.topHeight = result.safeArea.top
// console.log(result.safeArea.top, "result.safeArea.top")
// return result.safeArea.top + 'px'
// }
// })
// }
},
onLoad
(
option
)
{
this
.
id
=
option
.
id
this
.
materialDetail
()
...
...
@@ -104,6 +125,17 @@
}
})
console
.
log
(
uni
.
upx2px
(
100
),
)
uni
.
getSystemInfo
({
success
:
(
result
)
=>
{
this
.
topHeight
=
result
.
safeArea
.
top
console
.
log
(
result
.
safeArea
.
top
,
"result.safeArea.top"
)
}
})
this
.
heightpx
=
uni
.
upx2px
(
100
)
this
.
resultpx
=
(
this
.
heightpx
-
this
.
topHeight
)
+
'px'
console
.
log
(
this
.
resultpx
,
"this.resultpx"
)
},
onShow
()
{
this
.
id
=
this
.
$route
.
query
.
id
...
...
@@ -198,7 +230,7 @@
}
}
.whole-
bottom
{
.whole-
whole
{
padding
:
0
30rpx
;
...
...
@@ -208,49 +240,51 @@
padding
:
30rpx
;
margin-top
:
-60rpx
;
}
.body-two
{
.body-two
{
background
:
#ffffff
;
border-radius
:
4px
;
padding
:
30rpx
;
// margin-top: -
6
0rpx;
// margin-top: -
2
0rpx;
}
.font
{
padding-bottom
:
30rpx
;
}
.item
{
padding-bottom
:
30rpx
;
display
:
flex
;
.font
{
padding-bottom
:
30rpx
;
}
.item-left
{
margin-right
:
20rpx
;
.item
{
padding-bottom
:
30rpx
;
display
:
flex
;
.item-left
{
margin-right
:
20rpx
;
.item-img
{
width
:
80px
;
height
:
80px
;
}
.item-img
{
width
:
80px
;
height
:
80px
;
}
}
}
.item
:last-child
{
padding-bottom
:
0px
;
}
.item
:last-child
{
padding-bottom
:
0px
;
}
.item-right
{
.right-one
{
font-weight
:
bold
;
}
.item-right
{
.right-one
{
font-weight
:
bold
;
}
.right-two
{
display
:
flex
;
color
:
rgba
(
0
,
0
,
0
,
0
.40
);
.right-two
{
display
:
flex
;
color
:
rgba
(
0
,
0
,
0
,
0
.40
);
.two-left
{
margin-right
:
40rpx
;
}
.two-left
{
margin-right
:
40rpx
;
}
}
}
}
}
</
style
>
</
style
>
\ No newline at end of file
src/pages/home/editFabric.vue
View file @
4c367dcc
...
...
@@ -7,14 +7,14 @@
<view>
<u-input
v-model=
"detail.referToBrand"
></u-input>
</view>
-->
<u-form
:model=
"detailInfo"
label-position=
"top"
ref=
"uForm"
>
<u-form
:model=
"detailInfo"
label-position=
"top"
ref=
"
r
uForm"
>
<hs-tip-title
title=
"面料基本信息"
></hs-tip-title>
<u-form-item
label=
"面料名称"
prop=
"materialName"
required
>
<u-input
v-model=
"detailInfo.materialName"
placeholder=
"请输入面料名称"
/>
</u-form-item>
<view
class=
"title"
>
面料门幅
</view>
<u-number-box
v-model=
"detailInfo.clothWidth"
:step=
"
1"
:input-width=
"160"
:input-height=
"
60"
@
change=
"valChange"
style=
"margin-right:30rpx"
>
<u-number-box
v-model=
"detailInfo.clothWidth"
:step=
"
0.1"
:positive-integer=
"false"
:input-width=
"1
60"
:input-height=
"60"
@
change=
"valChange"
style=
"margin-right:30rpx"
>
</u-number-box>
cm
<u-form-item
label=
"面料成分"
prop=
"component"
required
>
<u-input
v-model=
"detailInfo.component"
placeholder=
"请输入面料成分"
/>
...
...
@@ -34,6 +34,7 @@
data
()
{
return
{
id
:
""
,
step
:
0.1
,
detailInfo
:
{},
value
:
2.2
,
tableList
:
[]
...
...
src/pages/home/fabricList.vue
View file @
4c367dcc
...
...
@@ -25,7 +25,7 @@ export default {
components
:{
fabricTitle
},
data
()
{
return
{
size
:
5
,
size
:
10
,
search
:
''
,
fiabricList
:
[],
// dataList:[],
...
...
@@ -54,7 +54,7 @@ export default {
},
methods
:
{
searchCli
()
{
this
.
size
=
5
;
//
this.size = 5;
this
.
materialList
();
},
// 我的面料
...
...
src/pages/home/index.vue
View file @
4c367dcc
...
...
@@ -49,12 +49,32 @@
<view
class=
"home_con_content u-m-t-24"
@
click=
"detailFabric(item)"
v-for=
"item in fiabricList"
v-for=
"(item, index) in fiabricList"
:key=
"index"
>
<image
v-if=
"index == 0"
class=
"hs-img"
src=
"../../static/images/home/1@2x.png"
mode=
""
mode=
"aspectFill"
></image>
<image
v-if=
"index == 1"
class=
"hs-img"
src=
"../../static/images/home/2@2x.png"
mode=
"aspectFill"
></image>
<image
v-if=
"index == 2"
class=
"hs-img"
src=
"../../static/images/home/3@2x.png"
mode=
"aspectFill"
></image>
<image
v-if=
"index == 3"
class=
"hs-img"
src=
"../../static/images/home/4@2x.png"
mode=
"aspectFill"
></image>
<view
class=
"home_con_content_font ov_hiden"
>
{{
item.materialName
...
...
@@ -193,7 +213,7 @@ export default {
// this.toBeSelectedQuantity();
// this.orderTicketExceptionNum();
// this.noSampleOrder();
//
this.materialList();
this
.
materialList
();
// 潜在客户
this
.
potentialCustomersPage
();
},
...
...
@@ -276,14 +296,16 @@ export default {
},
// 我的面料
materialList
()
{
this
.
$http
(
"
orderTicket.m
aterialList"
,
{
this
.
$http
(
"
materialinfo.getM
aterialList"
,
{
size
:
4
,
current
:
1
,
materialType
:
"面料"
,
materialCode
:
""
,
materialName
:
""
,
}).
then
((
res
)
=>
{
let
{
code
,
data
}
=
res
;
if
(
code
==
200
)
{
this
.
fiabricList
=
data
.
data
;
this
.
fiabricList
=
data
.
page
.
records
;
}
});
},
...
...
@@ -295,7 +317,7 @@ export default {
this
.
$Router
.
push
(
"/pages/home/fabricList"
);
},
detailFabric
(
data
)
{
this
.
$Router
.
push
(
"/pages/home/
fabricDetails
?id="
+
data
.
id
);
this
.
$Router
.
push
(
"/pages/home/
detail
?id="
+
data
.
id
);
},
sampleConfirm
()
{
this
.
$Router
.
push
(
...
...
@@ -315,6 +337,7 @@ export default {
},
};
</
script
>
<
style
lang=
"scss"
scoped
>
.item--round
{
border-radius
:
8rpx
;
...
...
src/pages/home/search.vue
View file @
4c367dcc
...
...
@@ -10,19 +10,24 @@
</u-navbar>
<!-- 列表 -->
<view
class=
"home_con_order u-p-l-30 u-p-r-30"
>
<view
class=
"u-m-t-30"
v-for=
"item in fiabricList"
><hs-material-thumbnail
@
click=
"detailFabric(item)"
:item=
"filterFiabric(item)"
></hs-material-thumbnail></view>
<!--
<view
class=
"u-m-t-30"
v-for=
"item in fiabricList"
>
-->
<!--
<hs-material-thumbnail
@
click=
"detailFabric(item)"
:item=
"filterFiabric(item)"
></hs-material-thumbnail>
-->
<fabricTitle
:tableData=
"fiabricList"
></fabricTitle>
<!--
</view>
-->
</view>
</view>
</
template
>
<
script
>
import
home
from
'./mixin/index.js'
;
import
fabricTitle
from
"./components/fabricTitle.vue"
export
default
{
mixins
:
[
home
],
components
:{
fabricTitle
},
data
()
{
return
{
value
:
''
,
size
:
5
,
size
:
10
,
total
:
0
,
fiabricList
:
[]
};
...
...
@@ -39,20 +44,22 @@ export default {
this
.
$router
.
push
(
'/pages/home/index'
);
},
searchCli
()
{
this
.
size
=
5
;
// this.size = 10
;
this
.
materialList
();
},
// 我的面料
materialList
()
{
this
.
$http
(
'
orderTicket.m
aterialList'
,
{
this
.
$http
(
'
materialinfo.getM
aterialList'
,
{
size
:
this
.
size
,
materialCode
:
''
,
materialName
:
this
.
value
"current"
:
1
,
"materialType"
:
"面料"
,
codeAndName
:
this
.
value
}).
then
(
res
=>
{
let
{
code
,
data
}
=
res
;
if
(
code
==
200
)
{
this
.
fiabricList
=
data
.
data
;
this
.
total
=
data
.
total
;
this
.
fiabricList
=
data
.
page
.
records
;
this
.
total
=
data
.
page
.
total
;
}
});
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment