/**
 * Created by MyPC on 2019/11/5.
 */
const cloudService=require('../service/cloudEditionService');
const hash=require('../class/hash');

//养护云板首页
var curingEdition= async function (req, res){

//    var redis = require('redis');
//    var client = redis.createClient(6379, '127.0.0.1');
//    var data2={};
//    client.get('name', function (err, value) {
//        data2=value;
//    });
//
//console.log(data2);
//    if(!hash.isExistence(data)){
//        console.log('no------------------------');
//    }



    var curingList=await cloudService.getCuringList(req, res);	//养护用户列表
    var compilationList=await cloudService.getCompilationList(); //编办信息

    var data={ 'curingList': curingList.curingList,'pageData':curingList.pageData,'compilationList':compilationList };


    /*client.on('connect', function () {

        client.set('name', 'long', function (err, data) {
            console.log(data)
        })

        var d=client.get('name', function (err, data) {
            console.log(data)
        });
        console.log(d);

        // set �﷨
       /!* client.set('name', 'long', function (err, data) {
            console.log(data)
        })
        // get �﷨
        client.get('name', function (err, data) {
            console.log(data)
        })*!/

        /!*client.lpush('class',1,function (err,data) {
            console.log(data)
        })

        client.lrange('class',0,-1,function (err,data) {
            console.log(data)
        })*!/
    })*/




    res.render('cloud/curing',data);
}


exports.curingEdition = curingEdition;

