自定义头部
This commit is contained in:
@@ -3,6 +3,40 @@
|
||||
background-color: #f5f5f5;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
.custom{
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 45px;
|
||||
background: #fff;
|
||||
z-index: 999;
|
||||
}
|
||||
.custom text{
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
color: #333;
|
||||
font-size: 26rpx;
|
||||
font-weight: 500;
|
||||
max-width: 280rpx;
|
||||
}
|
||||
.flex_center{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.flex_center image{
|
||||
margin-left: 15px;
|
||||
width: 19px;
|
||||
height: 19px;
|
||||
float: left;
|
||||
}
|
||||
.empty_custom{
|
||||
height: 45px;
|
||||
width: 100%;
|
||||
}
|
||||
@import './assets/css/common.wxss';
|
||||
@import '/assets/font/iconfont.wxss';
|
||||
@import '/assets/font/iconfont.wxss';
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 871 B |
Binary file not shown.
|
After Width: | Height: | Size: 1.8 KiB |
@@ -1,11 +1,14 @@
|
||||
// pages/meeting/meeting.js
|
||||
import MeetingApi from '../../assets/js/http/meetingApi'
|
||||
import UserApi from '../../assets/js/http/userApi'
|
||||
import {isLogin} from '../../assets/js/common'
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
statusBarHeight: wx.getSystemInfoSync()['statusBarHeight'],
|
||||
searchParams: {
|
||||
pageNo: 1,
|
||||
pageSize: 10,
|
||||
@@ -33,6 +36,48 @@ Page({
|
||||
// 是哪个筛选条件
|
||||
index: -1
|
||||
},
|
||||
goBack(){
|
||||
wx.navigateBack()
|
||||
},
|
||||
// 扫码签到
|
||||
signUp(){
|
||||
isLogin(() => {
|
||||
wx.scanCode({
|
||||
onlyFromCamera: false,
|
||||
scanType: [],
|
||||
success: (result) => {
|
||||
if (result.result.indexOf("scanSign") > -1) { // 证明是签到二维码
|
||||
let meetingId = result.result.split("=")[1] // 会议Id
|
||||
// let meetingId = result.result // 会议Id
|
||||
// 成功扫码的回调
|
||||
UserApi.scanCode({
|
||||
meetingId
|
||||
}).then(res => {
|
||||
if (res.success) {
|
||||
let result = JSON.stringify(res.result)
|
||||
wx.navigateTo({ // 已报名
|
||||
url: `../scanSign/scanSign?signed=1&meeting=${result}`,
|
||||
})
|
||||
} else {
|
||||
let result = JSON.stringify(res.result)
|
||||
// 未查到报名信息
|
||||
wx.navigateTo({ // 未报名
|
||||
url: `../scanSign/scanSign?signed=0&meeting=${result}`,
|
||||
})
|
||||
}
|
||||
}).catch(err => {})
|
||||
} else {
|
||||
wx.showToast({
|
||||
title: '此二维码不是签到码',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
return
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
// 会议状态筛选
|
||||
bindStatusChange(e) {
|
||||
this.data.searchParams.pageNo = 1
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"navigationBarTitleText": "会议",
|
||||
"navigationStyle": "custom",
|
||||
"usingComponents": {
|
||||
"popup": "../../components/popup/popup",
|
||||
"dateMonth": "../../components/dateMonth/dateMonth"
|
||||
|
||||
@@ -1,4 +1,11 @@
|
||||
<!--pages/meeting/meeting.wxml首页会议活动-->
|
||||
<!-- 自定义头部start -->
|
||||
<view class="custom flex_center" style="padding-top:{{statusBarHeight}}px">
|
||||
<image src="../../assets/images/back.png" bindtap="goBack"></image>
|
||||
<image src="../../assets/images/signEntran.png" bindtap="signUp"></image>
|
||||
<text>会议</text>
|
||||
</view>
|
||||
<view class="empty_custom" style="padding-top:{{statusBarHeight}}px"></view><!-- 空view用来填充自定义头部的padding-top -->
|
||||
<!-- 自定义头部end -->
|
||||
<view class="select-list">
|
||||
<view class="select-item">
|
||||
<picker bindchange="bindStatusChange" range="{{meetingStatus}}">
|
||||
|
||||
Reference in New Issue
Block a user