1 Star 0 Fork 5

xiaokong658/sz_yi

forked from 杨雷/sz_yi 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
site.php 4.63 KB
一键复制 编辑 原始数据 按行查看 历史
杨雷 提交于 2016-03-03 14:27 . 初始代码
<?php
/**
* 易商城模块微站定义
*
* @author RainYang
* @url http://bbs.we7.cc/
*/
defined('IN_IA') or exit('Access Denied');
require_once IA_ROOT. '/addons/sz_yi/version.php';
require_once IA_ROOT. '/addons/sz_yi/defines.php';
require_once SZ_YI_INC.'functions.php';
require_once SZ_YI_INC.'core.php';
require_once SZ_YI_INC.'plugin/plugin.php';
require_once SZ_YI_INC.'plugin/plugin_model.php';
class Sz_yiModuleSite extends Core {
//商城管理
public function doWebShop(){ $this->_exec(__FUNCTION__ ,'goods'); }
//订单管理
public function doWebOrder(){ $this->_exec(__FUNCTION__,'list'); }
//会员管理
public function doWebMember(){ $this->_exec(__FUNCTION__,'list'); }
//财务管理
public function doWebFinance(){ $this->_exec(__FUNCTION__,'log'); }
//统计分析
public function doWebStatistics(){ $this->_exec(__FUNCTION__,'sale'); }
//插件管理
public function doWebPlugins(){ $this->_exec(__FUNCTION__,'list'); }
//系统设置
public function doWebSysset(){ $this->_exec(__FUNCTION__,'sysset'); }
//插件web入口
public function doWebPlugin(){
global $_W,$_GPC;
require_once SZ_YI_INC."plugin/plugin.php";
$plugins = m('plugin')->getAll();
$p = $_GPC['p'];
$file = SZ_YI_PLUGIN.$p."/web.php";
if(!is_file($file)){
message('未找到插件 '.$plugins[$p].' 入口方法');
}
require $file;
$pluginClass = ucfirst($p)."Web";
$plug = new $pluginClass($p);
$method = strtolower($_GPC['method']);
if(empty($method)){
$plug->index();
exit;
}
if(method_exists($plug,$method)){
$plug->$method();
exit;
}
trigger_error('Plugin Web Method '.$method.' not Found!');
}
//插件app入口
public function doMobilePlugin(){
global $_W,$_GPC;
require_once SZ_YI_INC."plugin/plugin.php";
$plugins = m('plugin')->getAll();
$p = $_GPC['p'];
$file = SZ_YI_PLUGIN.$p."/mobile.php";
if(!is_file($file)){
message('未找到插件 '.$plugins[$p].' 入口方法');
}
require $file;
$pluginClass = ucfirst($p)."Mobile";
$plug = new $pluginClass($p);
$method = strtolower($_GPC['method']);
if(empty($method)){
$plug->index();
exit;
}
if(method_exists($plug,$method)){
$plug->$method();
exit;
}
trigger_error('Plugin Mobile Method '.$method.' not Found!');
}
//购物车入口
public function doMobileCart(){ $this->_exec('doMobileShop','cart',false); }
//我的收藏入口
public function doMobileFavorite(){ $this->_exec('doMobileShop','favorite',false); }
//工具
public function doMobileUtil(){ $this->_exec(__FUNCTION__,'',false); }
//会员
public function doMobileMember(){ $this->_exec(__FUNCTION__,'center',false); }
//商城
public function doMobileShop(){ $this->_exec(__FUNCTION__,'index',false); }
//订单
public function doMobileOrder(){ $this->_exec(__FUNCTION__,'list',false); }
//支付成功
public function payResult($params){ return m('order')->payResult($params); }
public function getAuthSet() {
global $_W;
$set = pdo_fetch('select sets from ' . tablename('sz_yi_sysset') . ' order by id asc limit 1');
$sets = iunserializer($set['sets']);
if (is_array($sets)) {
return is_array($sets['auth']) ? $sets['auth'] : array();
}
return array();
}
public function doWebAuth() {$this->_exec('doWebSysset','auth',true); }
public function doWebUpgrade() {$this->_exec('doWebSysset','upgrade',true); }
}
/*
class Sz_yiModuleSite extends WeModuleSite {
public function doWebShop() {
//这个操作被定义用来呈现 规则列表
}
public function doWebOrder() {
//这个操作被定义用来呈现 规则列表
}
public function doWebCart() {
//这个操作被定义用来呈现 规则列表
}
public function doWebFavorite() {
//这个操作被定义用来呈现 规则列表
}
public function doWebMember() {
//这个操作被定义用来呈现 规则列表
}
public function doWebStatistics() {
//这个操作被定义用来呈现 管理中心导航菜单
}
public function doWebPlugins() {
//这个操作被定义用来呈现 管理中心导航菜单
}
public function doWebSysset() {
//这个操作被定义用来呈现 管理中心导航菜单
}
public function doMobileShop() {
//这个操作被定义用来呈现 微站首页导航图标
}
}
*/
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/xiaokong658/sz_yi.git
git@gitee.com:xiaokong658/sz_yi.git
xiaokong658
sz_yi
sz_yi
master

搜索帮助