微信接口方法添加注释

This commit is contained in:
sugar1569 2018-09-30 15:24:40 +08:00
parent aba36446a1
commit 5ae5bdb7b5

View File

@ -27,6 +27,9 @@ class WechatService
{ {
private static $instance = null; private static $instance = null;
/**获取微信配置参数
* @return array
*/
public static function options() public static function options()
{ {
$wechat = SystemConfigService::more(['wechat_appid','wechat_appsecret','wechat_token']); $wechat = SystemConfigService::more(['wechat_appid','wechat_appsecret','wechat_token']);
@ -59,6 +62,9 @@ class WechatService
return self::$instance; return self::$instance;
} }
/**
* 微信接口
*/
public static function serve() public static function serve()
{ {
$wechat = self::application(true); $wechat = self::application(true);
@ -364,6 +370,11 @@ class WechatService
return self::paymentService()->refund($orderNo,$refundNo,$totalFee,$refundFee,$opUserId,$type,$refundAccount,$refundReason); return self::paymentService()->refund($orderNo,$refundNo,$totalFee,$refundFee,$opUserId,$type,$refundAccount,$refundReason);
} }
/**订单退款
* @param $orderNo
* @param array $opt
* @return bool
*/
public static function payOrderRefund($orderNo, array $opt) public static function payOrderRefund($orderNo, array $opt)
{ {
if(!isset($opt['pay_price'])) exception('缺少pay_price'); if(!isset($opt['pay_price'])) exception('缺少pay_price');
@ -409,6 +420,10 @@ class WechatService
return self::application()->js; return self::application()->js;
} }
/** jsSdk
* @param string $url
* @return array|string
*/
public static function jsSdk($url = '') public static function jsSdk($url = '')
{ {
$apiList = ['onMenuShareTimeline', 'onMenuShareAppMessage', 'onMenuShareQQ', 'onMenuShareWeibo', 'onMenuShareQZone', 'startRecord', 'stopRecord', 'onVoiceRecordEnd', 'playVoice', 'pauseVoice', 'stopVoice', 'onVoicePlayEnd', 'uploadVoice', 'downloadVoice', 'chooseImage', 'previewImage', 'uploadImage', 'downloadImage', 'translateVoice', 'getNetworkType', 'openLocation', 'getLocation', 'hideOptionMenu', 'showOptionMenu', 'hideMenuItems', 'showMenuItems', 'hideAllNonBaseMenuItem', 'showAllNonBaseMenuItem', 'closeWindow', 'scanQRCode', 'chooseWXPay', 'openProductSpecificView', 'addCard', 'chooseCard', 'openCard']; $apiList = ['onMenuShareTimeline', 'onMenuShareAppMessage', 'onMenuShareQQ', 'onMenuShareWeibo', 'onMenuShareQZone', 'startRecord', 'stopRecord', 'onVoiceRecordEnd', 'playVoice', 'pauseVoice', 'stopVoice', 'onVoicePlayEnd', 'uploadVoice', 'downloadVoice', 'chooseImage', 'previewImage', 'uploadImage', 'downloadImage', 'translateVoice', 'getNetworkType', 'openLocation', 'getLocation', 'hideOptionMenu', 'showOptionMenu', 'hideMenuItems', 'showMenuItems', 'hideAllNonBaseMenuItem', 'showAllNonBaseMenuItem', 'closeWindow', 'scanQRCode', 'chooseWXPay', 'openProductSpecificView', 'addCard', 'chooseCard', 'openCard'];