
小程序
Martin -Tang
这个作者很懒,什么都没留下…
展开
-
uniapp或者原生小程序检测更新
【代码】uniapp或者原生小程序检测更新。原创 2024-05-11 15:03:53 · 150 阅读 · 0 评论 -
uniapp - 倒计时组件-优化循环时间倒计时
时间倒计时组件,优化多个时间卡顿问题原创 2023-09-05 15:09:26 · 1540 阅读 · 0 评论 -
uniapp 小程序分享-朋友圈-微信好友
分享-------点击按钮分享<button class="btn2 flex" open-type="share"> <image class="share" :src="imgurl+'images/brand_detail/share.png'" mode="aspectFit"></image>分享</button>onShareAppMessage() { return { title: 分享名称, path: 分享原创 2021-09-16 09:25:14 · 338 阅读 · 0 评论 -
js 数组去掉重复数据----去重
js 数组去掉重复数据----去重// //去掉重复//////////////////////////////var specvalue=[1,2,3,4,5]//数组Array.prototype.distinct = function () { var arr = this, result = [], i, j, len = arr.length; for (i = 0; i < len; i++) {原创 2021-05-22 10:09:07 · 188 阅读 · 0 评论 -
uniapp 小程序唤醒高德地图或腾讯地图进行导航
uniapp 小程序唤醒高德地图或腾讯地图进行导航methods: { mapFun(){ uni.openLocation({ latitude: 29.58832234563708,//纬度 longitude: 106.56436432812498,//经度 name: "电脑城", address: "重庆九龙坡" }); }}原创 2021-04-12 15:11:56 · 3761 阅读 · 0 评论 -
uni-app 图片上传 放大预览图片 单张 多张
//单张图片previewImg(logourl) { let _this = this; let imgsArray = []; imgsArray[0] = logourl uni.previewImage({ current: 0, urls: imgsArray }); },// 预览图片多张//this.imgUrlList图片数组previewImg(index) { let原创 2021-01-18 10:43:59 · 884 阅读 · 0 评论 -
uniapp 点击页面定位到指定位置 锚点跳转方法
uniapp 点击页面定位到指定位置 锚点跳转方法but(){ uni.createSelectorQuery().select('.Follow-auto').boundingClientRect(data=>{//目标位置的节点:类class或者id uni.createSelectorQuery().select(".Follows").boundingClientRect(res=>{//最外层盒子的节点:类class或者id uni.pageScrollTo({ dura原创 2020-12-15 15:54:28 · 13020 阅读 · 5 评论 -
uni-app 弹窗输入
jsexport default { data() { return { userFeedbackHidden: true, // 默认隐藏 feedbackContent: '' ,// 输入数量 }; },showDiv() { // 显示输入弹出框 this.userFeedbackHidden = false;},hideDiv() { // 隐藏输入弹出框 this.userFeedbackHidden = true;},submitFeedback() { //原创 2020-11-26 19:09:00 · 3642 阅读 · 0 评论 -
uni-app 整理基础笔记
数组存取多个数据js数组缓存var lists=[]var arr = new Array(3)arr[0] = this.BankIdarr[1] = this.nunmphonearr[2] = this.idcarlists.push(arr)uni.setStorage({ key:"banksf", data:arr})加粗样式原创 2020-11-17 15:28:23 · 303 阅读 · 0 评论 -
uniapp 富文本编辑器
index.vue文件<template> <view class="container"> <view class="page-body"> <view class='wrapper'> <view class='toolbar' @tap="format"> <view :class="formats.bold ? 'ql-active' : ''" class="iconfont icon-zitijia转载 2020-11-14 15:21:43 · 7295 阅读 · 30 评论 -
uniapp js缓存
存值button(){uni.setStorage({ key:'user', data:data //存值 }) }获取值try { var value = uni.getStorageSync('user')//拿值 if (value!="") { this.name=value } } catch (e) { // Do something w原创 2020-11-05 11:28:04 · 837 阅读 · 1 评论 -
js 时间获取,时间戳转换
uniapp js 时间戳转换时间var dates=12345612var now = new Date(datec*1000);var year = now.getFullYear();var month = now.getMonth() + 1;if (month < 10) { month = '0' + month }var date = now.getDate();if (date < 10) { date = '0' + date }console.log(原创 2020-11-05 14:05:07 · 1177 阅读 · 1 评论 -
js判断电话号码,身份证号码,日期,邮箱,邮政,是否符合规则
@uniapp js判断电话号码是否符合规则var strTemp = /^1[3|4|5|6|7|8|9][0-9]{9}$/;if(strTemp.test(this.phone)){this.phonnumber == true}else{this.phonnumber == false}功能快捷键撤销:Ctrl/Command + Z重做:Ctrl/Command + Y加粗:Ctrl/Command + B斜体:Ctrl/Command + I标题:Ctrl/Command原创 2020-11-05 11:07:20 · 2300 阅读 · 1 评论