Files
Smart-Farm/app/member/info/Subscribe.php
2025-12-22 14:32:54 +08:00

163 lines
4.1 KiB
PHP

<?php
// +----------------------------------------------------------------------
// | Longbing [ WE CAN DO IT JUST THINK IT ]
// +----------------------------------------------------------------------
// | Copyright Chengdu longbing Technology Co., Ltd.
// +----------------------------------------------------------------------
// | Website http://longbing.org/
// +----------------------------------------------------------------------
// | Sales manager: +86-13558882532 / +86-13330887474
// | Technical support: +86-15680635005
// | After-sale service: +86-17361005938
// +----------------------------------------------------------------------
declare(strict_types=1);
namespace app\member\info;
use app\card\service\UserService;
use longbingcore\diy\BaseSubscribe;
/**
* @author shuixian
* @DataTime: 2019/12/11 16:23
* Class Subscribe
* @package app\ucenter\info
*/
class Subscribe extends BaseSubscribe
{
/**
* 监听代理管理端授权小程序事件
*
* @param $data
* @return array
* @author shuixian
* @DataTime: 2019/12/27 17:33
*/
public function onAgentAppAuthEdit($config){
$permission = new PermissionMember(0);
if($permission->sAuth() && $permission->infoConfig['auth_platform'] ) {
$auth_switch['formType'] = 'radio';
$auth_switch['name'] = 'member_switch';
$auth_switch['value'] = $config ? $config[ $auth_switch['name'] ] : 0;
$auth_switch['title'] = $permission->info['title'];
return [ $auth_switch ];
}
}
/**
* 监听用户中心模块
*
* @return array
* @author shuixian
* @DataTime: 2019/12/18 14:04
*/
// public function onAddUcenterCompoent(){
// $last_staff_id = '#last_staff_id#' ;
//
// $moduleMenuShop = <<<COMPOENT
//{
// "title": "等级会员",
// "type": "moduleMenuMember",
// "icon": "iconMember",
// "isDelete": true,
// "addNumber": 1,
// "attr": [{
// "title": "模板名称",
// "type": "Switch",
// "name": "isShowTitle"
// },
// {
// "title": "选择模板",
// "type": "ChooseModule",
// "name": "module",
// "data": [{
// "title": "一行多列",
// "name": "module-menu-row",
// "img": "http://longbingcdn.xiaochengxucms.com/admin/diy/module-menu-col.jpg"
// },
// {
// "title": "一行一列",
// "name": "module-menu-col",
// "img": "http://longbingcdn.xiaochengxucms.com/admin/diy/module-menu-row.jpg"
// }
// ]
// },
// {
// "title": "一行多少列",
// "type": "InputNumber",
// "name": "row"
// }
// ],
// "data": {
// "isShowTitle": false,
// "module": "module-menu-row",
// "row": {
// "number": 4,
// "min": 2,
// "max": 5,
// "label": "请输入"
// },
// "list": [{
// "title": "我的会员",
// "icon": "iconMember",
// "link": {
// "type": 2,
// "url": "/vip/pages/home"
// }
// }]
// }
//
// }
//COMPOENT;
//
// $permission = new PermissionMember($this->_uniacid);
// $compoentList = [] ;
// if( $this->_uniacid == 0 || $permission->pAuth()){
// $compoentList = [
// json_decode($moduleMenuShop, true)
// ] ;
// }
//
//
//
// return $compoentList ;
// }
/**
* @param $item
* @功能说明:监听支付菜单数据获取
* @author jingshuixian
* @DataTime: 2020/1/7 17:02
*/
// public function onDiyModuleMenuPayqr($item){
// $last_staff_id = UserService::getLastStaffId($this->_uniacid,$this->getUserId()) ;
//
//
// $list = [
// [
// "title" =>"去付款",
// "icon" => "iconwodedingdan1",
// "link"=> [
// "type"=> 2,
// "url"=> "/pay/pages/home?staff_id=".$last_staff_id
// ]
// ]
// ] ;
// $item['data']['list'] = $list ;
// return $item;
//
// }
}