摘要:在manifest.json 中 h5里 加 "devServer": { "proxy": { "/webadmin": {//接口包含的路径 "target": "http://221.0.82/",//接口地址ip或域名 "changeOrigin": true, "ws":true } }
阅读全文
摘要:1.申请公众号,申请开发者获取appid,secret 2.设置安全访问ip,不然获取不到access_token 3.设置安全域名,h5网页访问的域名(不设置会报invalid url) 4.前端代码相关 安装 jssdk 1. npm install jweixin-module --save
阅读全文
摘要:在static中新建index.html并注入微信jssdk,web配置中设置index路径 调用: jWeixin.miniProgram.postMessage({ data: { type: 'share', url: "11111" } }) 注意是jWeixin不是wx!!!注意是jWei
阅读全文
摘要:function request(url, data = {}, method = "GET") { return new Promise(function(resolve, reject) { uni.request({ url: url, data: data, method: method,
阅读全文
摘要:引用 import {pickFile} from '@/js/common/pickFile.js' 使用 pickFile.PickFile(function(audioSrc){ console.log(audioSrc) _this.audioSrc = 'file://' + audioS
阅读全文
摘要:plus.io.resolveLocalFileSystemURL( "_www/static/caise.json",//static下路径 function(entry){ //获取文件对象 console.log("entry:"+entry.fullPath); entry.file( fu
阅读全文
摘要:查找某目录下的文件 plus.io.resolveLocalFileSystemURL( "_www/static/本地.png", function(entry){ //获取文件对象 console.log("entry:"+entry.fullPath); } ) 复制文件 没有文件夹时会直接创
阅读全文
摘要:page{filter: grayscale(100%); } .uni-tabbar__item{filter: grayscale(100%); }
阅读全文
摘要:{ "uni-app": { "scripts": { "mp-dingtalk": { "title": "钉钉小程序", "env": { "UNI_PLATFORM": "mp-alipay" }, "define": { "MP-DINGTALK": true } } } }, "depen
阅读全文
摘要:<!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
阅读全文
摘要:下载 this.downloadFile('二维码',that.img64) downloadFile(fileName, content) { let aLink = document.createElement('a') let blob = this.base64ToBlob(content)
阅读全文
摘要:const custom = wx.getMenuButtonBoundingClientRect() // console.log(custom) that.yuansheng= custom.height + (custom.top - uni.getSystemInfoSync().statu
阅读全文
摘要:var url = 'file:///storage/emulated/0/Android/data/uni.UNICFDC688/apps/__UNI__CFDC688/doc/file.tpkx'; //var url = 'file://.....'; // 这个url是你的文件路径,文件路径
阅读全文
摘要:var main = plus.android.runtimeMainActivity(); var pkName = main.getPackageName(); console.log(pkName)
阅读全文
摘要://隐藏系统导航按钮 var main = plus.android.runtimeMainActivity(); var windowMe = main.getWindow(); plus.android.importClass(windowMe); var decorView = windowM
阅读全文
摘要:可以先把对象转为字符串,再转回来JSON.parse(JSON.stringify(res.data));
阅读全文
摘要: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
阅读全文
摘要:如果想要全屏模式,在应用的manifest.json文件中app-plus节点下添加“fullscreen”节点:Boolea值类型,true表示全屏,false表示非全屏,默认值为false。 fullscreen:true function fullscreen(){ // 设置应用全屏显示!
阅读全文
摘要://墨卡托转经纬度 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
阅读全文
摘要:网页端 → 网页执行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项目
阅读全文