index.vue 799 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <template>
  2. <view class="classify_coupon" :data-theme="theme">
  3. <coupon-and-classify :tabActive="tabActive" :merId="merid" v-if="merid"
  4. type="classify_coupon"></coupon-and-classify>
  5. </view>
  6. </template>
  7. <script>
  8. import couponAndClassify from '../components/couponAndClassify/index.vue';
  9. let app = getApp();
  10. export default {
  11. name: "index",
  12. components: {
  13. couponAndClassify
  14. },
  15. onLoad() {
  16. uni.setNavigationBarTitle({
  17. title: this.tabActive === 1?'商品分类':'优惠券' // 设置为你需要的标题
  18. });
  19. },
  20. data() {
  21. return {
  22. theme: app.globalData.theme,
  23. tabActive: 0,
  24. merid: 0
  25. }
  26. },
  27. methods: {
  28. onLoad(options) {
  29. this.merid = Number(options.id)
  30. this.tabActive = Number(options.tabActive)
  31. }
  32. }
  33. }
  34. </script>
  35. <style scoped>
  36. </style>