---
title: "window.Shopline"

doc_type: static
doc_category: static
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/zh-hans-cn/docs/online-store-3-0-themes/best-practice/window-shopline'
  md: 'https://developer.shopline.com/zh-hans-cn/docs/online-store-3-0-themes/best-practice/window-shopline.md'
---
# window.Shopline

`window.Shopline` 对象提供了店铺的相关信息。本文介绍该对象下的各个属性。

***

## window\.Shopline.customer

客户信息对象，仅在客户已登录时才有数据，包含以下字段：

```javascript
{
  id: "*******890",	// 客户 ID
  email: "********@example.com",	// 客户邮箱
  phone: "+86139****8888"	// 客户手机
}
```

***

## window\.Shopline.designMode

当前店铺页面是否处于主题编辑器的预览模式，值与 [request.design\_mode](https://developer.shopline.com/zh-hans-cn/docs/sline/object/request.md) 保持一致。

***

## window\.Shopline.extension

当前店铺页面的插件信息对象，包含 `i18nInit` 和 `t` 两个字段。

### window\.Shopline.extension.i18nInit

获取当前页面指定插件多语言包的初始化方法，可异步拉取该插件多语言包 JSON 数据，具体可参考 [获取语言包](https://developer.shopline.com/zh-hans-cn/docs/online-store-3-0-themes/best-practice/fetching-language-packs.md)。

### window\.Shopline.extension.t

获取当前页面指定插件多语言文案的方法，具体可参考 
[获取语言包](https://developer.shopline.com/zh-hans-cn/docs/online-store-3-0-themes/best-practice/fetching-language-packs.md)。


***

## window\.Shopline.handle

店铺的 handle，即网址的前缀。例如一个店铺的域名为 `demo.myshopline.com`，则该店铺的 handle 为 `demo`。

***

## window\.Shopline.i18nInit

获取当前页面主题多语言包的初始化方法，可异步拉取该主题多语言包 JSON 数据，具体可参考 [获取语言包](https://developer.shopline.com/zh-hans-cn/docs/online-store-3-0-themes/best-practice/fetching-language-packs.md)。

***

## window\.Shopline.storeId

店铺 ID。

***

## window\.Shopline.t

获取当前页面主题多语言文案的方法，具体可参考 [获取语言包](https://developer.shopline.com/zh-hans-cn/docs/online-store-3-0-themes/best-practice/fetching-language-packs.md)。

***

## window\.Shopline.uri

当前店铺页面的路径信息对象，其包含以下多个字段。

### window\.Shopline.uri.alias

页面别名，以下为页面路径与页面别名的映射表：

| **页面路径**                            | **页面别名**        |
| ----------------------------------- | --------------- |
| /                                   | Home            |
| /password                           | Password        |
| /proofing                           | Proofing        |
| /404                                | 404             |
| /cart                               | Cart            |
| /search                             | ProductsSearch  |
| /products/\{productHandle\}         | ProductsDetail  |
| /collections-all                    | AllCollections  |
| /collections/\{collectionHandle\}    | Products        |
| /gift_cards/\:storeId/\{handle\}     | GiftCard        |
| /blogs/\{blogHandle\}                 | BlogsList       |
| /blogs/\{blogHandle\}/\{articleHandle\} | BlogsDetail     |
| /pages/\{handle\}                     | Page            |
| /policies/\{handle\}                 | Policy          |
| /user/signIn                        | SignIn          |
| /user/signUp                        | SignUp          |
| /user/activate                      | ActivateAccount |
| /user/passwordNew                   | PasswordNew     |
| /user/center                        | Center          |
| /user/company                       | Company         |
| /user/address/new                   | AddressNew      |
| /user/address/\:addressSeq/edit      | AddressEdit     |
| /user/orders                        | OrderList       |
| /user/orders/\:id                    | OrderDetail     |

### window\.Shopline.uri.root\_url

页面根路径，如主题编辑器预览页面根路径为 `/preview`。

### window\.Shopline.uri.params

页面路由参数。

