微信
hy3528
这个作者很懒,什么都没留下…
展开
-
js转义html标签
将特殊符号转义会html标签replaceSpecialChar (str) { str = str.replace(/&quot;/g, '"'); str = str.replace(/&amp;/g, '&'); str = str.replace(/&lt;/g, '<'); str = str.replace(/&gt;/g, '>'); str = str.replac原创 2021-03-26 17:10:49 · 222 阅读 · 0 评论 -
微信小程序跳转带中文等参数时会被截取问题解决
首先跳转时对参数进行加密escape()url: '../' + type + url + '?id=' + id + '&title=' + escape(title)到了页面之后获取参数之后进行解密即可unescape()unescape(options.title)原创 2020-09-04 10:07:47 · 939 阅读 · 0 评论 -
小程序scroll-view左右滑动联动效果
效果图<view class='cont-pro'> <!-- 左侧列表 --> <scroll-view scroll-y='true' scroll-with-animation="true" style="width:25%;"> <view class='pro_left'> <view wx:for="{{serviceTypes}}" wx:key='index' class="pro_title {{index==curr原创 2020-07-20 16:14:30 · 928 阅读 · 0 评论 -
H5在微信中点击查看预览图片
//图片预览 yulanimg(index) { mep = this.list.vip_imgs //需要预览的图片数组 let mmp = [] for (let i = 0; i < mep.length; i++) { console.log(mep[i].image) m...原创 2020-07-04 14:12:36 · 1991 阅读 · 1 评论 -
微信H5分享
引入微信的js在这里插入代码片js中<script src="https://res2.wx.qq.com/open/js/jweixin-1.4.0.js"></script><script> //根据自己的域名配置 wx.config({ debug: false, appId: '{$signPackage["appId"]}', timestamp: '<?php echo $signPac原创 2020-06-05 10:11:54 · 332 阅读 · 0 评论 -
微信内网页分享
引入js<script src="http://res2.wx.qq.com/open/js/jweixin-1.4.0.js"></script>然后进行配置(通过config接口注入权限验证配置)wx.config({ debug: true, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信...原创 2020-03-14 15:22:15 · 324 阅读 · 0 评论 -
微信小程序签到
wxml <!-- 签到 --> <view class="check"> <view class="checknumber"> <view class="number" wx:for="{{list}}" wx:key="index" data-index="{{index}}"> <image w...原创 2020-03-10 17:51:09 · 355 阅读 · 0 评论 -
微信小程序常用方法
滚动控制wx.pageScrollTo({ scrollTop:0, //页面滚动的距离 //selector:'#tabItem2',//这是锚点,意思为滚动到id=tabItem2的位置 duration: 1000, //页面滚动速度 单位ms success: function (e) { //成功函数 }});拨打电话 wx.makePho...原创 2020-01-10 16:55:42 · 196 阅读 · 0 评论 -
小程序悬浮图标
新建一个文件夹Suspension(可以自己定义名字)在文件夹新建Component。(也可以自己定义名字)wxml页面<movable-area class="movable-box" style="height:calc(100vh - {{tabBarH}})px"><slot/> <movable-view out-of-bounds="true"...原创 2020-01-10 16:47:51 · 984 阅读 · 0 评论 -
html引入腾讯地图导航
需要再http协议上打开,并且绑定过公众号,并把页面放到服务器上。否则打开则是空白页面链接后面需要带目的地坐标参数(或者从接口获取,但是一定要有一个目的地经纬度)。&latitude=28.662031&longitude=115.919083点击导航页面代码里已经把目的地参数传到腾讯地图页,自动规划线路再点击导航就跳转到了腾讯地图APP,已经下载了腾讯地图APP的会自...原创 2020-01-10 11:12:25 · 2744 阅读 · 0 评论 -
html引用腾讯地图(带导航)
请在http或https协议下使用!<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta http...原创 2020-01-06 17:07:06 · 1888 阅读 · 0 评论 -
html调用微信支付api
<script src="http://res2.wx.qq.com/open/js/jweixin-1.4.0.js"></script> actionReadWxpay(order_num) { if (!order_num) { return ...原创 2019-12-19 10:30:07 · 1640 阅读 · 0 评论 -
微信小程序分类菜单
wxml:<view class="navigation"> <scroll-view scroll-y="true" style="height:100%;" bindscrolltoupper="upper" bindscrolltolower="lower" bindscroll="scroll" scroll-into-view="{{toView}...原创 2019-12-16 09:15:28 · 1585 阅读 · 0 评论 -
微信小程序去掉默认的滚动条
第一种:::-webkit-scrollbar {width: 0;height: 0;color: transparent;}第二种:::-webkit-scrollbar {display: none;}原创 2019-12-16 09:04:52 · 703 阅读 · 0 评论 -
微信小程序商品购物界面
wxml代码<view class="page"> <view class="page__bd"> <view class="weui-tab"> <view class="weui-navbar"> <block wx:for="{{tabs}}" wx:key="*this"> ...原创 2019-12-14 13:35:02 · 1907 阅读 · 0 评论 -
h5跳转微信支付
获取参数(固定写法,后端让你怎么写你就怎么写)wx.config({ debug: false, appId: '{$signPackage["appId"]}', timestamp: '<?php echo $signPackage["timestamp"];?>', nonceStr: '<?php echo $signPackage["n...原创 2019-11-26 11:42:49 · 1743 阅读 · 1 评论