【类 型】:test
【主 题】: 【描 述】:公共函数测试 [原因]: [过程]: [影响]: 【结 束】 # 类型 包含: # feat:新功能(feature) # fix:修补bug # docs:文档(documentation) # style: 格式(不影响代码运行的变动) # refactor:重构(即不是新增功能,也不是修改bug的代码变动) # test:增加测试 # chore:构建过程或辅助工具的变动
This commit is contained in:
parent
9ad9cc29f1
commit
81e28ba2fb
@ -55,15 +55,6 @@ class PublicController extends Controller
|
|||||||
$jsoninfo = json_decode($output, true);
|
$jsoninfo = json_decode($output, true);
|
||||||
return $jsoninfo;
|
return $jsoninfo;
|
||||||
}
|
}
|
||||||
/**
|
|
||||||
* @description: 构建 用户订阅对应主题的前缀
|
|
||||||
* @param {*} openid 微信用户唯一凭证
|
|
||||||
* @return {*} topicPrefix 主题前缀
|
|
||||||
*/
|
|
||||||
protected function makeTopicPrefix($openid)
|
|
||||||
{
|
|
||||||
return substr(md5($openid . date("j")), 0, 8); //用户id+当天日 加密 截取前8位
|
|
||||||
}
|
|
||||||
/**
|
/**
|
||||||
* @description: 构建token
|
* @description: 构建token
|
||||||
* @param {*} openid 微信用户唯一凭证
|
* @param {*} openid 微信用户唯一凭证
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
|
||||||
* Think 系统函数库
|
|
||||||
*/
|
|
||||||
/**
|
/**
|
||||||
* @description: 构建加密 微信用户订阅对应主题的前缀
|
* @description: 构建加密 微信用户订阅对应主题的前缀
|
||||||
* @param {*} openid 微信用户唯一凭证
|
* @param {*} openid 微信用户唯一凭证
|
||||||
@ -12,3 +9,7 @@ function makeTopicPrefix($openid)
|
|||||||
{
|
{
|
||||||
return substr(md5($openid . date("j")), 0, 8); //用户id+当天日 加密 截取前8位
|
return substr(md5($openid . date("j")), 0, 8); //用户id+当天日 加密 截取前8位
|
||||||
}
|
}
|
||||||
|
function demo()
|
||||||
|
{
|
||||||
|
echo "hello";
|
||||||
|
}
|
||||||
|
@ -8,6 +8,7 @@ class IndexController extends Controller
|
|||||||
{
|
{
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
|
demo();
|
||||||
$this->display();
|
$this->display();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user