PHP移动端用户登录 生成随机唯一 appToken
摘要:/** * 生成随机唯一 appToken * @return string */ public function getAppToken() { //strtoupper转换成全大写的 $charid = strtoupper(md5(uniqid(mt_rand(), true))); retu
阅读全文
PHP 生成永远唯一的密钥码、激活码自定义方法函数
摘要:/** * 生成永远唯一的密钥码 * sha512(返回128位) sha384(返回96位) sha256(返回64位) md5(返回32位) * 还有很多Hash函数...... * @author xiaochaun * @param int $type 返回格式:0大小写混合 1全大写 2全
阅读全文
微信小程序 map组件 include-points 缩放视野以包含所有给定的坐标点
摘要:代码如下: <template> <view> <view class="page-body"> <view class="page-section page-section-gap"> <map style="width: 99%; height: 99vh;" show-compass :lat
阅读全文
获取JS一定范围的随机整数
摘要:function getRand($min, $max) { var rand = Math.random(); return Math.round($min + rand*($max - $min)); }
阅读全文