自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(57)
  • 收藏
  • 关注

原创 uni-app 实现小程序rsa加密(非对称加密原理)

uni-app 小程序 rsa 加密 使用的是 jsencryptmain.js文件//引入js文件import security_http_config from './common/security.js'//封装的接口Vue.prototype.proims = (data, url, contentType) => { //重要的地方 **let currentKey = security_http_config.createKey();** const token_u =

2022-01-17 15:46:24 1643

原创 微信小程序分享朋友圈功能

微信小程序分享到朋友圈的功能,终于实现了!但是只能是点击右上角菜单方式分享!话不多说 直接上代码!jsPage({ onLoad: function (options) { if(options.info){ options = JSON.parse(options.info); }; let that = this, //接受参数 that.setData({ id: options.id, avatarUrl: op.

2020-11-28 10:34:09 582

原创 微信小程序多选取值判断显示内容

写微信小程序项目的时候 遇到多选框选值通过id来判断内容切换这里是通过wxs来实现的wxml<wxs module="calc"> function getId(arr, id) { return arr.indexOf(id) } module.exports = { getId: getId, }</wxs><view class="lb1"> <view class="lb2">

2020-10-23 14:52:06 1115

原创 微信小程序实现数组排序(向上向下移动)

首先在data里定义一个数组arr: [{ id: '1', name: '222', }, { id: '3', name: '332', }, { id: '5', name: '33', }, ],加一个点击事件(向上)mySorts: function (e) { var index = e.currentTarget.

2020-07-03 10:46:20 3195

原创 uni-app—微信公众号授权登录(截取code)

uni-app获取code发送到服务器上获取信息首先先获取code,公众号分为静默授权(即无需用户点击)和非静默授权(弹出提示框,用户点击确认)getCode() { // 非静默授权,第一次有弹框 this.code = '' var local = window.location.href // 获取页面url var appid = 'wx65adcf0753691319' this.code = this.getUrlCode() // 截取codeurlEn

2020-06-04 16:29:01 6745

原创 uni-app实现上传多张照片

项目中往往会遇到上传多张图片,上传到服务器,下面就是我自己在项目中实现的上传多张图片 uni.chooseImage({ count: 9, //默认9 sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有 sourceType: ['album'], //从相册选择 success: (file) => { let img = file.tempFilePaths fo

2020-06-04 11:40:27 4230

原创 uni-app实现上拉加载更多

我这里是运用官方的onReachBottom,没有用组件直接上代码首先在data里定义page onReachBottom: function() { this.page++; //页面+1 var list1 = { name:***, page: this.page } this.proims(list1, '调接口').then((res) => { if (res.data.code == 1) { } else {

2020-06-02 16:01:26 1989

原创 微信小程序搜索多个关键字高亮

一般项目中会有搜索,有了搜索就会有关键字高亮,还是多个关键字搜索高亮。下面就是我为大家整理的。直接上代码(js中) **var seArr = e.detail.value.replace(' ', '');** **var searchArr = seArr.split('');** var tielies = arr[i].title.split(''); ...

2020-03-09 15:54:17 1231

原创 uni-app 利用substring隐藏中间,用****代替

【代码】uni-app 利用substring隐藏中间,用****代替。

2023-07-04 15:36:02 342

原创 uni-app 实现循环多规格(多选功能)

【代码】uni-app 实现循环多规格(多选功能)

2023-04-20 14:35:27 698 1

原创 uni-app h5唤起App

唤起app

2022-09-24 09:06:16 817

原创 uni-app实现app和H5调用手机拨号功能

H5拨打电话

2022-08-08 10:58:33 2628

原创 uni-app transform 旋转效果 rotate()

动画

2022-07-08 16:08:38 2799

原创 uniapp 使用canvas 生成海报并保存到本地

canvas

2022-06-21 10:27:20 774

原创 uni-app解析银行卡(支付宝)返回form表单,唤起支付宝界面

form表单唤起支付

2022-06-08 15:45:10 1413 1

原创 uniapp循环输入框并获取到每个的值(并且数字是几 就显示几条数据)

<template> <gui-page> <view slot="gBody"> <!-- 人数 --> <view class="xname"> <text style="font-weight: bold;">人数 <text style="color: red;">*</text></text> <view class="xname_inp gui-fl

2022-03-26 11:31:24 1625

原创 uni-app 微信小程序自定义radio样式

/* radio 选中后的样式 */ /deep/ uni-radio .uni-radio-input.uni-radio-input-checked { background-color: #65D9CD !important; border-color: #65D9CD !important; background-clip: content-box !important; padding: 7rpx !important; box-sizing: border-box;.

2022-03-07 09:57:49 1449

原创 uni-app开发微信小程序之获取当前地址

<script> import amapFile from '../../common/amap-wx.js' export default { data() { return { key: 'ea5272730d9258289a996809b38c1638', } }, onShow() { this.handleAuthorize() }, methods: { // 获取位置 handleAuthorize() { va

2022-02-25 13:48:00 1409 2

原创 uniapp实现动态生成随机图形验证码

<template> <gui-page> <view slot="gBody"> <view class="content"> <!-- 验证码 --> <view class="firsts_s" style="margin-top: 25rpx;"> <view class="firsts_s_l"> <view class="first-input".

2022-02-08 16:59:57 1172

原创 uni-app使用input框 v-model双向绑定不起作用解决方案

<input type="text" @input="inputs" value="" placeholder="请输入金额" v-model="number" /><script> export default { data() { return { number: '', } }, methods: { // 可提现金额显示 inputs(e) { var mon = e.detail.value if (Numb

2022-01-11 16:48:38 5480 2

原创 uni-app实现传值路径乱码的问题

var option= " https%3A%2F%2Fwww.wangyongwei.top%3Fid%3D13"解决办法 decodeURIComponent(option)

2021-12-17 18:10:53 636

原创 uni-app 用户地理位置授权

许多小程序授权的时候 有的会点击取消授权,这就要打开设置重新授权了onShow() { this.Autho() },//授权Autho() { var that = this uni.authorize({ scope: 'scope.userLocation', success(res) { that.lat() }, // 授权失败 fail(err) { err = err['errMsg'] uni.sho

2021-12-17 11:56:07 926

原创 uni-app 发送form-data参数的请求方式传值给后台

传值给后台 基本上是form还有json格式把值传给后台。首先是json格式的header: { 'Content-Type': 'application/json', },form格式header: { 'Content-Type': 'application/x-www-form-urlencoded',},

2021-11-24 10:12:25 2746

原创 uni-app 更新包提示HTML5+Runtime缺少升级包manifest.json中配置的模块:payment

这是我在写wgt更新包时出现的。原因是之前打apk的包没有勾选manifest.json里面的支付,就直接更新了。解决办法就是:重新打个apk的包,重新下载 就能更新了注:如果更新时plus.runtime用的install,需要在manifest.json里权限配置里勾选以下两个<uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" /><uses-permission and..

2021-10-20 17:30:08 2747

原创 uni-app 实现递增递减(js)

js实现数值递增,保存两位小数this.price =200var arr=[]var numR=0numR=Number(this.price)for(var i=0;i<5;i++){ numR=Number(numR)+0.01 arr.push(numR.toFixed(2))}var arrs=[]var numRs=0numR=Number(this.price)for(var i=0;i<5;i++){ numR=Number(numR)-0.01 .

2021-09-03 16:17:19 518

原创 js截取数组里url中的域名的方法

data() { return { imageListy: [], }},onLoad(option) { var arr = [] //this.imageListy就是图片数据 for (var i = 0; i < this.imageListy.length; i++) { //replace(/^http:\/\/[^/]+/, "") 主要部分 var imageListy = this.imageListy[i].replace(/^h

2021-07-22 17:22:17 623

原创 uni-app定时器清除问题

data() { return { // 定义一个变量 time: '' }},onHide() { //当页面隐藏时清除定时器 clearInterval(this.time)},onShow() { // 执行定时器 this.times()},methods: { //定时器方法 times() { this.time = setInterval( this.group, 2000) }, //这里是想要执行的方法

2021-06-30 10:11:34 1508

原创 uniapp 实现微信小程序修改rich-text图片样式

<template> <gui-page> <view slot="gBody"> <view class="htext"> <rich-text :nodes="content"></rich-text> </view> </view> </gui-page></template><script> export default { d

2021-05-19 16:56:18 737

原创 uni-app 微信小程序使用 web-view 预览PDF

1、使用uni-pp开发微信小程序,上线之后发现Android手机无法加载览PDF,但ios可以。这里运用了 uni.openDocument<template> <view class="wenj" @click="file" > 点击查看文件 </view></template><script> export default { data() { return { attach_url: '', .

2021-05-19 09:54:46 550

原创 uni-app实现微信小程序本地图片转为base64

// #ifdef MP-WEIXIN uni.getFileSystemManager().readFile({ filePath: '/static/images/topbg.png', //选择图片返回的相对路径 encoding: 'base64', //编码格式 success: res => { //成功的回调 this.base64img = 'data:image/jpeg;base64,' + res.data //不加上这串字符,在页面无法显示

2021-05-13 16:32:10 471

原创 uni-app获取url中的参数(网页地址参数)

onLoad(option) { var paraString = location.search; var paras = paraString.split("="); console.log(paras) this.login_account = paras[1]}, //this.login_account就是截取的参数了

2021-04-26 14:05:52 20611

原创 js实现图形验证码

html <!-- 图形验证码 --> <div class="phone"> <div class="phones"> <div class="img"> <img src="./img/yanzhnegma.png" alt=""> </div> <div class="input"> .

2021-04-24 16:47:09 826

原创 uni-app 实现点击列表隐藏显示

<!-- 卖家订单 --> <view class="conent" v-for="(item,index) in list" :key='index'> <view class="conent-bott"> <view class="bott-b"> <view class="b-r"> <view class="revokes" @click="rejectS(item.id,item)">...

2021-04-22 17:32:58 3444

原创 uniapp底部弹出框效果

<template> <view> <view class="one-right" @click="sell"> <text>卖出</text> </view> <view class="share"> <view :class="{'box': share}" @click="display"> </view> <view class="share-ite

2021-04-16 11:02:46 2372

原创 uni-app请求图片的路径是反斜杠如何解决

uni-app做app项目的时候,请求到的图片链接路径有反斜杠,但是能在浏览器上打开,在页面就报错页面显示之后报的错,实际上是能拿到照片的,因为里面的\被当成转义符了,被转义了解决方法this.bottom_img = res.data.data.bottom_img.replace(/\\/g,"/"); 可以使用.replace(/\\/g,"/");来改变图片路径。这样就能显示了...

2021-04-09 15:52:40 1097

原创 vue npm: react运行时报错npm start — babel-eslint 版本兼容性问题

安装npm i 报错npm ERR! code E404npm ERR! 404 Not Found - GET https://registry.npm.taobao.org/@types/node/-/node-8.10.61.tgz - [not_found] document not foundnpm ERR! 404npm ERR! 404 '@types/node@https://registry.npm.taobao.org/@types/node/-/node-8.10.61..

2021-03-09 15:21:45 572

原创 vue中this.$router.push()路由传值和获取的两种常见方法

我们在做项目时 ,经常会遇到路由跳转页面传值的问题,有的路由跳转到导航页面时 导航的样式也就改变了。命名的路由(通过params) this.$router.push({ name: "路径", params: { type: this.type }, //传的参数 });接受参数(可以写在created) this.type = this.$route.params.type;带查询参数,变成 /路径?selected=2 t

2021-02-23 15:20:54 978

原创 微信小程序保存图片到相册

wxml<view bindtap="download" class="down"> <view>生成图片</view></view>js download: function () { var that = this wx.showLoading({ title: '加载中', }); // 下载海报图片 wx.downloadFile({ url:‘图片路径’, su

2020-12-22 11:37:46 645

原创 vue实现点击地图放大缩小

<template><div class="operating-btn"> <div class="add-box"> <img src="../../public/static/img/add.png" alt="" @click="toBChange" /> </div> <div class="sub-box"> <img src="../../publi

2020-12-08 15:26:25 1428

原创 vue实现鼠标悬浮 显示全部内容

在做vue项目中 常常会遇到内容太长 显示不全 这就用到鼠标悬浮效果了使用 (element-ui) <el-tooltip :content="全部内容" placement="top-start" effect="dark" popper-class="atooltip"> <span class="topt1">{{ 内容}}</span> </el-tooltip>effect=“dark” 在这可以修改背.

2020-12-07 10:41:38 6052 1

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除