![](https://img-blog.csdnimg.cn/20190918140053667.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
小程序
小程序
云南吴小黑
这个作者很懒,什么都没留下…
展开
-
后端完成微信静默授权
【代码】后端完成微信静默授权。原创 2022-10-09 10:19:22 · 388 阅读 · 0 评论 -
微信H5拉起(跳转)微信小程序
main.js配置忽略wx-open-launch-weappVue.config.ignoredElements = ['wx-open-launch-weapp'];template<template> <view class="index-wrapper"> <view class="wrapper"> <view class="">点击下面按钮跳转</view> <wx-open-launch-wea.原创 2022-05-13 10:56:18 · 1990 阅读 · 0 评论 -
微信通过txt文件验证服务器是否可用
控制器@GetMapping("/valid") @ResponseBody public void valid( HttpServletResponse response, @RequestParam(value = "signature") String signature, @RequestParam(value = "timestamp") String timestamp, @RequestParam(value = "nonce") .原创 2022-03-23 21:28:05 · 505 阅读 · 0 评论 -
微信小程序(uniapp)授权登录
1. 开发前准备2. 前端开发初始化openId和sessionKeyasync initWechat_MP() { const _this = this; console.log('wechat==========>', _this.wechat); if (_this.wechat && _this.wechat.openId && _this.wechat.sessionKey) { return; } uni.login({ su原创 2022-03-23 21:20:20 · 2197 阅读 · 0 评论 -
微信查询元素信息时boundingClientRect()和exec()区别
参考代码//代码1const query = wx.createSelectorQuery(); query.select('#id').boundingClientRect(res => { console.log('元素', res);}).exec();//代码2const query = wx.createSelectorQuery();query.select('#id').boundingClientRect().exec(resList => { cons.原创 2022-03-04 10:19:30 · 1519 阅读 · 0 评论 -
微信小程序和公众号(H5)获取元素信息
H5页面// #ifdef H5var query = wx.createSelectorQuery();query.select("#search-bar").boundingClientRect().exec(res => { console.log("searchBar:" + res);});// #endif小程序(非自定义组件)非自定义组件不用加.in(this)// #ifdef MP-WEIXINconst query = wx.createSelecto.原创 2022-03-04 09:36:18 · 596 阅读 · 0 评论 -
uniapp 组件封装-图片选择
在目录components下创建文件夹image目录,在image目录下创建index.vue文件,代码如下:<template name="avatar"> <view> <image :src="imgSrc.imgSrc" @tap="fSelect" :style="[imgStyle]" class="my-avatar" ></image> <canvas canvas-id="avatar-.原创 2021-09-29 11:26:08 · 347 阅读 · 0 评论 -
微信小程序授权登录
前端调用wx.login()(uniapp调用uni.login())拿到临时code【代码实现如下】:uni.login({ success: res => { //res.code即为临时code if (!res.code) { uni.showToast('none', '初始化微信授权失败'); return; } //进行下一步... }});把临时code传到后台获取openId和sessionKey【代码实现如下】:Map<.原创 2021-08-12 11:00:55 · 82 阅读 · 0 评论 -
腾讯地图取点(切换位置)
直接点击取点进去chooseLocation() { const _this = this; wx.getSetting({ success(res) { if (res.authSetting['scope.userLocation'] != undefined && res.authSetting['scope.userLocation'] != true) { uni.showModal({ title: '位置授权', content:.原创 2021-08-12 11:24:11 · 698 阅读 · 0 评论 -
调用腾讯地图获取位置信息
1.调用wx.getLocation()获取用户授权【实现代码如下】:wx.getLocation({ //type: 'gcj02', //wgs84 返回 gps 坐标,gcj02 返回可用于 wx.openLocation 的坐标 success: res => { console.log('获取位置信息成功======>'); //res.longitude为纬度, res.longitude为经度 // 通过申请的key生成wxMap实例 let map原创 2021-08-12 11:13:55 · 761 阅读 · 0 评论 -
break、continue和return的作用和区别
1、breakbraek跳出当前循环,结束当前的循环体;2、continue跳出本次循环,进入并执行下一次的循环;3、renturnrenturn后面的代码不执行,直接结束当前的方法;原创 2020-09-15 19:49:23 · 420 阅读 · 1 评论