<?php
defined('IN_IA') || exit('Access Denied');
global $_W;
global $_GPC;
mload()->func('api');
mload()->model('shop');
$op = $_GPC['op'];
$do = $_GPC['do'];
$tpl="delivery/";
if($op!='addmobile'&&$dos!='member'){
    $dos = array("api","crontab",'member');
    if(!in_array($do, $dos)){
        if(!is_weixin()){
            message("请在微信里面打开",$this->createMobileUrl('member',array('op'=>'addmobile')),"error");
        }
        if(empty($_W['openid'])){
            mc_oauth_userinfo();
        }
        $sql ="SELECT * FROM".tablename("evzg_express_member")."WHERE openid='{$_W['openid']}' AND 	uniacid='{$_W['uniacid']}'";
        $member = pdo_fetch($sql);
        if(empty($member['mobile'])){
            message("请先绑定手机号",$this->createMobileUrl('member',array('op'=>'addmobile')),"error");
        }
    }

}

//基础设置
$setting = pdo_fetch("SELECT * FROM".tablename("evzg_express_setting")."WHERE uniacid='{$_W['uniacid']}' ");

?>