common.js 686 B

123456789101112131415161718192021222324252627282930
  1. // 处理多次点击
  2. function noMultipleClicks(methods,params) {
  3. let that = this;
  4. if (that.noClick) {
  5. console.log(1)
  6. that.noClick= false;
  7. methods(params);
  8. setTimeout(function () {
  9. that.noClick= true;
  10. }, 2000)
  11. } else {
  12. console.log(2)
  13. uni.showToast({
  14. title: '请勿重复点击',
  15. duration: 2000,
  16. icon: 'none'
  17. })
  18. }
  19. }
  20. // const websiteUrl = 'https://qhome.usky.cn';
  21. // const BASE_URL = 'https://qhome.usky.cn/USKYZHAF/USKYZHAF.php/Home/'
  22. //导出
  23. export default {
  24. noMultipleClicks,//禁止多次点击
  25. // websiteUrl,
  26. // BASE_URL
  27. }