安卓板和iphone 版显示样式不一致
安卓版文字view 显示在底部正常的,但是iphone 版文字view显示在顶部 ,微信开发者工具调试时也是在底部 [图片] js wxss wxml代码如下 [代码]//list.js[代码][代码]var[代码] [代码]md5Utils = require([代码][代码]'../../utils/md5.js'[代码][代码]);[代码][代码]var[代码] [代码]app = getApp()[代码][代码]var[代码] [代码]number =1[代码][代码]var[代码] [代码]isLoading = [代码][代码]false[代码][代码]Page({[代码][代码] [代码][代码]data: {[代码][代码] [代码][代码]arr_res: [],[代码][代码] [代码][代码]windowHeight: [代码][代码]"500px"[代码][代码],[代码][代码] [代码][代码]loadingHidden: [代码][代码]true[代码][代码],[代码][代码] [代码][代码]lodingInfo: [代码][代码]"加载更多"[代码][代码],[代码][代码] [代码][代码]url:[代码][代码]"../../pages/content/content"[代码][代码] [代码][代码]},[代码][代码] [代码][代码]onLoad: [代码][代码]function[代码][代码](options) {[代码][代码] [代码][代码]//使number重置为0[代码][代码] [代码][代码]number = 1;[代码][代码] [代码][代码]console.log(options.listId);[代码][代码] [代码][代码]console.log(options.listName);[代码][代码] [代码][代码]var[代码] [代码]that = [代码][代码]this[代码][代码];[代码][代码] [代码][代码]wx.getSystemInfo({[代码][代码] [代码][代码]success: [代码][代码]function[代码][代码](res) {[代码][代码] [代码][代码]console.log(res.windowHeight + [代码][代码]"px"[代码][代码]);[代码][代码] [代码][代码]that.setData({[代码][代码] [代码][代码]windowHeight: res.windowHeight + [代码][代码]"px"[代码][代码] [代码][代码]})[代码][代码] [代码][代码]},[代码][代码] [代码][代码]fail: [代码][代码]function[代码][代码](e) {[代码][代码] [代码][代码]console.log([代码][代码]"获取设备信息失败"[代码] [代码]+ e);[代码][代码] [代码][代码]}[代码][代码] [代码][代码]});[代码] [代码] [代码][代码]// 动态设置标题栏。。。无效[代码][代码] [代码][代码]wx.setNavigationBarTitle({[代码][代码] [代码][代码]title: options.listName,[代码][代码] [代码][代码]fail: [代码][代码]function[代码][代码]() {[代码][代码] [代码][代码]console.log([代码][代码]"更改标题失败"[代码][代码]);[代码][代码] [代码][代码]},[代码][代码] [代码][代码]success: [代码][代码]function[代码][代码]() {[代码][代码] [代码][代码]console.log([代码][代码]"更改标题成功"[代码][代码]);[代码][代码] [代码][代码]}[代码][代码] [代码][代码]});[代码][代码] [代码][代码]wx.request({[代码][代码] [代码][代码]url: app.globalData.globalUrl + [代码][代码]"tdouroubaikenew/list"[代码][代码],[代码][代码]//20170806 add[代码][代码] [代码][代码]data: {[代码][代码] [代码][代码]'page'[代码][代码]: number,[代码][代码] [代码][代码]'limit'[代码][代码]: 20,[代码][代码] [代码][代码]'ke'[代码][代码]: [代码][代码]this[代码][代码].options.listName,[代码][代码] [代码][代码]},[代码][代码] [代码][代码]header: {[代码][代码] [代码][代码]'token'[代码][代码]: app.globalData.token,[代码][代码] [代码][代码]'sign'[代码][代码]: md5Utils.hexMD5([代码][代码]"page"[代码] [代码]+ number + [代码][代码]"limit20ke"[代码] [代码]+ encodeURI([代码][代码]this[代码][代码].options.listName)+ app.globalData.token),[代码][代码] [代码][代码]'timestamp'[代码][代码]: Date.now(), [代码][代码] [代码][代码]'Content-Type'[代码][代码]: [代码][代码]'text/html;charset=UTF-8'[代码][代码] [代码][代码]},[代码][代码] [代码][代码]success: [代码][代码]function[代码][代码](res) {[代码][代码] [代码][代码]number++;[代码][代码] [代码][代码]that.setData({[代码][代码] [代码][代码]arr_res: res.data.page.list[代码][代码] [代码][代码]});[代码][代码] [代码][代码]console.log(that.data.arr_res);[代码][代码] [代码][代码]},[代码][代码] [代码][代码]fail: [代码][代码]function[代码][代码](error) {[代码][代码] [代码][代码]console.log(error);[代码][代码] [代码][代码]that.setData({[代码][代码] [代码][代码]request_fail: [代码][代码]true[代码][代码],[代码][代码] [代码][代码]});[代码][代码] [代码][代码]}[代码][代码] [代码][代码]})[代码][代码] [代码][代码]},[代码][代码] [代码][代码]//滑到底部监听事件[代码][代码] [代码][代码]lower: [代码][代码]function[代码][代码](e) {[代码][代码] [代码][代码]console.log(e);[代码][代码] [代码][代码]var[代码] [代码]that = [代码][代码]this[代码][代码];[代码][代码] [代码][代码]if[代码] [代码](number < 20 && !isLoading) {[代码][代码] [代码][代码]isLoading = [代码][代码]true[代码][代码];[代码][代码] [代码][代码]that.setData({[代码][代码] [代码][代码]loadingHidden: [代码][代码]false[代码][代码] [代码][代码]})[代码][代码] [代码][代码]wx.request({[代码][代码] [代码][代码]url: app.globalData.globalUrl + [代码][代码]"tdouroubaikenew/list"[代码][代码],[代码][代码]//20170806 add[代码][代码] [代码][代码]data: {[代码][代码] [代码][代码]'page'[代码][代码]: number,[代码][代码] [代码][代码]'limit'[代码][代码]: 20,[代码][代码] [代码][代码]'ke'[代码][代码]: [代码][代码]this[代码][代码].options.listName,[代码][代码] [代码][代码]},[代码][代码] [代码][代码]header: {[代码][代码] [代码][代码]'token'[代码][代码]: app.globalData.token,[代码][代码] [代码][代码]'sign'[代码][代码]: md5Utils.hexMD5([代码][代码]"page"[代码] [代码]+ number + [代码][代码]"limit20ke"[代码] [代码]+ encodeURI([代码][代码]this[代码][代码].options.listName) + app.globalData.token),[代码][代码] [代码][代码]'timestamp'[代码][代码]: Date.now(),[代码][代码] [代码][代码]'Content-Type'[代码][代码]: [代码][代码]'text/html;charset=UTF-8'[代码][代码] [代码][代码]},[代码][代码] [代码][代码]success: [代码][代码]function[代码][代码](res) {[代码][代码] [代码][代码]number++; [代码][代码] [代码][代码]that.setData({[代码][代码] [代码][代码]arr_res: that.data.arr_res.concat(res.data.page.list),[代码][代码] [代码][代码]lodingInfo: [代码][代码]"加载更多"[代码][代码],[代码][代码] [代码][代码]});[代码][代码] [代码][代码]console.log(that.data.arr_res);[代码][代码] [代码][代码]},[代码][代码] [代码][代码]fail: [代码][代码]function[代码][代码](error) {[代码][代码] [代码][代码]// number--;[代码][代码] [代码][代码]console.log(error);[代码][代码] [代码][代码]that.setData({[代码][代码] [代码][代码]lodingInfo: [代码][代码]"加载失败"[代码][代码],[代码][代码] [代码][代码]})[代码][代码] [代码][代码]},[代码][代码] [代码][代码]complete: [代码][代码]function[代码][代码]() {[代码][代码] [代码][代码]isLoading = [代码][代码]false[代码][代码];[代码][代码] [代码][代码]that.setData({[代码][代码] [代码][代码]loadingHidden: [代码][代码]true[代码][代码],[代码][代码] [代码][代码]})[代码][代码] [代码][代码]}[代码][代码] [代码][代码]})[代码][代码] [代码][代码]}[代码][代码] [代码][代码]},[代码][代码]})[代码][代码].view-request-fail{[代码][代码] [代码][代码]width[代码][代码]: [代码][代码]100%[代码][代码];[代码][代码] [代码][代码]height[代码][代码]: [代码][代码]100%[代码][代码];[代码][代码] [代码][代码]display[代码][代码]: flex;[代码][代码] [代码][代码]justify-[代码][代码]content[代码][代码]: [代码][代码]center[代码][代码];[代码][代码] [代码][代码]align-items: [代码][代码]center[代码][代码];[代码][代码]}[代码][代码].text-request-fail{[代码][代码] [代码][代码]font-size[代码][代码]: [代码][代码]18px[代码][代码];[代码][代码] [代码][代码]color[代码][代码]: [代码][代码]rgb[代码][代码]([代码][代码]85[代码][代码], [代码][代码]85[代码][代码], [代码][代码]85[代码][代码])[代码][代码]}[代码][代码].main {[代码][代码] [代码][代码]display[代码][代码]: flex;[代码][代码] [代码][代码]flex-[代码][代码]direction[代码][代码]: column;[代码][代码]}[代码] [代码].head {[代码][代码] [代码][代码]display[代码][代码]: flex;[代码][代码] [代码][代码]flex-[代码][代码]direction[代码][代码]: row; [代码][代码] [代码][代码]position[代码][代码]: [代码][代码]relative[代码][代码];[代码][代码] [代码][代码]width[代码][代码]: [代码][代码]100%[代码][代码];[代码][代码] [代码][代码]height[代码][代码]: [代码][代码]400[代码][代码]rpx; [代码][代码]}[代码][代码].img{[代码][代码] [代码][代码]position[代码][代码]: [代码][代码]absolute[代码][代码];[代码][代码] [代码][代码]width[代码][代码]: [代码][代码]100%[代码][代码];[代码][代码] [代码][代码]height[代码][代码]: [代码][代码]400[代码][代码]rpx;[代码][代码] [代码] [代码]}[代码][代码].title-view{[代码][代码] [代码][代码]position[代码][代码]: [代码][代码]absolute[代码][代码]; [代码][代码] [代码][代码]align-self: flex-end;[代码][代码] [代码][代码]width[代码][代码]: [代码][代码]100%[代码][代码];[代码][代码] [代码][代码]height[代码][代码]: [代码][代码]auto[代码][代码]; [代码][代码] [代码][代码]background-color[代码][代码]: rgba([代码][代码]39[代码][代码], [代码][代码]174[代码][代码], [代码][代码]96[代码][代码],[代码][代码]0.5[代码][代码])[代码][代码]}[代码][代码].title{[代码][代码] [代码][代码]font-size[代码][代码]: [代码][代码]18px[代码][代码];[代码][代码] [代码][代码]color[代码][代码]: [代码][代码]rgb[代码][代码]([代码][代码]255[代码][代码], [代码][代码]255[代码][代码], [代码][代码]255[代码][代码]);[代码][代码] [代码][代码]margin-left[代码][代码]: [代码][代码]40[代码][代码]rpx;[代码][代码] [代码][代码]opacity: [代码][代码]1.0[代码][代码]}[代码][代码].titlet{[代码][代码] [代码] [代码] [代码][代码]font-size[代码][代码]: [代码][代码]18px[代码][代码];[代码][代码] [代码][代码]color[代码][代码]: [代码][代码]gray[代码][代码];[代码][代码] [代码][代码]margin-left[代码][代码]: [代码][代码]40[代码][代码]rpx;[代码][代码] [代码][代码]opacity: [代码][代码]1.0[代码][代码]}[代码][代码].text{[代码][代码] [代码][代码]display[代码][代码]: flex;[代码][代码] [代码][代码]flex-[代码][代码]direction[代码][代码]: column;[代码][代码] [代码][代码]margin[代码][代码]: [代码][代码]40[代码][代码]rpx;[代码][代码]}[代码][代码].line{[代码][代码] [代码][代码]display[代码][代码]: flex;[代码][代码] [代码][代码]flex: [代码][代码]1[代码][代码];[代码][代码] [代码][代码]height[代码][代码]: [代码][代码]2[代码][代码]rpx;[代码][代码] [代码][代码]margin-top[代码][代码]: [代码][代码]10[代码][代码]rpx;[代码][代码] [代码][代码]/*background-color: #757575*/[代码][代码] [代码][代码]background-color[代码][代码]: lightgray[代码][代码]}[代码][代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]"view-request-fail"[代码] [代码]wx:if[代码][代码]=[代码][代码]"{{request_fail}}"[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]text[代码] [代码]class[代码][代码]=[代码][代码]"text-request-fail"[代码][代码]>网络或服务器错误,请检查网络...</[代码][代码]text[代码][代码]>[代码][代码]</[代码][代码]view[代码][代码]>[代码][代码]<[代码][代码]view[代码] [代码]wx:if[代码][代码]=[代码][代码]"{{!request_fail}}"[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]scroll-view[代码] [代码]scroll-y[代码][代码]=[代码][代码]"true"[代码] [代码]bindscrolltolower[代码][代码]=[代码][代码]"lower"[代码] [代码]style[代码][代码]=[代码][代码]"height:{{windowHeight}};"[代码] [代码]lower-threshold[代码][代码]=[代码][代码]"200"[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]navigator[代码] [代码]wx:for[代码][代码]=[代码][代码]"{{arr_res}}"[代码] [代码]url[代码][代码]=[代码][代码]"{{url}}?id={{item.id}}&name={{item.name}}"[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]"main"[代码][代码]> [代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]"head"[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]image[代码] [代码]class[代码][代码]=[代码][代码]"img"[代码] [代码]mode[代码][代码]=[代码][代码]"aspectFill"[代码] [代码]src[代码][代码]=[代码][代码]"{{item.pic}}"[代码] [代码]/>[代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]"title-view"[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]text[代码] [代码]class[代码][代码]=[代码][代码]"title"[代码][代码]>{{item.name}}{{item.ename}}</[代码][代码]text[代码][代码]>[代码][代码] [代码][代码]</[代码][代码]view[代码][代码]>[代码][代码] [代码][代码]</[代码][代码]view[代码][代码]>[代码][代码] [代码][代码]<!--<text class="titlet">{{item.name}}{{item.ename}}</text>-->[代码][代码] [代码][代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]"line"[代码] [代码]/>[代码][代码] [代码][代码]</[代码][代码]view[代码][代码]>[代码][代码] [代码][代码]</[代码][代码]navigator[代码][代码]>[代码][代码] [代码][代码]</[代码][代码]scroll-view[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]loading[代码] [代码]hidden[代码][代码]=[代码][代码]"{{loadingHidden}}"[代码][代码]>{{lodingInfo}}</[代码][代码]loading[代码][代码]>[代码][代码]</[代码][代码]view[代码][代码]>[代码]