- wx.makePhoneCall在ios上是一个底部弹出的菜单,背景颜色能改吗?目前是跟随系统的
wx.makePhoneCall在ios上是一个底部弹出的菜单,背景颜色能改吗?目前是跟随系统的 是否有配置直接固定是深色或者浅色模式?
05-07 - 使用swiper嵌套video组件,打开全屏能正常显示,退出全屏导致下一个swiper的vide错位
swiper组件嵌套video组件滑动展示,页面开启了"pageOrientation": "auto"允许屏幕旋转; 正常旋转没问题,旋转了之后切换swpier也没问题; 但是在竖屏状态点击某一个video全屏横屏展示之后,再保持横屏状态切换swpier组件,下一个video会错位; 没有响应"pageOrientation": "auto"屏幕旋转,或者响应异常? 最小复现demo index.wxml <view class="page-body"> <view class="page-section tc"> <swiper class="swiper-container"> <swiper-item wx:key="1" class="swiper-item"> <video id="myVideo" src="http://wxsnsdy.tc.qq.com/105/20210/snsdyvideodownload?filekey=30280201010421301f0201690402534804102ca905ce620b1241b726bc41dcff44e00204012882540400&bizid=1023&hy=SH&fileparam=302c020101042530230204136ffd93020457e3c4ff02024ef202031e8d7f02030f42400204045a320a0201000400" binderror="videoErrorCallback" danmu-list="{{danmuList}}" enable-danmu danmu-btn controls></video> </swiper-item> <swiper-item wx:key="2"> <video id="myVideo2" src="http://wxsnsdy.tc.qq.com/105/20210/snsdyvideodownload?filekey=30280201010421301f0201690402534804102ca905ce620b1241b726bc41dcff44e00204012882540400&bizid=1023&hy=SH&fileparam=302c020101042530230204136ffd93020457e3c4ff02024ef202031e8d7f02030f42400204045a320a0201000400" binderror="videoErrorCallback" danmu-list="{{danmuList}}" enable-danmu danmu-btn controls></video> </swiper-item> </swiper> <!-- <view class="weui-cells"> <view class="weui-cell weui-cell_input"> <view class="weui-cell__hd"> <view class="weui-label">弹幕内容</view> </view> <view class="weui-cell__bd"> <input bindblur="bindInputBlur" class="weui-input" type="text" placeholder="在此处输入弹幕内容" /> </view> </view> </view> --> <view class="btn-area"> <!-- <button bindtap="bindSendDanmu" class="page-body-button" type="primary" formType="submit">发送弹幕</button> <button bindtap="bindPlay" class="page-body-button" type="primary">播放</button> <button bindtap="bindPause" class="page-body-button" type="primary">暂停</button> --> <button bindtap="fullscreen" class="page-body-button" type="primary">全屏</button> </view> </view> </view> index.wxss @import "../lib/weui.wxss"; .weui-cells { margin-top: 80rpx; text-align: left; } .weui-label { width: 5em; } .page-body-button { margin-bottom: 30rpx; } .page-section { /* position: fixed; left: 0; right: 0; top: 0; bottom: 0; */ width: 100vw; height: 100vh; } .swiper-container { width: 100%; height: 100%; } .swiper-item { } .page-section video { width: 100vw; height: 100vh; } .btn-area { position: fixed; bottom: 0; left: 0; right: 0; z-index: 999; } index.json { "pageOrientation": "auto", "navigationStyle": "custom" } index.js function getRandomColor () { const rgb = [] for (let i = 0 ; i < 3; ++i){ let color = Math.floor(Math.random() * 256).toString(16) color = color.length == 1 ? '0' + color : color rgb.push(color) } return '#' + rgb.join('') } Page({ onReady: function (res) { this.videoContext = wx.createVideoContext('myVideo') }, inputValue: '', data: { src: '', danmuList: [{ text: '第 1s 出现的弹幕', color: '#ff0000', time: 1 }, { text: '第 3s 出现的弹幕', color: '#ff00ff', time: 3 }] }, bindInputBlur: function(e) { this.inputValue = e.detail.value }, bindSendDanmu: function () { this.videoContext.sendDanmu({ text: this.inputValue, color: getRandomColor() }) }, bindPlay: function() { this.videoContext.play() }, bindPause: function() { this.videoContext.pause() }, fullscreen: function() { console.log('fullscreen') this.videoContext.requestFullScreen({direction: 90}) }, videoErrorCallback: function(e) { console.log('视频错误信息:') console.log(e.detail.errMsg) } })
04-24 - video组件全屏模式下,写在video内的组件能正常展示出来,但是点击没法触发方法?
video组件全屏模式下,写在video内的组件能正常展示出来,但是点击没法触发方法? 目前需要完全自定义video组件的进度条等各种样式,因此隐藏了video默认的样式,自定义的全屏按钮,点击全屏之后,进入全屏模式,但是退出全屏按钮点击方法不生效
04-22 - "pageOrientation": "auto"屏幕方向旋转问题,是否能动态控制旋转?
目前需求,一个页面里面点击图片或者视频预览,想要支持屏幕旋转的时候图片和视频一起旋转 然后我就打开了"pageOrientation": "auto"屏幕方向 目前遇到的问题是关闭预览的时候,当前页面也会跟着屏幕旋转 是否能动态控制?或者有什么其他方案能实现我的需求,并且不影响原页面 我看了微信聊天的时候预览图片和视频能旋转,退出预览的时候自动恢复竖屏了,要如何实现这种效果?
04-22 - 想要自己开发一个类似wx.previewMedia的预览媒体资源的组件,发现覆盖不了右上角胶囊按钮?
想要自己开发一个类似wx.previewMedia的预览媒体资源的组件,发现覆盖不了右上角胶囊按钮 但是官方的wx.previewMedia能覆盖右上角胶囊按钮,不知如何实现的?
04-22 - 用户头像和昵称的使用咨询
https://developers.weixin.qq.com/miniprogram/dev/component/button.html <Input type="nickname"/> <Button open-type="chooseAvatar"/> 在使用这个两个组件获取用户头像和昵称的时候,因为微信安全策略 所以强制要求必须点击按钮或者输入框才能触发获取用户头像和昵称 这样的话 需要同时获取微信头像和昵称的步骤至少需要4步,必须用户点击获取,点击确认,还不能同时获取,只能单独获取 如果最后再加一个统一的提交,那么步骤就需要5步了,用户交互流程太长,能否优化或者在保证微信安全策略的前提下给出更好的解决方案? 比如点击一个输入框能够同时获取头像和昵称?简化步骤呢?
04-17 - 使用web-view内嵌h5页面,在h5页面跳转另外的一个微信小程序可以使用url scheme吗?
const browser = navigator.userAgent.toLowerCase(); if (browser.match(/MicroMessenger/i) == "micromessenger") { window.location.href = "weixin://dl/business/?appid=wx6a587c896b06f54d&path=pages/map/map"; }
2024-11-28