Browse Source

微博详情页

pull/40/head
pengda 21 hours ago
parent
commit
ecf40dae89
  1. 2
      config/define.php
  2. 4
      control/weibo.php
  3. 1
      model/mWeiboBehavior.php
  4. 30
      view/templates/weibo/show_detail.html

2
config/define.php

@ -51,6 +51,8 @@
define('WEIBO_LOGIN_COOKIE', '_2A25FItemDeRhGeFH41MV8ibNyjSIHXVmXlVurDV8PUNbmtAYLWP9kW9NekLV22FUUuTM0k2WTJS1xyONMvh_V90k');
define('WEIBO_DETAIL_URL', 'https://zhishiku.yizherenxin.cn/weibo/show_detail/wid/%s');
define('WEIBO_USER_ZHANG',2282201403);
define('WEIBO_USER_XU',1285478591);
define('WEIBO_USER_CHENG',5031299688);

4
control/weibo.php

@ -106,4 +106,8 @@ class weibo extends publicBase {
$this->ajax_json(true, '获取成功', $rdata);
}
public function show_detail() {
$this->view['wid'] = $this->get('wid') + 0;
}
}

1
model/mWeiboBehavior.php

@ -71,6 +71,7 @@ class mWeiboBehavior extends mBase {
$re['uname'] = empty($weibo)? $weibo_user[WEIBO_USER_ZHANG] : $weibo_user[$weibo['uid']];
$re['title'] = empty($weibo)? '无文字展示' : $weibo['text'];
$re['url'] = sprintf(WEIBO_DETAIL_URL, $re['wid']);
}
return $res;
}

30
view/templates/weibo/show_detail.html

@ -0,0 +1,30 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="referrer" content="no-referrer">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>详情</title>
{literal}
<style>
html, body {
margin: 0;
padding: 0;
height: 100%;
overflow: hidden;
}
iframe {
border: none;
width: 100%;
height: 100%;
}
</style>
{/literal}
</head>
<body>
<iframe src="https://m.weibo.cn/detail/{$wid}" frameborder="0"></iframe>
</body>
</html>
Loading…
Cancel
Save