\app\common\service\messageBasics

消息通知服务[基类] Class Basics

Summary

Methods
Properties
Constants
getError()
hasError()
send()
No public properties found
No constants found
sendSms()
sendWxSubMsg()
getSubstr()
$error
$wxappId
$param
N/A
No private methods found
No private properties found
N/A

Properties

$error

$error : 

Type

$wxappId

$wxappId : 

Type

$param

$param : 

Type

Methods

getError()

getError() : mixed

获取错误信息

Returns

mixed

hasError()

hasError() : boolean

是否存在错误

Returns

boolean

send()

send(array  $param) : mixed

发送消息通知

Parameters

array $param

参数

Returns

mixed

sendSms()

sendSms(  $msgType,   $templateParams,   $wxappId) : boolean

发送短信提醒

Parameters

$msgType
$templateParams
$wxappId

Throws

\think\Exception

Returns

boolean

sendWxSubMsg()

sendWxSubMsg(  $wxappId,   $params) : mixed

发送微信订阅消息

Parameters

$wxappId
$params

Throws

\app\common\exception\BaseException
\think\Exception
\think\exception\DbException

Returns

mixed

getSubstr()

getSubstr(  $content, integer  $length = 20) : boolean|string

字符串截取前20字符 [用于兼容thing数据类型]

Parameters

$content
integer $length

Returns

boolean|string