...
|
...
|
@@ -158,6 +158,55 @@ bindEvent.add(function() { |
|
|
$imgShow.attr('src', src);
|
|
|
}
|
|
|
|
|
|
var moveWidth = 135;
|
|
|
var w = 420;
|
|
|
var h = 560;
|
|
|
var _w = 1000;
|
|
|
var radio = w / _w;
|
|
|
var $moveObj = $('.move-object');
|
|
|
|
|
|
function move(e) {
|
|
|
var x = e.pageX - $imgShow.offset().left;
|
|
|
var y = e.pageY - $imgShow.offset().top;
|
|
|
|
|
|
var _x = x - moveWidth / 2;
|
|
|
var _y = y - moveWidth / 2;
|
|
|
|
|
|
var _rx = x + moveWidth / 2 ;
|
|
|
var _ry = y + moveWidth / 2 ;
|
|
|
|
|
|
|
|
|
if (_y < 0) {
|
|
|
_y = 0;
|
|
|
} else if (_y >= _ry) {
|
|
|
_y = _maxY;
|
|
|
}
|
|
|
|
|
|
if (_x < 0) {
|
|
|
_x = 0;
|
|
|
} else if (_x >= _maxX) {
|
|
|
_x = _maxX;
|
|
|
}
|
|
|
|
|
|
var offX = _x / radio;
|
|
|
var offY = _y / radio;
|
|
|
|
|
|
$moveObj.css({
|
|
|
left: _x,
|
|
|
top: _y
|
|
|
});
|
|
|
}
|
|
|
|
|
|
$imgShow.hover(function() {
|
|
|
$('.move-object').removeClass('hide');
|
|
|
}, function() {
|
|
|
$('.move-object').addClass('hide');
|
|
|
});
|
|
|
|
|
|
$imgShow.mousemove(function(e) {
|
|
|
move(e);
|
|
|
});
|
|
|
|
|
|
function getCouponAsync(cid) {
|
|
|
var uid = getUid(); // eslint-disable-line
|
|
|
|
...
|
...
|
@@ -526,7 +575,7 @@ bindEvent.add(function() { |
|
|
});
|
|
|
|
|
|
//套餐
|
|
|
$('#buy-detail').click(function () {
|
|
|
$('#buy-detail').click(function() {
|
|
|
var opt = {
|
|
|
className: 'pkg-dialog',
|
|
|
closeIcon: false,
|
...
|
...
|
|