Files
mp-Blog/mp/app.js
T
rumosky 99c1070c04 v1.1.0
2023-11-26 02:23:06 +08:00

15 lines
271 B
JavaScript

// app.js
App({
onLaunch() {
// 获取当前年份
const date = new Date();
const currentYear = date.getFullYear();
this.globalData.currentYear = currentYear;
},
globalData: {
baseURL: "https://rumosky.com/api",
currentYear: null,
},
});