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
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"log" | |
"net/http" | |
) | |
type UserInfo struct { |
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
/** | |
* 图片上传之前调用的事件 | |
*/ | |
beforeAvatarUpload(file) { | |
// 允许所有的图片类型 | |
const isJPG = file.type.indexOf("image/") > -1; | |
const isLt2M = file.size / 1024 / 1024 < 2; | |
if (!isJPG) { | |
this.$message.error("请上传图片文件!"); | |
} |
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>js判断用户有没有操作页面</title> | |
</head> | |
<body> | |
<script> |
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
function getParameterByName(name, url) { | |
if (!url) url = window.location.href; | |
name = name.replace(/[\[\]]/g, "\\$&"); | |
var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"), | |
results = regex.exec(url); | |
if (!results) return null; | |
if (!results[2]) return ''; | |
return decodeURIComponent(results[2].replace(/\+/g, " ")); | |
} |
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
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Net; | |
using System.Net.Http; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace Common | |
{ |
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
if(/<a[^>]*id\s*=\s*[\'"]js_btn_add_contact[\'"][^>]*style\s*=\s*[\'"]display:none;[\'"][^>]*>/i.test(serverResData.toString()) != true){ | |
follow = '<script>var a = document.getElementById("js_btn_add_contact"); a.click(); </script>'; | |
} |
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 jumpScript = '<script>'+ | |
'function jumpIf(date=2000, jumpUrl=""){'+ | |
'var doc = document.all[0].innerHTML;'+ | |
'if( /<span[^>]*display\\:\\s*none[^>]*>\\.*?已无更多\\.*?<\\\/span>/i.test(doc) ){'+ | |
'document.body.scrollTop = document.body.scrollHeight - (document.body.clientHeight && document.documentElement.clientHeight);'+ | |
'setTimeout(jumpIf, date);'+ |
NewerOlder