{"Message":"增加钉钉登录","MessageType":2,"Modules":[{"State":1,"Type":1,"Name":"PCPage/其他登录方式"},{"State":1,"Type":12,"Name":"CustomLibrary"},{"State":1,"Type":15,"Name":"ServerCommand/获取CorpId"},{"State":3,"Type":15,"Name":"ServerCommand/钉钉授权登录"},{"State":3,"Type":15,"Name":"ServerCommand/dingtalkLogin"},{"State":3,"Type":1,"Name":"PCPage/dingtalkLogin"}],"Version":"v1"}

This commit is contained in:
cuckooent
2024-09-04 21:36:24 +08:00
parent b311235743
commit 61f3aa574e
10 changed files with 1044 additions and 124 deletions

4
UserFile/Load.js Normal file
View File

@@ -0,0 +1,4 @@
function isDingTalk() {
const userAgent = navigator.userAgent || navigator.vendor || window.opera;
return /DingTalk/i.test(userAgent);
}

View File

@@ -1,67 +0,0 @@
// 改变页面图表样式
let bgColor = "#fff";
let color = ["#0090FF", "#ffc300", "#f64662", "#ec610a", "#00c9b1", "#6730ec"];
function hexToRgba(hex, opacity) {
return (
"rgba(" +
parseInt("0x" + hex.slice(1, 3)) +
"," +
parseInt("0x" + hex.slice(3, 5)) +
"," +
parseInt("0x" + hex.slice(5, 7)) +
"," +
opacity +
")"
);
}
// 修改折线图样式
Forguncy.Helper.preSetEchartOption = (op, page, chart) => {
console.log(op);
op.series = op.series.map((element, index) => {
if (element.type == "line") {
var s1 = {};
s1.smooth = true;
element.symbol = "emptyCircle";
element.symbolSize = 8;
s1.zlevel = 3;
s1.showSymbol = false;
s1.lineStyle = {
normal: {
color: color[index],
shadowBlur: 5,
shadowColor: hexToRgba(color[index], 0.1),
shadowOffsetY: 6
}
};
s1.areaStyle = {
normal: {
color: new echarts.graphic.LinearGradient(
0,
0,
0,
1,
[
{
offset: 0,
color: hexToRgba(color[index], 0.3)
},
{
offset: 1,
color: hexToRgba(color[index], 0.1)
}
],
false
),
shadowColor: hexToRgba(color[index], 0.1),
shadowBlur: 10
}
};
element = { ...element, ...s1 };
}
return element;
});
return op;
};