...
|
...
|
@@ -5603,6 +5603,7 @@ exports.showDialog = function(data, callback) { |
|
|
|
|
|
var dialogStr = dialogTemplate(data),
|
|
|
$dialogBox,
|
|
|
defaultHideDuraton,
|
|
|
dialogWrapperHammer;
|
|
|
|
|
|
$('.dialog-wrapper').remove();
|
...
|
...
|
@@ -5629,9 +5630,13 @@ exports.showDialog = function(data, callback) { |
|
|
|
|
|
//隐藏
|
|
|
if (data.autoHide) {
|
|
|
defaultHideDuraton = 1000;
|
|
|
if (data.autoHide > 1) {
|
|
|
defaultHideDuraton = data.autoHide;
|
|
|
}
|
|
|
setTimeout(function() {
|
|
|
$dialogWrapper.fadeOut();
|
|
|
}, 1000);
|
|
|
}, defaultHideDuraton);
|
|
|
}
|
|
|
|
|
|
dialogWrapperHammer.on('tap', function(event) {
|
...
|
...
|
@@ -5642,12 +5647,8 @@ exports.showDialog = function(data, callback) { |
|
|
callback();
|
|
|
}
|
|
|
});
|
|
|
|
|
|
};
|
|
|
|
|
|
exports.hideDialog = function() {
|
|
|
$dialogWrapper.fadeOut();
|
|
|
};
|
|
|
|
|
|
});
|
|
|
define("js/me/order-detail", ["jquery","lazyload","hammer"], function(require, exports, module){
|
...
|
...
|
@@ -6010,11 +6011,21 @@ lazyLoad(); |
|
|
headerNavHammer = new Hammer(document.getElementById('yoho-header'));
|
|
|
|
|
|
headerNavHammer.on('tap', function(e) {
|
|
|
var suggestText = $('#suggest-textarea').val();
|
|
|
var suggestText = $('#suggest-textarea').val(),
|
|
|
textReg = /\S+/;
|
|
|
|
|
|
|
|
|
if ($(e.target).hasClass('nav-btn')) {
|
|
|
|
|
|
if (!textReg.test(suggestText)) {
|
|
|
diaLog.showDialog({
|
|
|
autoHide: true,
|
|
|
dialogText: '意见不能为空'
|
|
|
});
|
|
|
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
$.ajax({
|
|
|
method: 'post',
|
|
|
url: '/home/savesuggest',
|
...
|
...
|
@@ -6031,10 +6042,18 @@ headerNavHammer.on('tap', function(e) { |
|
|
setTimeout(function() {
|
|
|
location.pathname = 'home/suggest';
|
|
|
}, 2000);
|
|
|
} else {
|
|
|
diaLog.showDialog({
|
|
|
autoHide: true,
|
|
|
dialogText: '提交失败~'
|
|
|
});
|
|
|
}
|
|
|
}).fail(function() {
|
|
|
|
|
|
//TODO
|
|
|
diaLog.showDialog({
|
|
|
autoHide: true,
|
|
|
dialogText: '网络错误~'
|
|
|
});
|
|
|
});
|
|
|
}
|
|
|
});
|
...
|
...
|
@@ -7317,19 +7336,14 @@ $page.on('touchstart', '.del-icon', function() { |
|
|
success: function(data) {
|
|
|
if (data.code === 200) {
|
|
|
dialog.showDialog({
|
|
|
dialogText: '删除浏览记录成功',
|
|
|
autoHide: true,
|
|
|
fast: true
|
|
|
});
|
|
|
dialogText: '删除浏览记录成功',
|
|
|
autoHide: 2000,
|
|
|
fast: true
|
|
|
});
|
|
|
setTimeout(function() {
|
|
|
window.history.go(0);
|
|
|
}, 1200);
|
|
|
}
|
|
|
},
|
|
|
complete: function() {
|
|
|
setTimeout(function() {
|
|
|
dialog.hideDialog();
|
|
|
}, 1500);
|
|
|
}
|
|
|
});
|
|
|
});
|
...
|
...
|
@@ -7560,6 +7574,7 @@ define("js/me/pay", ["jquery","hammer"], function(require, exports, module){ |
|
|
var $ = require("jquery");
|
|
|
|
|
|
var loading = require("js/plugin/loading"),
|
|
|
tip = require("js/plugin/tip"),
|
|
|
Hammer = require("hammer");
|
|
|
|
|
|
var theOrderCode = document.getElementById('ordercode').value;
|
...
|
...
|
@@ -7571,7 +7586,7 @@ var appIconPosition = { |
|
|
baidu: '-2.7rem',
|
|
|
weixin: '-1.2rem',
|
|
|
QQ: '-5.4rem',
|
|
|
bank: '-4'
|
|
|
bank: '-4rem'
|
|
|
};
|
|
|
|
|
|
//隐藏微信分享选项
|
...
|
...
|
@@ -7631,11 +7646,11 @@ function callpay(orderCode) { |
|
|
jsApiParameters = res.data.jsApiParameters;
|
|
|
jsApiCall(orderCode, jsApiParameters);
|
|
|
} else {
|
|
|
alert('微信支付调取失败');
|
|
|
tip.show('微信支付调取失败');
|
|
|
}
|
|
|
},
|
|
|
error: function() {
|
|
|
alert('请刷新本页面,完成微信支付');
|
|
|
tip.show('请刷新本页面,完成微信支付');
|
|
|
}
|
|
|
});
|
|
|
}
|
...
|
...
|
@@ -7653,11 +7668,11 @@ function isWXOpen() { |
|
|
}
|
|
|
|
|
|
function hideWeChatPay() {
|
|
|
var payApps = document.getElementsByClassName('app');
|
|
|
var $payApps = $('.app');
|
|
|
|
|
|
[].forEach.call(payApps, function(app, index) {
|
|
|
if (app.innerHTML.indexOf('微信') !== -1) {
|
|
|
app.parentNode.style.display = 'none';
|
|
|
$payApps.each(function(idx, app) {
|
|
|
if ($(app).attr('id') === 'weixin') {
|
|
|
$(app).parent().css('display', 'none');
|
|
|
return false;
|
|
|
}
|
|
|
});
|
...
|
...
|
@@ -7671,29 +7686,29 @@ function handleForWX() { |
|
|
|
|
|
|
|
|
function setAppIcon(el, position) {
|
|
|
el.style.backgroundPositionY = position;
|
|
|
$(el).css('background-position-y', position);
|
|
|
}
|
|
|
|
|
|
function loadIcon() {
|
|
|
var boxs = document.getElementsByClassName('box');
|
|
|
var div = null;
|
|
|
var $boxs = $('.box');
|
|
|
var $div = null;
|
|
|
var appid = null;
|
|
|
|
|
|
[].forEach.call(boxs, function(box, index) {
|
|
|
div = box.getElementsByClassName('icon')[0].getElementsByTagName('div')[0];
|
|
|
if (div) {
|
|
|
appid = box.getAttribute('id');
|
|
|
$boxs.each(function(idx, box) {
|
|
|
$div = $(box).find('.icon').find('div');
|
|
|
if ($div.length > 0) {
|
|
|
appid = $(box).attr('id');
|
|
|
if (appid !== 'alipay') {
|
|
|
setAppIcon(div, appIconPosition[appid]);
|
|
|
setAppIcon($div, appIconPosition[appid]);
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
|
|
|
function showPage() {
|
|
|
var pageList = document.getElementsByClassName('payapp-list')[0];
|
|
|
var $pageList = $('.payapp-list');
|
|
|
|
|
|
pageList.style.visibility = 'visible';
|
|
|
$pageList.css('visibility', 'visible');
|
|
|
}
|
|
|
|
|
|
if (wxHammer) {
|
...
|
...
|
|