123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215 |
- $.ajaxSetup({
- cache: false
- });
- function search_ask() {
- var search = $("#search").val();
- if (search == "") {
- easyDialog.open({
- container : {
- content : '还未输入搜索内容'
- },
- follow : "search",
- followX : 0,
- followY : 42,
- autoClose : 1500,
- overlay : false
- });
- return false;
- }
- }
- function search_sory() {
- var search = $("#search_advisory").val();
- if (search == "") {
- easyDialog.open({
- container : {
- content : '还未输入搜索内容'
- },
- follow : "search",
- followX : -123,
- followY : 100,
- autoClose : 1500,
- overlay : false
- });
- return false;
- }
- }
- function login() {
- var username = $("#username").val();
- var password = $("#password").val();
- if (username == "" || password == ""){
- easyDialog.open({
- container : {
- content : '请输入用户名或者密码'
- },
- follow : "username",
- followX : 320,
- followY : 22,
- autoClose : 1500,
- overlay : false
- });
- return false;
- }
- }
- function login_index() {
- var username = $("#username").val();
- var password = $("#password").val();
- if (username == "" || password == ""){
-
- $("#erroTips").html("请输入用户名或者密码");
-
- $("#erroTips").show(1000);
- return false;
- }
-
- var form1 = $("#index_login_form");
-
- form1.submit();
-
- // var url="/ajax/login_index";
- //
- // $.ajax({
- // url:url,
- // type: "post",
- // cache: false,
- // dataType: "json",
- // data: {
- // username:username,
- // password:password
- // },
- // global: true,
- // success: function(data){
- //
- // if(!data.is_login){
- // $("#erroTips").html("帐号/邮箱或者密码错误!");
- //
- // $("#erroTips").show(1000);
- //
- // }else{
- // var form1 = $("#index_login_form");
- //
- // form1.submit();
- // }
- //
- // },
- // error:function(err){
- //
- // is=false;
- // }
- // });
- }
- $(function() {
-
-
- $('#search').focus(function(){
- var url="ajax/get_search_works";
-
- $('#search').autocomplete({
- source: url,
- 'select':function(ev,ui) {
- $('#search').val(ui.item.label);
- $('#searchform').submit();}
- });
- }).blur(function (){
-
- var url="ajax/get_search_works";
-
- $('#search').autocomplete({
- source: url,
- 'select':function(ev,ui) {
- $('#search').val(ui.item.label);
- $('#searchform').submit();}
- });
-
-
- });
-
- //系统信息
- $("a[id^='get_msg_']").click(function() {
- var msg = $(this).attr("data");
- var a = msg.split("_");
- document.getElementById("fromuid").value = a[0];
- document.getElementById("on_page").value = a[1];
- var form = document.getElementById("msgform");
- form.submit();
- });
- //我的订单
- $("a[id^='get_oder_']").click(function() {
- var msg = $(this).attr("data");
- document.getElementById("on_page").value = msg;
- $("#oderform").submit();
- });
-
- $("#pu").click(function() {
- $("#pu").addClass('now');
- $("#vip").removeClass('now');
- $("#question_e").show();
- $("#vip_question_e").hide();
-
- });
-
- $("#vip").click(function() {
- $("#pu").removeClass('now');
- $("#vip").addClass('now');
- $("#question_e").hide();
- $("#vip_question_e").show();
- });
-
- $("#user_action").click(function() {
- $("#user_action").addClass('now');
- $("#sys_action").removeClass('now');
- $("#user").show();
- $("#sys").hide();
-
- });
-
- $("#sys_action").click(function() {
- $("#user_action").removeClass('now');
- $("#sys_action").addClass('now');
- $("#user").hide();
- $("#sys").show();
- });
-
- })
- /**
- * 设置系统信息的读取时间
- *
- * @param val
- */
- function set_msg_time(val) {
- document.getElementById("time").value = val;
- }
- function set_oder_time(val) {
- document.getElementById("time").value = val;
- document.getElementById("on_page").value = 1;
- $("#oderform").submit();
- }
|