This commit is contained in:
chenyuwu
2026-08-20 09:07:29 +08:00
parent 80e346f200
commit 2d0fa32dc7
3 changed files with 44 additions and 4 deletions
+33 -1
View File
@@ -1,6 +1,17 @@
// app.ts
// import { BASE_URL, appId } from './env'
// const DEFAULT_SHARE_CONFIG = {
// title: '吉林敖东控糖胶囊 辅助降血糖',
// imageUrl: '/pages/index/assets/test.jpg',
// }
App<IAppOption>({
globalData: {},
globalData: {
// shareConfig: { ...DEFAULT_SHARE_CONFIG },
},
onLaunch() {
const updateManager = wx.getUpdateManager()
@@ -35,7 +46,28 @@ App<IAppOption>({
const envVersion = wx.getAccountInfoSync().miniProgram.envVersion
if (envVersion !== 'release') {
wx.reLaunch({ url: '/pages/tools/index' })
return
}
// this.fetchShareConfig()
},
// fetchShareConfig() {
// wx.request({
// url: `${BASE_URL}/api/ad/ww-join-fans/share/${appId}`,
// method: 'GET',
// success: (res: any) => {
// const data = res.data?.data ?? res.data
// if (data?.title || data?.imageUrl) {
// this.globalData.shareConfig = {
// title: data.title || DEFAULT_SHARE_CONFIG.title,
// imageUrl: data.imageUrl || DEFAULT_SHARE_CONFIG.imageUrl,
// }
// }
// },
// fail: () => {
// // 请求失败时继续使用默认分享文案和背景图
// },
// })
// },
})