首页 > 小程序教程 > 微信小程序51报名管家橙色首页样式模板制作设计下载

微信小程序51报名管家橙色首页样式模板制作设计下载

上一篇 下一篇
制作好以后效果图如下:
一、wxml页面代码如下:
<!--index.wxml-->
<view id="index">
    <view class="row text-center row-center header-nav energized-bg">
        <navigator class="col" url="../record/applyrecord" open-type="navigate" hover-class="none">
            <view class="iconfont icon-wodedingdan"></view>
            <text class="icon-text">报名记录</text>
        </navigator>
        <navigator class="col" url="" open-type="navigate" hover-class="none">
            <view class="iconfont icon-seach"></view>
            <text class="icon-text">准考证查询</text>
        </navigator>
        <navigator class="col" url="" open-type="navigate" hover-class="none">
            <view class="iconfont icon-xiangguanjiansuo"></view>
            <text class="icon-text">成绩查询</text>
        </navigator>
    </view>
    <view class="item item-divider  light-bg item-icon-left headLine">
        <view class="iconfont icon-shengyin energized"></view>
        {{headLine[0].NewsTitle}}
    </view>
    <view class="row text-center row-center header-subnav light-bg margin-top">
        <navigator class="col" url="../notice/noticelist" open-type="navigate" hover-class="none">
            <view class="iconfont icon-shengyin energized"></view>
            <text class="icon-text">公告</text>
        </navigator>
        <navigator class="col" url="" open-type="navigate" hover-class="none">
            <view class="iconfont icon-jushoucang royal"></view>
            <text class="icon-text">关注</text>
        </navigator>
        <navigator class="col" url="" open-type="navigate" hover-class="none">
            <view class="iconfont icon-yijianfankui balanced"></view>
            <text class="icon-text">考试宝典</text>
        </navigator>
        <navigator class="col" url="" open-type="navigate" hover-class="none">
            <view class="iconfont icon-trade assertive"></view>
            <text class="icon-text">增值服务</text>
        </navigator>
    </view>

    <view class=" applylist margin-top">
        <navigator url="../apply/applysubjectmore" open-type="navigate"
                   hover-class="navigator-hover" class="item item-divider  light-bg item-icon-right">
            <text></text>
            报名考试
            <text class="icon-accessory iconfont icon-xiangyoujiantou"></text>
        </navigator>
        <block wx:for="{{headExamType}}">
            <view wx-if="{{item.IsActive==1||item.IsActive==2}}" class="item item-icon-left item-button-right">
                <text class="iconfont icon-naozhong">
                    <text>{{item.differdays}}</text>
                </text>
                {{item.ExamTypeName}}
                <view class="p"> 报名时间 : {{item.SignTimes}}</view>
                <view class="p"> 考试时间 : {{item.ExamTimes}}</view>
                <navigator url="../apply/applysubject?ExamTypeId={{item.ExamTypeId}}" open-type="navigate"
                           hover-class="navigator-hover" class="button button-energized button-outline ">
                    {{item.differdays<10?'立即':'预约'}}报名
                </navigator>
            </view>
        </block>
    </view>


    <view class=" applylist margin-top">
        <navigator url="../activity/activityapplymore" open-type="navigate"
                   hover-class="navigator-hover" class="item item-divider  light-bg item-icon-right">
            <text></text>
            活动报名
            <text class="icon-accessory iconfont icon-xiangyoujiantou"></text>
        </navigator>
        <block wx:for="{{headActiveList}}" wx:for-index="idx" wx:if="{{idx<=2}}">
            <view class="item item-icon-left item-button-right">
                <text class="iconfont icon-naozhong">
                    <text>{{item.differdays}}</text>
                </text>
                {{item.ActiveName}}
                <view class="p"> 活动地点 : {{item.ActiveAddress}}</view>
                <view class="p"> 报名时间 : {{item.SignTimes}}</view>

                <navigator url="../activity/activityapply" open-type="navigate"
                           hover-class="navigator-hover" class="button button-energized button-outline ">
                    {{item.differdays<10?'立即':'预约'}}报名
                </navigator>
            </view>
        </block>
    </view>

</view>
 
二、wxss样式文件代码如下:
/**index.wxss**/

