【修改】 页面标题

This commit is contained in:
fengachen
2021-12-23 19:56:15 +08:00
parent 77bbe4f8cb
commit ced4a15b65
6 changed files with 26 additions and 8 deletions
+16 -1
View File
@@ -18,7 +18,8 @@ Page({
particularYear:'',// 资料网元的运行年份,
// 创建时间倒叙排序
column:'createTime',
order:'desc'
order:'desc',
pageTitle:'项目'
}
},
goBack(){
@@ -179,6 +180,20 @@ Page({
*/
onLoad: function (options) {
this.data.type = options.type
switch(options.type){
case 'ziliao': this.setData({
pageTitle:'资料网员'
})
break
case 'work': this.setData({
pageTitle:'工作组'
})
break
default : this.setData({
pageTitle:'项目'
})
break
}
this.loadData()
},
/**
+1 -1
View File
@@ -1,7 +1,7 @@
<!-- 自定义头部start -->
<view class="custom flex_center" style="padding-top:{{statusBarHeight}}px">
<image src="../../assets/images/back.png" bindtap="goBack"></image>
<text>项目</text>
<text>{{pageTitle}}</text>
</view>
<view class="empty_custom" style="padding-top:{{statusBarHeight}}px"></view><!-- 空view用来填充自定义头部的padding-top -->
<!-- 自定义头部end -->