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