微擎模块应用开发过程中有哪些需要注意的事项

发布于 2020-03-26 16:16:10

有哪些是你在开发微擎模块应用中学习注意到的。

查看更多

浏览量
2823
2 个回答
猫哥
猫哥 项目组成员 2020-03-27
希望我的回答能对你有所帮助

快速创建链接

  • 前台:$this->createMobileUrl('index')
  • 后台 $this->createWebUrl('user');

渲染模板

  • include $this->template('index');
  • 前台模板文件所在位置 addons/xxx/template/mobile/index.html
  • 后台模板文件位置 addons/xxx/template/user.html
  • 变量渲染 {$user['name']}
  • 遍历 {loop $list $index $item}{$item['info']}{/loop}
  • 判断 {if $do=='sss'}{else}{/if}
  • 模板引用 {template 'header'}
  • url {url 'extension/service/display'}
猫哥
猫哥 项目组成员 2020-03-26
希望我的回答能对你有所帮助

一个新应用模块的安装,会影响到的数据表有:

  • modules_bindings 模块绑定表,包含菜单、访问入口等
  • modules 模型信息表

关于前台和后台模块的命名方法

  • 前台方法 doMobileUser
  • 后台方法 doWebUser

关于前台的访问链接

  • 默认 域名/app/index.php?i=2&c=entry&eid=模块链接ID 【链接id模式】
  • 自定义 域名/app/index.php?i=2&c=entry&do=index&m=baoming 【mvc模式】

关于后台的访问链接

  • 默认 域名/web/index.php?c=site&a=entry&eid=51&versiion_id=0 【链接ID】
  • 自定义 域名/web/index.php?c=size&a=enry&do=user&m=baoming 【mvc】

学习
记录

发布
问题

分享
好友

手机
浏览

扫码手机浏览