This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.page-index{ | |
.m-menu { | |
width: 230px; | |
height: 475px; | |
box-sizing: border-box; | |
margin-top: -50px; | |
margin-left: 20px; | |
color: #FFF; | |
position: relative; | |
background: linear-gradient(-180deg, rgba(2, 181, 157, .85) 2%, rgba(22, 146, 183, .85) 100%); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<el-container class="layout-default"> | |
<el-header height="197px"> | |
<my-header/> | |
</el-header> | |
<el-main> | |
<div class="page-index"> | |
<el-row> | |
<el-col :span="5"> | |
<emenu/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 應用程序 | |
* 同目錄下多文件引用的問題解決方法: | |
* https://blog.csdn.net/pringD/article/details/79143235 | |
* 方法1 1 go build ./ 2 運行編譯後的文件 | |
* 方法2 go run *.go | |
* xorm 工具使用 : | |
* 安裝 : go get github.com/go-xorm/cmd/xorm | |
* WIN下使用路徑 : C:\Users\rorast\go\src\github.com\go-xorm\cmd\xorm | |
* 使用 : xorm reverse mysql "root:123456@tcp(127.0.0.1:3306)/superstar?charset=utf8" templates/goxorm/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Vue 入門</title> | |
<!-- 开发环境版本,包含了有帮助的命令行警告 --> | |
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script> | |
</head> | |
<body> | |
<!-- 父組件 --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let { init, exec, sql, transaction } = require('mysqls') // 引入 mysqls 的套件 | |
var randomstring = require("randomstring") // 引入隨機字串產生的套件 | |
// mysqls 套件,資料庫連線的初始化設定 | |
init({ | |
host: 'localhost', | |
user: 'root', | |
password: '123456', | |
database: 'doudizhu', | |
port: 8889, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var expect = require('chai').expect; | |
var apiModel = require('../lib/mysql.js') | |
describe('add User', function() { | |
// 创建一个用户 | |
before((done) => { | |
apiModel.insertData(['myself','123456','start','time']).then(()=>{ | |
done() | |
}); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const userModel = require('../lib/mysql.js'); | |
const md5 = require('md5') | |
const checkNotLogin = require('../middlewares/check.js').checkNotLogin | |
const checkLogin = require('../middlewares/check.js').checkLogin | |
const moment = require('moment'); | |
const fs = require('fs') | |
exports.getSignup = async ctx => { | |
await checkNotLogin(ctx) | |
await ctx.render('signup', { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const userModel = require('../lib/mysql.js') | |
const md5 = require('md5') | |
const checkNotLogin = require('../middlewares/check.js').checkNotLogin | |
const checkLogin = require('../middlewares/check.js').checkLogin | |
exports.getSignin = async ctx => { | |
await checkNotLogin(ctx) | |
await ctx.render('signin', { | |
session: ctx.session, | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const userModel = require('../lib/mysql.js'); | |
const md5 = require('md5') | |
const checkNotLogin = require('../middlewares/check.js').checkNotLogin | |
const checkLogin = require('../middlewares/check.js').checkLogin | |
const moment = require('moment'); | |
const fs = require('fs') | |
exports.getSignup = async ctx => { | |
await checkNotLogin(ctx) | |
await ctx.render('signup', { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<%- include("header",{type:'signup'}) %> | |
<div class="container"> | |
<form class="form create" method="post"> | |
<div> | |
<label>用户名:</label> | |
<input placeholder="請輸入用户名" type="text" name="name"> | |
</div> | |
<div> | |
<label>密碼:</label> | |
<input placeholder="請輸入密碼" class="password" type="password" name="password"> |
NewerOlder