Skip to content

Commit

Permalink
[new]通过laytpl渲染
Browse files Browse the repository at this point in the history
  • Loading branch information
notmaster-C committed Jun 19, 2024
1 parent 5b18037 commit a896322
Show file tree
Hide file tree
Showing 4 changed files with 388 additions and 361 deletions.
1 change: 1 addition & 0 deletions assets/images/qrcode.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
41 changes: 36 additions & 5 deletions assets/js/index.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,44 @@
const data={
userName: "菜菜",
job:"后端开发工程师",
address:"成都",
age:"24岁",
sex:"男",
tel:15984426676,
email:"[email protected]",
skills:[
{
name:"JAVA",
per:88
},
{
name:"Golang",
per:88
},
{
name:"Linux",
per:85
},
{
name:"Mysql",
per:83
},
{
name:"Oracle",
per:80
},
]
}
console.log("感谢您的浏览,期待能够加入贵公司!");
layui.use(function(){
var layer = layui.layer;
var util = layui.util;
layer.msg('Hello World', {icon: 6});
// $("#userName").innerHTML = data.userName
// $("#job").innerHTML = data.job
var laytpl = layui.laytpl,$=layui.jquery
$('#view').html("渲染中...")
//引入外部html
$.get('assets/pages/home.html',function(homePage){
//渲染并输出结果
laytpl(homePage).render(data, function(str){
$('#view').html(str);
});
});
})

Loading

0 comments on commit a896322

Please sign in to comment.