- wrap StartRefreshComment and StartRefreshEbaiRealMobile by ReallyCallPlatformAPI

This commit is contained in:
gazebo
2019-03-15 11:14:33 +08:00
parent bb01fc422b
commit 39f390cb1f
2 changed files with 11 additions and 6 deletions

View File

@@ -6,12 +6,15 @@ import (
"git.rosy.net.cn/baseapi/utils" "git.rosy.net.cn/baseapi/utils"
"git.rosy.net.cn/jx-callback/business/jxutils/jxcontext" "git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
"git.rosy.net.cn/jx-callback/business/partner/purchase/ebai" "git.rosy.net.cn/jx-callback/business/partner/purchase/ebai"
"git.rosy.net.cn/jx-callback/globals"
) )
func StartRefreshEbaiRealMobile() { func StartRefreshEbaiRealMobile() {
if globals.ReallyCallPlatformAPI {
utils.AfterFuncWithRecover(5*time.Second, func() { utils.AfterFuncWithRecover(5*time.Second, func() {
RefreshEbaiRealMobile() RefreshEbaiRealMobile()
}) })
}
} }
func RefreshEbaiRealMobile() { func RefreshEbaiRealMobile() {

View File

@@ -21,9 +21,11 @@ const (
) )
func (c *PurchaseHandler) StartRefreshComment() { func (c *PurchaseHandler) StartRefreshComment() {
if globals.ReallyCallPlatformAPI {
utils.AfterFuncWithRecover(5*time.Second, func() { utils.AfterFuncWithRecover(5*time.Second, func() {
c.refreshCommentOnce() c.refreshCommentOnce()
}) })
}
} }
func (c *PurchaseHandler) refreshCommentOnce() { func (c *PurchaseHandler) refreshCommentOnce() {