util

package
v0.0.0-...-95c47bc Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 9, 2020 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source

Variables

View Source
var BathroomIDList = []string{
	"1526", "1525",
	"1544", "1543",
	"1546", "1545",
	"1548", "1547",
	"1566", "1565",
}
View Source
var BathroomName = []string{
	"鱼山校区-男浴室", "鱼山校区-女浴室",
	"北海苑-男浴室", "北海苑-女浴室",
	"东海苑-男浴室", "东海苑-女浴室",
	"南海苑-男浴室", "南海苑-女浴室",
	"浮山校区-男浴室", "浮山校区-女浴室",
}
View Source
var HallTicket, AspNetSession, JSessionID string

Functions

func BookBathroom

func BookBathroom(roomID string)

func CreateQrcode

func CreateQrcode(content string) string

创建qrcode,并返回文件路径

func GetBathroomID

func GetBathroomID() string

func GetHallTicket

func GetHallTicket(account string) error

func GetHtml

func GetHtml() (string, error)

获取包含登录qrcode的html

func GetJSessionID

func GetJSessionID() error

func GetQrcodeContentFromHtml

func GetQrcodeContentFromHtml(html string) string

获取qrcode的内容

func ToBook

func ToBook(id int) bool

func WsClient

func WsClient(qrcode string) (string, error)

Types

type BookResp

type BookResp struct {
	Message string `json:"message"`
}

type CheckSupplyResp

type CheckSupplyResp struct {
	Object []struct {
		PRICE     string `json:"PRICE"`
		SURPLUS   int    `json:"SURPLUS"`
		USINGNUM  int    `json:"USING_NUM"`
		SERVICEID string `json:"SERVICEID"`
		ID        int    `json:"ID"`
		REMARK    string `json:"REMARK"`
		TIMENO    string `json:"TIME_NO"`
		STATUS    int    `json:"STATUS"`
		ISOVER    int    `json:"ISOVER"`
		ALLCOUNT  int    `json:"ALL_COUNT"`
	} `json:"object"`
	Result string `json:"result"`
}

检查浴室剩余数量的相应

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL