Authored by 沈志敏

fix bug

... ... @@ -2,17 +2,7 @@ var yoho = require('yoho');
var $ = require('jquery');
var util = require('common/util');
$(() => {
window.addEventListener('touchmove', function() {
var topHeight = document.body.scrollTop;
if (topHeight > 50) {
$('#header').addClass('top-change');
} else {
$('#header').removeClass('top-change');
}
});
yoho.ready(() => {
if (!yoho.isLogin) {
$('.auth').addClass('no-intercept');
$('.auth').on('click', function() {
... ... @@ -37,4 +27,20 @@ $(() => {
yoho.showLoading(false);
util.visibilitychange();
window.addEventListener('touchmove', function() {
var topHeight = document.body.scrollTop;
if (topHeight > 50) {
$('#header').addClass('top-change');
} else {
$('#header').removeClass('top-change');
}
});
document.addEventListener('visibilitychange', () => {
if (!document.hidden) {
location.reload();
}
});
});
... ...
... ... @@ -7,16 +7,19 @@
const Vue = require('vue');
const OrderDetail = require('me/order-detail.vue');
const yoho = require('yoho');
require('common/vue-filter')(Vue);
require('common/count-down');
new Vue({
el: '#order-detail',
data: {
orderCode: document.getElementById('order-code').value
},
components: {
OrderDetail
}
yoho.ready(() => {
new Vue({
el: '#order-detail',
data: {
orderCode: document.getElementById('order-code').value
},
components: {
OrderDetail
}
});
});
... ...
... ... @@ -33,6 +33,14 @@ const yoho = {
*/
data: window.yohoInterfaceData,
ready(callback) {
if (this.isApp) {
document.addEventListener('deviceready', callback);
} else {
callback();
}
},
/**
* 跳转至指定index的tab(从0开始)
* @param args 传递给 APP 的参数 {"index":tab_index}
... ...