order-complete.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. var app = new Vue({
  2. 'el': '#app',
  3. 'data': {
  4. // 详情
  5. submitting: false,
  6. },
  7. methods: {
  8. // 获取列表数据
  9. rePrint: function(){
  10. var _this = this;
  11. if(_this.submitting){
  12. return false;
  13. }
  14. var id = getParam('id');
  15. if(id<=0 || id == ''){
  16. $.showLoading("订单参数错误...");
  17. setTimeout(function(){
  18. location.href = history.go(-1);
  19. }, 500)
  20. return false;
  21. }
  22. $.showLoading("重新打印中,请耐心等候...");
  23. $.post('/weixin/print/rePrint', {id: id}, function (res) {
  24. $.hideLoading();
  25. if (res.code == 'success') {
  26. $.toast('已成功发起打印,请留意设备口');
  27. }else if(res.code == 'login'){
  28. login(res.data.url);
  29. }else{
  30. $.toast(res.message)
  31. }
  32. }, "json");
  33. }
  34. }
  35. })