130 lines
4.2 KiB
Markdown
Executable File
130 lines
4.2 KiB
Markdown
Executable File
# ThinkPHP 6.0
|
|
|
|
> 运行环境要求 PHP7.1+,兼容 PHP8.0。
|
|
|
|
[官方应用服务市场](https://market.topthink.com) | [`ThinkAPI`——官方统一 API 服务](https://docs.topthink.com/think-api)
|
|
|
|
ThinkPHPV6.0 版本由[亿速云](https://www.yisu.com/)独家赞助发布。
|
|
|
|
## 主要新特性
|
|
|
|
- 采用`PHP7`强类型(严格模式)
|
|
- 支持更多的`PSR`规范
|
|
- 原生多应用支持
|
|
- 更强大和易用的查询
|
|
- 全新的事件系统
|
|
- 模型事件和数据库事件统一纳入事件系统
|
|
- 模板引擎分离出核心
|
|
- 内部功能中间件化
|
|
- SESSION/Cookie 机制改进
|
|
- 对 Swoole 以及协程支持改进
|
|
- 对 IDE 更加友好
|
|
- 统一和精简大量用法
|
|
|
|
## 安装
|
|
|
|
```
|
|
composer create-project topthink/think tp 6.0.*
|
|
```
|
|
|
|
如果需要更新框架使用
|
|
|
|
```
|
|
composer update topthink/framework
|
|
```
|
|
|
|
## 文档
|
|
|
|
[完全开发手册](https://www.kancloud.cn/manual/thinkphp6_0/content)
|
|
|
|
## 参与开发
|
|
|
|
请参阅 [ThinkPHP 核心框架包](https://github.com/top-think/framework)。
|
|
|
|
## 版权信息
|
|
|
|
ThinkPHP 遵循 Apache2 开源协议发布,并提供免费使用。
|
|
|
|
本项目包含的第三方源码和二进制文件之版权信息另行标注。
|
|
|
|
版权所有 Copyright © 2006-2020 by ThinkPHP (http://thinkphp.cn)
|
|
|
|
All rights reserved。
|
|
|
|
ThinkPHP® 商标和著作权所有者为上海顶想信息科技有限公司。
|
|
|
|
更多细节参阅 [LICENSE.txt](LICENSE.txt)
|
|
|
|
php 7.4 解除禁用
|
|
|
|
```sh
|
|
proc_open
|
|
putenv
|
|
composer install
|
|
php think run
|
|
|
|
composer require phpoffice/phpspreadsheet
|
|
composer require yzalis/identicon
|
|
composer require topthink/think-image
|
|
php think UserStatisticsHour
|
|
```
|
|
##
|
|
1. 接入微信小程序订单(需要订单页面,订单详情页面)
|
|
2. 修改前端支付页面,当抽数不够时,只显示对应的按钮。
|
|
3.
|
|
|
|
|
|
SELECT goods_id,goods_title,goods_price,order_total,order_zhe_total,price,use_money,use_integral,use_money2,addtime,pay_time,prize_num,use_coupon FROM `order` where user_id=21544 and status=1
|
|
|
|
##
|
|
原抽无限赏奖逻辑(内存消耗过大,不在使用)
|
|
```sh
|
|
// #组合中奖商品
|
|
// $all_goods_id = [];
|
|
// foreach ($goodslist as $value) {
|
|
// $real_pro1 = $value['real_pro'];
|
|
// $real_pro = $real_pro1 * 100000;
|
|
// for ($i = 1; $i <= $real_pro; $i++) {
|
|
// $all_goods_id[] = $value['id'];
|
|
// }
|
|
// }
|
|
|
|
// for ($i = 0; $i < $prize_num; $i++) {
|
|
// #随机打乱
|
|
// shuffle($all_goods_id);
|
|
// shuffle($all_goods_id);
|
|
// $prize_id = $all_goods_id[0];
|
|
// $prize_info = GoodsList::where(['id' => $prize_id])->find();
|
|
// #编号
|
|
// $luck_no = OrderList::field('id')
|
|
// ->where('goods_id', '=', $goods_id)
|
|
// ->where('num', '=', 0)
|
|
// ->where('order_type', '=', $order_type)
|
|
// ->order('id desc')
|
|
// ->value('luck_no');
|
|
// $luck_no++;
|
|
// #新增记录
|
|
// $save_prize_info = [
|
|
// 'order_id' => $order_id,
|
|
// 'user_id' => $user_id,
|
|
// 'status' => 0,#0未操作 1选择兑换 2选择发货
|
|
// 'goods_id' => $goods_id,
|
|
// 'num' => 0,
|
|
// 'shang_id' => $prize_info['shang_id'],
|
|
// 'goodslist_id' => $prize_info['id'],
|
|
// 'goodslist_title' => $prize_info['title'],
|
|
// 'goodslist_imgurl' => $prize_info['imgurl'],
|
|
// 'goodslist_price' => $prize_info['price'],
|
|
// 'goodslist_money' => $prize_info['money'],
|
|
// 'goodslist_type' => $prize_info['goods_type'],
|
|
// 'goodslist_sale_time' => $prize_info['sale_time'],
|
|
// 'addtime' => time(),
|
|
// 'prize_code' => $prize_info['prize_code'],
|
|
// 'order_type' => $order_type,
|
|
// 'luck_no' => $luck_no,
|
|
// ];
|
|
// #入库===
|
|
// $res[] = OrderList::insert($save_prize_info);
|
|
// }
|
|
|
|
``` |