photo_show.js 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. var httpData=GetRequest(),
  2. doctorInfo = JSON.parse(window.localStorage.getItem('wlyyAgent'));
  3. function showSuccessMessage(msg) {
  4. layer.msg(msg, {
  5. icon: 1
  6. })
  7. }
  8. function showErrorMessage(msg) {
  9. layer.msg(msg, {
  10. icon: 5
  11. })
  12. }
  13. function showWarningMessage(msg) {
  14. layer.msg(msg, {
  15. icon: 2
  16. })
  17. }
  18. function showInfoMessage(msg) {
  19. layer.msg(msg, {
  20. icon: 6
  21. })
  22. }
  23. new Vue({
  24. el: "#app",
  25. data: {
  26. photoList: null,
  27. curryIndex: 0
  28. },
  29. mounted: function() {
  30. this.findPatientCertificateByType();
  31. },
  32. methods: {
  33. findPatientCertificateByType: function() {
  34. var vm = this,
  35. loadding = layer.load(0, {shade: false}),
  36. params = {
  37. patient: httpData.patientCode,
  38. type: httpData.serverType
  39. }
  40. signAPI.findPatientCertificateByType(params).then(function(res) {
  41. layer.close(loadding)
  42. if(res.status == 200) {
  43. vm.photoList = res.data
  44. } else {
  45. showErrorMessage(res.msg);
  46. }
  47. })
  48. },
  49. changeCurryIndex: function(index) {
  50. this.curryIndex = index
  51. },
  52. setImg: function(str) {
  53. return httpRequest.getImgUrl(str);
  54. },
  55. }
  56. })