功能:同步小程序流程
This commit is contained in:
@@ -1,11 +1,47 @@
|
||||
/**
|
||||
* Purpose: authApi supports index.js by holding or executing the auth api page or API role.
|
||||
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
const authApi = require('../../api/auth')
|
||||
/**
|
||||
* Purpose: couponApi supports index.js by holding or executing the coupon api page or API role.
|
||||
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
const couponApi = require('../../api/coupon')
|
||||
/**
|
||||
* Purpose: orderApi supports index.js by holding or executing the order api page or API role.
|
||||
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
const orderApi = require('../../api/order')
|
||||
/**
|
||||
* Purpose: userApi supports index.js by holding or executing the user api page or API role.
|
||||
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
const userApi = require('../../api/user')
|
||||
/**
|
||||
* Purpose: wishlistApi supports index.js by holding or executing the wishlist api page or API role.
|
||||
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
const wishlistApi = require('../../api/wishlist')
|
||||
/**
|
||||
* Purpose: actionGuard supports index.js by holding or executing the action guard page or API role.
|
||||
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
const actionGuard = require('../../utils/action-guard')
|
||||
/**
|
||||
* Purpose: auth supports index.js by holding or executing the auth page or API role.
|
||||
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
const auth = require('../../utils/auth')
|
||||
/**
|
||||
* Purpose: navigation supports index.js by holding or executing the navigation page or API role.
|
||||
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
const navigation = require('../../utils/navigation')
|
||||
/**
|
||||
* Purpose: theme supports index.js by holding or executing the theme page or API role.
|
||||
* Usage: import, call, read, or update this const from the owning page/module while preserving the surrounding loading and permission flow.
|
||||
*/
|
||||
const theme = require('../../utils/theme')
|
||||
const { DEFAULT_AVATAR } = require('../../utils/config')
|
||||
const { runWithLoading } = require('../../utils/loading')
|
||||
@@ -178,6 +214,11 @@ Page({
|
||||
}
|
||||
this._checkingPopupMessages = true
|
||||
try {
|
||||
const globalApp = getApp()
|
||||
if (globalApp && typeof globalApp.checkPopupMessages === 'function') {
|
||||
await globalApp.checkPopupMessages()
|
||||
return
|
||||
}
|
||||
const messages = await userApi.listMyPopupMessages()
|
||||
/**
|
||||
* `for` page method. Use this from WXML event bindings or lifecycle hooks.
|
||||
@@ -194,7 +235,7 @@ Page({
|
||||
})
|
||||
})
|
||||
await userApi.markMessagePopupShown(item.id)
|
||||
const opened = await navigation.openActionPath(item.actionPath)
|
||||
const opened = await navigation.openSystemMessage(item)
|
||||
if (opened) {
|
||||
break
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user