<?php

namespace app\index\controller;

use app\BaseController;
use app\common\model\master_worker\MasterWorkerAgree;
use app\common\service\JsonService;
use think\facade\View;

class AgreementController extends BaseController
{
    //
    public function master_service()
    {
        $code = $this->request->param('code');
        if(empty($code)){
            return JsonService::fail('code不存在');
        }
        $agree = MasterWorkerAgree::with('master_worker')->where('code', $code)->findOrEmpty()->toArray();
        View::assign([
            'agree'  => $agree,
        ]);
        return view('master_service');
    }

}
