Commit 536a9bfa by 冷斌

fix bug

parent 123f1cf5
<?php
namespace App\basic\Lib\Action;
use App\classroom\Lib\Action\CommonAction;
......@@ -6,13 +7,15 @@ use App\classroom\Lib\Action\CommonAction;
/**
* 单页
*/
class SingleAction extends CommonAction {
class SingleAction extends CommonAction
{
/**
* 初始化,配置内容标题
* @return void
*/
public function _initialize() {
* 初始化,配置内容标题
* @return void
*/
public function _initialize()
{
parent::_initialize();
}
......@@ -20,38 +23,40 @@ class SingleAction extends CommonAction {
* 首页
* @return void
*/
public function info() {
$id = t($_GET['id']);
var_dump($id);
die;
$map['is_del'] = 0;
if( is_numeric( $id )) {
$map['id'] = $id;
public function info()
{
$id = t($_GET['id']);
if ($id === 'buy') {
$res = [
'title' => '购买协议',
'text' => model('Xdata')->get("admin_Config:about"),
];
} else {
$map['key'] = $id;
}
$res = M('single')->where($map)->find();
if( !$res ) {
unset( $map['id'] );
$map['key'] = $id;
$map['is_del'] = 0;
if (is_numeric($id)) {
$map['id'] = $id;
} else {
$map['key'] = $id;
}
$res = M('single')->where($map)->find();
}
$this->assign('data' , $res);
if (!$res) {
unset($map['id']);
$map['key'] = $id;
$res = M('single')->where($map)->find();
}
}
$this->assign('data', $res);
$this->display();
}
/**
* 独立的单页
*/
public function indie(){
$this->display();
}
public function buy()
public function indie()
{
echo 1; die;
$this->display();
}
}
<include file="__THEME__/public_header_w3g" />
<include file="__THEME__/_header_w3g" />
<style>
body {
padding: 0 !important;
}
.content ,.cf2{ background-color: #f0f0f2!important;padding:10px 0; }
.wrap{min-height: 400px;background: #fff; padding: 20px; margin-bottom: 20px; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; border: 1px solid #e4ecf3;}
.jgpage_right_tit{padding-bottom:20px;margin: 0 0 20px 0; border-bottom: 1px solid #f5f5f5;}
.jgpage_right_tit{color:#333;font-size:18px;}
.jgpage_right_con{overflow:hidden;line-height: 36px;}
</style>
<div id="app">
<div class="layout_v">
<van-cell @click="onChangePwd" title="修改密码" is-link ></van-cell>
<!-- <van-cell @click="onFeedback" title="意见反馈" is-link ></van-cell>-->
<!-- <van-cell @click="onAboutUs" title="关于我们" is-link ></van-cell>-->
<van-cell @click="onQuit" title="退出账号" is-link ></van-cell>
<div class="content cf2">
<div class="wrap">
<div class="jgpage_right_tit mb30">{$data.title}</div>
<div class="jgpage_right_con">
{$data.text}
</div>
</div>
</div>
<script type="text/javascript">
new Vue({
el: "#app",
data: function() {
return {
}
},
mounted:function(){
document.title = "设置"
},
methods: {
onChangePwd: function() {
window.location.href = "{:U('home/User/changepsw')}"
},
onFeedback: function() {
},
onAboutUs: function() {
},
onQuit: function() {
logout()
}
}
})
</script>
<include file="__THEME__/public_footer_w3g"/>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment