Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
self-support
Project
Project
Details
Activity
Releases
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
李俊赕
self-support
Commits
da86ae9c
Commit
da86ae9c
authored
Jun 09, 2021
by
Facius
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
资料页面UI改动
parent
cf66069b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
129 additions
and
5 deletions
+129
-5
pages.json
src/pages.json
+9
-0
document-tag.vue
src/pages/order/document-tag.vue
+106
-0
document.vue
src/pages/order/document.vue
+14
-5
No files found.
src/pages.json
View file @
da86ae9c
...
...
@@ -331,6 +331,15 @@
"enablePullDownRefresh"
:
false
,
"disableScroll"
:
true
}
},
{
"path"
:
"document-tag"
,
"style"
:
{
"navigationBarTitleText"
:
""
,
//
合作商或品牌标签列表
"navigationStyle"
:
"custom"
,
"enablePullDownRefresh"
:
false
,
"disableScroll"
:
true
}
}
]
},
...
...
src/pages/order/document-tag.vue
0 → 100644
View file @
da86ae9c
<
template
>
<view
class=
"doc-tag"
>
<u-navbar
back-icon-color=
"#333333"
background=
"#FFFFFF"
title=
"安装文件"
titleColor=
"#333333"
:border-bottom=
"false"
title-bold
></u-navbar>
<!-- 合作商或品牌标签列表 -->
<view
class=
"label-content"
>
<view
v-for=
"(label, index) in labels"
:key=
"index"
class=
"label-item"
>
<!-- 选中为蓝底,非选中状态为灰底 -->
<view
:class=
"['label-normal',
{'selected': label.id == selectedId}]"
@click="handleClick(label)">
<text
class=
"label-text"
>
{{
label
.
name
}}
</text>
</view>
</view>
</view>
</view>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
labels
:
[],
// 标签列表
selectedId
:
''
};
},
onLoad
(
e
)
{
if
(
e
&&
e
.
partnerCompanyId
)
{
// 合作商id
this
.
tagTitle
=
'品牌'
this
.
loadFileLabel
(
'2'
,
e
.
partnerCompanyId
)
}
else
{
// 获取所有文件资料
this
.
tagTitle
=
'合作商'
this
.
loadFileLabel
(
'1'
)
}
},
methods
:
{
// 选中标签
handleClick
(
key
,
label
)
{
},
// 获取合作商列表
async
loadFileLabel
(
type
,
partnerCompanyId
)
{
let
param
=
{
type
:
type
,
// 1:合作商标签,2:品牌标签
}
if
(
type
==
'2'
)
{
param
.
partnerCompanyId
=
partnerCompanyId
// 合作商的标签id
}
let
res
=
await
this
.
$u
.
api
.
fileLabel
(
param
)
if
(
res
&&
res
.
code
==
200
)
{
this
.
labels
=
res
.
data
||
[]
// this.labels = [...res.data,...res.data,...res.data,...res.data,...res.data,...res.data,...res.data] // 测试模拟多条数据
}
},
}
};
</
script
>
<
style
lang=
"scss"
scoped
>
.doc-tag
{
background-color
:
#F4F5F7
;
height
:
100vh
;
display
:
flex
;
flex-direction
:
column
;
.label-content
{
width
:
100%
;
display
:
flex
;
align-items
:
center
;
overflow
:
auto
;
padding
:
0
10rpx
44rpx
30rpx
;
.label-item
{
padding-right
:
20rpx
;
flex-shrink
:
0
;
.label-normal
{
height
:
104rpx
;
width
:
200rpx
;
font-size
:
26rpx
;
color
:
#666666
;
background-color
:
#FFFFFF
;
border-radius
:
8rpx
;
padding-left
:
30rpx
;
padding-right
:
30rpx
;
text-align
:
center
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
.label-text
{
word-break
:
break-all
;
}
&
.selected
{
color
:
#FFFFFF
;
background-color
:
#2272FF
;
}
}
}
}
}
</
style
>
src/pages/order/document.vue
View file @
da86ae9c
...
...
@@ -5,9 +5,11 @@
<template
v-if=
"!orderFile"
>
<!-- 合作商、品牌标签列表 -->
<view
v-for=
"(item, key) in labels"
:key=
"key"
class=
"label-list"
>
<view
class=
"label-title"
>
<view>
{{
items
[
key
]
}}
</view>
<view
class=
"label-file-right"
>
<view
class=
"label-title"
>
<!-- 合作商或品牌 -->
<view>
{{
items
[
key
]
}}
</view>
<!-- 跳转到所有标签页面的更多按钮 -->
<view
class=
"label-file-right"
@
click=
"handleMore(key)"
>
<text
class=
"label-right-text"
>
更多
</text>
<u-icon
name=
"arrow-right"
></u-icon>
</view>
...
...
@@ -52,7 +54,6 @@
</template>
<
script
>
let
now
=
Date
.
now
()
export
default
{
data
()
{
return
{
...
...
@@ -133,6 +134,14 @@
this
.
loadFileList
(
this
.
selected
[
'1'
].
id
,
this
.
selected
[
'2'
].
id
)
// 获取文件列表
}
},
// 跳转到所有标签
handleMore
(
key
)
{
var
partnerCompanyId
=
''
// 合作商id
if
(
key
==
'2'
)
{
// 点击品牌的更多,跳转要传合作商id
partnerCompanyId
=
this
.
selected
[
'1'
].
id
}
this
.
$u
.
route
({
url
:
'pages/order/document-tag'
+
'?partnerCompanyId='
+
partnerCompanyId
+
'&selectedId='
+
this
.
selected
[
key
].
id
})
},
// 分享
handleShare
(
item
)
{
uni
.
showLoading
({
...
...
@@ -179,7 +188,7 @@
}
});
},
// 获取合作商列表
// 获取合作商
或品牌
列表
async
loadFileLabel
(
type
,
partnerCompanyId
)
{
let
param
=
{
type
:
type
,
// 1:合作商标签,2:品牌标签
...
...
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