Gate record features and storage entry points with invitation guidance; enforce record access in the backend. Add homepage greetings, right-swipe profile dismissal, and move the smoking switch to settings. Simplify API base configuration and remove the unused legacy tab bar component.
12 lines
607 B
JavaScript
12 lines
607 B
JavaScript
const { withRecordAccess } = require('../../utils/record-access');
|
|
const { tryLoginRenewal } = require('../../utils/subscribe');
|
|
const { getLayout } = require('../../utils/layout');
|
|
Page(withRecordAccess({
|
|
onLoginSubscribeTap: function() { return tryLoginRenewal(); },
|
|
data:{},
|
|
onLoad(){this.setData(getLayout());},
|
|
onResize(){this.setData(getLayout());},
|
|
loadMore(){const card=this.selectComponent('#smoking');if(card)return card.loadMoreLogs();},
|
|
async onPullDownRefresh(){try{const card=this.selectComponent('#smoking');if(card)await card.load(true);}finally{wx.stopPullDownRefresh();}}
|
|
}));
|