Commit e4e99018 by 胡懿

提交钉钉测试工具项目

parent 6f73a010
123
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.4.3</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.yqd</groupId>
<artifactId>dingding</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>dingding</name>
<description>Demo project for Spring Boot</description>
<properties>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>1.2.50</version>
</dependency>
<dependency>
<groupId>com.dingtalk.taobao</groupId>
<artifactId>taobao-sdk-java-auto</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>com.dingtalk.taobao</groupId>
<artifactId>taobao-sdk-java-auto-source</artifactId>
<version>1.0.0</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
package com.yqd.dingding;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class DingdingApplication {
public static void main(String[] args) {
SpringApplication.run(DingdingApplication.class, args);
}
}
package com.yqd.dingding.bean;
import java.util.List;
public class ColumnDefintionBean {
private String request_id;
private Integer errcode;
private ColumnsResult result;
public String getRequest_id() {
return request_id;
}
public void setRequest_id(String request_id) {
this.request_id = request_id;
}
public Integer getErrcode() {
return errcode;
}
public void setErrcode(Integer errcode) {
this.errcode = errcode;
}
public ColumnsResult getResult() {
return result;
}
public void setResult(ColumnsResult result) {
this.result = result;
}
@Override
public String toString() {
return "ColumnDefintionBean{" +
"request_id='" + request_id + '\'' +
", errcode=" + errcode +
", result=" + result +
'}';
}
}
package com.yqd.dingding.bean;
public class ColumnsBean {
private Integer id;
private Integer type;
private String name;
private String alias;
private Integer status;
private Integer sub_type;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getType() {
return type;
}
public void setType(Integer type) {
this.type = type;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getAlias() {
return alias;
}
public void setAlias(String alias) {
this.alias = alias;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public Integer getSub_type() {
return sub_type;
}
public void setSub_type(Integer sub_type) {
this.sub_type = sub_type;
}
@Override
public String toString() {
return "ColumnsBean{" +
"id=" + id +
", type=" + type +
", name='" + name + '\'' +
", alias='" + alias + '\'' +
", status=" + status +
", sub_type=" + sub_type +
'}';
}
}
package com.yqd.dingding.bean;
import java.util.List;
public class ColumnsResult {
private List<ColumnsBean> columns;
public List<ColumnsBean> getColumns() {
return columns;
}
public void setColumns(List<ColumnsBean> columns) {
this.columns = columns;
}
@Override
public String toString() {
return "ColumnsResult{" +
"columns=" + columns +
'}';
}
}
package com.yqd.dingding.bean;
import java.util.List;
public class RecordDateBean {
private String errcode;
private String errmsg;
private List<Recordresult> recordresult;
public String getErrcode() {
return errcode;
}
public void setErrcode(String errcode) {
this.errcode = errcode;
}
public String getErrmsg() {
return errmsg;
}
public void setErrmsg(String errmsg) {
this.errmsg = errmsg;
}
public List<Recordresult> getRecordresult() {
return recordresult;
}
public void setRecordresult(List<Recordresult> recordresult) {
this.recordresult = recordresult;
}
@Override
public String toString() {
return "RecordDateBean{" +
"errcode='" + errcode + '\'' +
", errmsg='" + errmsg + '\'' +
", recordresult=" + recordresult +
'}';
}
}
package com.yqd.dingding.bean;
import java.util.Date;
/**
* 打卡信息
*/
public class Recordresult {
private String userAccuracy; // 用户打卡定位精度
private String userLatitude; //用户打卡纬度
private String userLongitude; //用户打卡经度
private String userAddress; //用户打卡地址
private String deviceId; //打卡设备ID
private String locationMethod; //定位方法
private String isLegal; //是否合法 Y:合法 N:不合法
private String userCheckTime; //实际打卡时间
private String procInstId; //关联的审批实例id,当该字段非空时,表示打卡记录与请假、加班等审批有关,可以和获取审批实例详情配合使用。
private String baseCheckTime; //计算迟到和早退,基准时间;也可作为排班打卡时间。
private Long approveId; //关联的审批ID,当该字段非空时,表示打卡记录与请假、加班等审批有关。
private String timeResult; //打卡结果 Normal:正常 | Early:早退 | Late:迟到 | SeriousLate:严重迟到 | Absenteeism:旷工迟到 | NotSigned:未打卡
private String locationResult; //位置结果 Normal:范围内 Outside:范围外 NotSigned:未打卡
private String checkType; //考勤类型: OnDuty:上班 OffDuty:下班
private String sourceType; //数据来源: ATM:考勤机打卡(指纹/人脸打卡) BEACON:IBeacon DING_ATM:钉钉考勤机(考勤机蓝牙打卡) USER:用户打卡 BOSS:老板改签 APPROVE:审批系统 SYSTEM:考勤系统 AUTO_CHECK:自动打卡
private String userId; //打卡人的userid。
private Date workDate; //工作日
private String corpId; //企业ID。
private Long planId; //排班ID。
private Long groupId; //考勤组ID。
private Long id; //考勤ID。
private String userSsid; //用户打卡wifi SSID。
private String userMacAddr; //用户打卡wifi Mac地址。
private Date planCheckTime; //排班打卡时间
private String baseAddress; //基准地址
private String baseLongitude; //基准经度。
private String baseLatitude; //基准纬度。
private String baseAccuracy; //基准定位精度。
private String baseSsid; //基准wifi ssid。
private String baseMacAddr; //基准Mac地址。
private Date gmtCreate; //打卡创建时间。
private String outsideRemark; //打卡备注。
private String deviceSN; //打卡设备序列号。
private String bizId; //关联的业务ID。
public String getUserAccuracy() {
return userAccuracy;
}
public void setUserAccuracy(String userAccuracy) {
this.userAccuracy = userAccuracy;
}
public String getUserLatitude() {
return userLatitude;
}
public void setUserLatitude(String userLatitude) {
this.userLatitude = userLatitude;
}
public String getUserLongitude() {
return userLongitude;
}
public void setUserLongitude(String userLongitude) {
this.userLongitude = userLongitude;
}
public String getUserAddress() {
return userAddress;
}
public void setUserAddress(String userAddress) {
this.userAddress = userAddress;
}
public String getDeviceId() {
return deviceId;
}
public void setDeviceId(String deviceId) {
this.deviceId = deviceId;
}
public String getLocationMethod() {
return locationMethod;
}
public void setLocationMethod(String locationMethod) {
this.locationMethod = locationMethod;
}
public String getIsLegal() {
return isLegal;
}
public void setIsLegal(String isLegal) {
this.isLegal = isLegal;
}
public String getUserCheckTime() {
return userCheckTime;
}
public void setUserCheckTime(String userCheckTime) {
this.userCheckTime = userCheckTime;
}
public String getProcInstId() {
return procInstId;
}
public void setProcInstId(String procInstId) {
this.procInstId = procInstId;
}
public String getBaseCheckTime() {
return baseCheckTime;
}
public void setBaseCheckTime(String baseCheckTime) {
this.baseCheckTime = baseCheckTime;
}
public Long getApproveId() {
return approveId;
}
public void setApproveId(Long approveId) {
this.approveId = approveId;
}
public String getTimeResult() {
return timeResult;
}
public void setTimeResult(String timeResult) {
this.timeResult = timeResult;
}
public String getLocationResult() {
return locationResult;
}
public void setLocationResult(String locationResult) {
this.locationResult = locationResult;
}
public String getCheckType() {
return checkType;
}
public void setCheckType(String checkType) {
this.checkType = checkType;
}
public String getSourceType() {
return sourceType;
}
public void setSourceType(String sourceType) {
this.sourceType = sourceType;
}
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
public Date getWorkDate() {
return workDate;
}
public void setWorkDate(Date workDate) {
this.workDate = workDate;
}
public String getCorpId() {
return corpId;
}
public void setCorpId(String corpId) {
this.corpId = corpId;
}
public Long getPlanId() {
return planId;
}
public void setPlanId(Long planId) {
this.planId = planId;
}
public Long getGroupId() {
return groupId;
}
public void setGroupId(Long groupId) {
this.groupId = groupId;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getUserSsid() {
return userSsid;
}
public void setUserSsid(String userSsid) {
this.userSsid = userSsid;
}
public String getUserMacAddr() {
return userMacAddr;
}
public void setUserMacAddr(String userMacAddr) {
this.userMacAddr = userMacAddr;
}
public Date getPlanCheckTime() {
return planCheckTime;
}
public void setPlanCheckTime(Date planCheckTime) {
this.planCheckTime = planCheckTime;
}
public String getBaseAddress() {
return baseAddress;
}
public void setBaseAddress(String baseAddress) {
this.baseAddress = baseAddress;
}
public String getBaseLongitude() {
return baseLongitude;
}
public void setBaseLongitude(String baseLongitude) {
this.baseLongitude = baseLongitude;
}
public String getBaseLatitude() {
return baseLatitude;
}
public void setBaseLatitude(String baseLatitude) {
this.baseLatitude = baseLatitude;
}
public String getBaseAccuracy() {
return baseAccuracy;
}
public void setBaseAccuracy(String baseAccuracy) {
this.baseAccuracy = baseAccuracy;
}
public String getBaseSsid() {
return baseSsid;
}
public void setBaseSsid(String baseSsid) {
this.baseSsid = baseSsid;
}
public String getBaseMacAddr() {
return baseMacAddr;
}
public void setBaseMacAddr(String baseMacAddr) {
this.baseMacAddr = baseMacAddr;
}
public Date getGmtCreate() {
return gmtCreate;
}
public void setGmtCreate(Date gmtCreate) {
this.gmtCreate = gmtCreate;
}
public String getOutsideRemark() {
return outsideRemark;
}
public void setOutsideRemark(String outsideRemark) {
this.outsideRemark = outsideRemark;
}
public String getDeviceSN() {
return deviceSN;
}
public void setDeviceSN(String deviceSN) {
this.deviceSN = deviceSN;
}
public String getBizId() {
return bizId;
}
public void setBizId(String bizId) {
this.bizId = bizId;
}
@Override
public String toString() {
return "Recordresult{" +
"userAccuracy='" + userAccuracy + '\'' +
", userLatitude='" + userLatitude + '\'' +
", userLongitude='" + userLongitude + '\'' +
", userAddress='" + userAddress + '\'' +
", deviceId='" + deviceId + '\'' +
", locationMethod='" + locationMethod + '\'' +
", isLegal='" + isLegal + '\'' +
", userCheckTime='" + userCheckTime + '\'' +
", procInstId='" + procInstId + '\'' +
", baseCheckTime='" + baseCheckTime + '\'' +
", approveId=" + approveId +
", timeResult='" + timeResult + '\'' +
", locationResult='" + locationResult + '\'' +
", checkType='" + checkType + '\'' +
", sourceType='" + sourceType + '\'' +
", userId='" + userId + '\'' +
", workDate=" + workDate +
", corpId='" + corpId + '\'' +
", planId=" + planId +
", groupId=" + groupId +
", id=" + id +
", userSsid='" + userSsid + '\'' +
", userMacAddr='" + userMacAddr + '\'' +
", planCheckTime=" + planCheckTime +
", baseAddress='" + baseAddress + '\'' +
", baseLongitude='" + baseLongitude + '\'' +
", baseLatitude='" + baseLatitude + '\'' +
", baseAccuracy='" + baseAccuracy + '\'' +
", baseSsid='" + baseSsid + '\'' +
", baseMacAddr='" + baseMacAddr + '\'' +
", gmtCreate=" + gmtCreate +
", outsideRemark='" + outsideRemark + '\'' +
", deviceSN='" + deviceSN + '\'' +
", bizId='" + bizId + '\'' +
'}';
}
}
package com.yqd.dingding.bean;
public class TokenBean {
private Integer errcode;
private String access_token;
private String errmsg;
private Integer expires_in;
public Integer getErrcode() {
return errcode;
}
public void setErrcode(Integer errcode) {
this.errcode = errcode;
}
public String getAccess_token() {
return access_token;
}
public void setAccess_token(String access_token) {
this.access_token = access_token;
}
public String getErrmsg() {
return errmsg;
}
public void setErrmsg(String errmsg) {
this.errmsg = errmsg;
}
public Integer getExpires_in() {
return expires_in;
}
public void setExpires_in(Integer expires_in) {
this.expires_in = expires_in;
}
@Override
public String toString() {
return "TokenBean{" +
"errcode=" + errcode +
", access_token='" + access_token + '\'' +
", errmsg='" + errmsg + '\'' +
", expires_in=" + expires_in +
'}';
}
}
package com.yqd.dingding.bean;
public class UserIDBean {
private String errcode;
private String errmsg;
private String userid;
public String getErrcode() {
return errcode;
}
public void setErrcode(String errcode) {
this.errcode = errcode;
}
public String getErrmsg() {
return errmsg;
}
public void setErrmsg(String errmsg) {
this.errmsg = errmsg;
}
public String getUserid() {
return userid;
}
public void setUserid(String userid) {
this.userid = userid;
}
@Override
public String toString() {
return "UserIDBean{" +
"errcode='" + errcode + '\'' +
", errmsg='" + errmsg + '\'' +
", userid='" + userid + '\'' +
'}';
}
}
package com.yqd.dingding.util;
import com.alibaba.fastjson.JSON;
import com.dingtalk.api.DefaultDingTalkClient;
import com.dingtalk.api.DingTalkClient;
import com.dingtalk.api.request.*;
import com.dingtalk.api.response.*;
import com.taobao.api.ApiException;
import com.taobao.api.internal.util.StringUtils;
import com.yqd.dingding.bean.*;
import java.util.*;
public class DingDingUtil {
private static String appKey = "";
private static String appsectet = "";
private static String corpId = "dingf2686e63feb5696135c2f4657eb6378f";
private static String ssoSecret = "PeMFCtG5dAmYHfb03xjib5N03ZMhsi-arCpX6HfpeQMiA6ceBBSq-fU_mHWuKeiL";
public void setKeyAndSectet(String appKey, String appsectet) {
this.appKey = appKey;
this.appsectet = appsectet;
}
public TokenBean getDingDingToken() {
try {
DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/gettoken");
OapiGettokenRequest req = new OapiGettokenRequest();
req.setAppkey(DingDingUtil.appKey);
req.setAppsecret(DingDingUtil.appsectet);
req.setHttpMethod("GET");
OapiGettokenResponse rsp = client.execute(req);
String tokenStr = rsp.getBody();
TokenBean tokenBean = JSON.parseObject(tokenStr, TokenBean.class);
return tokenBean;
} catch (ApiException e) {
e.printStackTrace();
}
return null;
}
/**
* 签到记录
* @param beginTime
* @param endTime
* @param access_token
*/
public void getSignInfo(long beginTime, long endTime, String access_token) {
try {
DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/checkin/record");
OapiCheckinRecordRequest req = new OapiCheckinRecordRequest();
req.setDepartmentId("1");
req.setEndTime(endTime);
req.setStartTime(beginTime);
req.setOffset(0L);
req.setSize(100L);
req.setOrder("asc");
req.setHttpMethod("GET");
OapiCheckinRecordResponse rsp = client.execute(req, access_token);
System.out.println(rsp.getBody());
} catch (ApiException e) {
e.printStackTrace();
}
}
/**
* 考勤信息
* @param access_token
*/
public RecordDateBean getAttendanceInfo(String access_token, String checkDateFrom, String checkDateTo, List<String> userids) {
try {
DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/attendance/listRecord");
OapiAttendanceListRecordRequest req = new OapiAttendanceListRecordRequest();
req.setUserIds(userids);
req.setCheckDateFrom(checkDateFrom);
req.setCheckDateTo(checkDateTo);
OapiAttendanceListRecordResponse rsp = client.execute(req, access_token);
RecordDateBean resultBean = JSON.parseObject(rsp.getBody(), RecordDateBean.class);
return resultBean;
} catch (ApiException e) {
e.printStackTrace();
}
return null;
}
/**
* 免登陆验证
*/
public void noLoginCheck() {
try {
DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/sso/gettoken");
OapiSsoGettokenRequest req = new OapiSsoGettokenRequest();
req.setCorpid(DingDingUtil.corpId);
req.setCorpsecret(DingDingUtil.ssoSecret);
req.setHttpMethod("GET");
OapiSsoGettokenResponse rsp = client.execute(req);
System.out.println(rsp.getBody());
} catch (ApiException e) {
e.printStackTrace();
}
}
/**
* 根据手机号获取用户id
* @param access_token
* @param mobile
*/
public UserIDBean getUserIdByMobile(String access_token, String mobile) {
try {
DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/user/get_by_mobile");
OapiUserGetByMobileRequest req = new OapiUserGetByMobileRequest();
req.setMobile(mobile);
req.setHttpMethod("GET");
OapiUserGetByMobileResponse rsp = client.execute(req, access_token);
UserIDBean userIDBean = JSON.parseObject(rsp.getBody(), UserIDBean.class);
return userIDBean;
} catch (ApiException e) {
e.printStackTrace();
}
return null;
}
/**
* 获取列定义
* @param access_token
*/
public ColumnDefintionBean getColumnDefinition(String access_token) {
try {
DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/topapi/attendance/getattcolumns");
OapiAttendanceGetattcolumnsRequest req = new OapiAttendanceGetattcolumnsRequest();
OapiAttendanceGetattcolumnsResponse rsp = client.execute(req, access_token);
ColumnDefintionBean columnDefintionBean = JSON.parseObject(rsp.getBody(), ColumnDefintionBean.class);
return columnDefintionBean;
} catch (ApiException e) {
e.printStackTrace();
}
return null;
}
/**
* 获取报表考情数据
* @param access_token
* @param userid
* @param columnIdList
* @param fromDate
* @param toDate
*/
public void getAttendanceReport(String access_token, String userid, String columnIdList, Date fromDate, Date toDate) {
try {
DingTalkClient client = new DefaultDingTalkClient("https://oapi.dingtalk.com/topapi/attendance/getcolumnval");
OapiAttendanceGetcolumnvalRequest req = new OapiAttendanceGetcolumnvalRequest();
req.setUserid(userid);
req.setColumnIdList(columnIdList);
req.setFromDate(fromDate);
req.setToDate(toDate);
OapiAttendanceGetcolumnvalResponse rsp = client.execute(req, access_token);
System.out.println(rsp.getBody());
} catch (ApiException e) {
e.printStackTrace();
}
}
public static void main(String[] args) {
DingDingUtil dingDingUtil = new DingDingUtil();
dingDingUtil.setKeyAndSectet("dingnwjgigolatb7tihb", "dLtF3JE4e-eGI3aiVtRb2WyRQiA9R4Bwks51b6ys7VNvLH9YZZ8oRmctwoJR4pwa");
TokenBean tokenBean = dingDingUtil.getDingDingToken();
System.out.println(tokenBean);
// 获取用户信息
UserIDBean userIDBean_huyi = dingDingUtil.getUserIdByMobile(tokenBean.getAccess_token(), "15234760931");
UserIDBean userIDBean_wangjie = dingDingUtil.getUserIdByMobile(tokenBean.getAccess_token(), "15234190483");
List<String> userids = new ArrayList<>();
userids.add(userIDBean_huyi.getUserid());
userids.add(userIDBean_wangjie.getUserid());
// RecordDateBean recordDateBean = dingDingUtil.getAttendanceInfo(tokenBean.getAccess_token(), "2021-03-17 00:00:00", "2021-03-18 00:00:00", userids);
// StringUtils.parseDateTime("2020-09-07 12:12:12")
ColumnDefintionBean columnDefintionBean = dingDingUtil.getColumnDefinition(tokenBean.getAccess_token());
ColumnsResult columnsResult = columnDefintionBean.getResult();
List<ColumnsBean> columnsBeanList = columnsResult.getColumns();
StringBuffer sb = new StringBuffer();
for (int i = 0; i < columnsBeanList.size(); i++) {
ColumnsBean columnsBean = columnsBeanList.get(i);
System.out.println(columnsBean);
if (null != columnsBean.getId() && !"".equals(columnsBean.getId()) && !"null".equals(columnsBean.getId())) {
sb.append(columnsBean.getId());
if (i != columnsBeanList.size() - 1) {
sb.append(",");
}
}
}
System.out.println(sb.toString());
dingDingUtil.getAttendanceReport(tokenBean.getAccess_token(), userIDBean_huyi.getUserid(), "168355738", StringUtils.parseDateTime("2021-02-01 00:00:00"), StringUtils.parseDateTime("2021-03-01 00:00:00"));
}
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>test</title>
<script src="https://g.alicdn.com/dingding/dingtalk-jsapi/2.10.3/dingtalk.open.js"></script>
</head>
<body>
<div>测试免登陆code页面</div>
<button id="code" onclick="dd.ready()">获取授权码</button>
</body>
<script>
dd.ready(function() {
dd.channel.permission.requestAuthCode({
corpId: "dingf2686e63feb5696135c2f4657eb6378f",
onSuccess : function(result) {
var code = result.code;
alert('获取成功,你的免登code为:' + code);            //将code 发往后台处理
},
onFail : function(err) {
alert('出错了, 你获取了一个自定义错误' + err);
}
});
});
</script>
</html>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<script src="https://g.alicdn.com/dingding/dingtalk-jsapi/2.10.3/dingtalk.open.js"></script>
</head>
<body>
<button id="code" onclick="dd.ready()">获取授权码</button>
<script>
dd.ready(function() {
dd.runtime.permission.requestOperateAuthCode({
corpId: "dingf2686e63feb5696135c2f4657eb6378f",
agentId:"1138235324",
onSuccess : function(result) {
var code = result.code;
alert('获取成功,你的免登code为:' + code);            //将code 发往后台处理
},
onFail : function(err) {
alert('出错了, 你获取了一个自定义错误' + err);
}
});
dd.getAuthCode({
success:function(res){
/*{
authCode: 'hYLK98jkf0m' //string authCode
}*/
alert('获取成功,你的免登res为:' + res);
},
fail:function(err){
}
});
});
</script>
</body>
</html>
\ No newline at end of file
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
else if(typeof define === 'function' && define.amd)
define([], factory);
else if(typeof exports === 'object')
exports["vConsole"] = factory();
else
root["vConsole"] = factory();
})(this, function() {
return /******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ exports: {},
/******/ id: moduleId,
/******/ loaded: false
/******/ };
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/ // Flag the module as loaded
/******/ module.loaded = true;
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/ // Load entry module and return exports
/******/ return __webpack_require__(0);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ function(module, exports, __webpack_require__) {
/**
* A Front-End Console Panel for Mobile Webpage
*
* @version 1.0.0
* @author WeChat
*/
'use strict';
Object.defineProperty(exports, '__esModule', {
value: true
});
__webpack_require__(1);
/**
* initial
* @constructor
*/
function vConsole() {
this.html = __webpack_require__(5);
this.$dom = null;
this.activedTab = 'default';
this.console = {}; // store native console methods
this.isReady = false;
this.readyCallback = [];
var self = this;
bind(window, 'load', function () {
self._render();
self._bindEvent();
self._mokeConsole();
self._autoRun();
});
}
/**
* render panel DOM
* @private
*/
vConsole.prototype._render = function () {
var id = '#__vconsole';
if (!$(id)) {
var e = document.createElement('div');
e.innerHTML = this.html;
document.body.appendChild(e.children[0]);
}
this.$dom = $(id);
};
/**
* bind DOM events
* @private
*/
vConsole.prototype._bindEvent = function () {
var self = this;
// show console panel
bind($('.vc-show'), 'click', function () {
self.show();
});
// hide console panel
bind($('.vc-hide'), 'click', function () {
self.hide();
});
// hide console panel when tap background mask
bind($('.vc-mask'), 'click', function (e) {
if (e.target != $('.vc-mask')) {
return false;
}
self.hide();
});
// clear a log box
bind($('.vc-clear'), 'click', function () {
self.clearLog(self.activedTab);
});
// show a log box
bind($$('.vc-tab'), 'click', function (e) {
var tabName = e.target.dataset.tab;
if (tabName == self.activedTab) {
return;
}
self.showTab(tabName);
});
};
/**
* replace window.console with vConsole method
* @private
*/
vConsole.prototype._mokeConsole = function () {
if (!window.console) {
return;
}
var self = this;
this.console.log = window.console.log;
this.console.info = window.console.info;
this.console.warn = window.console.warn;
this.console.debug = window.console.debug;
this.console.error = window.console.error;
window.console.log = function () {
self._printLog('default', 'log', arguments);
};
window.console.info = function () {
self._printLog('default', 'info', arguments);
};
window.console.warn = function () {
self._printLog('default', 'warn', arguments);
};
window.console.debug = function () {
self._printLog('default', 'debug', arguments);
};
window.console.error = function () {
self._printLog('default', 'error', arguments);
};
};
/**
* auto run after initial
* @private
*/
vConsole.prototype._autoRun = function () {
// print system info
var ua = navigator.userAgent,
logMsg = [];
// current time
var d = getDate();
this._printLog('system', 'info', ['日志时间:', d.year + '-' + d.month + '-' + d.day + ' ' + d.hour + ':' + d.minute + ':' + d.second + ' ' + d.millisecond]);
// device & system
logMsg = ['系统版本:', '不明'];
var ipod = ua.match(/(ipod).*\s([\d_]+)/i),
ipad = ua.match(/(ipad).*\s([\d_]+)/i),
iphone = ua.match(/(iphone)\sos\s([\d_]+)/i),
android = ua.match(/(android)\s([\d\.]+)/i);
if (android) {
logMsg[1] = 'Android ' + android[2];
} else if (iphone) {
logMsg[1] = 'iPhone, iOS ' + iphone[2].replace(/_/g, '.');
} else if (ipad) {
logMsg[1] = 'iPad, iOS ' + ipad[2].replace(/_/g, '.');
} else if (ipod) {
logMsg[1] = 'iPod, iOS ' + ipod[2].replace(/_/g, '.');
}
this._printLog('system', 'info', logMsg);
// wechat app version
var version = ua.match(/MicroMessenger\/([\d\.]+)/i);
logMsg = ['微信版本:', '不明'];
if (version && version[1]) {
logMsg[1] = version[1];
this._printLog('system', 'info', logMsg);
}
// network type
var network = ua.toLowerCase().match(/ nettype\/([^ ]+)/g);
logMsg = ['网络类型:', '不明'];
if (network && network[0]) {
network = network[0].split('/');
logMsg[1] = network[1];
this._printLog('system', 'info', logMsg);
}
// HTTP protocol
logMsg = ['网址协议:', '不明'];
if (location.protocol == 'https:') {
logMsg[1] = 'HTTPS';
} else if (location.protocol == 'http:') {
logMsg[1] = 'HTTP';
} else {
logMsg[1] = location.protocol.replace(':', '');
}
this._printLog('system', 'info', logMsg);
// performance related
window.addEventListener('load', function (e) {
var performance = window.performance || window.msPerformance || window.webkitPerformance;
// timing
if (performance && performance.timing) {
var t = performance.timing,
start = t.navigationStart;
// this._printLog('system', 'debug', ['domainLookupEnd:', (t.domainLookupEnd - start)+'ms']);
this._printLog('system', 'info', ['连接结束点:', t.connectEnd - start + 'ms']);
this._printLog('system', 'info', ['回包结束点:', t.responseEnd - start + 'ms']);
// this._printLog('system', 'debug', ['domComplete:', (t.domComplete - start)+'ms']);
// this._printLog('system', 'info', ['beforeReqTime:', (t.requestStart - start)+'ms']);
if (t.secureConnectionStart > 0) {
this._printLog('system', 'info', ['ssl耗时:', t.connectEnd - t.secureConnectionStart + 'ms']);
}
// this._printLog('system', 'info', ['req&RespTime:', (t.responseEnd - t.requestStart)+'ms']);
this._printLog('system', 'info', ['dom渲染耗时:', t.domComplete - t.domLoading + 'ms']);
}
});
while (this.readyCallback.length > 0) {
var callback = this.readyCallback.shift();
callback && callback.call(this);
}
this.isReady = true;
};
/**
* print a log to log box
* @private
* @param string tabName
* @param string logType log|info|debug|error|warn
* @param array logs
*/
vConsole.prototype._printLog = function (tabName, logType, logs) {
if (!logs.length) {
return;
}
// generate plain text for a line
var line = '';
for (var i = 0; i < logs.length; i++) {
try {
if (typeof logs[i] == 'function') {
line += ' ' + logs[i].toString();
} else if (typeof logs[i] == 'object') {
line += ' ' + JSON.stringify(logs[i]);
} else {
line += ' ' + logs[i];
}
} catch (e) {
line += ' [' + typeof logs[i] + ']';
}
}
var $logbox = $('#__vc_log_' + tabName);
var p = document.createElement('p');
p.className = 'vc-item vc-item-' + logType;
p.innerHTML = line;
$('.vc-log', $logbox).appendChild(p);
$('.vc-content').scrollTop = $('.vc-content').scrollHeight;
// print to traditional console
this.console[logType].apply(window.console, logs);
};
/**
* show a log box by tab name
* @public
*/
vConsole.prototype.showTab = function (tabName) {
var $logbox = $('#__vc_log_' + tabName);
// set actived status
removeClass($$('.vc-tab', this.$dom), 'vc-actived');
addClass($('#__vc_tab_' + tabName), 'vc-actived');
removeClass($$('.vc-logbox'), 'vc-actived');
addClass($logbox, 'vc-actived');
// scroll to bottom
$('.vc-content').scrollTop = $('.vc-content').scrollHeight;
this.activedTab = tabName;
};
/**
* clear a log box by tab name
* @public
*/
vConsole.prototype.clearLog = function (tabName) {
var $logbox = $('#__vc_log_' + tabName);
$('.vc-log', $logbox).innerHTML = '';
};
/**
* show console panel
* @public
*/
vConsole.prototype.show = function () {
addClass(this.$dom, 'vc-toggle');
};
/**
* hide console panel
* @public
*/
vConsole.prototype.hide = function () {
removeClass(this.$dom, 'vc-toggle');
};
/**
*
* @public
*/
vConsole.prototype.ready = function (callback) {
if (!this.isReady) {
this.readyCallback.push(callback);
} else {
callback.call(this);
}
};
/****************************************************************
Utility Functions
****************************************************************/
/**
* get single element
* @private
*/
function $(selector, contextElement) {
if (contextElement) {
return contextElement.querySelector(selector);
}
return document.querySelector(selector);
}
/**
* get multiple elements
* @private
*/
function $$(selector, contextElement) {
var nodeList,
list = [];
if (contextElement) {
nodeList = contextElement.querySelectorAll(selector);
} else {
nodeList = document.querySelectorAll(selector);
}
if (nodeList && nodeList.length > 0) {
list = Array.prototype.slice.call(nodeList);
}
return list;
}
/**
* add className to an element
* @private
*/
function addClass($el, className) {
if (!$el) {
return;
}
if (Object.prototype.toString.call($el) != '[object Array]') {
$el = [$el];
}
for (var i = 0; i < $el.length; i++) {
$el[i].className += ' ' + className;
}
}
/**
* remove className from an element
* @private
*/
function removeClass($el, className) {
if (!$el) {
return;
}
if (Object.prototype.toString.call($el) != '[object Array]') {
$el = [$el];
}
for (var i = 0; i < $el.length; i++) {
var arr = $el[i].className.split(' ');
for (var j = 0; j < arr.length; j++) {
if (arr[j] == className) {
arr[j] = '';
}
}
$el[i].className = arr.join(' ');
}
}
/**
* bind an event to element(s)
* @private
* @param array $el element object or array
* @param string eventType name of the event
* @param function fn
* @param boolean useCapture
*/
function bind($el, eventType, fn, useCapture) {
if (!$el) {
return;
}
if (useCapture === undefined) {
useCapture = false;
}
if (Object.prototype.toString.call($el) != '[object Array]') {
$el = [$el];
}
for (var i = 0; i < $el.length; i++) {
$el[i].addEventListener(eventType, fn, useCapture);
}
}
/**
* get formatted date by timestamp
* @param int time
* @return object
*/
function getDate(time) {
var d = time > 0 ? new Date(time) : new Date();
var day = d.getDay() < 10 ? '0' + d.getDay() : d.getDay(),
month = d.getMonth() < 9 ? '0' + (d.getMonth() + 1) : d.getMonth() + 1,
year = d.getFullYear(),
hour = d.getHours() < 10 ? '0' + d.getHours() : d.getHours(),
minute = d.getMinutes() < 10 ? '0' + d.getMinutes() : d.getMinutes(),
second = d.getSeconds() < 10 ? '0' + d.getSeconds() : d.getSeconds(),
millisecond = d.getMilliseconds() < 10 ? '0' + d.getMilliseconds() : d.getMilliseconds();
if (millisecond < 100) {
millisecond = '0' + millisecond;
}
return {
time: +d,
year: year,
month: month,
day: day,
hour: hour,
minute: minute,
second: second,
millisecond: millisecond
};
}
/**
* export
*/
exports['default'] = new vConsole();
module.exports = exports['default'];
/***/ },
/* 1 */
/***/ function(module, exports, __webpack_require__) {
// style-loader: Adds some css to the DOM by adding a <style> tag
// load the styles
var content = __webpack_require__(2);
if(typeof content === 'string') content = [[module.id, content, '']];
// add the styles to the DOM
var update = __webpack_require__(4)(content, {});
if(content.locals) module.exports = content.locals;
// Hot Module Replacement
if(false) {
// When the styles change, update the <style> tags
if(!content.locals) {
module.hot.accept("!!./../node_modules/css-loader/index.js!./../node_modules/less-loader/index.js!./vconsole.less", function() {
var newContent = require("!!./../node_modules/css-loader/index.js!./../node_modules/less-loader/index.js!./vconsole.less");
if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
update(newContent);
});
}
// When the module is disposed, remove the <style> tags
module.hot.dispose(function() { update(); });
}
/***/ },
/* 2 */
/***/ function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(3)();
// imports
// module
exports.push([module.id, "#__vconsole {\n font-size: 13px;\n}\n#__vconsole .vc-show {\n display: block;\n position: fixed;\n right: 10px;\n bottom: 10px;\n color: #FFF;\n background-color: #04BE02;\n line-height: 1;\n font-size: 14px;\n padding: 8px 16px;\n z-index: 10000;\n border-radius: 4px;\n box-shadow: 0 0 8px rgba(0, 0, 0, 0.4);\n}\n#__vconsole .vc-mask {\n display: none;\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: rgba(0, 0, 0, 0);\n z-index: 10001;\n transition: background .3s;\n}\n#__vconsole .vc-panel {\n position: fixed;\n min-height: 80%;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 10002;\n background-color: #EFEFF4;\n -webkit-transition: -webkit-transform 0.3s;\n transition: -webkit-transform 0.3s;\n transition: transform .3s;\n transition: transform 0.3s, -webkit-transform 0.3s;\n -webkit-transform: translate(0, 100%);\n transform: translate(0, 100%);\n}\n#__vconsole .vc-tabbar {\n border-bottom: 1px solid #D9D9D9;\n overflow: hidden;\n}\n#__vconsole .vc-tabbar .vc-tab {\n float: left;\n line-height: 39px;\n padding: 0 15px;\n border-right: 1px solid #D9D9D9;\n text-decoration: none;\n color: #000;\n}\n#__vconsole .vc-tabbar .vc-tab.vc-actived {\n background-color: #FFF;\n}\n#__vconsole .vc-content {\n background-color: #FFF;\n overflow-x: hidden;\n overflow-y: scroll;\n position: absolute;\n top: 40px;\n left: 0;\n right: 0;\n bottom: 40px;\n -webkit-overflow-scrolling: touch;\n}\n#__vconsole .vc-logbox {\n display: none;\n position: relative;\n height: 100%;\n}\n#__vconsole .vc-logbox .vc-log:empty:before {\n content: \"No log\";\n color: #999;\n position: absolute;\n top: 45%;\n left: 0;\n right: 0;\n bottom: 0;\n font-size: 15px;\n text-align: center;\n}\n#__vconsole .vc-logbox .vc-item {\n margin: 0;\n padding: 6px 8px;\n line-height: 1.3;\n border-bottom: 1px solid #EEE;\n word-break: break-word;\n}\n#__vconsole .vc-logbox .vc-item-info {\n color: #6A5ACD;\n}\n#__vconsole .vc-logbox .vc-item-debug {\n color: #DAA520;\n}\n#__vconsole .vc-logbox .vc-item-warn {\n color: #FFA500;\n border-color: #FFB930;\n background-color: #FFFACD;\n}\n#__vconsole .vc-logbox .vc-item-error {\n color: #DC143C;\n border-color: #F4A0AB;\n background-color: #FFE4E1;\n}\n#__vconsole .vc-logbox.vc-actived {\n display: block;\n}\n#__vconsole .vc-toolbar {\n border-top: 1px solid #D9D9D9;\n line-height: 39px;\n position: absolute;\n left: 0;\n right: 0;\n bottom: 0;\n overflow: hidden;\n}\n#__vconsole .vc-toolbar .vc-tool {\n text-decoration: none;\n color: #000;\n width: 50%;\n float: left;\n text-align: center;\n position: relative;\n}\n#__vconsole .vc-toolbar .vc-tool:after {\n content: \" \";\n position: absolute;\n top: 7px;\n bottom: 7px;\n right: 0;\n border-left: 1px solid #D9D9D9;\n}\n#__vconsole .vc-toolbar .vc-tool-last:after {\n border: none;\n}\n#__vconsole.vc-toggle .vc-show {\n display: none;\n}\n#__vconsole.vc-toggle .vc-mask {\n background: rgba(0, 0, 0, 0.6);\n display: block;\n}\n#__vconsole.vc-toggle .vc-panel {\n -webkit-transform: translate(0, 0);\n transform: translate(0, 0);\n}\n", ""]);
// exports
/***/ },
/* 3 */
/***/ function(module, exports) {
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
// css base code, injected by the css-loader
"use strict";
module.exports = function () {
var list = [];
// return the list of modules as css string
list.toString = function toString() {
var result = [];
for (var i = 0; i < this.length; i++) {
var item = this[i];
if (item[2]) {
result.push("@media " + item[2] + "{" + item[1] + "}");
} else {
result.push(item[1]);
}
}
return result.join("");
};
// import a list of modules into the list
list.i = function (modules, mediaQuery) {
if (typeof modules === "string") modules = [[null, modules, ""]];
var alreadyImportedModules = {};
for (var i = 0; i < this.length; i++) {
var id = this[i][0];
if (typeof id === "number") alreadyImportedModules[id] = true;
}
for (i = 0; i < modules.length; i++) {
var item = modules[i];
// skip already imported module
// this implementation is not 100% perfect for weird media query combinations
// when a module is imported multiple times with different media queries.
// I hope this will never occur (Hey this way we have smaller bundles)
if (typeof item[0] !== "number" || !alreadyImportedModules[item[0]]) {
if (mediaQuery && !item[2]) {
item[2] = mediaQuery;
} else if (mediaQuery) {
item[2] = "(" + item[2] + ") and (" + mediaQuery + ")";
}
list.push(item);
}
}
};
return list;
};
/***/ },
/* 4 */
/***/ function(module, exports, __webpack_require__) {
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
var stylesInDom = {},
memoize = function(fn) {
var memo;
return function () {
if (typeof memo === "undefined") memo = fn.apply(this, arguments);
return memo;
};
},
isOldIE = memoize(function() {
return /msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase());
}),
getHeadElement = memoize(function () {
return document.head || document.getElementsByTagName("head")[0];
}),
singletonElement = null,
singletonCounter = 0,
styleElementsInsertedAtTop = [];
module.exports = function(list, options) {
if(false) {
if(typeof document !== "object") throw new Error("The style-loader cannot be used in a non-browser environment");
}
options = options || {};
// Force single-tag solution on IE6-9, which has a hard limit on the # of <style>
// tags it will allow on a page
if (typeof options.singleton === "undefined") options.singleton = isOldIE();
// By default, add <style> tags to the bottom of <head>.
if (typeof options.insertAt === "undefined") options.insertAt = "bottom";
var styles = listToStyles(list);
addStylesToDom(styles, options);
return function update(newList) {
var mayRemove = [];
for(var i = 0; i < styles.length; i++) {
var item = styles[i];
var domStyle = stylesInDom[item.id];
domStyle.refs--;
mayRemove.push(domStyle);
}
if(newList) {
var newStyles = listToStyles(newList);
addStylesToDom(newStyles, options);
}
for(var i = 0; i < mayRemove.length; i++) {
var domStyle = mayRemove[i];
if(domStyle.refs === 0) {
for(var j = 0; j < domStyle.parts.length; j++)
domStyle.parts[j]();
delete stylesInDom[domStyle.id];
}
}
};
}
function addStylesToDom(styles, options) {
for(var i = 0; i < styles.length; i++) {
var item = styles[i];
var domStyle = stylesInDom[item.id];
if(domStyle) {
domStyle.refs++;
for(var j = 0; j < domStyle.parts.length; j++) {
domStyle.parts[j](item.parts[j]);
}
for(; j < item.parts.length; j++) {
domStyle.parts.push(addStyle(item.parts[j], options));
}
} else {
var parts = [];
for(var j = 0; j < item.parts.length; j++) {
parts.push(addStyle(item.parts[j], options));
}
stylesInDom[item.id] = {id: item.id, refs: 1, parts: parts};
}
}
}
function listToStyles(list) {
var styles = [];
var newStyles = {};
for(var i = 0; i < list.length; i++) {
var item = list[i];
var id = item[0];
var css = item[1];
var media = item[2];
var sourceMap = item[3];
var part = {css: css, media: media, sourceMap: sourceMap};
if(!newStyles[id])
styles.push(newStyles[id] = {id: id, parts: [part]});
else
newStyles[id].parts.push(part);
}
return styles;
}
function insertStyleElement(options, styleElement) {
var head = getHeadElement();
var lastStyleElementInsertedAtTop = styleElementsInsertedAtTop[styleElementsInsertedAtTop.length - 1];
if (options.insertAt === "top") {
if(!lastStyleElementInsertedAtTop) {
head.insertBefore(styleElement, head.firstChild);
} else if(lastStyleElementInsertedAtTop.nextSibling) {
head.insertBefore(styleElement, lastStyleElementInsertedAtTop.nextSibling);
} else {
head.appendChild(styleElement);
}
styleElementsInsertedAtTop.push(styleElement);
} else if (options.insertAt === "bottom") {
head.appendChild(styleElement);
} else {
throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");
}
}
function removeStyleElement(styleElement) {
styleElement.parentNode.removeChild(styleElement);
var idx = styleElementsInsertedAtTop.indexOf(styleElement);
if(idx >= 0) {
styleElementsInsertedAtTop.splice(idx, 1);
}
}
function createStyleElement(options) {
var styleElement = document.createElement("style");
styleElement.type = "text/css";
insertStyleElement(options, styleElement);
return styleElement;
}
function createLinkElement(options) {
var linkElement = document.createElement("link");
linkElement.rel = "stylesheet";
insertStyleElement(options, linkElement);
return linkElement;
}
function addStyle(obj, options) {
var styleElement, update, remove;
if (options.singleton) {
var styleIndex = singletonCounter++;
styleElement = singletonElement || (singletonElement = createStyleElement(options));
update = applyToSingletonTag.bind(null, styleElement, styleIndex, false);
remove = applyToSingletonTag.bind(null, styleElement, styleIndex, true);
} else if(obj.sourceMap &&
typeof URL === "function" &&
typeof URL.createObjectURL === "function" &&
typeof URL.revokeObjectURL === "function" &&
typeof Blob === "function" &&
typeof btoa === "function") {
styleElement = createLinkElement(options);
update = updateLink.bind(null, styleElement);
remove = function() {
removeStyleElement(styleElement);
if(styleElement.href)
URL.revokeObjectURL(styleElement.href);
};
} else {
styleElement = createStyleElement(options);
update = applyToTag.bind(null, styleElement);
remove = function() {
removeStyleElement(styleElement);
};
}
update(obj);
return function updateStyle(newObj) {
if(newObj) {
if(newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap)
return;
update(obj = newObj);
} else {
remove();
}
};
}
var replaceText = (function () {
var textStore = [];
return function (index, replacement) {
textStore[index] = replacement;
return textStore.filter(Boolean).join('\n');
};
})();
function applyToSingletonTag(styleElement, index, remove, obj) {
var css = remove ? "" : obj.css;
if (styleElement.styleSheet) {
styleElement.styleSheet.cssText = replaceText(index, css);
} else {
var cssNode = document.createTextNode(css);
var childNodes = styleElement.childNodes;
if (childNodes[index]) styleElement.removeChild(childNodes[index]);
if (childNodes.length) {
styleElement.insertBefore(cssNode, childNodes[index]);
} else {
styleElement.appendChild(cssNode);
}
}
}
function applyToTag(styleElement, obj) {
var css = obj.css;
var media = obj.media;
if(media) {
styleElement.setAttribute("media", media)
}
if(styleElement.styleSheet) {
styleElement.styleSheet.cssText = css;
} else {
while(styleElement.firstChild) {
styleElement.removeChild(styleElement.firstChild);
}
styleElement.appendChild(document.createTextNode(css));
}
}
function updateLink(linkElement, obj) {
var css = obj.css;
var sourceMap = obj.sourceMap;
if(sourceMap) {
// http://stackoverflow.com/a/26603875
css += "\n/*# sourceMappingURL=data:application/json;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + " */";
}
var blob = new Blob([css], { type: "text/css" });
var oldSrc = linkElement.href;
linkElement.href = URL.createObjectURL(blob);
if(oldSrc)
URL.revokeObjectURL(oldSrc);
}
/***/ },
/* 5 */
/***/ function(module, exports) {
module.exports = "<!-- vConsole -->\n<div id=\"__vconsole\" class=\"\">\n\t<div class=\"vc-show\">面板</div>\n\t<div class=\"vc-mask\">\n\t</div>\n\t<div class=\"vc-panel\">\n\t\t<div class=\"vc-tabbar\">\n\t\t\t<a class=\"vc-tab vc-actived\" data-tab=\"default\" id=\"__vc_tab_default\" href=\"javascript:;\">日志</a>\n\t\t\t<a class=\"vc-tab\" data-tab=\"system\" id=\"__vc_tab_system\" href=\"javascript:;\">系统</a>\n\t\t</div>\n\t\t<div class=\"vc-content\">\n\t\t\t<div class=\"vc-logbox vc-actived\" id=\"__vc_log_default\">\n\t\t\t\t<div class=\"vc-log\"></div>\n\t\t\t</div>\n\t\t\t<div class=\"vc-logbox\" id=\"__vc_log_system\">\n\t\t\t\t<div class=\"vc-log\"></div>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class=\"vc-toolbar\">\n\t\t\t<a href=\"javascript:;\" class=\"vc-tool vc-clear\">清空</a>\n\t\t\t<a href=\"javascript:;\" class=\"vc-tool vc-tool-last vc-hide\">隐藏</a>\n\t\t</div>\n\t</div>\n</div>\n<!-- /vConsole -->";
/***/ }
/******/ ])
});
;
\ No newline at end of file
package com.yqd.dingding;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest
class DingdingApplicationTests {
@Test
void contextLoads() {
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment