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
190dce11
Commit
190dce11
authored
Jun 09, 2021
by
Facius
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
文件资料更多页面
parent
29244ad3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
52 additions
and
19 deletions
+52
-19
.env.js
.env.js
+1
-1
document-tag.vue
src/pages/order/document-tag.vue
+37
-18
document.vue
src/pages/order/document.vue
+14
-0
No files found.
.env.js
View file @
190dce11
(
function
()
{
let
NODE_ENV
=
'test'
;
// dev:开发环境 | test:测试环境 | prod:生产环境
let
ENV_VAR
=
null
;
let
VERSION_NUMBER
=
'1.3.
2
'
;
//版本号
let
VERSION_NUMBER
=
'1.3.
3
'
;
//版本号
//小程序是否审核通过,参数配置在ucenter库version表,对应版本号的is_audit设置为1,将显示学习视频
if
(
process
.
env
.
NODE_ENV
===
"development"
)
{
if
(
NODE_ENV
===
'dev'
)
{
...
...
src/pages/order/document-tag.vue
View file @
190dce11
<
template
>
<view
class=
"doc-tag"
>
<u-navbar
back-icon-color=
"#333333"
background=
"#FFFFFF"
title=
"安装文件
"
titleColor=
"#333333"
<u-navbar
back-icon-color=
"#333333"
background=
"#FFFFFF"
:title=
"titles[type]
"
titleColor=
"#333333"
:border-bottom=
"false"
title-bold
></u-navbar>
<!-- 合作商或品牌标签列表 -->
<view
class=
"label-content"
>
...
...
@@ -20,38 +20,56 @@
data
()
{
return
{
labels
:
[],
// 标签列表
selectedId
:
''
selectedId
:
''
,
type
:
'1'
};
},
onLoad
(
e
)
{
if
(
e
&&
e
.
selectedId
)
{
this
.
selectedId
=
e
.
selectedId
}
if
(
e
&&
e
.
partnerCompanyId
)
{
// 合作商id
this
.
t
agTitle
=
'品牌
'
this
.
loadFileLabel
(
'2'
,
e
.
partnerCompanyId
)
this
.
t
ype
=
'2
'
this
.
loadFileLabel
(
e
.
partnerCompanyId
)
}
else
{
// 获取所有文件资料
this
.
t
agTitle
=
'合作商
'
this
.
loadFileLabel
(
'1'
)
this
.
t
ype
=
'1
'
this
.
loadFileLabel
()
}
},
computed
:{
titles
()
{
return
[
'合作商'
,
'品牌'
]
}
},
methods
:
{
// 选中标签
handleClick
(
key
,
label
)
{
handleClick
(
label
)
{
this
.
selectedId
=
label
.
id
// 向上个页面传值
var
pages
=
getCurrentPages
();
if
(
pages
.
length
>=
2
)
{
var
page
=
pages
[
pages
.
length
-
2
];
page
.
selectedItem
=
{
type
:
this
.
type
,
id
:
this
.
selectedId
}
}
uni
.
navigateBack
()
},
// 获取合作商列表
async
loadFileLabel
(
type
,
partnerCompanyId
)
{
async
loadFileLabel
(
partnerCompanyId
)
{
let
param
=
{
type
:
t
ype
,
// 1:合作商标签,2:品牌标签
}
if
(
t
ype
==
'2'
)
{
param
.
partnerCompanyId
=
partnerCompanyId
//
合作商的标签id
type
:
t
his
.
type
,
// 1:合作商标签,2:品牌标签
}
if
(
t
his
.
type
==
'2'
)
{
param
.
partnerCompanyId
=
partnerCompanyId
//
品牌的时候有效
}
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] // 测试模拟多条数据
}
},
...
...
@@ -70,7 +88,8 @@
width
:
100%
;
display
:
flex
;
align-items
:
center
;
overflow
:
auto
;
overflow
:
auto
;
flex-wrap
:
wrap
;
padding
:
0
10rpx
44rpx
30rpx
;
.label-item
{
...
...
@@ -79,7 +98,7 @@
.label-normal
{
height
:
104rpx
;
width
:
2
00
rpx
;
width
:
2
16
rpx
;
font-size
:
26rpx
;
color
:
#666666
;
background-color
:
#FFFFFF
;
...
...
src/pages/order/document.vue
View file @
190dce11
...
...
@@ -121,6 +121,20 @@
this
.
loadFileLabel
(
'1'
)
}
},
onShow
()
{
// 从标签列表页面返回,获取选中的标签
let
pages
=
getCurrentPages
();
let
page
=
pages
[
pages
.
length
-
1
];
let
selectedItem
=
page
.
selectedItem
;
if
(
selectedItem
)
{
for
(
var
item
of
this
.
labels
[
selectedItem
.
type
])
{
if
(
item
.
id
==
selectedItem
.
id
)
{
this
.
handleClick
(
selectedItem
.
type
,
item
)
return
}
}
}
},
methods
:
{
// 选中标签
...
...
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