摘要: namespace FirstProject.Controllers { [ApiController] [Route("/[controller]")] public class WeatherForecastController : ControllerBase { private readon 阅读全文
posted @ 2020-08-16 22:18 好胖的兔子 阅读(167) 评论(0) 推荐(0) 编辑
摘要: HTML <!-- v-bind:class、v-bind:href等可以拼接vue的data参数 --> <div v-bind:class='['bg'+id]'> {{nickName}} </div> JS var app = new Vue({ el: '#app', data: { ni 阅读全文
posted @ 2020-03-25 16:02 好胖的兔子 阅读(874) 评论(0) 推荐(0) 编辑
摘要: 指定数字范围的随机 //随机2-32之间的数 mt_rand(2, 32); 自定义数组的随机 $colors = ['red','yellow','blue','green','brown']; //参数1:随机的数组 //参数2:指定返回多少个随机键名 //返回的是键名 $colorKey = 阅读全文
posted @ 2020-02-24 16:44 好胖的兔子 阅读(375) 评论(0) 推荐(0) 编辑
摘要: 微信提供给开发者的测试账号平台 https://mp.weixin.qq.com/debug/cgi-bin/sandboxinfo?action=showinfo&t=sandbox/index 微信网页开发文档 https://developers.weixin.qq.com/doc/offia 阅读全文
posted @ 2020-01-03 11:30 好胖的兔子 阅读(5663) 评论(0) 推荐(1) 编辑
摘要: $obj = $('#obj'); $obj.after($obj.clone().val("")); $obj.remove(); $('#obj').attr('readonly', true); 阅读全文
posted @ 2019-12-26 14:57 好胖的兔子 阅读(304) 评论(0) 推荐(0) 编辑
摘要: $arrs = [ 1 => '苹果', 4 => '梨子', 3 => '香蕉', 2 => '哈密瓜' ]; $arrs[0] = '草莓'; print_r($arrs);//结果Array ( [1] => 苹果 [4] => 梨子 [3] => 香蕉 [2] => 哈密瓜 [0] => 草 阅读全文
posted @ 2019-12-26 11:46 好胖的兔子 阅读(103) 评论(0) 推荐(0) 编辑
摘要: public function exportExcel() { $data = [ ['name' => 'aa', 'telephone' => '133xxxx4851'], ['name' => 'bb', 'telephone' => '135xxxx5862'], ['name' => ' 阅读全文
posted @ 2019-12-26 11:32 好胖的兔子 阅读(212) 评论(0) 推荐(0) 编辑
摘要: 获取用户发布消息的指定消息id的总和点赞数 Yii $productIds = ['2260', '2262', '2263', '2268', '2269']; $plSql = Like::find()->where([ 'pId' => $pIds, 'isLike' => 1 ])->sel 阅读全文
posted @ 2019-11-26 17:23 好胖的兔子 阅读(178) 评论(0) 推荐(0) 编辑
摘要: 在开发时候,我们经常使用的是默认的排序规则,但在某些特殊情况下,通过指定顺序来进行排序 -- fileld自定义排序时,应该是非主键的,否则主键是无效 SELECT * FROM customer WHERE telephone IN ( '1832xxxx701', '1739xxxx553', 阅读全文
posted @ 2019-11-26 13:56 好胖的兔子 阅读(472) 评论(0) 推荐(0) 编辑
摘要: 实例一 obj.attr('data-max-width','aa'); obj.data('max-width') 问题 data只会获取第一次select赋值的值 区别 .data每次是从jquery对象中取值,其属性值保存在内存中 .attr每次都是从dom元素中去取属性的值 解决 .attr 阅读全文
posted @ 2019-10-30 14:19 好胖的兔子 阅读(1489) 评论(0) 推荐(0) 编辑