Authored by whb

index css

... ... @@ -159,8 +159,6 @@ var $ = require("jquery");
var $returnTop = $('.return-top');
var apiDomain;
/**
* 订阅
* @return {[type]} [description]
... ... @@ -170,41 +168,36 @@ function actionSubscription() {
$subscriberBtn = $('#subscriber-btn'),
emailReg = /^[.\-_a-zA-Z0-9]+@[\-_a-zA-Z0-9]+\.[a-zA-Z0-9]/;
var subscribeParam = {
method: 'open.subscriber.subscriber',
v: 1,
return_type: 'jsonp',
open_key: '12345'
};
var iconCode = {
mail: '',
tick: '&#xe61a'
};
var email = $.trim($subscriberBox.val());
var params = {};
$subscriberBox.focus(function() {
$(this).val('').css('color', '');
$subscriberBtn.removeClass('done').html(iconCode.mail);
});
$subscriberBtn.click(function() {
var email = $.trim($subscriberBox.val());
if (email !== '' && emailReg.test(email)) {
$.extend(params, subscribeParam, {
email: email,
tmp: Math.random(),
uid: $.uid('_UID')
});
try {
$.getJSON('http://test.open.yohobuy.com' + '/?callback=?', params, function(data) {
if (data.data.result === 1) {
$subscriberBox.val('已订阅到:' + email);
$subscriberBtn.addClass('done').html(iconCode.tick);
} else {
$subscriberBox.css('color', 'red');
$.ajax({
url: 'http://www.yohobuy.com/common/emailsubscriber',
dataType: 'jsonp',
data: {
email: email,
tmp: Math.random(),
uid: window.getUid()
},
success: function(data) {
if (data.data.result === 1) {
$subscriberBox.val('已订阅到:' + email);
$subscriberBtn.addClass('done').html(iconCode.tick);
} else {
$subscriberBox.css('color', 'red');
}
}
});
} catch (e) {
... ... @@ -241,7 +234,6 @@ function actionhomeFootChange() {
var $this = $(this),
$li = $this.closest('li'),
index = $li.index(),
params = {},
_solution = [];
var _answer = $li.find('.feedback-answer').val(),
... ... @@ -252,28 +244,30 @@ function actionhomeFootChange() {
_solution.push($(this).val());
});
params = {
method: 'open.feedback.submit',
feedback: _feedback || 0,
question: _question || 0,
answer: _answer || '',
solution: _solution.join(',')
};
$.ajax({
url: 'http://www.yohobuy.com/common/suggestfeedback',
dataType: 'jsonp',
data: {
feedback_id: _feedback || 0,
question_id: _question || 0,
answer: _answer || '',
solution: _solution.join(',')
},
success: function(data) {
var next = index + 1;
if (~~data.data.result === 1) {
if (index === count - 1) {
alert('感谢您的参与!');
return;
}
$.getData(apiDomain, params, function(data) {
var next = index + 1;
$li.addClass('hide');
if (data.result === 1) {
if (index === count - 1) {
alert('感谢您的参与!');
return;
$vote.children(':eq(' + (index + 1) + ')').removeClass('hide');
$feedBackPage.children('.cur').removeClass('cur');
$feedBackPage.children(':eq(' + next + ')').addClass('cur');
}
$li.addClass('hide');
$vote.eq(index + 1).removeClass('hide');
$feedBackPage.children('.cur').removeClass('cur');
$feedBackPage.eq(next).addClass('cur');
}
});
});
... ... @@ -338,7 +332,7 @@ var handlebars = require("handlebars");
var json2 = require("index");
var vipInfoCombine = null; //用户信息编译模板
var loginInfoCombine = null; //登录信息编译模板
var apiDomain = 'http://api.open.yohobuy.com'; //获取数据的地址
var apiDomain = 'http://test.open.yohobuy.com/'; //获取数据的地址http://api.open.yohobuy.com
var cartTpl = ''; //购物车模板
/**
* 搜寻的时候过滤非法字符(+-/:等非法字符单独出现)
... ... @@ -5781,11 +5775,10 @@ var $sc = $('#send-captcha'),
itime;
$sc.click(function() {
$.post('/passport/register/authcode', {
$.post('/passport/back/sendbackmobile', {
mobile: $('#mobile').val(),
area: $('#area').val(),
captcha: $('#captchaPic').val(),
project: 'repassword'
verifyCode: $('#captchaPic').val(),
}, function(jsonData) {
if (jsonData.code === 200) {
$errTip.hide();
... ...
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.