other_shop.vue 942 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <template>
  2. <view class="shop_list">
  3. <shopItem :msg="allData"></shopItem>
  4. </view>
  5. </template>
  6. <script>
  7. import shopItem from "@/components/shop-item/shop-item";
  8. let app = getApp();
  9. import api from "../../../../../api.js";
  10. export default {
  11. data() {
  12. return {
  13. storeId:'',//商家id
  14. brandId:'',//品牌id
  15. allData:null,//所有数据
  16. status:'',//查询状态 全部 其余
  17. }
  18. },
  19. onLoad(options) {
  20. // console.log(options);
  21. this.storeId = options.storeid;
  22. this.brandId = options.brandid;
  23. this.status = options.status;
  24. this.getData();
  25. },
  26. methods: {
  27. //加载数据
  28. getData(){
  29. let data = {
  30. token:app.globalData.token,
  31. status:this.status,
  32. id: this.storeId,
  33. brandId: this.brandId,
  34. }
  35. api.getBrandOther(data).then((res)=>{
  36. console.log(res);
  37. this.allData = res.data.data;
  38. })
  39. }
  40. },
  41. components:{
  42. shopItem,
  43. }
  44. }
  45. </script>
  46. <style>
  47. </style>