摘要: <?php $arr = array( 0=>array('id'=>1,'name'=>'1'), 2=>array('id'=>2,'name'=>'2'), 5=>array('id'=>3,'name'=>'3'), 7=>array('id'=>4,'name'=>'4'), ); $ar 阅读全文
posted @ 2020-09-01 10:05 糖糖Y 阅读(1246) 评论(0) 推荐(0) 编辑
摘要: 解决方法有两种; 1.把该页面设置为tab页面或者主页 ; 2.进入该页面使用 wx.reLaunch(); 示例 wx.reLaunch({url: '../detail/detail',}) 这样有一个弊端,就是会销毁其它所有的页面。 转载:https://blog.51cto.com/1350 阅读全文
posted @ 2020-08-28 13:07 糖糖Y 阅读(4192) 评论(0) 推荐(0) 编辑
摘要: 场景: thinkphp3.2.3 后台接口为非url传参,微信小程序端用post传参问题描述:接口取不到参数数据,用 I()函数,$_GET,$_REQUEST,$_POST等都取不到数据 解决:后台用 $data = file_get_contents("php://input"); publi 阅读全文
posted @ 2020-08-28 09:34 糖糖Y 阅读(648) 评论(0) 推荐(0) 编辑
摘要: 生成底部带编号的二维码如下图所示: 具体实现代码如下: <?php namespace App\Http\Controllers\Api; use App\Models\OrderGoods; use Illuminate\Foundation\Application; use Illuminate 阅读全文
posted @ 2020-08-21 11:10 糖糖Y 阅读(415) 评论(0) 推荐(0) 编辑
摘要: 1、下载 PHPExcel 直接去github下载 https://github.com/PHPOffice/PHPExcel 2、在 app 目录下新建 libs 目录,将下载的 PHPExcel 放入 libs 目录下,如下图 3、在项目根目录的 composer.json 文件中添加 "app 阅读全文
posted @ 2020-08-21 11:00 糖糖Y 阅读(723) 评论(0) 推荐(0) 编辑
摘要: 1、首先查看vendor 文件夹中有没有 maatwebsite/excel 依赖,若没有在项目根目录下使用Composer安装依赖 composer require "maatwebsite/excel:~2.1.0" 2、在config/app.php中注册服务提供者到providers数组 M 阅读全文
posted @ 2020-08-20 14:37 糖糖Y 阅读(606) 评论(0) 推荐(0) 编辑
摘要: PHP 版本需切换到 PHP7即可解决此问题 阅读全文
posted @ 2020-08-20 14:21 糖糖Y 阅读(716) 评论(0) 推荐(0) 编辑
摘要: 在项目中,删除了 .env的APP_KEY的值,再运行 以下命令生成APP_KEY的值,访问 依然是The only supported ciphers are AES-128-CBC and AES-256-CBC with the correct key lengths错误信息; php art 阅读全文
posted @ 2020-08-20 14:13 糖糖Y 阅读(450) 评论(0) 推荐(0) 编辑
摘要: 出现-41003错误的原因可能如下: 1、encryptedData中有+号或者iv内空格导致解密失败,解决方法为小程序端给接口传递参数时使用encodeURIComponent()进行数据编码后再传,在接口中使用urldecode()解码; 2、code值的问题,在onShow中调用wx.logi 阅读全文
posted @ 2020-08-17 11:53 糖糖Y 阅读(3184) 评论(0) 推荐(0) 编辑
摘要: 微信小程序 动态添加view、input、picker等,添加之后取到input或者picker的值传给后台时,取到的这些值为数组,因为动态添加的无法给它们设置唯一的name值或class值。效果如下: index.wxml <!-- checkout.wxml --> <view class="c 阅读全文
posted @ 2020-08-14 13:33 糖糖Y 阅读(598) 评论(0) 推荐(0) 编辑