123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104 |
- <?php
- /*
- |--------------------------------------------------------------------------
- | home
- |--------------------------------------------------------------------------
- */
- $view
- # 初始化几个js变量
- ->fetch(array('script', 0), 'var config={};config.host="'.Dever::url('').'";config.type="<{Dever\Routing\Uri::$type}>";config.current="<{Dever::url()}>";config.upload="<{Dever::$global.host.upload}>";config.assets="<{Dever::$global.host.core}>";')
- ->loop
- (
- '.ds-comments',
- 'weixin/chat.usermsg',
- array
- (
- '.ds-avatar' => array
- (
- 'a|0' => array
- (
- 'title' => '<{$v.name}>',
- ),
- 'img|0' => array
- (
- 'src' => '<{$v.avatar}>',
- 'alt' => '<{$v.name}>',
- ),
- ),
-
- '.ds-comment-body' => array
- (
- 'a|0' => array
- (
- 'html' => '<{$v.name}>',
- ),
- 'p|0' => array
- (
- 'html' => '<{$v.content}>',
- ),
- '.ds-time' => array
- (
- 'html' => '[<{$v.type}>] <{$v.time}>',
- ),
- ),
-
- '#ds-ctx' => array
- (
- 'li' => array
- (
- # 数据处理
- '{data}' => '$v.child',
- '.ds-avatar' => array
- (
- 'a|0' => array
- (
- 'title' => '<{$vi.name}>',
- ),
- 'img|0' => array
- (
- 'src' => '<{$vi.avatar}>',
- 'alt' => '<{$vi.name}>',
- ),
- ),
-
- '.ds-ctx-body' => array
- (
- 'a|0' => array
- (
- 'html' => '<{$vi.name}>',
- ),
- '.ds-ctx-content' => array
- (
- 'html' => '<{$vi.info}>',
- ),
- '.ds-time' => array
- (
- 'html' => '<{$vi.time}> [<{$vi.status}>]',
- ),
- ),
- ),
- ),
- )
- )
- ->fetch('#account', 'weixin/chat.info#account')
- ->fetch('#user', '<{Dever::total("current")}>')
- ->fetch('#id@value', 'weixin/chat.info#id')
- # 分页
- ->fetch('#page','<{Dever::page("current")}>')
- ->fetch('.ds-replybox img@src', 'weixin/chat.info#avatar')
- ->fetch('.ds-replybox img@alt', 'weixin/chat.info#name')
- # 定义尾部
- ->fetch('#footer', '<{Dever::$global["base"]["copyright"]}>')
- # display
- ->display();
|