jQuery MiniUI

 找回密码
 立即注册
查看: 6326|回复: 5
打印 上一主题 下一主题

php 与 mini交互 探讨 并 求版主解决问题~!! [复制链接]

Rank: 1

跳转到指定楼层
楼主
发表于 2012-4-11 15:07:45 |只看该作者 |倒序浏览
{"total":10,"data":[{"log_id":"1","member_id":"194","money":"1000.000","message":"admin\u7ba1\u7406\u5458\u4ee3\u5145\u503c","mtime":"1324116887","payment_id":""},{"log_id":"2","member_id":"365","money":"600.000","message":"zhanxiaohu\u7ba1\u7406\u5458\u4ee3\u5145\u503c","mtime":"1324118456","payment_id":""},{"log_id":"3","member_id":"348","money":"200.000","message":"zhanxiaohu\u7ba1\u7406\u5458\u4ee3\u5145\u503c","mtime":"1324118539","payment_id":""}

以上是我pHP 返回的数据json的

<div title="数据层" region="center" >
       <div id="datagrid1" class="mini-datagrid" style="width:700px;height:280px;" url="../index.php/Index/testdata">
  <div property="columns">
  <!-- <div type="indexcolumn" ></div> -->
   <div field="log_id" width="120" headerAlign="center" allowSort="true">员工帐号</div>   
   <div field="member_id" width="120" headerAlign="center" allowSort="true">姓名</div>                           
   <div field="money" width="100" renderer="onGenderRenderer" align="center" headerAlign="center">性别</div>
   <div field="message" width="100" allowSort="true">薪资</div>                                    
   <div field="mtime" width="100" allowSort="true">年龄</div>
   <div field="payment_id" width="100" headerAlign="center" allowSort="true">创建日期</div>               
  </div>
    </div>  

数据不显示  是为啥   

public function testdata(){
        $model = new Model();
        $sql = "SELECT log_id,member_id,money,message,mtime,payment_id FROM member_ad limit 0,10";
        $user = $model->query($sql);
        $result[total] = 10;
        $result[data] = $user;
        
       //echo json_encode($results);
        //die();
        return json_encode($result);
    }

Rank: 2

沙发
发表于 2012-4-11 16:42:57 |只看该作者
返回数据贴全了?贴全了的话,最后少了]}
一般应该不会有问题

Rank: 1

板凳
发表于 2012-4-11 17:17:50 |只看该作者
{"total":10,"data":[{"log_id":"1","member_id":"194","money":"1000.000","message":"admin\u7ba1\u7406\u5458\u4ee3\u5145\u503c","mtime":"1324116887","payment_id":""},{"log_id":"2","member_id":"365","money":"600.000","message":"zhanxiaohu\u7ba1\u7406\u5458\u4ee3\u5145\u503c","mtime":"1324118456","payment_id":""},{"log_id":"3","member_id":"348","money":"200.000","message":"zhanxiaohu\u7ba1\u7406\u5458\u4ee3\u5145\u503c","mtime":"1324118539","payment_id":""},{"log_id":"4","member_id":"366","money":"200.000","message":"zhanxiaohu\u7ba1\u7406\u5458\u4ee3\u5145\u503c","mtime":"1324118601","payment_id":""},{"log_id":"5","member_id":"194","money":"41.800","message":"\u9884\u5b58\u6b3e\u652f\u4ed8\u8ba2\u5355","mtime":"1324135018","payment_id":"13241350181493"},{"log_id":"6","member_id":"194","money":"18.800","message":"\u9884\u5b58\u6b3e\u652f\u4ed8\u8ba2\u5355","mtime":"1324137997","payment_id":"13241379972660"},{"log_id":"7","member_id":"194","money":"10.600","message":"\u9884\u5b58\u6b3e\u652f\u4ed8\u8ba2\u5355","mtime":"1324140957","payment_id":"13241409566680"},{"log_id":"8","member_id":"194","money":"10.600","message":"\u9884\u5b58\u6b3e\u652f\u4ed8\u8ba2\u5355","mtime":"1324140974","payment_id":"13241409743635"},{"log_id":"9","member_id":"194","money":"10.600","message":"\u9884\u5b58\u6b3e\u652f\u4ed8\u8ba2\u5355","mtime":"1324140989","payment_id":"13241409888479"},{"log_id":"10","member_id":"194","money":"10.600","message":"\u9884\u5b58\u6b3e\u652f\u4ed8\u8ba2\u5355","mtime":"1324140999","payment_id":"13241409986626"}]}

Rank: 1

地板
发表于 2012-4-11 17:18:12 |只看该作者
应该不是数据问题吧

Rank: 1

5#
发表于 2012-4-11 17:40:46 |只看该作者
可能这个ui 还不能和PHP 兼容吧

Rank: 9Rank: 9Rank: 9

6#
发表于 2012-4-11 18:21:14 |只看该作者
请把数据JSON作为一个文档上传。
我们下载后,会在本地测试。
这样问题就可以快速定位了。

Archiver|普加软件

GMT+8, 2024-11-25 20:33 , Processed in 1.068383 second(s), 10 queries .

Powered by Discuz! X2

© 2001-2011 Comsenz Inc.

回顶部