加入web
This commit is contained in:
@@ -13,6 +13,11 @@
|
||||
<p>
|
||||
<div class="page-title">角色清單</div>
|
||||
</p>
|
||||
<hr>
|
||||
<div class="center">
|
||||
<h4><a href="./character/add.html">新增角色</a></h4>
|
||||
</div>
|
||||
<hr>
|
||||
<script src="https://cdn.jsdelivr.net/npm/axios@1.1.2/dist/axios.min.js"></script>
|
||||
<script language="javascript" type="text/javascript">
|
||||
let table = document.createElement("table");
|
||||
@@ -40,7 +45,7 @@
|
||||
thead.appendChild(row_1);
|
||||
|
||||
// 发送登录请求
|
||||
axios.get('http://127.0.0.1:8080/api/v1/characters')
|
||||
axios.get('./api/v1/characters')
|
||||
.then(function (response) {
|
||||
const data = response.data;
|
||||
console.log("Data: ", data);
|
||||
@@ -54,7 +59,7 @@
|
||||
|
||||
const item = data[i];
|
||||
|
||||
row_2_data_1.innerHTML = "<img src=\"http://127.0.0.1:8080" + item.imgSrc + "\" width=\"64\" height=\"64\">";
|
||||
row_2_data_1.innerHTML = "<img src=\"./" + item.imgSrc + "\" width=\"64\" height=\"64\">";
|
||||
row_2_data_2.innerHTML = item.name;
|
||||
row_2_data_3.innerHTML = item.standIndex;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user