You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
57 lines
1.2 KiB
57 lines
1.2 KiB
<?php
|
|
|
|
namespace app\base\model\platform;
|
|
|
|
use think\model\concern\SoftDelete;
|
|
|
|
class PlatformWeixin extends Base
|
|
{
|
|
use SoftDelete;
|
|
|
|
// 设置当前模型对应的完整数据表名称
|
|
protected $table = 'base_platform_weixin';
|
|
|
|
/**
|
|
* 获取微信公众号配置
|
|
* @date 2022-10-26
|
|
*/
|
|
public function getWeixinPlatformParam()
|
|
{
|
|
$where = [
|
|
['uid', '=', $this->mid],
|
|
['type', '=', 2]
|
|
];
|
|
$field = 'name,app_id,app_secret,is_authenticate,token';
|
|
return $this->getOneData($where, $field);
|
|
}
|
|
|
|
/**
|
|
* 获取微信小程序配置
|
|
* @date 2022-10-26
|
|
*/
|
|
public function getMpWeixinPlatformParam()
|
|
{
|
|
$where = [
|
|
['uid', '=', $this->mid],
|
|
['type', '=', 3]
|
|
];
|
|
$field = 'name,app_id,app_secret,is_authenticate,token';
|
|
return $this->getOneData($where, $field);
|
|
}
|
|
|
|
/**
|
|
* 获取移动应用配置
|
|
* @date 2022-10-26
|
|
*/
|
|
public function getAppWeixinPlatformParam()
|
|
{
|
|
$where = [
|
|
['uid', '=', $this->mid],
|
|
['type', '=', 4]
|
|
];
|
|
$field = 'name,app_id,app_secret,is_authenticate';
|
|
return $this->getOneData($where, $field);
|
|
}
|
|
|
|
}
|