official.js 831 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. const util = require("../../utils/util.js");
  2. Component({
  3. properties: {
  4. text: {
  5. type: String,
  6. observer: function (newVal, oldVal) {
  7. this.setData({ text: newVal });
  8. }
  9. },
  10. make:{
  11. type: Boolean,
  12. observer: function (newVal, oldVal) {
  13. this.setData({ make: newVal });
  14. }
  15. }
  16. },
  17. data: {
  18. text:'',
  19. make: false
  20. },
  21. pageLifetimes:{
  22. hide(){
  23. this.setData({ make: false });
  24. }
  25. },
  26. methods: {
  27. navigatorTo(e) {
  28. util.navigator(e.currentTarget.dataset.url);
  29. },
  30. cancel() {
  31. this.setData({ make: false });
  32. },
  33. confirm() {
  34. let url="/pages/public/swiper/web?url=https://mp.weixin.qq.com/s/e20v-4tPUv52n51I9DDrGw&title=宝贝走天下服务号"
  35. util.navigator(url);
  36. this.setData({ make: false });
  37. }
  38. }
  39. })