Authored by 李奇

有货技术支持说明设定

... ... @@ -13,7 +13,6 @@ import {Actionsheet} from '../../vendors/zanui/index';
let app = getApp();
let router = global.router;
let {windowHeight} = app.getSystemInfo();
let yas;
... ... @@ -95,6 +94,8 @@ Page(Object.assign({
productOnlyProvideByYohoStore: false,
productNotForSale: false,
windowHeight: 0
},
getUserInfoLogin,
onLoad: function(options) {
... ... @@ -130,9 +131,16 @@ Page(Object.assign({
login: !!app.getUid()
});
},
onReady: function() {
wx.getSystemInfo().then(({windowHeight}) => {
this.setData({
windowHeight
});
});
},
onPageScroll: function({scrollTop}) {
const showMenu = scrollTop > 50;
const show = scrollTop > windowHeight * 2;
const show = scrollTop > this.data.windowHeight * 2;
if (show !== this.data.showBackTop) {
this.setData({
... ...
... ... @@ -4,7 +4,6 @@ import listModel from '../../models/product/list';
let yas;
const app = getApp();
const {windowHeight} = getApp().getSystemInfo();
Page({
data: {
... ... @@ -20,7 +19,7 @@ Page({
allLoaded: false,
productList: [],
totalZero: false,
windowHeight
windowHeight: 0
},
onLoad: function(options) {
Object.keys(options).map(key => {
... ... @@ -38,10 +37,17 @@ Page({
yas = new Yas();
yas.pageOpenReport();
},
onReady: function() {
wx.getSystemInfo().then(({windowHeight}) => {
this.setData({
windowHeight
});
});
},
onPageScroll: function({scrollTop}) {
if (scrollTop > windowHeight * 2 !== this.data.showBackTop) {
if (scrollTop > this.data.windowHeight * 2 !== this.data.showBackTop) {
this.setData({
showBackTop: scrollTop > windowHeight * 2
showBackTop: scrollTop > this.data.windowHeight * 2
});
}
},
... ... @@ -123,7 +129,7 @@ Page({
loading: false,
allLoaded: this.data.page > this.data.totalPage,
productList: this.data.productList.concat(list),
totalZero: this.data.productList.concat(list).length
totalZero: this.data.productList.concat(list).length === 0
});
}
}).catch(() => {});
... ...
... ... @@ -4,7 +4,6 @@ import listModel from '../../models/product/list';
let yas;
const app = getApp();
const {windowHeight} = getApp().getSystemInfo();
Page({
data: {
... ... @@ -21,7 +20,7 @@ Page({
showLoading: false,
productList: [],
totalZero: false,
windowHeight
windowHeight: 0
},
onLoad: function(options) {
Object.keys(options).map(key => {
... ... @@ -39,10 +38,17 @@ Page({
yas = new Yas();
yas.pageOpenReport();
},
onReady: function() {
wx.getSystemInfo().then(({windowHeight}) => {
this.setData({
windowHeight
});
});
},
onPageScroll: function({scrollTop}) {
if (scrollTop > windowHeight * 2 !== this.data.showBackTop) {
if (scrollTop > this.data.windowHeight * 2 !== this.data.showBackTop) {
this.setData({
showBackTop: scrollTop > windowHeight * 2
showBackTop: scrollTop > this.data.windowHeight * 2
});
}
},
... ...
... ... @@ -8,12 +8,11 @@ import formatImage from '../../../utils/formatImage';
// 获取应用实例
let app = getApp();
let yas;
let {windowHeight} = app.getSystemInfo();
let timer;
Page({
data: {
windowHeight,
windowHeight: 0,
orderType: 1,
ordersList: [],
reason: [],
... ... @@ -38,6 +37,13 @@ Page({
onShow: function() {
this.getOrders(this.data.orderType);
},
onReady: function() {
wx.getSystemInfo().then(({windowHeight}) => {
this.setData({
windowHeight
});
});
},
startTimer: function() {
let that = this;
... ...
... ... @@ -2,7 +2,7 @@ import wx from '../../../utils/wx';
import Yas from '../../../common/yas';
import searchModel from '../../../models/product/search';
const {windowHeight} = getApp().getSystemInfo();
const app = getApp();
let yas;
... ... @@ -22,7 +22,7 @@ Page({
showNoMore: false,
showBackTop: false,
recentKeys: [],
windowHeight: windowHeight
windowHeight: 0
},
onReachBottom: function() {
if (this.data.currentPage < this.data.totalPage) {
... ... @@ -76,10 +76,17 @@ Page({
onShow: function() {
this.getRecentKeys();
},
onReady: function() {
wx.getSystemInfo().then(({windowHeight}) => {
this.setData({
windowHeight
});
});
},
onPageScroll: function({scrollTop}) {
if (scrollTop > windowHeight * 2 !== this.data.showBackTop) {
if (scrollTop > this.data.windowHeight * 2 !== this.data.showBackTop) {
this.setData({
showBackTop: scrollTop > windowHeight * 2
showBackTop: scrollTop > this.data.windowHeight * 2
});
}
},
... ...
... ... @@ -4,7 +4,6 @@ import listModel from '../../../models/product/list';
let yas;
const app = getApp();
const {windowHeight} = getApp().getSystemInfo();
Page({
data: {
... ... @@ -20,7 +19,7 @@ Page({
allLoaded: false,
productList: [],
totalZero: false,
windowHeight
windowHeight: 0
},
onLoad: function(options) {
Object.keys(options).map(key => {
... ... @@ -37,10 +36,17 @@ Page({
yas = new Yas();
yas.pageOpenReport();
},
onReady: function() {
wx.getSystemInfo().then(({windowHeight}) => {
this.setData({
windowHeight
});
});
},
onPageScroll: function({scrollTop}) {
if (scrollTop > windowHeight * 2 !== this.data.showBackTop) {
if (scrollTop > this.data.windowHeight * 2 !== this.data.showBackTop) {
this.setData({
showBackTop: scrollTop > windowHeight * 2
showBackTop: scrollTop > this.data.windowHeight * 2
});
}
},
... ...