提交 dc319955 编写于 作者: H hjdhnx

解决模板冲突问题

上级 2e6a0c5d
3.8.2
\ No newline at end of file
3.8.3
\ No newline at end of file
......@@ -6,7 +6,7 @@ import cheerio from 'https://gitcode.net/qq_32394351/dr_py/-/raw/master/libs/che
import 'https://gitcode.net/qq_32394351/dr_py/-/raw/master/libs/crypto-js.js';
import 'https://gitcode.net/qq_32394351/dr_py/-/raw/master/libs/drT.js';
// import 'http://192.168.10.103:5705/libs/drT.js';
import muban from 'https://gitcode.net/qq_32394351/dr_py/-/raw/master/js/模板.js';
// import muban from 'https://gitcode.net/qq_32394351/dr_py/-/raw/master/js/模板.js';
// import muban from 'http://192.168.10.103:5705/admin/view/模板.js';
// const key = 'drpy_zbk';
......@@ -1464,6 +1464,14 @@ function playParse(playObj){
function init(ext) {
console.log('init');
try {
// make shared jsContext happy muban不能import,不然会造成换源继承后变量被篡改
if (typeof (globalThis.mubanJs) === 'undefined') {
let mubanJs = request('https://gitcode.net/qq_32394351/dr_py/-/raw/master/js/模板.js', { 'User-Agent': MOBILE_UA });
mubanJs = mubanJs.replace('export default', '(function() {return muban;}()) // export default');
// console.log(mubanJs);
globalThis.mubanJs = mubanJs;
}
let muban = eval(globalThis.mubanJs);
if (typeof ext == 'object'){
rule = ext;
if (rule.template) {
......
此差异已折叠。
......@@ -48,6 +48,7 @@
[获取本地设备信息](https://m.jb51.net/article/140716.htm)
###### 2022/10/09
- [X] 1.v3.8.2 本地drpy.js抄了一下影魔代码实现了base64加解密和md5加密并且引入全局的CryptoJS对象
- [X] 2.v3.8.3 本地drpy.js抄了一下影魔代码不用import模板改成init加载模板解决换源冲突问题
###### 2022/10/08
- [X] 1.v3.8.1 本地drpy.js优化优酷兼容,已全部完善
###### 2022/10/07
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册