Efecto al Login
This commit is contained in:
@@ -56,7 +56,11 @@ function stringTo_md5(data_string){
|
||||
console.log("MD5: ", md5);
|
||||
return md5;
|
||||
}
|
||||
//********* APP-PEDIDOS-SIGMA ********//
|
||||
//************* FORM LOGIN DEMO ****************//
|
||||
controlador.login_test = (req, res) => {
|
||||
res.render('login_test');
|
||||
};
|
||||
//********* FORM APP-PEDIDOS-SIGMA ********//
|
||||
controlador.app_sigma = (req, res) => {
|
||||
res.render('app_pedidos');
|
||||
};
|
||||
@@ -110,6 +114,12 @@ function stringTo_md5(data_string){
|
||||
});
|
||||
});
|
||||
};
|
||||
controlador.recibe_pedidos = (req, res) => {
|
||||
console.log("Data: "+req.body);
|
||||
req.getConnection((err, conn) => {
|
||||
res.json({sision:"exitosa"});
|
||||
});
|
||||
};
|
||||
|
||||
//********* APP-panel control ********//
|
||||
controlador.panel_control = (req, res) => {
|
||||
|
||||
@@ -178,7 +178,8 @@ controlador.app_consultaItemsPrecios = (req,res) => {
|
||||
//if(err) return res.status(500).send("Error en Consulta de Items");
|
||||
rows.map(
|
||||
dat => {
|
||||
//console.log(var_b64(dat.imagen));
|
||||
//console.log(blob_a_b64(dat.imagen));
|
||||
dat.imagen = blob_a_b64(dat.imagen);
|
||||
//fs.writeFileSync(path.join(__dirname,"../img/db_img"+image.codigo_prdcto+".png"),image.imagen);
|
||||
}
|
||||
)
|
||||
@@ -189,20 +190,15 @@ controlador.app_consultaItemsPrecios = (req,res) => {
|
||||
});
|
||||
};
|
||||
|
||||
let blob_b64 = (blob) =>{
|
||||
return new Promise((resolve,reject)=>{
|
||||
const reader = new FileReader();
|
||||
reader.readAsDataURL(blob);
|
||||
reader.onloadend = () => {
|
||||
resolve(reader.result);
|
||||
}
|
||||
})
|
||||
};
|
||||
|
||||
var_b64 = (blob) => {
|
||||
const reader = new FileReader();
|
||||
return reader.readAsDataURL(blob);
|
||||
};
|
||||
function blob_a_b64(blob) {
|
||||
var b64;
|
||||
if(blob!=null){
|
||||
b64 = blob.toString('base64');
|
||||
}else{
|
||||
b64="";
|
||||
}
|
||||
return b64;
|
||||
}
|
||||
|
||||
//********* CONSULTA ADICIONALES X MODIFICAR ********//
|
||||
controlador.cierresCaja = (req, res) => {
|
||||
|
||||
Reference in New Issue
Block a user