Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
U
uni-app-base
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
tangfh
uni-app-base
Commits
94d9442d
Commit
94d9442d
authored
Jul 14, 2023
by
tangfh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
+
parent
3462d4be
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
48 deletions
+47
-48
base-tab.vue
pages/template/base-tab.vue
+47
-48
No files found.
pages/template/base-tab.vue
View file @
94d9442d
...
@@ -2,7 +2,10 @@
...
@@ -2,7 +2,10 @@
<view
class=
"content"
>
<view
class=
"content"
>
<!-- [uni-nav-bar 自定义导航栏](https://uniapp.dcloud.net.cn/component/uniui/uni-nav-bar.html) -->
<!-- [uni-nav-bar 自定义导航栏](https://uniapp.dcloud.net.cn/component/uniui/uni-nav-bar.html) -->
<uni-nav-bar
ref=
"navBar"
class=
"uni-navi-bar"
status-bar=
"true"
:border=
"false"
color=
"#333333"
fixed=
"true"
<uni-nav-bar
ref=
"navBar"
class=
"uni-navi-bar"
status-bar=
"true"
:border=
"false"
color=
"#333333"
fixed=
"true"
left-icon=
"left"
left-text=
"返回"
:title=
"title"
@
clickLeft=
"onNavBarLeftClick"
>
left-icon=
"left"
left-text=
"返回"
:title=
"title"
@
clickLeft=
"onNavBarLeftClick"
:titleRightIcon=
"tabBars[tabIndex].isNeedFilter ? titleRightIcon : ''"
:titleRightIcon2=
"titleRightIcon2"
@
onClickTitleRightIcon=
"onClickTitleRightIcon"
@
onClickTitleRightIcon2=
"onClickTitleRightIcon2"
>
</uni-nav-bar>
</uni-nav-bar>
<c-tab-bar
:tabBars=
"tabBars"
:tabIndex=
"tabIndex"
:tabWidth=
"tabWidth"
:scrollInto=
"scrollInto"
<c-tab-bar
:tabBars=
"tabBars"
:tabIndex=
"tabIndex"
:tabWidth=
"tabWidth"
:scrollInto=
"scrollInto"
:marginL=
"tabItemMargin"
:marginR=
"tabItemMargin"
@
onTabItemClick=
"onTabItemClick"
></c-tab-bar>
:marginL=
"tabItemMargin"
:marginR=
"tabItemMargin"
@
onTabItemClick=
"onTabItemClick"
></c-tab-bar>
...
@@ -28,6 +31,10 @@
...
@@ -28,6 +31,10 @@
</scroll-view>
</scroll-view>
</swiper-item>
</swiper-item>
</swiper>
</swiper>
<text
class=
"text-bottom-btn center active2"
@
click=
"onAddEmployeeBtnClick"
>
添加店员
</text>
<c-pop-passcard-filter
ref=
"filter"
@
onEnsureBtnClick=
"onFilterEnsureBtnClick"
></c-pop-passcard-filter>
</view>
</view>
</
template
>
</
template
>
...
@@ -44,11 +51,13 @@
...
@@ -44,11 +51,13 @@
apply
:
{
apply
:
{
type
:
1
,
type
:
1
,
name
:
'店员申请'
,
name
:
'店员申请'
,
isNeedFilter
:
false
,
content
:
JSON
.
parse
(
JSON
.
stringify
(
constant
.
LIST_CONTENT
))
content
:
JSON
.
parse
(
JSON
.
stringify
(
constant
.
LIST_CONTENT
))
},
},
passed
:
{
passed
:
{
type
:
2
,
type
:
2
,
name
:
'我的店员'
,
name
:
'我的店员'
,
isNeedFilter
:
true
,
content
:
JSON
.
parse
(
JSON
.
stringify
(
constant
.
LIST_CONTENT
))
content
:
JSON
.
parse
(
JSON
.
stringify
(
constant
.
LIST_CONTENT
))
}
}
};
};
...
@@ -76,6 +85,8 @@
...
@@ -76,6 +85,8 @@
seletedItem
:
{
seletedItem
:
{
range_name
:
""
range_name
:
""
},
},
titleRightIcon
:
"/static/btn_bar_screen.png"
,
titleRightIcon2
:
"/static/btn_problem.png"
,
}
}
},
},
onLoad
(
option
)
{
onLoad
(
option
)
{
...
@@ -85,8 +96,8 @@
...
@@ -85,8 +96,8 @@
this
.
tabWidth
=
(
getApp
().
globalData
.
screenWidth
-
this
.
tabItemMargin
*
2
)
/
this
.
tabBars
.
length
;
this
.
tabWidth
=
(
getApp
().
globalData
.
screenWidth
-
this
.
tabItemMargin
*
2
)
/
this
.
tabBars
.
length
;
let
contentHeight
=
systemInfo
.
screenHeight
-
(
uni
.
getSystemInfoSync
()
let
contentHeight
=
systemInfo
.
screenHeight
-
(
uni
.
getSystemInfoSync
()
.
statusBarHeight
+
this
.
$refs
.
navBar
.
height
)
-
(
systemInfo
.
safeAreaInsets
.
bottom
);
.
statusBarHeight
+
this
.
$refs
.
navBar
.
height
)
-
(
systemInfo
.
safeAreaInsets
.
bottom
);
//80 tabBar的高度
//80 tabBar的高度
90 底部按钮高度 单位:rpx,除以 getApp().globalData.pxToRpxScale 转换为 px
this
.
swiperHeight
=
contentHeight
-
80
/
getApp
().
globalData
.
pxToRpxScale
;
this
.
swiperHeight
=
contentHeight
-
(
80
+
90
)
/
getApp
().
globalData
.
pxToRpxScale
;
this
.
init
(
option
);
this
.
init
(
option
);
},
},
...
@@ -109,6 +120,25 @@
...
@@ -109,6 +120,25 @@
onNavBarLeftClick
()
{
onNavBarLeftClick
()
{
uni
.
navigateBack
();
uni
.
navigateBack
();
},
},
onClickTitleRightIcon
()
{
},
onClickTitleRightIcon2
()
{
},
onFilterEnsureBtnClick
(
items
)
{
this
.
$refs
.
filter
.
dismiss
();
let
screen
=
""
;
items
.
forEach
((
item
,
index
)
=>
{
if
(
index
!=
items
.
length
-
1
)
{
screen
+=
item
.
status
+
","
}
else
{
screen
+=
item
.
status
}
})
this
.
screen
=
screen
;
this
.
refresh
();
},
onStatusClick
()
{
onStatusClick
()
{
this
.
refresh
();
this
.
refresh
();
},
},
...
@@ -140,8 +170,8 @@
...
@@ -140,8 +170,8 @@
var
tab
=
this
.
tabBars
[
this
.
tabIndex
];
var
tab
=
this
.
tabBars
[
this
.
tabIndex
];
tab
.
content
.
refreshFlag
=
false
;
tab
.
content
.
refreshFlag
=
false
;
let
param
=
{
let
param
=
{
status
:
t
his
.
tabBars
[
index
]
.
type
,
status
:
t
ab
.
type
,
screen
:
t
his
.
screen
,
screen
:
t
ab
.
isNeedFilter
?
this
.
screen
:
''
,
};
};
let
option
=
{
let
option
=
{
isNeedShowLoading
:
false
isNeedShowLoading
:
false
...
@@ -162,7 +192,6 @@
...
@@ -162,7 +192,6 @@
tab
.
content
.
firstRequest
=
false
;
tab
.
content
.
firstRequest
=
false
;
let
data
=
res
.
data
.
data
;
let
data
=
res
.
data
.
data
;
let
list
=
data
.
list
;
let
list
=
data
.
list
;
if
(
tab
.
content
.
refreshing
||
tab
.
content
.
list
.
length
==
0
)
{
if
(
tab
.
content
.
refreshing
||
tab
.
content
.
list
.
length
==
0
)
{
tab
.
content
.
total_pages
=
util
.
calTotalPage
(
data
.
total_list
);
tab
.
content
.
total_pages
=
util
.
calTotalPage
(
data
.
total_list
);
this
.
clearTabData
(
this
.
tabIndex
);
this
.
clearTabData
(
this
.
tabIndex
);
...
@@ -230,13 +259,19 @@
...
@@ -230,13 +259,19 @@
this
.
tabBars
[
cacheIndex
].
content
.
list
.
length
=
0
;
this
.
tabBars
[
cacheIndex
].
content
.
list
.
length
=
0
;
this
.
tabBars
[
cacheIndex
].
content
.
loadingText
=
"加载更多..."
;
this
.
tabBars
[
cacheIndex
].
content
.
loadingText
=
"加载更多..."
;
},
},
onItemClick
(
item
)
{
onItemClick
(
item
2
,
index2
)
{
uni
.
navigateTo
({
//
uni.navigateTo({
url
:
'/pages/repair-detail/repair-detail'
//
url: '/pages/repair-detail/repair-detail'
})
//
})
},
},
ensure
()
{
ensure
()
{
uni
.
navigateBack
();
uni
.
navigateBack
();
},
onAuditBtnClick
(
item2
,
index2
)
{
},
onAddEmployeeBtnClick
()
{
}
}
}
}
}
}
...
@@ -296,46 +331,10 @@
...
@@ -296,46 +331,10 @@
background-color
:
#ffffff
;
background-color
:
#ffffff
;
}
}
.checkbox
{}
.text-bottom-btn
{
.view-repair-item
{
height
:
80rpx
;
padding-left
:
32rpx
;
padding-right
:
32rpx
;
justify-content
:
center
;
align-items
:
center
;
}
.text-name
{
flex-grow
:
1
;
font-size
:
26rpx
;
color
:
$uni-text-color-grey
;
font-size
:
$uni-font-size-base
;
}
.view-bottom
{
padding-left
:
32rpx
;
width
:
100%
;
width
:
100%
;
height
:
90rpx
;
height
:
90rpx
;
flex-grow
:
1
;
align-items
:
center
;
}
.view-bottom-left
{
flex-grow
:
1
;
}
.text-bottom-prefix1
{
font-size
:
20rpx
;
color
:
$uni-text-color-grey
;
}
.text-ensure-btn
{
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
width
:
260rpx
;
height
:
100%
;
background-color
:
$main-colro1
;
background-color
:
$main-colro1
;
color
:
$uni-font-size-lg
;
}
}
</
style
>
</
style
>
\ No newline at end of file
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