WishMeLz

生活其实很有趣

分类 uniapp 下的文章

非对称加密(node-rsa,jsencrypt)

公钥私钥生成随便找个在线生成的http://www.metools.info/code/c80.htmlORconst NodeRSA = require('node-rsa') const fs = require('fs') const newkey = new NodeRSA({ b: 512 }) newkey.setOptions({ encryptionScheme: 'pkcs1' }) let public_key = newkey.exportKey('pkcs8-public') //公钥 let private_key =...

uniapp 返回上一页页面出现空白遮挡白屏

前言: ios webview嵌套的H5页面,H5页面是uniapp打包的。返回页面页面出现白屏遮挡物因为列表页面使用了 vh 高度导致。因为100%的高度拿不到,只能使用100vh,并且还添加了box-sizing: border-box; 也不行。 改写高度方式,不使用vh就行了

微信小程序-小程序码

appId,secret 生成TOKEN. token去强求微信接口生产小程序码https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=${appId}&secret=${secret}https://api.weixin.qq.com/wxa/getwxacode?access_token=' + access_token request({ url:'https://api...

uniapp导航栏滚动渐变

<template> <view class="index"> <view class="header" :style="headerStyle"> <view :style="'height: ' + statusBarHeight"> </view> <view class="header-info"> <view class="title" :style="headerTextStyle"> 这个是标题 </view> </view> &l...

uniapp 二维码

<canvas canvas-id="Qrcode"></canvas> qrCode.api.draw(text, { ctx: uni.createCanvasContext('Qrcode'), width: 127, height: 127 });https://github.com/WishMelz/file/blob/master/js/qrCode.js

uniapp 导航栏tab切换 底下有个长方形跟着滑动

获取文字的宽度, 在拿到文字距离左侧的距离. 每次点击就更新一下宽度和left var that = this; const query = uni.createSelectorQuery().in(that); query.select('#nav').boundingClientRect(data => { data.width; data.left; console.log(JSON.strin...

scroll-view IOS 端出现滚动条

在对应的元素添加style/deep/ .uni-scroll-view::-webkit-scrollbar { display: none } // or >>> .uni-scroll-view::-webkit-scrollbar { display: none }

uniapp 取消web-view全屏

取消全屏, 设置导航栏.垃圾编辑器粘贴代码格式全乱不整理了. 自己copy过去格式化onReady() { // #ifdef APP-PLUS uni.setNavigationBarColor({ frontColor: '#000000', backgroundColor: '#ffffff' }) var lh = plus.navigator.getStatusbarHeight(); var currentWebview = this.$scope .$getAppW...

uniapp 取消导航栏

这样就会浸入试, 页面和导航栏重叠, 设置占位符<view class="status_bar"></view> .status_bar { height: var(--status-bar-height); // 内置的变量导航栏的高度 width: 100%; }

UNIAPP 打包APP 图标和启动图

图标配置(logo)可以使用一键配置功能启动图Android: 使用 .9 文件。一个尺寸就可以,我个人选择的是720的尺寸IOS: 自定义storyboard启动界面.9文件制作使用Android Studio来操作 启动界面尽量简单,横屏竖直。好定义可以拉伸的区域在制作页面是有一个像素的空白右边和底部全部涂黑. 左边的黑边和顶部的黑边分别控制 X轴 Y轴 可以拉伸的区域.这个是一个特别简单的启动图例子. 就中间是不能拉伸的区域.storyboard制作https://github.com/WishMelz/file/blob/master/Cu...

uniapp 地图和导航

高得地图SDK<map style="width: 100%; height: 300px;" :latitude="latitude" :longitude="longitude" :markers="covers"> </map> data() { return { id: 0, // 使用 marker点击事件 需要填写id title: 'map', latitude: 39.913904, longitude: 116.39728, //这个经纬度是打开地图显示的...

uni-app + 微信小程序

1.滚动到底部( viewscroll:容器id )pageScrollToBottom: function() { wx.createSelectorQuery().select('#viewscroll').boundingClientRect(function(rect){ // 使页面滚动到底部 wx.pageScrollTo({ scrollTop: rect.bottom, duration: 10 }) }).exec() },