2020-03-08    点击:42    

首页 » 资讯 » 技术文档

模块开发流程 Destoon B2B 二次开发

  

一、复制模块

首先根据需要制作的模块功能,从系统已有模块里选择一个功能类似的模块,在此模块基础上进行修改开发
例如,复制求购模块为采购,模块为offer
复制 module/buy/ 为 module/offer修改 module/offer/buy.class.php 为 module/offer/offer.class.php复制 template/default/buy/ 为 template/default/offer/复制 template/default/member/my_buy.htm 为 template/default/member/my_offer.htm复制 template/default/tag/list-buy.htm 为 template/default/tag/list-offer.htm复制 template/default/homapage/buy.htm 为 template/default/homepage/offer.htm复制 template/default/mobile/buy.htm 为 template/default/mobile/offer.htm复制 skin/default/buy.css 为 skin/default/offer.css复制 lang/zh-cn/buy.inc.php 为 lang/zh-cn/offer.inc.php复制 company/buy/ 为 company/offer/复制 module/company/buy.inc.php 为 module/company/offer.inc.php修改 mobile/include/buy.inc.php 为 mobile/include/offer.inc.php复制 file/setting/buy.csv 为 file/setting/offer.csv复制 file/setting/buy.sql 为 file/setting/offer.sql所有新创建的文件,查找buy,批量替换为offer,查找求购,批量替换为采购在后台模块管理,添加模块模块名称 采购所属模型 采购安装目录 offer提交假如提交之后,采购的模块ID为26修改 module/offer/admin/install.inc.php 里面的6为26复制 file/cache/module-6.php 为 file/cache/module-26.php进入后台功能模块,采购管理,模块设置,提交一下设置然后复制file/cache/module-26.php 到 file/setting/module-26.php

二、设计字段

根据实际需要新增字段和删除无用字段
后台模板module/offer/admin/tenplate/edit.tpl.php
前台模板template/default/member/my_offer.htm
字段验证和写入module/offer/offer.class.php
增加或删除的字段需要同时在destoon_offer_26数据表里操作

三、编写逻辑

以下为所有采购模块相关的文件的作用列表,根据实际情况修改对应文件(其他模块通用)
文件路径功能
module/offer/admin/index.inc.php后台采购列表
module/offer/admin/template/index.tpl.php后台采购列表模板
module/offer/admin/template/edit.tpl.php后台添加和修改信息模板
module/offer/admin/html.inc.php后台更新网页
module/offer/admin/template/index.tpl.php后台更新网页模板
module/offer/admin/setting.inc.php后台模块设置
module/offer/admin/template/setting.tpl.php后台模块设置模板,此模板可以直接增加或删除参数
module/offer/admin/config.inc.php后台模块相关的配置
module/offer/admin/config.inc.php后台模块相关的配置
module/offer/admin/config.inc.php后台模块相关的配置
module/offer/admin/menu.inc.php后台模块左侧菜单
module/offer/admin/install.inc.php后台安装模块需要执行的操作
module/offer/admin/uninstall.inc.php后台安装模块需要执行的操作
module/offer/admin/remkdir.inc.php后台重建模块目录需要执行的操作
module/offer/offer.class.php核心类库,所有的数据操作通过此文件实现
module/offer/common.inc.php通用文件,模块所有文件都先包含此文件
module/offer/global.func.php模块需要用到的函数
module/offer/index.inc.php前台首页
module/offer/index.htm.php前台生成静态首页
module/offer/list.inc.php前台列表
module/offer/list.htm.php前台生成静态列表
module/offer/show.inc.php前台内容页
module/offer/list.htm.php前台生成静态内容页
module/offer/search.inc.php前台搜索页
module/offer/my.inc.php会员中心会员管理和发布采购页
module/offer/task.inc.php前台任务页
module/offer/price.inc.php前台报价页
module/company/offer.inc.php公司主页采购页
mobile/include/offer.inc.php手机版采购页
template/default/offer/index.htm前台首页模板
template/default/offer/list.htm前台列表模板
template/default/offer/show.htm前台内容模板
template/default/offer/search.htm前台搜索模板
template/default/offer/price.htm前台报价模板
template/default/tag/list-offer.htm前台标签模板
template/default/member/my_offer.htm会员中心会员管理和发布采购模板
template/default/homepage/offer.htm公司主页采购模板
template/default/mobile/offer.htm手机版采购模板
skin/default/offer.css采购模块前台样式
lang/zh-cn/offer.inc.php采购模块语言文件

 
客服QQ:646734987
  • ©2008-2020 WEBCAIJI.COM 版权所有