东风启辰小程序端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 satır
853B

  1. // pages/component/prizeDetailShow/prizeDetailShow.js
  2. const app = getApp()
  3. Component({
  4. /**
  5. * 组件的属性列表
  6. */
  7. properties: {
  8. topValue:{
  9. type:Number,
  10. value:550
  11. },
  12. datas:{
  13. type:Object,
  14. value:{}
  15. }
  16. },
  17. /**
  18. * 组件的初始数据
  19. */
  20. data: {
  21. imgUrl: app.globalData.urlStatic,//图片路径
  22. },
  23. attached:function(){
  24. console.log(this.data.datas);
  25. },
  26. /**
  27. * 组件的方法列表
  28. */
  29. methods: {
  30. copyExchangeCode: function (e) {
  31. var type = e.currentTarget.dataset.type;
  32. if(type==1){
  33. var text = this.data.datas.couponCode;
  34. }else{
  35. var text = this.data.datas.couponSecret;
  36. }
  37. this.contentCopy(text);
  38. },
  39. contentCopy: function (text) {//内容复制
  40. wx.setClipboardData({
  41. data: text
  42. })
  43. }
  44. }
  45. })