自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(40)
  • 收藏
  • 关注

原创 vue 对后端返回字段值为null的变成空字符串

12313

2023-08-28 15:53:25 1181

原创 微信小程序去除button默认样式

【代码】微信小程序去除button默认样式。

2023-04-21 13:28:34 847

原创 微信小程序自动滚动到底部

微信小程序

2022-09-14 08:42:28 1133

原创 css 左箭头右箭头

css 左箭头右箭头

2022-09-07 16:12:08 723

原创 微信小程序标题栏高度自适应

123

2022-09-07 08:53:24 206

原创 微信小程序改变swiper轮播图上点的位置

微信小程序改变swiper轮播图上点的位置

2022-07-26 09:40:55 651

原创 父元素内固定到底部

<div class="container-element"> <div class="element-to-stick-to-bottom"> </div></div>css.element-to-stick-to-bottom { position: absolute; bottom: 0;}.container-element { position: relative;}

2022-04-16 10:39:20 288

原创 微信小程序获取当前城市

ak需要在百度地图api官网去注册,然后创建一个应用,如此便可拿到您的ak。Page({ data: { currentCity: '' }, onLoad: function (options) { this.getLocation(); }, getLocation: function () { var page = this wx.getLocation({ type: 'wgs84', //默认为 wgs84 返回 gps 坐标...

2022-03-15 14:47:26 1579

原创 onclick多个不同类型传参字符串转义

\''+ item.warehouse+ '\'

2022-01-13 14:07:29 154

原创 html获取多个input框 select框的内容 radio回显

把name属性设置成一样的$("input[name='familyTableId']").each(function(i,item){ });$("select[name='operationList']").each(function(j,item3){ });

2021-12-24 11:36:41 485

原创 html 打印table内容

第一步 添加iframe<iframe id="iframe1" style="display: none"></iframe>打印的click事件function preview(){ bdhtml=$("#dayin").html();//需要打印的内容 sprnstr="<!--startprint-->"; //开始打印标识字符串有17...

2021-12-24 11:32:42 484

原创 html点击table当前行变背景色

#main_boxhui .aabba{background: #E9F2FF;}$(document).on('click', '#main_boxhui tr', function () { var trs = $(this).parent().find('tr'); //获取所有tr if(trs.hasClass('aabba')){ //判断这些tr 有没有Class ‘...

2021-12-09 15:16:11 692

原创 html 清除select选中

$('#projectaccount option:selected').removeAttr('selected');

2021-11-25 17:13:18 890

原创 火狐window.location.reload()不起效果

window.location.reload() 变成 window.location.href=window.location.href

2021-11-13 16:49:12 936

原创 html 子父onclick 事件只执行一次

window.event? window.event.cancelBubble = true : e.stopPropagation();//阻止向上冒泡

2021-11-06 09:43:47 306

原创 html 页面之间传值 接收

url="index.html?id=2"$.query.get("id");需引入这个js/*** jQuery.query - Query String Modification and Creation for jQuery* Written by Blair Mitchelmore (blair DOT mitchelmore AT gmail DOT com)* Licensed under the WTFPL (http://sam.zoy.org/wtfpl/).* D.

2021-10-26 16:30:43 456

原创 uniapp app端返回上一页停留之前页面位置

onPageScroll(e) { this.scroll=e.scrollTop }, var timer = setTimeout(() => { uni.pageScrollTo({ duration: 0, //过渡时间必须为0,uniapp bug,否则运行到手机会报错 ...

2021-10-18 08:48:33 1496

原创 html 兼容火狐请求

$.ajaxSettings.async = false;//设置成同步 $.post("{:U('/Reception/editConsulting')}", function (res) { window.history.go(-1);//当button type属性等于button生效 }, "json"); $.ajaxSettings.async = true...

2021-09-26 13:30:45 83

原创 css隐藏页面元素

.hide {opacity: 0;}opacity属性的意思是设置一个元素的透明度。它不是为改变元素的边界框(bounding box)而设计的。这意味着将opacity设为0只能从视觉上隐藏元素。而元素本身依然占据它自己的位置并对网页的布局起作用。它也将响应用户交互.hide {visibility: hidden;}将它的值设为hidden将隐藏我们的元素。如同opacity属性,被隐藏的元素依然会对我们的网页布局起作用。与opacity...

2021-09-03 17:22:33 108

原创 微信小程序中字符串转JSON

var resData = data.replace("", "");(data等于后端返回的数据) //去掉utf8编码的BOM头 resData = resData.replace(/\ufeff/g, ""); console.log('test2: '+resData); var jsonObj = JSON.parse(resData);...

2021-09-01 13:52:47 1416

原创 js时间戳转日期

(new Date(parseInt(time))).toLocaleDateString()

2021-06-15 10:22:28 71

原创 position:absolute水平居中

position: absolute;left: 0;right:0;margin: 0 auto;

2021-06-11 15:47:15 1258 1

原创 uni.showModal

uni.showModal({ title: '提示', content: '您已参加并通过本次考试,是否再次进行考试?', cancelText: "取消", // 取消按钮的文字 confirmText: "开始考试", // 确认按钮文字 showCancel: true, // 是否显示取消按钮,默认为 true confirmColor: '#f55850', cancelColor: '#39B54A', success: (res) => { i.

2021-05-10 10:24:52 3611

原创 vue转义字符串

label="`共计${item.index}`"

2021-01-20 11:49:20 6332

原创 微信小程序线上日志

1.根目录下创建log.jsvar log = wx.getRealtimeLogManager ? wx.getRealtimeLogManager() : nullmodule.exports = { info() { if (!log) return log.info.apply(log, arguments) }, warn() { if (!log) return log.warn.apply(log, arguments) }, error() { if (

2021-01-09 08:39:31 1166

原创 js数组去重

Hash:functionunique(arr=[]){if(arr.length===0||arr.length===1){returnarr;}constnewArray=[];consthash={};for(leti=0;i<arr.length;i++){if(!hash[arr[i]]){hash[arr[i]]=1;newArray.push(...

2020-12-25 13:15:17 40

原创 uniapp小程序打开文件以后分享文件

uni.downloadFile({url: msg.ext.file.url, //文件路径filePath:wx.env.USER_DATA_PATH+"/"+msg.ext.file.filename, //文件系统中的用户目录路径success: (res) => {if (res.statusCode === 200) {console.log(res)const filePath = res.filePathconsole.log(filePath)wx.openDocum

2020-12-11 10:23:08 947 1

原创 vue过滤器处理金额

{{item.realMoney|filterMoney}}filters: {filterMoney(value) {return (value/100).toFixed(2);}},

2020-10-11 15:57:05 499

原创 小程序,uniapp,微信支付

wx.requestPayment({ timeStamp: res.data.result.timeStamp, nonceStr: res.data.result.nonceStr, package: res.data.result.package, signType: res.data.result.signType, paySign: res.data.result.paySign, success (res) { un...

2020-09-29 09:47:01 91

原创 微信小程序获取位置信息再次唤起授权信息

//页面加载判断是否授权 created() { this.checkGetLaction() }, //声明获取位置授权方法 getLocation() { var that = this wx.getLocation({ type: 'wgs84', success(res) { uni.setStorageSync('latitude', res.latitude) uni.setStorageSync('longitu..

2020-09-19 17:12:34 578

原创 vue跳转页面传对象

***传参***let arr=encodeURIComponent(JSON.stringify(i)) 把字符串作为 URI 组件进行编码。 wx.navigateTo({ url: '/pages/information/information?arr='+arr, }) ***接参*** onLoad: function (options) { let cc=JSON.parse(decodeURIComponent(options.arr)) 对en..

2020-09-16 16:28:02 3049

原创 JSON.stringify()与JSON.parse()

JSON.stringify():把json对象转换成字符串JSON.parse():把字符串转换成json对象

2020-09-04 09:21:27 56

原创 vue-element-ui前端解决跨域问题

vue-element-ui前端解决跨域问题vue.config.js中devServer下加入 proxy: { '/api': { target: process.env.VUE_APP_BASE_API, changeOrigin: true, pathRewrite: { '^/api': 'api' } }, '/auth': { target: proces

2020-08-21 15:49:26 1824

原创 uni-app input 实时监听input 值

uni-app input 实时监听input 值 *<input type="value" placeholder="请输入" @input="onInput" />*onInput(e){console.log(e.detail)}

2020-08-20 09:56:34 5319 1

原创 查找数组里边某个属性的值

if(this.arr.findIndex(target=>target.checked=false)-1){console.log(“通过”)}else {console.log(“不通过”)}find()函数用来查找目标元素,找到就返回该元素,找不到返回undefined。findIndex()函数也是查找目标元素,找到就返回元素的位置,找不到就返回-1。...

2020-07-08 11:46:11 706

原创 格式化json数组

JSON.stringify(数组)格式化json数组

2020-06-29 15:53:06 596

原创 element-ui框架中switch数据回显

<el-switch v-model="item.functioValue" active-text="否" active-value="0" inactive-text="是" inactive-value="1" > </el-switch>** active-value inactive-value 前边不加...

2020-01-11 14:04:28 3948 4

原创 Mysql时间晚八个小时

关联mysql失败_Server returns invalid timezone. Go to ‘Advanced’ tab and set ‘serverTimezon’时区错误,MySQL默认的时区是UTC时区,比北京时间晚8个小时。所以要修改mysql的时长在mysql的命令模式下,输入:set global time_zone=’+8:00’;再次连接成功...

2020-01-07 14:22:50 281

原创 git常用指令

查看分支 git branch创建分支 git branch 切换分支 git checkout 合并分支 git merge删除分支 git branch -d 查看分支合并图 git - - graph添加当前要提交的项目 git add .提交当前项目 git commit -m’日志’提交到指定分支 git push origin查看状态 git status...

2019-12-30 16:17:09 50

原创 定义变量

1UserVO userVO;List<Userdo> userDOList = ...;List<UserVO> userVOList = new ArrarList<>(userDOList.sizze());for (UserDO userDO : userDOList){ userVO = new UserVO(); userVO.set...

2019-12-27 09:57:24 96

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除