はじめに

To use the location module, import wixLocationFrontend from the @wix/site-location module:

コピー
1

The setter functions in @wix/site-location can only be used when browser rendering happens, meaning you can only use them in frontend code after the page is ready. You can use the getter functions for both server-side or browser rendering.

The URL is broken into:

Premium Sites

For premium sites, the URL of the incoming call has the following format: https://www.domain.com/myPrefix/myPath?myQuery=myValue

  • baseUrl:     https://www.domain.com
  • prefix:        myPrefix
  • path:          myPath
  • クエリー:        myQuery=myValue

: https://domain.com/animals/elephant?species=african-elephant

  • baseUrl:     https://domain.com/
  • prefix:        animals. Only for routers and dynamic pages.
  • path:          elephant
  • クエリー:        species=african-elephant

Free Sites

For free sites, the URL of the incoming call has the following format: https://user_name.wixsite.com/mysite/myPrefix/myPath?myQuery=myValue

  • baseUrl:     https://user_name.wixsite.com/mysite
  • prefix:        myPrefix
  • path:          myPath
  • クエリー:        myQuery=myValue

: https://user_name.wixsite.com/zoo/animals/elephant?species=african-elephant

  • baseUrl:     https://user.wixsite.com/zoo
  • prefix:        animals. Only for routers and dynamic pages.
  • path:          elephant
  • クエリー:        species=african-elephant

Learn more about @wix/site-location in Getting Started and on Wix Learn.

役に立ちましたか?
はい
いいえ