API
Component

WxSn ($UI/comp/wxSn/components/wxSn/wxSn)

使用范围:WX

Contents

component WxSn ($UI/comp/wxSn/components/wxSn/wxSn) extends Component

序号组件

<b>使用场景</b>:产生一个唯一的序号。 <b>使用方法</b>:在操作中提供了函数,同时提供了api接口供js中调用。

Constructor Top

  WxSn ()
  WxSn ( config)

Attributes Top

String component = "$UI/comp/wxSn/components/wxSn/wxSn"

组件标识

Methods Top

Promise next (String key, String format, String num)
Promise nextByDate (String key)
String nextByDateSync (String key)
String nextSync (String key, String format, String num)
Promise snowId ()
Number snowIdSync ()

Operations Top

Promise next (String key, String format, String num)
Promise nextByDate (String key)

Constructor details Top

public WxSn ()

序号组件

<b>使用场景</b>:产生一个唯一的序号。 <b>使用方法</b>:在操作中提供了函数,同时提供了api接口供js中调用。

public WxSn ( config)

构造函数

Inherited from Operational

Parameters

config

操作配置

Attributes Detail Top

public String component = "$UI/comp/wxSn/components/wxSn/wxSn"

组件标识

Methods Detail Top

public Promise next (String key, String format, String num)

Parameters

String key
String format
String num

Return Value

Promise

public Promise nextByDate (String key)

Parameters

String key

Return Value

Promise

public String nextByDateSync (String key)

调用此方法前需要先调用nextByData

Parameters

String key

Return Value

String

public String nextSync (String key, String format, String num)

调用此方法前需要先调用next方法

Parameters

String key
String format
String num

Return Value

String

public Promise snowId ()

Return Value

Promise

public Number snowIdSync ()

调用此方法前需要先调用snowId

Return Value

Number

Operations Detail Top

public Promise next (String key, String format, String num)

Parameters

String key
String format
String num

Return Value

Promise

public Promise nextByDate (String key)

Parameters

String key

Return Value

Promise