function qrcode() { header("Content-type: text/html; charset=utf-8"); $id = intval($_GET['qid']); //二维码ID $sid = intval($_GET['sid']); //商户ID $mod = M('Score_order'); $gc = M('Score_qrcode'); $where['qid'] = $id; $where['status'] = 2; //查询二维码状态 if (2 == $gc->where('id=' . $id)->getField('status')) { if (isset($sid)) { $sid = getwxsid(); } redirect('productList?sid=' . $sid); } else { $this->getQrproductByQid($id); $str = urlencode(base64_encode('?id=' . $id . '&uid=' . getwxuserid())); $url = 'http://a.forcent.cn/ldh/store.php/PayM/requestQrcode/' . $str; $this->getStoreNameById($sid); $this->assign('url', $url); $this->assign('qid', $id); $this->assign('sid', $sid); $this->display(); } }
function index() { if (!session('_wxuserid')) { $this->display('login'); } else { redirect('/ldh/exchange.php/Store/productList?sid=' . getwxsid()); } }