随笔分类 -  uniapp

1 2 3 下一页

uniapp相关
uniapp在h5调试跨域问题
摘要:在manifest.json 中 h5里 加 "devServer": { "proxy": { "/webadmin": {//接口包含的路径 "target": "http://221.0.82/",//接口地址ip或域名 "changeOrigin": true, "ws":true } } 阅读全文

posted @ 2023-09-13 09:32 Just丶随心 阅读(303) 评论(0) 推荐(0) 编辑

uniapp网页微信JSsdk的使用
摘要:1.申请公众号,申请开发者获取appid,secret 2.设置安全访问ip,不然获取不到access_token 3.设置安全域名,h5网页访问的域名(不设置会报invalid url) 4.前端代码相关 安装 jssdk 1. npm install jweixin-module --save 阅读全文

posted @ 2023-09-04 11:29 Just丶随心 编辑

uniapp生成h5与小程序webview交互
摘要:在static中新建index.html并注入微信jssdk,web配置中设置index路径 调用: jWeixin.miniProgram.postMessage({ data: { type: 'share', url: "11111" } }) 注意是jWeixin不是wx!!!注意是jWei 阅读全文

posted @ 2023-08-15 09:36 Just丶随心 阅读(80) 评论(0) 推荐(0) 编辑

uniapp中执行完一个方法在执行另一个
摘要:function request(url, data = {}, method = "GET") { return new Promise(function(resolve, reject) { uni.request({ url: url, data: data, method: method, 阅读全文

posted @ 2023-05-30 10:59 Just丶随心 编辑

uniapp安卓选择文件
摘要:引用 import {pickFile} from '@/js/common/pickFile.js' 使用 pickFile.PickFile(function(audioSrc){ console.log(audioSrc) _this.audioSrc = 'file://' + audioS 阅读全文

posted @ 2023-05-29 11:36 Just丶随心 编辑

uniapp安卓本地文件读取(html5+)
摘要:plus.io.resolveLocalFileSystemURL( "_www/static/caise.json",//static下路径 function(entry){ //获取文件对象 console.log("entry:"+entry.fullPath); entry.file( fu 阅读全文

posted @ 2023-02-21 17:31 Just丶随心 编辑

uniapp文件复制,重命名以及删除
摘要:查找某目录下的文件 plus.io.resolveLocalFileSystemURL( "_www/static/本地.png", function(entry){ //获取文件对象 console.log("entry:"+entry.fullPath); } ) 复制文件 没有文件夹时会直接创 阅读全文

posted @ 2023-02-06 14:34 Just丶随心 编辑

uniapp全局黑白
摘要:page{filter: grayscale(100%); } .uni-tabbar__item{filter: grayscale(100%); } 阅读全文

posted @ 2022-12-01 17:09 Just丶随心 编辑

uniapp 配置钉钉小程序package.json文件
摘要:{ "uni-app": { "scripts": { "mp-dingtalk": { "title": "钉钉小程序", "env": { "UNI_PLATFORM": "mp-alipay" }, "define": { "MP-DINGTALK": true } } } }, "depen 阅读全文

posted @ 2022-11-29 13:17 Just丶随心 阅读(412) 评论(0) 推荐(0) 编辑

uniapp改变icon
摘要:<!DOCTYPE html><html lang="zh-CN"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <link rel="icon" href="<%= BASE 阅读全文

posted @ 2022-09-08 15:54 Just丶随心 阅读(222) 评论(0) 推荐(0) 编辑

下载base64图片
摘要:下载 this.downloadFile('二维码',that.img64) downloadFile(fileName, content) { let aLink = document.createElement('a') let blob = this.base64ToBlob(content) 阅读全文

posted @ 2022-09-07 15:10 Just丶随心 阅读(221) 评论(0) 推荐(0) 编辑

uniapp 中获取微信小程序的原生导航栏高度
摘要:const custom = wx.getMenuButtonBoundingClientRect() // console.log(custom) that.yuansheng= custom.height + (custom.top - uni.getSystemInfoSync().statu 阅读全文

posted @ 2022-08-26 11:13 Just丶随心 编辑

uniapp删除文件
摘要:var url = 'file:///storage/emulated/0/Android/data/uni.UNICFDC688/apps/__UNI__CFDC688/doc/file.tpkx'; //var url = 'file://.....'; // 这个url是你的文件路径,文件路径 阅读全文

posted @ 2022-03-21 11:17 Just丶随心 编辑

uniapp获取APP包名
摘要:var main = plus.android.runtimeMainActivity(); var pkName = main.getPackageName(); console.log(pkName) 阅读全文

posted @ 2022-03-18 08:37 Just丶随心 阅读(2601) 评论(0) 推荐(1) 编辑

uniapp隐藏系统导航按钮
摘要://隐藏系统导航按钮 var main = plus.android.runtimeMainActivity(); var windowMe = main.getWindow(); plus.android.importClass(windowMe); var decorView = windowM 阅读全文

posted @ 2022-02-25 16:15 Just丶随心 编辑

vue中两个变量赋值一样导致同步改变解决办法
摘要:可以先把对象转为字符串,再转回来JSON.parse(JSON.stringify(res.data)); 阅读全文

posted @ 2022-02-17 08:39 Just丶随心 编辑

uniapp本地文件的路径
摘要:file:///storage/emulated/0/Android/data/com.xl21127.lt/apps/__UNI__CB8CCF5/www/static/bg.png 包名 com.xl21127.lt UNIAPPID __UNI__CB8CCF5 直接用API获取 plus.i 阅读全文

posted @ 2021-12-31 11:32 Just丶随心 编辑

uniapp全屏和屏幕方向
摘要:如果想要全屏模式,在应用的manifest.json文件中app-plus节点下添加“fullscreen”节点:Boolea值类型,true表示全屏,false表示非全屏,默认值为false。 fullscreen:true function fullscreen(){ // 设置应用全屏显示! 阅读全文

posted @ 2021-12-28 08:47 Just丶随心 编辑

JS墨卡托坐标与经纬度互转
摘要://墨卡托转经纬度 mktlng(poi){ var lnglat = {}; lnglat.lng = poi.x/20037508.34*180; var mmy = poi.y/20037508.34*180; lnglat.lat = 180/Math.PI*(2*Math.atan(Mat 阅读全文

posted @ 2021-12-16 16:03 Just丶随心 编辑

uniapp APP内部与网页通讯,互相执行对方方法
摘要:网页端 → 网页执行APP的方法要导入uni的js <script type="text/javascript" src="https://js.cdn.aliyun.dcloud.net.cn/dev/uni-app/uni.webview.1.5.2.js"></script> 如果是vue项目 阅读全文

posted @ 2021-12-13 17:30 Just丶随心 编辑

1 2 3 下一页
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

导航

统计

点击右上角即可分享
微信分享提示