group-goods-info.vue 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <template>
  2. <view class="">
  3. <Nav :title="shop_name" :bgckgroundBox='"transparent"' leftIconColor="#333" titleColor="#333"></Nav>
  4. <view class="sift-box p-12-24 box-border-box align-items-center">
  5. <view class="flex-1 align-items-center">
  6. <view class="max-w-200">
  7. </view>
  8. </view>
  9. <uni-icons type="bars" size="22"></uni-icons>
  10. </view>
  11. <scroll-view :scroll-y="true" class="flex-common-css">
  12. </scroll-view>
  13. </view>
  14. </template>
  15. <script>
  16. import {
  17. groupInfo,
  18. groupIndexGoods
  19. } from '@/api/group.js'
  20. export default {
  21. components: {},
  22. data() {
  23. return {
  24. shop_id: '',
  25. gooods_id: '',
  26. shop_name: '',
  27. goods_info: {},
  28. sift_data: [],
  29. sift_id: 0
  30. };
  31. },
  32. onLoad(data) {
  33. if (data) {
  34. this.shop_id = data.shop_id
  35. this.gooods_id = data.gooods_id
  36. this.shop_name = data.shop_name
  37. this.groupInfo()
  38. this.groupIndexGoods()
  39. }
  40. // console.log(data);
  41. },
  42. mounted() {},
  43. methods: {
  44. groupIndexGoods() {
  45. groupIndexGoods({shop_id: this.shop_id}).then((res) => {
  46. if(res.code === 1) {
  47. this.sift_data = res.data
  48. }
  49. })
  50. },
  51. groupInfo() {
  52. groupInfo({
  53. shop_id: this.shop_id,
  54. id: this.gooods_id
  55. }).then((res) => {
  56. if (res.code === 1) {
  57. this.goods_info = res.data
  58. }
  59. })
  60. }
  61. },
  62. }
  63. </script>
  64. <style lang="scss" scoped>
  65. .box-b{
  66. width: 100%;
  67. height: 100vh;
  68. background: orangered;
  69. }
  70. .max-w-200{
  71. max-width: 200rpx;
  72. background: rebeccapurple;
  73. margin-right: 15rpx;
  74. }
  75. </style>