Files
Fuxsto-V4/Dashboard/bing.js.bak
2025-10-18 10:19:37 +08:00

48 lines
999 B
JavaScript

// app.js
const { createApp } = Vue;
const app = createApp({
data() {
return {
w: null,
p: null,
d: null,
s: true,
}
},
async mounted() {
// 生命周期钩子 - 挂载后
console.log('应用已挂载');
},
methods: {
search() {
Message.info('正在请求...', { duration: 5000000000000000 });
this.s = false;
axios.get('https://zk.aoidc.top/api/api.php?q='+this.w)
.then(response => {
Message.closeAll();
this.s = true;
if (response.data.results != null) {
this.d = response.data.results;
this.s = true;
Message.success('已载入~', { duration: 2000 });
} else {
Message.warning('失败', { duration: 2000 });
}
})
},
}
});
// 挂载到DOM元素
app.mount('#app');