夏邑12345_前端

getClient.js 505B

123456789101112131415161718192021
  1. function getClient(){
  2. var curentHost = window.location.protocol + '//' + window.location.host;
  3. var clientURL = curentHost + '/download.html?n=' + Math.random();
  4. if(clientURL){
  5. $('#elevator-app-url0').val(clientURL);
  6. getQrcode('elevator-app-qrcode0','elevator-app-url0');
  7. function getQrcode(ele1,ele2){
  8. var qrcode = new QRCode(document.getElementById(ele1), {
  9. width: 108,
  10. height: 108
  11. });
  12. var elText = document.getElementById(ele2);
  13. qrcode.makeCode(elText.value);
  14. }
  15. }
  16. }