search
HomeWeChat AppletMini Program DevelopmentWeChat applet realizes check-in calendar function

WeChat applet realizes check-in calendar function

Aug 17, 2020 pm 04:37 PM
WeChat appletSign in

WeChat applet realizes check-in calendar function

Preface

Because I have to sign in, I have to write a calendar.

There is only a basic calendar, and check-in needs to be implemented by yourself.

(I will also implement sign-in later...)

Related learning recommendations: WeChat Mini Program Development Tutorial

WeChat applet realizes check-in calendar function

##wxml
<view>
    <view>
      <view>

        <view>
            {{ item }}
        </view>
        <view>
            {{ item.day }}
        </view>

      </view>
    </view>
  </view>

wxss
.calendar{
   margin-top: 10%;}.month{
      display: flex;
      flex-flow: row wrap;
      font-size: 1.1rem;  }.item{
      width: 14.28%;
      text-align: center;
      line-height: 3rem;}.othe{
   color: grey}

js
// pages/sing_in/sing_in.jsPage({
  data: {
    dateData: [],
    isSignin: false,
    week: ['日','一','二','三','四','五','六'],
  },
  onLoad: function (options) {
      this.initCurrMonthData()
  },
  /**
  * year string 年  如:2020 
  * month string 月 如: 5
  * return array 所有天数 如:[1,2,3...,31]
  **/
  monthDays(year,month){ 
     let days_count = new Date(year,month,0).getDate() //月总天数 如:31
     let days = []; //存放月的天数
     for(let i = 1; i  this.formatDay(val)) //当月的数据

     for(let i = 0; i 

Related learning recommendations:

WeChat public account development tutorial

The above is the detailed content of WeChat applet realizes check-in calendar function. For more information, please follow other related articles on the PHP Chinese website!

Statement
This article is reproduced at:jb51. If there is any infringement, please contact admin@php.cn delete

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

Dreamweaver Mac version

Dreamweaver Mac version

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools