45 行
1.1 KiB
PHP
可执行文件
45 行
1.1 KiB
PHP
可执行文件
<?php
|
|
|
|
namespace Vip\Controller;
|
|
|
|
use Common\Business\CouponUse;
|
|
use Think\Controller;
|
|
|
|
//[1.7.84]
|
|
class CouponController extends BaseController
|
|
{
|
|
Public function index()
|
|
{
|
|
$userInfo = session('userinfo');
|
|
if ($userInfo['style_model'] == 2) {
|
|
$this->display('index2');
|
|
} else if ($userInfo['style_model'] == 3) {
|
|
$this->display('index3');
|
|
} else {
|
|
$this->display();
|
|
}
|
|
}
|
|
|
|
public function getcoupondata()
|
|
{
|
|
if (IS_POST) {
|
|
$data = I('post.');
|
|
$data['merchant_id'] = session('merchantid');
|
|
$data['vip_id'] = session('vid');
|
|
$CouponUserClass = new CouponUse();
|
|
$result = $CouponUserClass->getVipCouponList($data);
|
|
$this->ajaxReturn($result);
|
|
}
|
|
}
|
|
|
|
public function coupondetail()
|
|
{
|
|
$data['id'] = I('get.id');;
|
|
$data['merchant_id'] = session('merchantid');
|
|
$CouponUserClass = new CouponUse();
|
|
$result = $CouponUserClass->couponInfo($data);
|
|
$this->assign('coupon', $result['data']);
|
|
|
|
$this->display();
|
|
}
|
|
} |