要在隐私协议里面添加下面这个,添加之后会审核中,审核通过就可以用了 [图片] [图片]
第三方小程序使用wx.chooseAddress在发行版本报错 112 ,如何处理?[图片] [图片] 代码和报错如图, 我们是第三方小程序,根据官方文档做了以下处理: 1:因为我们是uniapp开发的,所以在 manifest.json 中添加了 requiredPrivateInfos 声明了 chooseAddress [图片] 2:在 ext.json 中也声明了 requiredPrivateInfos [图片] 3:也通过了接口权限的接通,下面的是官方文档描述 [图片] 但是还是报错 112 ,英文翻译过来说是需要隐私权限,但是看官方文档没有提到过隐私权限,所以这个隐私权限要怎么设置呢? 以下是官方地理位置接口新增与相关流程调整截图: [图片] [图片]
04-17https://developers.weixin.qq.com/s/tOsxXqm57PZI 已解决
双角色tabbar底部导航栏,切换和真机不一样,什么问题?模拟器上显示正常,真机上的问题是,在首页进入论坛角色,点击我的页面中去社区按钮,页面跳转了,tabbar没有切换,当在首页进入社区角色,点击我的页面中去论坛的按钮,页面跳转了,tabbar没有切换,试了无数次,都是这样的问题。这是什么问题,开发工具。1.05版本的
04-15找一个 我这样的背景[图片] [图片]
自定义tabbar中间凸起部分的圆弧怎么做出来?[图片][图片] 自定义的tabbar,中间凸起部分的圆弧怎么做出来?如图二是想要实现的效果,图一中红色框的圆弧要怎么实现? wxml代码 <view class="tab-bar"> <view class="tab-bar-border"></view> <view class="tab-bar-item" wx:for="{{selectList}}" wx:key="index" data-index="{{index}}" data-path="{{item.pagePath}}" data-selected="{{item.selected}}" bindtap="onwidthTap"> <image class="cover-image" src="{{selected === item.selected ? item.selectedIconPath : item.iconPath}}"></image> <view class="cover-view" style="color:{{selected === item.selected ? selectedColor : color}}">{{item.text}}</view> </view> </view> <view class="indicator"> <view class="indicator-border"></view> <view class="indicator-item"> <image class="indicator-image" src="/images/jia.png"></image> </view> <view class="indicator-item-text">发布</view> </view> wxss代码 .tab-bar { position: fixed; bottom: 0; left: 0; right: 0; height: 120rpx; background-color: white; display: flex; padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 0 5rpx 0 rgba(0, 0, 0, 0.33); } .tab-bar-item { flex: 1; text-align: center; display: flex; flex-direction: column; justify-content: center; align-items: center; } .cover-image { margin-bottom: 40rpx; width: 44rpx; height: 44rpx; } .tab-bar-item .cover-view { font-size: 34rpx; position: absolute; bottom: 10rpx; color: #7A7E83; } .indicator { height: 70rpx; display: flex; flex-direction: column; align-items: center; } .indicator-border { position: absolute; left: 50%; top: -50rpx; transform: translate(-50%, -50%); border-radius: 50%; width: 80rpx; height: 80rpx; border: 7px solid #fff; box-shadow: 0 0 5rpx 0 rgba(0, 0, 0, 0.33); z-index: -1; } .indicator-item { position: absolute; left: 50%; top: -50rpx; transform: translate(-50%, -50%); background: #ff9f7f; border-radius: 50%; width: 80rpx; height: 80rpx; display: flex; flex-direction: column; justify-content: space-between; align-items: center; border: 7px solid #fff; z-index: 1; } .indicator-image { width: 80rpx; height: 80rpx; border-radius: 50%; } .indicator-item-text { font-size: 34rpx; z-index: 1; color: #7A7E83; position: absolute; bottom: 10rpx; }
04-09用自定义顶部导航栏,可以全局配置或单独需要的页面配置 全局"navigationStyle": "custom" [图片] 按需"navigationStyle": "custom" [图片]  [图片]
顶部导航栏增加一个背景图片设置?现在小程序只有设置顶部导航栏的颜色,什么时候能增加一个设置顶部导航栏背景图片就好了,现在通过自定义顶部导航栏来实现,太麻烦
04-03<web-view> 的 ref 无法直接获取
给web-view设置了ref,但是无法获取到ref里面的值?<template> <view> <web-view ref="webDiv" src="https://www.baidu.com"></web-view> <audio ref="audiod" style="text-align: left" src="https://web-ext-storage.dcloud.net.cn/uni-app/ForElise.mp3" controls></audio> <image ref="asda3434333" style="width: 200px; height: 200px; background-color: #eeeeee;" src="https://qiniu-web-assets.dcloud.net.cn/unidoc/zh/shuijiao.jpg"></image> </view> </template> <script> export default { data() { return { title: 'Hello' } }, onLoad() { console.log(this.$refs.audiod) console.log(this) }, mounted() { // 也可以在 mounted 生命周期里获取引用 console.log(this.$refs.audiod) console.log(this) }, methods: { // webview向外部发送消息 handlePostMessage: function(data) { console.log("接收到消息:" + JSON.stringify(data.detail)); }, // 调用 webview 内部逻辑 evalJs: function() { this.$refs.webview.evalJs("document.body.style.background ='#00FF00'"); } } } </script> <style> </style>
03-28「码」上有爱 ❤️ 送给最美程序媛的祝福! [图片] index.wxml: <navigation-bar title="「码」上有爱 ❤️" back="{{false}}" color="white" background="#ff69b4"></navigation-bar> <view class="container">   <canvas type="2d" id="heartCanvas" class="canvas"></canvas>   <view class="blessing">     <text>{{message}}</text>   </view> </view> index.wxss: .container {   display: flex;   flex-direction: column;   align-items: center;   justify-content: center;   height: 100vh;   background: linear-gradient(135deg, #fff5f8 0%, #ffe4f1 100%); } .canvas {   width: 300px;   height: 300px;   margin-bottom: 30px; } .blessing {   font-size: 18px;   color: #e91e63;   text-align: center;   font-weight: bold;   padding: 20px;   background: rgba(255, 255, 255, 0.8);   border-radius: 15px;   box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);   animation: float 3s ease-in-out infinite; } @keyframes float {   0% {     transform: translateY(0px);   }   50% {     transform: translateY(-10px);   }   100% {     transform: translateY(0px);   } } index.js Page({   data: {     message: "❤️ 祝所有程序媛们代码无 bug,编译无报错,生活永远高效而美好!💖",     scale: 8,     angle: 0   },   async onLoad() {     try {       const sysInfo = await wx.getSystemInfo();       const query = wx.createSelectorQuery();       query.select('#heartCanvas')         .fields({ node: true, size: true })         .exec((res) => {           const canvas = res[0].node;           const ctx = canvas.getContext('2d');                      // 设置canvas尺寸           const dpr = sysInfo.pixelRatio;           canvas.width = res[0].width * dpr;           canvas.height = res[0].height * dpr;           ctx.scale(dpr, dpr);                      this.canvas = canvas;           this.ctx = ctx;           this.startAnimation();         });     } catch (error) {       console.error('获取系统信息失败:', error);     }   },   startAnimation() {     const animate = () => {       this.setData({         angle: (this.data.angle + 1) % 360       });       this.drawHeart();       this.animationTimer = this.canvas.requestAnimationFrame(animate);     };     animate();   },   drawHeart() {     const ctx = this.ctx;     const scale = this.data.scale;     const points = [];     const centerX = 150;     const centerY = 150;     // 清除画布     ctx.clearRect(0, 0, 300, 300);     // 创建渐变色     const gradient = ctx.createLinearGradient(0, 0, 300, 300);     gradient.addColorStop(0, '#ff69b4');     gradient.addColorStop(0.5, '#ff1493');     gradient.addColorStop(1, '#ff69b4');     // 生成爱心曲线点集     for (let t = 0; t < Math.PI * 2; t += 0.05) {       const x = 16 * Math.pow(Math.sin(t), 3);       const y = 13 * Math.cos(t) - 5 * Math.cos(2 * t) - 2 * Math.cos(3 * t) - Math.cos(4 * t);              // 添加旋转效果       const rotatedX = x * Math.cos(this.data.angle * Math.PI / 180) - y * Math.sin(this.data.angle * Math.PI / 180);       const rotatedY = x * Math.sin(this.data.angle * Math.PI / 180) + y * Math.cos(this.data.angle * Math.PI / 180);              points.push({          x: rotatedX * scale + centerX,          y: -rotatedY * scale + centerY        });     }     // 绘制爱心     ctx.save();     ctx.fillStyle = gradient;     ctx.shadowColor = 'rgba(255, 105, 180, 0.5)';     ctx.shadowBlur = 10;     ctx.shadowOffsetX = 0;     ctx.shadowOffsetY = 0;          ctx.beginPath();     ctx.moveTo(points[0].x, points[0].y);     points.forEach(p => ctx.lineTo(p.x, p.y));     ctx.closePath();     ctx.fill();     ctx.restore();     // 添加闪光效果     const time = Date.now() / 1000;     ctx.fillStyle = `rgba(255, 255, 255, ${Math.sin(time) * 0.2 + 0.2})`;     ctx.beginPath();     ctx.moveTo(points[0].x, points[0].y);     points.forEach(p => ctx.lineTo(p.x, p.y));     ctx.closePath();     ctx.fill();   },   onUnload() {     if (this.animationTimer) {       this.canvas.cancelAnimationFrame(this.animationTimer);     }   } }); 代码片段:https://developers.weixin.qq.com/s/4CU4pxm47aYE
程序媛特辑 | 码上3·8?一起为程序媛打call!各位代码大神们,注意啦!一年一度的三八妇女节将至~ 在这个属于所有女性朋友的节日里,我们不仅要为身边的妈妈、妻子、女儿送上祝福,更要为代码世界里闪闪发光的她们打call ! 她们,在代码与数据的世界里,运用自己的智慧与细腻为行业发展注入独特能量。 她们,在各行各业的征程里,发挥自己的温暖与洞察为社会助力发展创新。 同时,她们更是我们微信开放社区不可或缺的力量,愿所有程序媛们在这专属的节日里绽放光彩,并在代码世界里持续书写辉煌篇章! 🔥 # 码上3·8,一起为程序媛打call # 话题活动火热开启!让我们向每一位在岗位上发光发热的程序媛致以最诚挚的祝福! 欢迎各位开发者们参与微信开放社区3.8话题活动~ 参与方式: 1. 表白程序媛: 用代码编写一段祝福语、绘制一幅图案,向程序媛们表达你的敬意和祝福! 2. 分享你的故事: 分享你与程序媛合作的故事,或者你对女性开发者群体的看法和建议,让我们一起为她们加油鼓劲! 3. 围观点赞: 为你喜欢的评论或作品点赞、评论,一起为程序媛们打call! 即日起至 2025 年 03 月 11 日,在下方评论区分享你与你身边程序媛的故事或送上祝福,精选评论的用户将获得官方精美礼品一份。 [图片]
03-10用腾讯地图的逆地址解析 https://https://lbs.qq.com/miniProgram/jsSdk/jsSdkGuide/methodReverseGeocoder 使用案例: var QQMapWX = require('../../static/js/qqmap-wx-jssdk.min'); var qqmapsdk; Page({     onLoad: function () {         // 实例化API核心类         qqmapsdk = new QQMapWX({             key: '申请的key'         });     },     onShow: function () {         let that = this         wx.getLocation({             type: "gcj02",             success(res) {                 that.reverseGeocoder(res.latitude,res.longitude)             },             fail(err) {                 console.log(11111111);                 wx.hideLoading();                 wx.showToast({                     title: '定位失败',                     icon: 'none',                     duration: 1500                 })                 self.setData({                     lastPage: false,                     isRefreshing: false                 })             }         })     },     reverseGeocoder(lat, lng) {         let that = this         qqmapsdk.reverseGeocoder({             location: {                 latitude: lat,                 longitude: lng             },             success: function (res) { //成功后的回调                 console.log('reverseGeocoder:', res);                 that.setData({                                      })             },             fail: function (error) {                 console.error(error);             },             complete: function (res) {                 console.log(res);             }         })     }, }) [图片]
小程序定位只能拿到经纬度吗?可以拿到地理信息不?我想拿到当前定位经纬度和地址描述 除了经纬度还需要 xxx路xx号 或者 xxx小区南门 或者xxx地铁站 怎么拿到详细信息呢?只能服务端用api解析吗?
03-04getLocation() { let that = this; wx.showLoading({ title: '正在获取当前位置...', mask: true, }); wx.getLocation({ type: 'wgs84', // 坐标类型 success: (res) => { console.log('位置信息', res); const { latitude, longitude } = res; this.setData({ location: { latitude, longitude }, // 更新页面数据 }); wx.showToast({ title: '位置获取成功', icon: 'success', }); wx.hideLoading(); }, fail: (err) => { console.error('获取位置失败', err); wx.showToast({ title: '无法获取位置,请检查权限或网络', icon: 'none', }); // 如果用户拒绝授权,引导用户开启权限 wx.getSetting({ success(res) { if (!res.authSetting['scope.userLocation']) { wx.showModal({ title: '授权提示', content: '定位失败,是否开启定位权限?', confirmText: '去开启', success(modalRes) { if (modalRes.confirm) { wx.openSetting({ success() { // 重新发起定位 that.getLocation(); }, }); } }, }); } }, }); }, }); },
公众号网页开发,如何在本地调试中调用wx.config接口?并使用wx.getLoaction方法?如何在本地调试中调用wx.config接口?并使用wx.getLoaction方法?
02-28参考这个文章可以申请成功,我之前申请很多次都没有成功,我参考这个审核通过了 https://blog.csdn.net/liuqinrui520/article/details/136702532
getLocation审核一直不通过?appId: wx0293b252425a6786 小程序主要面向企业内部员工,需要查看内部门店位置并前往,扫码需要拿到用户附近门店正在进行的活动。审核一直不通过,具体需要怎么做
02-19profitSharing的参数不是true或false吗,还有使用这个,你开通分账没有
微信统一下单添加"profitSharing":"Y"就会出现调起支付JSAPI缺少参数怎么解决?微信统一下单添加"profitSharing":"Y"就会出现调起支付JSAPI缺少参数:total_fee,这是啥问题 [图片]
02-19