- 博客(31)
- 资源 (2)
- 收藏
- 关注
原创 tp5 对接万维易源ISBN接口
首先购买万维易源的一元套餐下面都有详细的说明接口返回的数据格式是{ "showapi_res_error": "", "showapi_res_code": 0, "showapi_res_id": "", "showapi_res_body": { "datas": [ { "series": "", "edition": "1版", "yinci": "1", "subject": ""
2021-07-17 14:51:59
454
1
原创 tp5 微信授权
<?php/** * Created by PhpStorm. * User: COLORFUL * Date: 2019/6/27 * Time: 14:24 */namespace app\api\controller;use app\admin\model\apps\Apps;use Complex\Exception;use think\Cache;use think\Controller;use think\Db;class Wxcontroller exten.
2021-07-17 14:39:29
233
原创 tp5 对接腾讯云聊天
首先可以使用腾讯集成的包来对接更加的便捷composer require tencent/tls-sig-api-v2即时通讯文档:https://cloud.tencent.com/document/product/269/32688然后就是在注册的时候把用户信息传给腾讯,也就是导入账号,文档里面都很详细,下面是我写的简单的方法public function importSingle($user_id,$nickname,$avatar){ $params = [
2021-07-17 14:35:43
1015
原创 fastadmin 新增操作按钮成功刷新页面
,buttons: [ { name: 'warehouses', text: '入库', title: '入库', icon: 'fa', classname: 'btn btn-xs btn-success btn-ajax', url: 'orders/orders/warehouses', success: fun.
2021-07-17 14:09:46
2062
原创 tp5对接阿里云短信
<?phpnamespace app\api\controller;use AlibabaCloud\Client\DefaultAcsClient;use AlibabaCloud\Client\Profile\DefaultProfile;use AlibabaCloud\Dysmsapi\Dysmsapi;use AlibabaCloud\Dysmsapi\V20170525\SendSms;use AlibabaCloud\SDK\Dysmsapi\V20170525\Mod.
2021-07-15 17:58:16
799
2
原创 初学uniapp --引用css
<style> @import url("../../static/css/index.css"); </style>
2021-07-15 17:53:24
205
原创 初学uniapp 请求接口
data() { return { title: 'Hello', bannerlist:[], age:[], new_shelf:[], btnnum: 0, borrow_list:[], general_list:[], } }, onLoad() { }, onShow() { this.getInfo(); }, methods: { getInfo(){ uni.re.
2021-07-15 17:51:05
510
原创 tp5或者fastadmin 引用PHPExcel 报 Class ‘PHPExcel‘ not found
直接使用Vendor('phpoffice.phpexcel.Classes.PHPExcel'); Vendor('phpoffice.phpexcel.Classes.PHPExcel.IOFactory.PHPExcel_IOFactory');引用就可以使用PHPspreadsheeet PHP7以上会报网站找不到 ,还是phpexcel 靠谱点
2021-07-15 17:48:20
1503
原创 tp5 构造方法和初始化方法里面return 无效
可以用exit( json(['status' => -2000, 'message' => '请先登录'])->send());
2021-07-03 10:20:11
415
原创 fastadmin 前台请求路径传参
路径:https://aa.com/app.php/user/user?createtime=today&ref=addtabs获取$createtime=input('createtime');$this->assignconfig('createtime',$createtime);js里面 Table.api.init({ extend: { index_url: 'user/user/ind
2021-07-03 10:14:16
1387
原创 fastadmin js 列表表格样式修改
{field: 'books.title', title: __('绘本信息'), operate: 'LIKE' ,cellStyle:function(value,row,index){ return {css:{"width":"350px"}}},formatter:function(value,row,index){ return '<div class="r..
2021-07-03 09:36:47
1392
原创 最近用的的一些小方法
1.获取最近七天内的日期function get_weeks($time = '', $format='Y-m-d'){ $time = $time != '' ? $time : time(); //组合数据 $date = []; for ($i=1; $i<=7; $i++){ $date[$i] = date($format ,strtotime( '+' . $i-7 .' days', $time)); } return
2021-07-01 18:03:03
151
原创 fastadmin select 多选 全选 和取消全选方法
1.<div class="form-group"> <label class="control-label col-xs-12 col-sm-2">{:__('Category_id')}:</label> <div class="col-xs-12 col-sm-8"> <input id="c-category_id" data-rule="required" data-source..
2021-07-01 17:38:28
3269
原创 tp5 获取小程序直播间列表
1、接口介绍请求URLhttps://api.weixin.qq.com/wxa/business/getliveinfo?access_token=请求参数示例: json{“start”: 0, // 起始拉取房间,start = 0 表示从第 1 个房间开始拉取“limit”: 10 // 每次拉取的个数上限,不要设置过大,建议 100 以内}请求参数含义参数 类型 必填 说明start Number 是 起始房间,0表示从第1个房间开始拉取limit Number 是 每次拉取
2020-08-15 11:03:41
1149
原创 fastadmin 自己对接百度编辑器
1、在require-backend.js中增加配置项require.config({ urlArgs: "v=" + requirejs.s.contexts._.config.config.site.version, packages: [{ name: 'moment', location: '../libs/moment', main: 'moment' } ], //在打包压缩时将会把include中的模块合
2020-08-15 10:52:11
1425
1
原创 php对接linepay支付
请访问https://github.com/yidas/line-pay-sdk-php,里面写的都很详细我说一下我遇到的几种报错情况:1、申请支付调requestAPI时总是会报付款金額= sum(packages[].amount) + sum(packages[].userFee) + options.shipping.feeAmount;这是在提醒你你的商品的总金额不等于支付时的总金额,个人建议把多商品订单当成一个商品去支付,避免出错。2、确认支付时confirmAPI 报错1159:无
2020-07-03 10:02:35
1414
2
转载 tp5 PHPExcle 导出多商品订单
tp5 PHPExcle 导出多商品订单例子代码:public function export(){ if ($this->request->isPost()) { set_time_limit(0); $search = $this->request->post('search'); $ids = $this->request->post('ids');
2020-06-17 15:10:50
910
原创 fastadmin 仿选择图片页面做的 选择商品,其他类似
1.html 页面 <div class="form-group"> <label class="control-label col-xs-12 col-sm-2">{:__('關聯商品')}:</label> <div class="col-xs-12 col-sm-8"> <di...
2020-04-29 09:38:19
1426
4
原创 查询数据库中某个值是否在这个字段中
例如:字段名为 category_id 数据库中的值为 (1,2,3);查询2是否是这个字段中的值就用find_in_setdb('goods')->where('find_in_set(2,category_id)')->select();
2020-04-29 09:24:36
482
原创 被软删除的数据怎么用model查出来
$good = model('goods')->withTrashed()->where(['id' => $data['goods_id']])->find();
2020-04-21 17:37:03
975
原创 取出编辑器中的图片
if (strpos($goods['content'],'< img src="') !== false){ $goods['content'] = str_replace('< img src="','< img src="'.DOMAIN,$goods['content']);}//去除标签和字符 $goods['content'] = html...
2020-04-21 17:35:58
210
原创 主从数据库搭建
参考文档:https://blog.youkuaiyun.com/xlgen157387/article/details/51331244/需要两个服务器tp5主从数据库设置读写分离文档https://blog.youkuaiyun.com/qq_26182959/article/details/78466320查询数据库操作日志命令:SHOW VARIABLES LIKE "genera...
2020-04-21 17:34:26
133
原创 phpcms被攻击的解决方案
1.搜索跳转到博彩网站:被挂马,需要检查所有html页面是否有这种标签里面的内容需要全部删除,可以利用www目录下的文件debug.js进行批量删除debug.js运行方式通过ssh进入到www目录下以后执行node deBug.js如果还有的话phpcms就检查/caches/configs/database.php里面是否有木马文件,检查caches\configs是否有c...
2020-04-21 17:32:05
1250
原创 git命令行的使用
一.Git的安装与简单配置:https://blog.youkuaiyun.com/qq_23341529/article/details/79331519二、Git的使用1、初始化一个新的git仓库 a、创建文件夹 方法一:点击鼠标右键,新建 方法二:使用git新建:输入命令$ mkdir '文件名' b、在文件内初始化git(创建git...
2020-04-21 17:29:53
232
原创 fastadmin 搜索时怎么让id唯一搜索,以及关联表时报错的解决办法
以前是这样写的不过看了文档才知道只需要在 protected $model = null; protected $relationSearch=true; public function _initialize() { parent::_initialize(); $this->model = new \app\ad...
2020-04-21 17:26:18
1302
原创 fastadmin怎么消除列表上的修改和删除按钮
{field: 'operate', title: __('Operate'), table: table,events: Table.api.events.operate, formatter: function (value, row, index) {var that = $.extend({}, this);var table = $(that.table).clone(tr...
2020-04-21 17:22:08
2705
原创 UM编辑器添加内容到光标处
UM.getEditor('c-save_template').focus();UM.getEditor('c-save_template').execCommand('inserthtml',html);
2020-04-21 16:44:44
283
原创 php 获取二维数组的最后一个数组
可以使用$lastOne = array_pop($array); 弹出二维数组的最后一个数组。 如果还想要再放回去到原来的二维数组,可以使用array_push($array, $lastOne); 再将刚刚array_pop出来的数组放回原数组的末尾即可。...
2020-04-21 16:11:32
3024
原创 关于TP框架隐藏index.php
保证下面这些基础的东西都改掉1. 确认httpd.conf配置文件中加载了mod_rewrite.so模块 2. AllowOverride None 将None改为 All;允许读取.htaccess文件 3. 打开Myapp/Conf/config.php文件,在配置的数组中添加一行: 'URL_MODEL'=>2, 4. 在入口文件所在的同级目录下,新建一个.htac
2017-12-04 18:17:55
4408
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人