feat: 删除无用的console输出
This commit is contained in:
@@ -21,7 +21,7 @@ App({
|
||||
|
||||
if (token && typeof token === 'string') {
|
||||
wx.setStorageSync('token', token);
|
||||
console.log('Login successful');
|
||||
|
||||
if (this._resolveLogin) this._resolveLogin(token);
|
||||
|
||||
// Background Profile Update
|
||||
|
||||
@@ -65,5 +65,6 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"sitemapLocation": "sitemap.json"
|
||||
"sitemapLocation": "sitemap.json",
|
||||
"lazyCodeLoading": "requiredComponents"
|
||||
}
|
||||
@@ -26,7 +26,7 @@ Page({
|
||||
try {
|
||||
// Fetch levels
|
||||
const levelRes = await request.get('/config/level/list');
|
||||
console.log('Level Detail - API Response:', levelRes);
|
||||
|
||||
|
||||
let list = [];
|
||||
if (levelRes) {
|
||||
@@ -41,14 +41,14 @@ Page({
|
||||
}
|
||||
}
|
||||
|
||||
console.log('Level Detail - Parsed List:', list);
|
||||
|
||||
list.sort((a, b) => a.minSunlight - b.minSunlight);
|
||||
|
||||
// Fetch profile if sunlight not passed
|
||||
let currentSunlight = passedSunlight;
|
||||
if (currentSunlight === undefined) {
|
||||
const profileRes = await request.get('/profile/detail');
|
||||
console.log('Level Detail - Profile:', profileRes);
|
||||
|
||||
currentSunlight = profileRes.totalSunlight || 0;
|
||||
this.setData({ currentSunlight });
|
||||
}
|
||||
@@ -63,7 +63,7 @@ Page({
|
||||
}
|
||||
}
|
||||
|
||||
console.log('Level Detail - Calculated Level:', currentLevel);
|
||||
|
||||
|
||||
this.setData({
|
||||
levels: list,
|
||||
|
||||
@@ -130,7 +130,7 @@ Page({
|
||||
// Open WeChat notification settings
|
||||
wx.openSetting({
|
||||
success: (res) => {
|
||||
console.log('Settings opened', res);
|
||||
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"projectname": "plant-mp",
|
||||
"condition": {},
|
||||
"setting": {
|
||||
"urlCheck": false,
|
||||
"urlCheck": true,
|
||||
"coverView": true,
|
||||
"lazyloadPlaceholderEnable": false,
|
||||
"skylineRenderEnable": false,
|
||||
|
||||
+3
-3
@@ -63,7 +63,7 @@ class WxRequest {
|
||||
if ((statusCode === 401 || data.code === 401) && !options.skipToken && !options._retry) {
|
||||
const app = getApp();
|
||||
if (app && app.forceRefreshLogin) {
|
||||
console.log('401 detected, refreshing token...');
|
||||
|
||||
app.forceRefreshLogin().then(() => {
|
||||
// Retry Original Request
|
||||
this.request({ ...options, _retry: true })
|
||||
@@ -270,8 +270,8 @@ class WxRequest {
|
||||
|
||||
// Initialize with default instance
|
||||
const request = new WxRequest({
|
||||
baseUrl: 'http://192.168.0.184:8889',
|
||||
//baseUrl: 'https://go.sundynix.cn/api',
|
||||
//baseUrl: 'http://192.168.0.184:8889',
|
||||
baseUrl: 'https://go.sundynix.cn/api',
|
||||
header: {
|
||||
'Content-Type': 'application/json'
|
||||
}
|
||||
|
||||
+2
-2
@@ -17,10 +17,10 @@ export const requestSubscription = () => {
|
||||
tmplIds: [TEMPLATE_ID],
|
||||
success(res) {
|
||||
if (res[TEMPLATE_ID] === 'accept') {
|
||||
console.log('Subscription accepted');
|
||||
|
||||
resolve({ success: true, status: 'accept' });
|
||||
} else {
|
||||
console.log('Subscription rejected or other status', res[TEMPLATE_ID]);
|
||||
|
||||
resolve({ success: false, status: res[TEMPLATE_ID] });
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user