cxhxy/app/user/controller/Apply.php
test_service d3170b4d1c 1
2023-12-01 15:43:29 +08:00

1 line
1.0 KiB
PHP
Executable File

<?php
namespace app\user\controller;
use app\user\model\Apply as ApplyModel;
use app\user\model\Applet as AppletModel;
use think\facade\View;
use think\facade\Session;
/**
* 用户认证申请控制器
*/
class Apply extends Controller
{
/**
* 获取申请列表
*/
public function index()
{
$model = new ApplyModel;
$list = $model->getList(0,$this->user_id);
return View::fetch('index',compact('list'));
}
/**
* 编辑
*/
public function detail($id)
{
$model = ApplyModel::get($id);
$url = '';
if($model['apply_mode']['value'] == 10 or $model['apply_mode']['value'] == 30){
$data = $this->user;
$data['applet'] = AppletModel::get($model['applet_id']);
Session::set('hema_applet',$data);
$model['apply_mode']['value'] == 10 && $url = '/applet/wxapp.register/' . 'wxapp';
$model['apply_mode']['value'] == 30 && $url = '/applet/wxapp.register/' . 'wxpay';
}
return redirect($url);
}
}