anchor.diff:      db: 'teamfive',
       max: 5); //与数据库相连
   Future main(List<String> args)async {
  -    var myRouter = router();
  -   // myRouter.get('/', responseRoot);
  -   // myRouter.get('/login', forlogin);
  -    //myRouter.get('/no_login', forno_login);
  -    myRouter.get('/student/{stuid_x}', forstuid);
  -    myRouter.get('/teacher/{teaid_x}', forteaid);
  -    //myRouter.get('/teacher/{teaid_x}/student/{stuid_m}', forteasearch);
  -Map <String, String> corsHeader = new Map();
  -corsHeader["Access-Control-Allow-Origin"] = "*";
  -corsHeader["Access-Control-Allow-Methods"] = 'POST,GET,OPTIONS';
  -corsHeader['Access-Control-Allow-Headers'] =
  -'Origin, X-Requested-With, Content-Type, Accept';
  -var routerHandler = myRouter.handler;
  -var handler = const shelf.Pipeline()
  -    .addMiddleware(shelf.logRequests())
  -    .addMiddleware(
  -    shelf_cors.createCorsHeadersMiddleware(corsHeaders: corsHeader))
  -    .addHandler(routerHandler);
  -io.serve(handler, '127.0.0.1', 8080).then((server) {
  -print('Serving at http://${server.address.host}:${server.port}');
  -});
  +  var myRouter = router();
  +  // myRouter.get('/', responseRoot);
  +  // myRouter.get('/login', forlogin);
  +  //myRouter.get('/no_login', forno_login);
  +  myRouter.get('/search',forsearch);
  +  myRouter.get('/student/{stuid_x}', forstuid);
  +  myRouter.get('/teacher/{teaid_x}', forteaid);
  +  //myRouter.get('/teacher/{teaid_x}/student/{stuid_m}', forteasearch);
  +  Map <String, String> corsHeader = new Map();
  +  corsHeader["Access-Control-Allow-Origin"] = "*";
  +  corsHeader["Access-Control-Allow-Methods"] = 'POST,GET,OPTIONS';
  +  corsHeader['Access-Control-Allow-Headers'] =
  +  'Origin, X-Requested-With, Content-Type, Accept';
  +  var routerHandler = myRouter.handler;
  +  var handler = const shelf.Pipeline()
  +      .addMiddleware(shelf.logRequests())
  +      .addMiddleware(
  +      shelf_cors.createCorsHeadersMiddleware(corsHeaders: corsHeader))
  +      .addHandler(routerHandler);
  +  io.serve(handler, '127.0.0.1', 8080).then((server) {
  +    print('Serving at http://${server.address.host}:${server.port}');
  +  });
   /*
       forteasearch(request)
       {
  
positive.code: }
  
  Future<shelf.Response> forteaid(shelf.Request request) async {
        //从数据库获取数据
        String userName_tea = await getDataFromDb_tea();
  
        //把这个post过来的数据有返回给客户端
        return new shelf.Response.ok(
            ' ${userName_tea}'
        );
      }
  
  Future<shelf.Response> _echoRequest(shelf.Request request) async {
    //接受post过来的数据
  
negative.code:   String stuListJson=encode(stuList);
    print(stuListJson);
    return stuListJson;
    // return sr;
  
  }
  
  Future<String> getDataFromDb_tea() async {
    var results = await pool.query('select teaname,teaid from tea_infor');
    int i = 0;
    results.forEach((row) {
      //列出所有用户名
      String index1 = "teaname" + i.toString();
      value1["teaname"]=row.teaname;
      value1["teaid"]=row.teaid;
      data1[index1] = JSON.encode(value1);
      i++;
    });
    String jsonData = JSON.encode(data1);
    return jsonData;
  }
  
  
  
  