08 2020 档案

摘要:解决方法有两种; 1.把该页面设置为tab页面或者主页 ; 2.进入该页面使用 wx.reLaunch(); 示例 wx.reLaunch({url: '../detail/detail',}) 这样有一个弊端,就是会销毁其它所有的页面。 转载:https://blog.51cto.com/1350 阅读全文
posted @ 2020-08-28 13:07 糖糖Y 阅读(4497) 评论(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 阅读(753) 评论(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 阅读(520) 评论(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 阅读(823) 评论(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 阅读(817) 评论(0) 推荐(0)
摘要:PHP 版本需切换到 PHP7即可解决此问题 阅读全文
posted @ 2020-08-20 14:21 糖糖Y 阅读(771) 评论(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 阅读(554) 评论(0) 推荐(0)
摘要:出现-41003错误的原因可能如下: 1、encryptedData中有+号或者iv内空格导致解密失败,解决方法为小程序端给接口传递参数时使用encodeURIComponent()进行数据编码后再传,在接口中使用urldecode()解码; 2、code值的问题,在onShow中调用wx.logi 阅读全文
posted @ 2020-08-17 11:53 糖糖Y 阅读(3513) 评论(0) 推荐(0)
摘要:微信小程序 动态添加view、input、picker等,添加之后取到input或者picker的值传给后台时,取到的这些值为数组,因为动态添加的无法给它们设置唯一的name值或class值。效果如下: index.wxml <!-- checkout.wxml --> <view class="c 阅读全文
posted @ 2020-08-14 13:33 糖糖Y 阅读(703) 评论(0) 推荐(0)
摘要:// 第一天$start = date('Y-m-01', time()); echo $start; // 最后一天 $end = date('Y-m-d',strtotime("$start +1 months-1 day")); echo $end; 阅读全文
posted @ 2020-08-14 11:40 糖糖Y 阅读(229) 评论(0) 推荐(0)
摘要:效果图 文件夹列表 popup.wxml <view class="wx-popup" hidden="{{flag}}"> <view class='popup-container'> <view class="wx-popup-title">{{title}}</view> <view clas 阅读全文
posted @ 2020-08-13 10:58 糖糖Y 阅读(1354) 评论(0) 推荐(0)
摘要:index.wxml <view class="container"> <view class="matter"> <image wx:for="{{info}}" src="{{item.pic}}" style="width: {{imagewidth}}px; height: {{imageh 阅读全文
posted @ 2020-08-13 10:41 糖糖Y 阅读(2020) 评论(0) 推荐(0)
摘要:wxml <image wx:for="{{info}}" src="{{item.pic}}" bindtap="preview" data-list="{{item.pic}}" data-src="{{item.pic}}"></image> js Page({ //图片预览 preview: 阅读全文
posted @ 2020-08-13 09:06 糖糖Y 阅读(255) 评论(0) 推荐(0)
摘要:<div class="mobile"></div> 1 .mobile{ 2 width: 360px; 3 height: 710px; 4 background: url(/static/backend/image/bgiphone2.jpg); 5 background-repeat: no 阅读全文
posted @ 2020-08-13 08:52 糖糖Y 阅读(286) 评论(0) 推荐(0)
摘要:页面使用form表单,button放在form表单中,没有设置type类型,默认为submit提交,所有打开弹窗的时候就会出现一闪而过就消失的问题。 解决方法:给button添加 type='button' 阅读全文
posted @ 2020-08-11 15:52 糖糖Y 阅读(879) 评论(0) 推荐(0)
摘要:1 <?php 2 3 class IndexController extends Controller 4 { 5 public function index(Request $request){ 6 $course_id = $request->input("course_id"); 7 $li 阅读全文
posted @ 2020-08-11 15:48 糖糖Y 阅读(647) 评论(0) 推荐(0)
摘要:1 <?php 2 3 $arr = [ 4 [ 5 'id'=>1, 6 'name'=>'Tom' 7 ], 8 [ 9 'id'=>2, 10 'name'=>'Tom' 11 ], 12 [ 13 'id'=>3, 14 'name'=>'Tom' 15 ], 16 [ 17 'id'=>4 阅读全文
posted @ 2020-08-07 13:29 糖糖Y 阅读(2472) 评论(0) 推荐(0)
摘要:wxml页面: 1 <view class="container"> 2 <view wx:for="{{info}}" data-index="{{index}}" class="card" id="{{item.id}}" style="position: absolute; left:{{it 阅读全文
posted @ 2020-08-07 09:40 糖糖Y 阅读(1565) 评论(0) 推荐(0)
摘要:效果图: HTML页面代码 1 <div class="layui-form-item"> 2 <label class="layui-form-label">收货地址</label> 3 <div class="layui-input-inline" style="width: 20%;"> 4 阅读全文
posted @ 2020-08-07 09:16 糖糖Y 阅读(688) 评论(0) 推荐(0)