contactsAjaxController.js 667 B

12345678910111213141516171819202122232425
  1. /**
  2. * Created by MyPC on 2019/12/17.
  3. */
  4. const hash=require('../class/hash');
  5. const contactsService=require('../service/contactsService');
  6. const url=require("url");
  7. var models=require('../models');
  8. //获得cld客户信息组
  9. var getClentList= async function (req, res){
  10. var params = url.parse(req.url, true).query;
  11. if(hash.isExistence(params.clientname)){
  12. var clientname=decodeURI(params.clientname);
  13. var list= await contactsService.getClentListByClientname(params.clientname);
  14. res.json({ 'status': 1,'list':list });
  15. }else{
  16. res.json({ 'status': 0,'msg':'params error' });
  17. }
  18. }
  19. exports.getClentList = getClentList;