#index {
    with: 100%;
    overflow: hidden;
}

.header-nav {
    color: #fff;
    height: 200 rpx;
}

.header-nav .iconfont {
    font-size: 1.8rem;
}

.header-nav .icon-text, .header-subnav .icon-text {
    font-size: 0.8rem;
}

.icon-naozhong:before {
    border-color: transparent;
    color: #f26604;
    font-size: 2.2rem !important;
}

.icon-naozhong {
    position: relative;
    color: #fff;
    font-size: 1rem !important;
}

.icon-naozhong text {
    position: absolute;
    left: 50%;
    top: 50%;
    -webkit-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
}

.header-subnav {
    color: #000;
    height: 200 rpx;
}

.header-subnav .iconfont {
    font-size: 1.6rem;
}

.item-divider text:first-child {
    display: inline-block;
    margin-right: 0.6rem;
    height: 0.8rem;
    border-left: 3px solid #f26604 !important;
}

.share {
    margin-top: -0.6rem;
    color: #000;
    height: 300 rpx;
}

.applylist:last-child {
    margin-bottom: 0.8rem;
}

.applylist .p {
    font-size: 13px;
}

.headLine {
    font-size: 0.8rem;
    color: #262626;
    font-weight: 100 !important;
    line-height: 20px;
}

.headLine .iconfont {
    font-size: 1rem;
}
三、js页面代码如下:
//index.js
//获取应用实例
var app = getApp();
var util = require('../../utils/util.js');
Page({
    data: {
        hiddenLoading: false
    },

    onLoad: function () {
        //考试报名列表
        util.https(app.globalData.api + "/GetHeadExamType", "GET", {
                praviteKey: app.globalData.praviteKey
            }
            ,
            this.getHeadExamType
        )
        //考试头条
        util.https(app.globalData.api + "/GetHeadLines", "GET", {
                praviteKey: app.globalData.praviteKey
            },
            this.getHeadLines
        )

        //首页活动报名列表
        util.https(app.globalData.api + "/GetHeadActiveList", "GET", {
                inputJson: {
                    StudentID: wx.getStorageSync("StudentId") ? wx.getStorageSync("StudentId") : 0//传入用户的ID,如果是没登录状态就给0,如果是已经登录就返回userID.
                },
                praviteKey: app.globalData.praviteKey
            },
            this.getHeadActiveList
        )
    },
    //考试报名列表
    getHeadExamType: function (data) {

        var headExamType = data.Data;
        for (var index in headExamType) {
            //考试时间差
            headExamType[index].differdays = Math.floor((new Date(headExamType[index].EndDate).getTime() - new Date().getTime()) / (24 * 3600 * 1000));
        }
        console.log(headExamType);
        this.setData({
            headExamType: headExamType
        });


    },
    //考试头条
    getHeadLines: function (data) {
        this.setData({
            headLine: data.Data
        });

    },
    //首页活动报名列表
    getHeadActiveList: function (data) {
        console.log(data);
        var headActiveList = data.Data;
        for (var index in headActiveList) {
            //考试时间差
            headActiveList[index].differdays = Math.floor((new Date(headActiveList[index].EndDate).getTime() - new Date().getTime()) / (24 * 3600 * 1000));
        }
        this.setData({
            headActiveList: headActiveList
        });

    },
})

模板简介:该模板名称为【微信小程序51报名管家橙色首页样式模板制作设计下载】,大小是,文档格式为.,推荐使用打开,作品中的图片,文字等数据均可修改,图片请在作品中选中图片替换即可,文字修改直接点击文字修改即可,您也可以新增或修改作品中的内容,该模板来自用户分享,如有侵权行为请联系网站客服处理。欢迎来懒人模板【小程序教程】栏目查找您需要的精美模板。

相关搜索
  • 下载密码 lanrenmb
  • 下载次数 20,150次
  • 使用软件
  • 文件格式
  • 文件大小
  • 上传时间 06-14
  • 作者 网友投稿
  • 肖像权 人物画像及字体仅供参考
栏目分类 更多 >
热门推荐 更多 >
微信公众平台 微信素材 自适应 单页式简历模板 微信模板 html5 企业网站 响应式 微信文章 微信图片
您可能会喜欢的其他模板