index.js 536 B

12345678910111213141516171819202122232425262728293031
  1. const _Http = getApp().globalData.http;
  2. Component({
  3. properties: {
  4. pageType: {
  5. type: String,
  6. value: "Standard"
  7. }
  8. },
  9. data: {
  10. num: 0,
  11. },
  12. lifetimes: {
  13. attached: function () {
  14. getApp().globalData.Language.getLanguagePackage(this)
  15. }
  16. },
  17. methods: {
  18. /* 去购物车 */
  19. toShopping() {
  20. wx.navigateTo({
  21. url: '/packageA/shopping/index?type=' + this.data.pageType,
  22. })
  23. },
  24. /* 设置数量 */
  25. setNum(num) {
  26. this.setData({
  27. num
  28. })
  29. }
  30. }
  31. })