描述:选择首页登录

This commit is contained in:
SelfRidicule 2024-04-02 18:25:12 +08:00
parent a899b14e23
commit d598ef54e7
5 changed files with 18 additions and 3 deletions

View File

@ -378,4 +378,11 @@ image {
color: white; color: white;
font-size: 30rpx; font-size: 30rpx;
text-align: center; text-align: center;
}
.ellipsisFont {
text-overflow: ellipsis;
overflow: hidden;
word-break: break-all;
white-space: nowrap;
} }

View File

@ -155,6 +155,7 @@ Page({
], ],
bannerList: [], bannerList: [],
userDetail: {}, userDetail: {},
parkName: '首页'
}, },
onLoad(options) { onLoad(options) {
@ -212,8 +213,13 @@ Page({
// 登录用户是否选择园区 // 登录用户是否选择园区
userIsPark() { userIsPark() {
let _this = this;
let parkId = wx.getStorageSync('parkId'); let parkId = wx.getStorageSync('parkId');
if (!parkId) { if (parkId) {
_this.setData({
parkName: wx.getStorageSync('parkName')
})
} else {
wx.navigateTo({ wx.navigateTo({
url: '/pages/index/parkList/parkList', url: '/pages/index/parkList/parkList',
}) })

View File

@ -1,5 +1,5 @@
{ {
"navigationBarTitleText": "中电郑州数据创新中心", "navigationBarTitleText": "首页",
"navigationStyle": "custom", "navigationStyle": "custom",
"usingComponents": { "usingComponents": {
"van-notify": "@vant/weapp/notify/index" "van-notify": "@vant/weapp/notify/index"

View File

@ -8,7 +8,7 @@
<view class="topHead"> <view class="topHead">
<image class="scanImg" src="{{IMG_NAME + '/profile/static/index/scan.png'}}" mode="aspectFill" bind:tap="jumpScan"></image> <image class="scanImg" src="{{IMG_NAME + '/profile/static/index/scan.png'}}" mode="aspectFill" bind:tap="jumpScan"></image>
<view class="title">中电郑州数据创新中心</view> <view class="title ellipsisFont">{{parkName}}</view>
</view> </view>
<view class="loopView"> <view class="loopView">

View File

@ -19,6 +19,8 @@
} }
.topHead .title{ .topHead .title{
width: 320rpx;
text-align: center;
font-size: 30rpx; font-size: 30rpx;
} }