之前页面转发是好好的,这次我增加了一个view,通过按钮切换,使一个view隐藏,一个view显示,默认显示一个,现在在转发时,苹果的iOS10.3.3版本是正常转发的,但是在华为meta8上不能转发,直接闪退,求解。
var app = getApp()
var bathUrl = getApp().globalData.bathUrl
Page({
data: {
loadingHidden: false ,
audioIndex: -1,
winWidth: 0,
expertList: [ '/image/linwei.jpg' , '/image/zhangxuling.jpg' , '/image/jinying.jpg' , '/image/chendade.jpg' , '/image/liuxiangmei.jpg' , '/image/yangmiao.jpg' ],
audioType: [],
videoList:[],
currentTab:1,
oldVideoID: ''
},
onLoad: function (options) {
var that = this ;
wx.getSystemInfo({
success: function (res) {
that.setData({
winWidth: res.windowWidth
});
}
});
},
swichNav: function (e) {
var that = this ;
if (that.data.currentTab === e.target.dataset.current) {
return false ;
} else {
that.setData({
currentTab: e.target.dataset.current
})
}
},
onShareAppMessage: function () {
return {
success: function (res) {
console.log( "转发成功!" );
},
fail: function (res) {
console.log( "转发失败!" );
}
}
},
onReady: function () {
},
onShow: function () {
},
onHide: function () {
},
onUnload: function () {
}
})
|
< loading hidden = "{{loadingHidden}}" >
加载中...
</ loading >
< block >
< view class = "swiper-tab" >
< view data-current = "1" bindtap = "swichNav" class = "swiper-tab-list" >< text class = "{{currentTab==1 ? 'on' : ''}}" data-current = "1" bindtap = "swichNav" >听讲座</ text ></ view >
< view data-current = "2" bindtap = "swichNav" class = "swiper-tab-list" >< text class = "{{currentTab==2 ? 'on' : ''}}" data-current = "2" bindtap = "swichNav" >看视频</ text ></ view >
</ view >
</ block >
< view class = "{{currentTab==1 ? 'view-show' : 'view-hidden'}}" >
< swiper indicator-dots = "true" autoplay = "true" interval = "6000" duration = "1000" >
< block wx:for = "{{expertList}}" wx:key = "{{item}}" >
< swiper-item >
< image src = "{{item}}" mode = "aspectFill" style = "width:100%; height:100%;" ></ image >
</ swiper-item >
</ block >
</ swiper >
< view class = 'content-item' >
< view class = "list-item" >
< view class = "list-itemcontent" wx:for = "{{audioType}}" wx:key = "{{item}}" >
…………………………………………
</ view >
</ view >
</ view >
</ view >
< view class = "{{currentTab==2 ? 'view-show' : 'view-hidden'}}" style = "height:100%;background-color:#e6e9eb" >
< view class = "video-view" wx:for = "{{videoList}}" wx:key = "{{item}}" >
…………………………………………………………
</ view >
</ view >
|
代码做了一层层的调试,发现时最底下一个view的问题,如果把这个view中动态获取的数据去掉,就可以转发,但是这是为什么呢,动态获取的video中的数据都是正常的呀,为什么加上了会黑屏闪退
在开发工具中点击转发,截取的屏幕也不全,如图。