找到问题了,也不算是域名配置的问题,图片上传到服务器后,由于服务器返回给我存到数据库的url是http的,正式版和体验版无法打开http的文件,因为认为是不安全的,我把数据库的url改成https后,正式版和体验版就可以正常打开了
小程序调用openDocument打开文件预览?小程序调用openDocument打开文件预览,在正式版无法打开,体验版也无法打开,用体验版打开调试模式就可以正常打开了,请问这是什么问题
2020-03-26应该不行吧,小程序是基于微信客户端的,运行方式类似于浏览器打开页面,调用的接口也是微信所开放的,目前微信没有开放小程序独立于微信悬浮在桌面的接口吧,小程序的浮窗也只是允许悬浮在微信上面,微信隐藏,浮窗也隐藏了。
有没有API能让小程序像系统的悬浮按钮一样悬浮在其他APP的界面上?现在微信官方提供了可以让小程序悬浮在微信界面中的功能?那有没有能让小程序悬浮在其他APP页面上的功能的呢?
2020-03-02https://developers.weixin.qq.com/s/9fQ4yimi7Tcw这个是代码片段,这个在开发者工具上是没有任何问题的,在安卓手机也没问题,但是在苹果手机会有bug,因为这个代码片段无法在手机端调试,所以,我尽量跟原来的代码一样了,可以试试导入这个代码片段到一个小程序看能不能在苹果手机重现这个bug
关于swiper在苹果手机上的bug?[代码]<!--消息页面 -->[代码][代码]<!-- 顶部tab栏,可以切换“消息中心”和“联系人”,默认显示消息中心 -->[代码][代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]'msg-tab swiperTab'[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]"tab-msg swiper-tab-item {{currentTab==0?'active':''}}"[代码] [代码]data-current[代码][代码]=[代码][代码]"0"[代码] [代码]bindtap[代码][代码]=[代码][代码]"clickTab"[代码][代码]>消息中心</[代码][代码]view[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]"tab-people swiper-tab-item {{currentTab==1?'active':''}}"[代码] [代码]data-current[代码][代码]=[代码][代码]"1"[代码] [代码]bindtap[代码][代码]=[代码][代码]"clickTab"[代码][代码]>联系人</[代码][代码]view[代码][代码]>[代码][代码]</[代码][代码]view[代码][代码]>[代码] [代码]<!-- 消息中心 -->[代码][代码]<[代码][代码]view[代码] [代码]style[代码][代码]=[代码][代码]"width:100%;height:100%;"[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]swiper[代码] [代码]current[代码][代码]=[代码][代码]"{{currentTab}}"[代码] [代码]bindchange[代码][代码]=[代码][代码]"swiperTab"[代码] [代码]class[代码][代码]=[代码][代码]'swiper-contacts'[代码] [代码]style[代码][代码]=[代码][代码]'height:{{minfixheight}}rpx'[代码][代码]>[代码] [代码] [代码][代码]<[代码][代码]swiper-item[代码] [代码]style[代码][代码]=[代码][代码]"margin-top: 75rpx;"[代码] [代码]item-id[代码][代码]=[代码][代码]'0'[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]style[代码][代码]=[代码][代码]'background-color:#fff;border-top:1rpx solid #ddd;'[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]block[代码] [代码]wx:for[代码][代码]=[代码][代码]"{{msg_list}}"[代码] [代码]wx:key[代码][代码]=[代码][代码]"id"[代码] [代码]wx:for-item[代码][代码]=[代码][代码]"item"[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]"weui-cell weui-cell_access contact-item"[代码] [代码]hover-class[代码][代码]=[代码][代码]"weui-cell_active"[代码] [代码]style[代码][代码]=[代码][代码]'padding:20rpx 20rpx;'[代码] [代码]bindtap[代码][代码]=[代码][代码]"listTochat"[代码] [代码]data-item[代码][代码]=[代码][代码]"{{item}}"[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]'contact-msg'[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]style[代码][代码]=[代码][代码]"width:13%; display: flex;flex-direction: row;"[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]image[代码] [代码]src[代码][代码]=[代码][代码]'{{item.friend_picture}}'[代码] [代码]class[代码][代码]=[代码][代码]'contact-icon'[代码] [代码]catchtap[代码][代码]=[代码][代码]'show_information'[代码] [代码]data-item[代码][代码]=[代码][代码]"{{item}}"[代码][代码]></[代码][代码]image[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]wx:if[代码][代码]=[代码][代码]'{{item.msg_arr[item.msg_arr.length-1].unread == 0}}'[代码] [代码]style[代码][代码]=[代码][代码]"background-color:red;height:16rpx;width:16rpx;border-radius:16rpx;color:red;z-index:99;margin-left:-16rpx;"[代码][代码]></[代码][代码]view[代码][代码]>[代码][代码] [代码][代码]</[代码][代码]view[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]style[代码][代码]=[代码][代码]'display:flex;flex-direction: column;padding-left:6rpx;width:87%;'[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]style[代码][代码]=[代码][代码]'display:flex;flex-direction: row;'[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]text[代码] [代码]class[代码][代码]=[代码][代码]'contact-name'[代码][代码]>{{item.friend_name}}</[代码][代码]text[代码][代码]>[代码][代码] [代码][代码]</[代码][代码]view[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]text[代码] [代码]class[代码][代码]=[代码][代码]'contact-phone'[代码][代码]>{{item.msg_arr[item.msg_arr.length-1].content?item.msg_arr[item.msg_arr.length-1].content:item.msg_arr[item.msg_arr.length-1].Content}}</[代码][代码]text[代码][代码]>[代码][代码] [代码][代码]</[代码][代码]view[代码][代码]>[代码][代码] [代码][代码]</[代码][代码]view[代码][代码]>[代码][代码] [代码][代码]<!-- <view class='iconfont icon-dianhua phone-icon' catchtap="calling" data-phone_num='{{user.phone}}'></view> -->[代码][代码] [代码][代码]</[代码][代码]view[代码][代码]>[代码][代码] [代码][代码]</[代码][代码]block[代码][代码]>[代码][代码] [代码][代码]</[代码][代码]view[代码][代码]>[代码][代码] [代码][代码]</[代码][代码]swiper-item[代码][代码]>[代码] [代码] [代码][代码]<!-- 联系人 -->[代码][代码] [代码][代码]<[代码][代码]swiper-item[代码] [代码]style[代码][代码]=[代码][代码]"margin-top: 75rpx;"[代码] [代码]item-id[代码][代码]=[代码][代码]'1'[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]'contacts'[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]"weui_cells weui-cells_after-title"[代码][代码]>[代码] [代码] [代码][代码]<[代码][代码]block[代码] [代码]wx:for[代码][代码]=[代码][代码]"{{friends}}"[代码] [代码]wx:key[代码][代码]=[代码][代码]"groupId"[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]"weui-cell weui-cell_access department"[代码] [代码]hover-class[代码][代码]=[代码][代码]"weui-cell_active"[代码] [代码]bindtap[代码][代码]=[代码][代码]'spread'[代码] [代码]data-spread[代码][代码]=[代码][代码]'{{index}}'[代码] [代码]data-friends[代码][代码]=[代码][代码]'{{friends}}'[代码] [代码]data-minfixheight[代码][代码]=[代码][代码]'{{minfixheight}}'[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]'president-icon iconfont {{item.icon}}'[代码][代码]></[代码][代码]view[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]"weui-cell__bd todo-task"[代码][代码]>{{item.name}}[代码][代码] [代码][代码]<[代码][代码]text[代码] [代码]class[代码][代码]=[代码][代码]'num'[代码][代码]>({{item.list.length}})</[代码][代码]text[代码][代码]>[代码][代码] [代码][代码]</[代码][代码]view[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]'unfold'[代码] [代码]style[代码][代码]=[代码][代码]'transform: rotate({{item.isspread?"135deg":"45deg"}});'[代码][代码]></[代码][代码]view[代码][代码]>[代码][代码] [代码][代码]</[代码][代码]view[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]"weui-cell weui-cell_access groups-contents0 {{item.isspread&&item.list.length!=0?'open':'close'}}"[代码][代码]>[代码] [代码] [代码][代码]<[代码][代码]block[代码] [代码]wx:for[代码][代码]=[代码][代码]"{{item.list}}"[代码] [代码]wx:key[代码][代码]=[代码][代码]"id"[代码] [代码]wx:for-item[代码][代码]=[代码][代码]"user"[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]"weui-cell weui-cell_access contact-item"[代码] [代码]hover-class[代码][代码]=[代码][代码]"weui-cell_active"[代码] [代码]style[代码][代码]=[代码][代码]'padding:0px 20rpx;margin-left:20rpx;'[代码] [代码]bindtap[代码][代码]=[代码][代码]"contactTochat"[代码] [代码]data-item[代码][代码]=[代码][代码]"{{user}}"[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]'contact-person'[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]image[代码] [代码]src[代码][代码]=[代码][代码]'{{user.picture}}'[代码] [代码]class[代码][代码]=[代码][代码]'contact-icon'[代码] [代码]catchtap[代码][代码]=[代码][代码]'show_information'[代码] [代码]data-item[代码][代码]=[代码][代码]"{{user}}"[代码][代码]></[代码][代码]image[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]style[代码][代码]=[代码][代码]'display:flex;flex-direction: column;margin-left:20rpx;'[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]style[代码][代码]=[代码][代码]'display:flex;flex-direction: row;'[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]text[代码] [代码]class[代码][代码]=[代码][代码]'contact-name'[代码][代码]>{{user.name}}</[代码][代码]text[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]text[代码] [代码]style[代码][代码]=[代码][代码]'font-size: 28rpx;color: #888;line-height:54rpx;'[代码][代码]> ({{user.job_name}})</[代码][代码]text[代码][代码]>[代码][代码] [代码][代码]</[代码][代码]view[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]text[代码] [代码]class[代码][代码]=[代码][代码]'contact-phone'[代码][代码]>{{user.phone}}</[代码][代码]text[代码][代码]>[代码][代码] [代码][代码]</[代码][代码]view[代码][代码]>[代码][代码] [代码][代码]</[代码][代码]view[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]'iconfont icon-dianhua phone-icon'[代码] [代码]catchtap[代码][代码]=[代码][代码]"calling"[代码] [代码]data-phone_num[代码][代码]=[代码][代码]'{{user.phone}}'[代码][代码]></[代码][代码]view[代码][代码]>[代码][代码] [代码][代码]</[代码][代码]view[代码][代码]>[代码][代码] [代码][代码]</[代码][代码]block[代码][代码]>[代码][代码] [代码][代码]</[代码][代码]view[代码][代码]>[代码][代码] [代码][代码]</[代码][代码]block[代码][代码]>[代码] [代码] [代码][代码]</[代码][代码]view[代码][代码]>[代码][代码] [代码][代码]</[代码][代码]view[代码][代码]>[代码][代码] [代码][代码]</[代码][代码]swiper-item[代码][代码]>[代码][代码] [代码][代码]</[代码][代码]swiper[代码][代码]>[代码][代码]</[代码][代码]view[代码][代码]>[代码][代码]//滑动切换[代码][代码] [代码][代码]swiperTab: function(e) {[代码][代码] [代码][代码]var that = this;[代码][代码] [代码][代码]that.setData({[代码][代码] [代码][代码]currentTab: e.detail.current[代码][代码] [代码][代码]});[代码][代码] [代码][代码]if (this.noswiper) {[代码][代码] [代码][代码]if (e.detail.current == 1) {[代码][代码] [代码][代码]this.getFriends();[代码] [代码] [代码][代码]} else {[代码][代码] [代码][代码]this.getConversations();[代码][代码] [代码][代码]}[代码][代码] [代码][代码]}[代码][代码] [代码][代码]this.noswiper = true;[代码] [代码] [代码][代码]},[代码] [代码] [代码][代码]//点击切换[代码][代码] [代码][代码]clickTab: function(e) {[代码][代码] [代码][代码]var that = this;[代码][代码] [代码][代码]this.noswiper = false;[代码][代码] [代码][代码]if (this.data.currentTab == e.target.dataset.current) { //点击的是当前选项卡,则点击不生效[代码][代码] [代码][代码]return false;[代码][代码] [代码][代码]} else { //点击其他选项卡,切换显示[代码][代码] [代码][代码]that.setData({[代码][代码] [代码][代码]currentTab: e.target.dataset.current[代码][代码] [代码][代码]});[代码] [代码] [代码][代码]if (e.target.dataset.current == 1) {[代码][代码] [代码][代码]this.getFriends();[代码][代码] [代码][代码]} else {[代码][代码] [代码][代码]this.getConversations();[代码][代码] [代码][代码]}[代码] [代码] [代码][代码]}[代码][代码] [代码][代码]},[代码][图片][图片] 这是开发者工具中的效果,也是安卓手机的效果,也是预想中的效果,但是在苹果手机中右边swiper-item的列表直接拼接在左边swiper-item下面了[图片]
2019-10-22全局搜索这几个字,看这个错误弹窗是哪里抛出来的呀
一进入小程序页面就提示登录失败,首页并无登录代码[图片]
2019-10-22可以了,代码运行是没问题的,就是这里显示有问题,一直显示红色的而已,代码没问题了
小程序开发之云函数[图片] 云函数中的除法好像有问题,/ 后面的内容无法识别
2019-07-13