uniapp
呱嗨喵
这个作者很懒,什么都没留下…
展开
-
uniapp获取经纬度
注意 "requiredPrivateInfos": ["chooseLocation", "getLocation"] 这个之前版本是默认就可以用的 现在得必须配置对应得函数api才行。首先配置manifest.json源码里的 mp-weixin 项。原创 2023-06-19 22:37:52 · 543 阅读 · 0 评论 -
uniapp 九宫格抽抽奖
【代码】uniapp 九宫格抽抽奖。原创 2023-06-16 10:16:38 · 670 阅读 · 0 评论 -
公共部分的css (unapp、 vue、小程序)
【代码】公共部分的css (unapp、 vue)原创 2023-06-13 17:51:59 · 216 阅读 · 1 评论 -
uniapp 定位失败
【代码】uniapp 定会失败。原创 2023-05-30 15:59:43 · 449 阅读 · 0 评论 -
自定义进度条
【代码】自定义进度条。原创 2023-05-29 13:28:08 · 56 阅读 · 0 评论 -
vue3 跨组件传参
【代码】vue3 跨组件传参。原创 2023-05-29 12:49:13 · 197 阅读 · 0 评论 -
vue uniapp ref动态更改dom样式 (微信小程序里面 获取dom ,ref微信小程序用不了)
【代码】vue uniapp ref动态更改dom样式 (微信小程序里面 获取dom ,ref微信小程序用不了)原创 2023-05-28 12:14:24 · 1562 阅读 · 0 评论 -
csss 旋转过度动画 和style三元判断
<template><view class="content"> <view class="text-area" @click="showbut"> <!-- <text class="title" style="transform: rotate(180deg); animation: 1;">{{title}}</text> --> <text class="title" :style="{'transfo原创 2022-12-12 11:26:17 · 272 阅读 · 0 评论 -
简单封装uniapp接口 (是按需引入的)
【代码】简单封装uniapp接口 (是按需引入的)原创 2022-09-20 10:29:04 · 418 阅读 · 0 评论 -
小程序在线更新功能
【代码】小程序在线更新功能。原创 2022-09-16 14:42:46 · 178 阅读 · 0 评论 -
查字符串或者查对象值去重
【代码】查字符串或者查对象值去重。原创 2022-09-01 19:00:35 · 73 阅读 · 0 评论 -
uniapp 防抖、节流、网络连接处理 、跳转传参
/** * @description 防抖 * const debounceFn = debounce(function() { }[, 1000]) * debounceFn(args) * or * handleFn: debounce(function() {this.fn()}, 1000) * @param {Function} fn * @param {Number} [delay] 500 * @return {Function} */const debounce = (f原创 2022-08-27 09:48:07 · 669 阅读 · 0 评论 -
生成二维码
https://download.csdn.net/download/YUlangML/85774075原创 2022-06-25 17:23:36 · 791 阅读 · 0 评论 -
小程序跳装到公众号
uyTXhl3OUFqI7eX0ja8uvw原创 2022-06-25 11:21:38 · 103 阅读 · 0 评论 -
简单封装 js并应用
test原创 2022-06-25 11:15:57 · 80 阅读 · 0 评论 -
h5跳小程序
就可//以了。原创 2022-06-22 09:10:42 · 142 阅读 · 0 评论 -
uniapp 轮播 需要请求接口 vuex 获取用户信息生成海报
x原创 2022-06-20 11:38:51 · 223 阅读 · 0 评论 -
vue-drag-resize拖拽组件的简单使用
vue3npm i -s vue-drag-resize@next//局部使用<template> <div class="home"> <div class="pos"> <VueDragResize class="list" :isActive="true" :w="width" :h="height" v-on:resizing="resize.原创 2022-05-31 14:31:53 · 2459 阅读 · 0 评论 -
简单缩放动画效果
transform: scale(1);//1是原画 transition-duration: 0.6s;//动画效果延时器transform: scale(0.9);//小于一缩小,大于一放大 transition-duration: 0.6s;//动画效果延时器原创 2022-05-30 11:22:21 · 184 阅读 · 0 评论 -
u-popup改主体白块方法
methods: {},options: { styleIsolation: 'shared' },//然后再样式里/deep/.u-mode-center-box { background-color: transparent !important; }原创 2022-05-25 17:29:06 · 417 阅读 · 0 评论 -
uni.navigateBack 返回上一页 刷新上一页数据 调用接口
//页代码onShow() { this.getListData(true);//调接口 },//接口async getListData(show) { this.isLoading = true;//11111111111111111111111111111111111111111111111111111 //重置数据不然不显示 这是关键 if(show){ this.listData = [] this.原创 2022-04-26 19:20:19 · 5894 阅读 · 0 评论 -
some 判断数组里某个原始是否存在
var arr = res.data.list let isClockInEd = false; isClockInEd=arr.some(item=>item.status=="NORMAL") if (isClockInEd) { arr.forEach((value,index)=>{ if(!value.sign){ if(value.status=="NORMAL"){ this.currdex.原创 2022-04-12 15:52:50 · 103 阅读 · 0 评论 -
简单的封装js
//一、对 utils.js 通过 export default 默认导出为对象//utils.js 内容://import {Message, MessageBox} from 'element-ui' // elementui 引入(这里根据个人需求决定是否需要导入)export default { //等同于test: function ()... test(x){ console.log(x) }, hello(){ console.log("Hello Wo.原创 2022-04-11 16:18:01 · 779 阅读 · 0 评论 -
数组简便去重方法
function unique(arr) { let hash = {}; return arr.reduce((item, next) => { hash[next.id] ? '' : hash[next.id] = true && item.push(next); return item; }, []); }let lits .原创 2022-04-11 14:21:43 · 795 阅读 · 0 评论 -
vue h5支付宝支付 假设接口
uni.request({ url: this.global.url + "/api/user/recharge", method: "POST", header: { 'content-type': 'application/x-www-form-urlencoded' }, data: { token: uni.getStorageSync("token").token, paytype: tha...原创 2022-03-24 10:32:05 · 1180 阅读 · 0 评论 -
上拉刷新 下拉抵触
onPullDownRefresh() { this.page = 1; this.shopList = [] this.init() setTimeout(function () { uni.stopPullDownRefresh(); }, 1000); }, onReachBottom() { let that = this; that.init(); },..原创 2022-03-17 17:12:23 · 300 阅读 · 0 评论 -
uniapp上传图片、保存图片、 预览图片
uni.chooseImage({ count: 1, success: (res) => { uni.uploadFile({ url: this.global.url + '/index.php/api/common/upload',//地址 filePath: res.tempFilePaths[0],//获取本地图片地址 name: 'file',//类型 success: (resim...原创 2022-03-17 15:58:59 · 1991 阅读 · 0 评论 -
uniapp复制
uni.setClipboardData({ data: e,//复制的内容 success: () => { uni.showToast({ title: '已复制到剪贴板', icon: 'none' }) } })原创 2022-03-17 15:51:28 · 279 阅读 · 0 评论 -
微信小程序高度自适应
<view class="zhuti"> </view> <view v-bind:style="{paddingTop:hei+'px'}"></view> mounted() { var that = this const query = uni.createSelectorQuery().in(this); query.select('.zhuti').boundingClientRect(data => { .原创 2022-03-17 11:38:55 · 718 阅读 · 0 评论 -
JS面试题:数组去重
JS面试题:数组去重 - 掘金 (juejin.cn)1. 普通简单数组去重方法1:利用indexof来去重 const arr = [1,2,3,4,5,6,6,5,4,3,2,1,0] const newArr = arr.filter((it, index, list)=>list.indexOf(it) === index) console.log(newArr) // 输出:1 2 3 4 5 6 0复制代码indexof返回转载 2022-03-14 17:54:30 · 406 阅读 · 0 评论 -
moment 月 季 半年 年
//需要先 安装 moment 的 依赖包 然后 引入 需要的页面 在 methods 里加个" moment," 这个不带双引号//如果这个封装的js 把 moment 它引入封装的 js 里//1月 3季 6半年 12年 getTimeMemon(time_type) { // let starDatattime = "" // starDatattime = new Date().toLocaleDateString() // 最后时间为今天 let endDate.原创 2022-02-28 17:22:32 · 378 阅读 · 0 评论 -
数组遍历循环组成这种结构{513: [“<“, 3], asd: [“≥“, 1]}和解构
let maxDa = "≥" let small = "<" let obj = {}; for (var key in this.levelList) { if (this.levelList[key].where == 1) { obj[this.levelList[key].name] = [maxDa, this.levelList[key].num] } else if (t..原创 2022-02-22 15:04:01 · 236 阅读 · 0 评论 -
两个数组合成一个或 sum = { [item.id]: item.value }
let arr = [1000,1001,10002,1003]let arr1 = ['zs','ls','ww','zl']let newArr = arr.map((age, i) => ({age, name: arr1[i]}))console.log(newArr);//这是函数事件onDepartmentChange(value, treeNode, data, idnex) {let newArr = value.map((age, i) => ({id:age.原创 2022-02-15 18:07:50 · 330 阅读 · 0 评论 -
css上下滑动
overflow-y: scroll;max-height: 70vh;如:<div style="overflow-y: scroll; max-height: 70vh;">内容可上下滑动</div>原创 2022-01-14 15:00:34 · 3033 阅读 · 0 评论 -
uniapp上拉抵触
<template> <view> <page-loading v-if="showLoading"></page-loading> <view class="container u-rela"> <view class="bg-style u-abso"></view> <view class="content u-rela"> <view class="user-info.原创 2021-12-30 10:41:21 · 121 阅读 · 0 评论 -
转换px到rpx
// :style="{paddingTop:paddingTop+ 'rpx'}" 这里是标签里的//这里是data里的 // data() { // return { // paddingTop:'', // }; // },//这里是onLoad里的 // onLoad() { // uni.getSystemInfo({ // success: res=> { // console.log(..原创 2021-11-08 17:54:13 · 772 阅读 · 0 评论 -
uni.getLocation获取省市县
//https://lbs.qq.com/dev/console/application/mine 获取腾讯地图密钥//import QQMapWX from '../../qqmap/qqmap-wx-jssdk.js' 引用jsonLoad() { this.getMapAddress() }, methods: { getMapAddress() { const tMap = new QQMapWX({ key: 'EQQBZ-Z653S-76VOU-64.原创 2021-11-08 16:42:02 · 1147 阅读 · 0 评论 -
vue 三元把相同类提出了
:class="['flex align-center justify-center',key.type==frequency?'indexcurAct':'indexcur']"原创 2021-11-08 10:32:16 · 73 阅读 · 0 评论 -
父组件点击控制子组件组件显隐
//父组件<logo :isShow="isShow" @handleOk="handleOk"></logo>import logo from '../../components/logo.vue'components: { logo },data() { return { isShow: false,}},//判断用户是否登录onShow() { console.log(112) var userInfo = uni.getS.原创 2021-09-18 18:33:10 · 291 阅读 · 0 评论 -
uniapp刷新当前页面
setTimeout(() => { ta.$router.go(0) }, 400)原创 2021-07-06 10:32:50 · 1518 阅读 · 0 评论