web.js 639 B

12345678910111213141516171819202122232425
  1. Page({
  2. data: {
  3. url:"",
  4. title:'',
  5. countDown:{ //倒计时任务
  6. show:false,
  7. time:20,
  8. taskId:''
  9. },
  10. },
  11. onLoad(options) {
  12. console.log(options);
  13. this.setData({ url: decodeURIComponent(options.url),title:decodeURIComponent(options.title) });
  14. wx.setNavigationBarTitle({
  15. title: decodeURIComponent(options.title)
  16. });
  17. },
  18. onShareAppMessage() {
  19. console.log(this.data.title);
  20. return {
  21. title: '宝贝走天下 - '+this.data.title,
  22. path: '/pages/public/swiper/web?url=' + encodeURIComponent(this.data.url) + '&title=' + encodeURIComponent(this.data.title)
  23. }
  24. }
  25. })