index.js 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. const app = require('../../utils/util.js');
  2. const tools = require('../../utils/tools.js');
  3. Page({
  4. data: {
  5. // 轮播
  6. backgrounds: [{
  7. "pic": "/images/banner1.png",
  8. // link:'../aboutme/index',
  9. },
  10. {
  11. "pic": "/images/banner2.png",
  12. // link:'../aboutme/index',
  13. },
  14. {
  15. "pic": "/images/banner3.png",
  16. // link:'../aboutme/index',
  17. },
  18. ],
  19. indicatorDots: true,
  20. vertical: false,
  21. autoplay: true,
  22. interval: 5000,
  23. duration: 500
  24. },
  25. goCollect() {
  26. wx.switchTab({
  27. url: '/pages/collectInfo/collectInfo',
  28. })
  29. },
  30. goXunfang() {
  31. wx.switchTab({
  32. url: '/pages/visitandinfo/visitandinfo',
  33. })
  34. },
  35. goTongzhi(){
  36. wx.navigateTo({
  37. url: '/pages/notice/notice',
  38. })
  39. },
  40. goPaiming() {
  41. wx.navigateTo({
  42. url: '/pages/paiming/paiming',
  43. })
  44. },
  45. goSaoMa() {
  46. console.log("扫阿");
  47. var _this = this;
  48. // 允许从相机和相册扫码
  49. wx.scanCode({
  50. success: (res) => {
  51. console.log(res,"打印锕");
  52. let length = res.result.substring(res.result.lastIndexOf('/')+1,res.result.length)
  53. wx.navigateTo({
  54. url: '/pages/love/love?id='+length,
  55. })
  56. }
  57. })
  58. },
  59. onLoad() {
  60. },
  61. })