分类 随笔 下的文章

需要引入bootstrap


```

Select CONCAT( 'drop table ', table_name, ';' )
FROM information_schema.tables where table_schema='sql856243'

得出
drop table dede_addonarticle;
drop table dede_addonimages;
drop table dede_addoninfos;
drop table dede_addonshop;
drop table dede_addonsoft;
drop table dede_addonspec;
drop table dede_admin;
drop table dede_admintype;
drop table dede_advancedsearch;
drop table dede_arcatt;
drop table dede_arccache;
drop table dede_archives;
drop table dede_arcmulti;
drop table dede_arcrank;
drop table dede_arctiny;
drop table dede_arctype;
drop table dede_area;
drop table dede_channeltype;
drop table dede_co_htmls;
drop table dede_co_mediaurls;
drop table dede_co_note;
drop table dede_co_onepage;
drop table dede_co_urls;
drop table dede_diyform1;
drop table dede_diyforms;
drop table dede_dl_log;
drop table dede_downloads;
drop table dede_erradd;
drop table dede_feedback;
drop table dede_flink;
drop table dede_flinktype;
drop table dede_freelist;
drop table dede_homepageset;
drop table dede_keywords;
drop table dede_log;
drop table dede_member;
drop table dede_member_company;
drop table dede_member_feed;
drop table dede_member_flink;
drop table dede_member_friends;
drop table dede_member_group;
drop table dede_member_guestbook;
drop table dede_member_model;
drop table dede_member_msg;
drop table dede_member_operation;
drop table dede_member_person;
drop table dede_member_pms;
drop table dede_member_snsmsg;
drop table dede_member_space;
drop table dede_member_stow;
drop table dede_member_stowtype;
drop table dede_member_tj;
drop table dede_member_type;
drop table dede_member_vhistory;
drop table dede_moneycard_record;
drop table dede_moneycard_type;
drop table dede_mtypes;
drop table dede_multiserv_config;
drop table dede_myad;
drop table dede_myadtype;
drop table dede_mytag;
drop table dede_payment;
drop table dede_plus;
drop table dede_plus_mda_setting;
drop table dede_plus_seoinfo;
drop table dede_purview;
drop table dede_pwd_tmp;
drop table dede_ratings;
drop table dede_scores;
drop table dede_search_cache;
drop table dede_search_keywords;
drop table dede_sgpage;
drop table dede_shops_delivery;
drop table dede_shops_orders;
drop table dede_shops_products;
drop table dede_shops_userinfo;
drop table dede_softconfig;
drop table dede_sphinx;
drop table dede_stepselect;
drop table dede_sys_enum;
drop table dede_sys_module;
drop table dede_sys_set;
drop table dede_sys_task;
drop table dede_sysconfig;
drop table dede_tagindex;
drop table dede_taglist;
drop table dede_uploads;
drop table dede_verifies;
drop table dede_vote;
drop table dede_vote_member;

然后删除
Where table_name LIKE 'dede_%';

dede_指定前缀表

生成删表语句,然后执行这些语句

3.0的DUX完善了自定义模型和筛选模型,负载能力也比2.0有很大提升

so刚出测试版就搭建了一个站点用以测试

在使用中发现了一些细节的问题

1、列表顺序

比方说列表页排列顺序和点击筛选后顺序是正序的,这个需要修改

 /app/article/controller/IndexController.php

$classIds = target('article/ArticleClass')->getSubClassId($classId);
        $where['_sql'] = 'B.class_id in (' . $classIds . ') ORDER BY B.content_id desc';
 
        $attrList = [];
        if($classInfo['filter_id']) {
            $filter = target('site/SiteFilter')->getFilter('article/ArticleClass', $classIds, ['id' => $classId]);
            if ($filter['status']) {
                $where['_sql'] = 'A.content_id in (' . $filter['ids'] . ') ORDER BY B.content_id desc';
            }
            $attrList = $filter['attrList'];
        }

大约36,42行的位置加入ORDER BY B.content_id desc,可以在不影响响应速度的前提下把顺序改为倒序。

2、内页响应时间

/*
        target('site/SiteContent')->where(['content_id' => $info['content_id']])->setInc('view');

        $where = [];
        $where['A.status'] = 1;
        $where['_sql'] = 'A.create_time < ' . $info['create_time'];
        $where['B.class_id'] = $info['class_id'];
        $nextInfo = target('article/Article')->loadList($where, 1);

        $where = [];
        $where['A.status'] = 1;
        $where['_sql'] = 'A.create_time > ' . $info['create_time'];
        $where['B.class_id'] = $info['class_id'];
        $prevInfo = target('article/Article')->loadList($where, 1);*////这里注释用以减少sql查询

/app/article/controller/InfoController.php

注释掉大约62-75行之间的代码,可以极大的提升内页响应时间,3W数据内页响应时间从2S缩短到0.02S

假如要把GIF文件批量修改成为JPG文件,在需要修改的文件夹中,右键新建一个“文本文档”,打开文本文档后在里面输入

ren *.gif *.jpg

的内容,设置好之后保存文件,同时把这个文本你文档改成“.bat”后缀名的文件,设置好之后点击运行刚刚那个bat文件,就可以看到GIF文件全变成JPG文件了。

首页

栏目页

内容页

方法2
1、新建一个js 如 wap.js 内容如下

function browserRedirect(url) {

var sUserAgent = navigator.userAgent.toLowerCase();

var bIsIphoneOs = sUserAgent.match(/iphone os/i) == "iphone os";

var bIsMidp = sUserAgent.match(/midp/i) == "midp";

var bIsUc7 = sUserAgent.match(/rv:1.2.3.4/i) == "rv:1.2.3.4";

var bIsUc = sUserAgent.match(/ucweb/i) == "ucweb";

var bIsAndroid = sUserAgent.match(/android/i) == "android";

var bIsCE = sUserAgent.match(/windows ce/i) == "windows ce";

var bIsWM = sUserAgent.match(/windows mobile/i) == "windows mobile";

if (bIsIphoneOs || bIsMidp || bIsUc7 || bIsUc || bIsAndroid || bIsCE || bIsWM){

window.location.replace(url);

}

}

2、在网站引入这个js

即可实现跳转