one.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. // compontents/chat/chat.js
  2. Component({
  3. /**
  4. * 组件的属性列表
  5. */
  6. properties: {
  7. productionData: {
  8. type: Object,
  9. value: {}
  10. },
  11. title: {
  12. type: String,
  13. value: ''
  14. },
  15. type: {
  16. type: String,
  17. value: ''
  18. },
  19. },
  20. /**
  21. * 组件的初始数据
  22. */
  23. data: {
  24. text: '',
  25. chatDatas: [],
  26. animationData: {},
  27. },
  28. /**
  29. * 组件的方法列表
  30. */
  31. methods: {
  32. uploadImage (e) {
  33. const type = this.properties.type;
  34. wx.navigateTo({
  35. url: '../input_content/input_content?type=' + type
  36. })
  37. },
  38. listenerButtonPreviewImage: function(e) {
  39. let imgUrl = [];
  40. imgUrl.push(e.target.dataset.img);
  41. wx.previewImage({
  42. current: '', // 当前显示图片的http链接
  43. urls: imgUrl, // 需要预览的图片http链接列表
  44. //这根本就不走
  45. success: function(res) {
  46. //console.log(res);
  47. },
  48. //也根本不走
  49. fail: function() {
  50. //console.log('fail')
  51. }
  52. })
  53. }
  54. }
  55. })