Ver código fonte

首页返回刷新消息提示

git-svn-id: svn://svn7.apicloud.com/A6007457911931/%E5%9C%88%E5%A4%9A%E5%A4%9A@642 0e1a2743-8d03-4e5a-a60c-7e26af42b145
1149931599@qq.com 4 anos atrás
pai
commit
a3f1b40ebd
2 arquivos alterados com 6 adições e 4 exclusões
  1. 6 3
      html/frame0.html
  2. 0 1
      html/home/msglist.html

+ 6 - 3
html/frame0.html

@@ -268,6 +268,11 @@ apiready = function() {
         getAddress();
         getmsgtotal();
     });
+	api.addEventListener({
+	    name: 'viewappear'
+	}, function(ret, err) {
+	    getmsgtotal();
+	});
     setTimeout(function(){
         goto_adv();
     }, 800);
@@ -449,9 +454,7 @@ function getRouteData() {
             }
         }
     });
-    getmsgtotal();
     function_name();
-    
 }
 
 function set_height() {
@@ -462,7 +465,6 @@ function set_height() {
 }
 
 function getmsgtotal() {
-    // body...
     $.ajax({
         url: siteurl + 'v2/shop/msg_count',//'?do=getmsgtotal',
         data: {
@@ -472,6 +474,7 @@ function getmsgtotal() {
         dataType: 'json',
         type: 'post',
         success: function(datas) {
+			console.log(JSON.stringify(datas.data));
             if (datas.result) {
                 if (datas.data.total > 0) {
                     $(".msg-total").text(datas.data.total);

+ 0 - 1
html/home/msglist.html

@@ -315,7 +315,6 @@ function getcheckall() {
     var no = $(".msg-list .msg-cent-list").length;
     var nox = $(".msg-list [src$='checkun.png']").length;
     var noc = $(".msg-list [src$='checked.png']").length;
-    console.log(no,nox,noc)
     if (no == noc) {
         $(".check-all").attr("src", "../../image/checked.png");
     } else {