first commit

This commit is contained in:
编码猿
2024-09-27 02:06:13 +08:00
commit 852d94fbb9
36760 changed files with 3274413 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
class MechanismList {
constructor() {
this.mechanList()
// console.log(window.top.document.URL)
}
async mechanList () {
var res = await mechInfoService.mechanismList({
page:0,
id:`${urlId}`
});
console.log(res)
$(".jg_list ul").append(item(res.data))
$(".action").append(`
<i class="iconfont icon-back1"></ihre>
<span>${unit_title}</span>
`)
}
}
var url = document.location.toString();//获取url地址
var urlParmStr = url.slice(url.indexOf('?')+1);//获取问号后所有的字符串
var arr = urlParmStr.split('&');//通过&符号将字符串分割转成数组
var urlId = arr[0].split("=")[1];//获取数组中第一个参数
var unit_title=arr[1].split("=")[1];//第二个参数
unit_title=decodeURI(unit_title);//转码将解码方式unscape换为decodeURI,将中文参数获取
console.log(unit_title)
new MechanismList();