![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
uniapp
罗根-前端
这个作者很懒,什么都没留下…
展开
-
uniapp 微信小程序 用户授权代码
<template> <view class="pop-up" v-if="popUpShow"> <view class="pop-box"> <view class="pop-box-title">获取用户权限</view> <view class="pop-bot"> <view class="btn-cancel" @click="cancel">取消</view> &l原创 2022-01-26 14:11:49 · 1441 阅读 · 0 评论 -
uniapp开发App调用微信授权登陆
一键授权登陆在 微信开放平台 中创建移动应用,其中安卓应用签名为DCloud应用证书详情中的MD5密文(密文需要去除冒号并转小写)wxLogin() { let _this = this; uni.getProvider({ service: 'oauth', success: function(res) { if (~res.provider.indexOf('weixin')) { uni.showLoading({ title: '微信授权中' });原创 2022-01-21 15:26:56 · 1302 阅读 · 0 评论 -
uniapp map位置未授权,提示授权
getLocation(x, y, name) { // 传值判断x、y轴是否准确 if(!x || !y) { uni.showToast({ icon:none, title:'位置信息不准确无法导航', duration:2000 }) return } let than = this; uni.getSetting({ success(res) { if (res.authSetting['scop原创 2021-12-23 19:17:48 · 485 阅读 · 0 评论 -
uniapp地图map点击回到当前位置,地图未授权前往授权。授权整套逻辑
核心代码presentLocation() { let than = this; uni.getSetting({ success(res) { if (res.authSetting['scope.userLocation']) { // console.log("userLocation位置功能已授权") // 如果已授权,直接获取对应参数 uni.getLocation({ type: 'gcj02', success: (r原创 2021-09-03 10:17:42 · 696 阅读 · 0 评论 -
解决uniapp默认首页判断没有登陆后进入登陆页面,屏幕闪首页问题(app)
核心思想在manifest.json文件修改闪屏页配置。将闪屏页自动关闭autoclose改为false在页面实际操作逻辑完成后调用plus.navigator.closeSplashscreen();来关闭闪屏页面来实现。// 核心代码// App.vue生命周期onLaunch中写let token = uni.getStorageSync('token');if (token === null || token === '') { uni.reLaunch({ url: '/pag原创 2021-09-03 10:05:37 · 3604 阅读 · 0 评论