brand.vue 769 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <template>
  2. <view class="content">
  3. <view class="lineBox">
  4. <view class="line" v-for="(item,index) in brandList">{{item}}</view>
  5. </view>
  6. </view>
  7. </template>
  8. <script>
  9. export default {
  10. data() {
  11. return {
  12. userId:'',
  13. brandList:'',
  14. }
  15. },
  16. onLoad() {
  17. this.userId=uni.getStorageSync('loginInfo').userId
  18. this.brandsSupplier()
  19. },
  20. methods: {
  21. brandsSupplier(){
  22. this.$http('imSys/brandsSupplier', {
  23. userId:this.userId, //'431A242A-0694-4D6F-9657-C31AD25E7D15'//
  24. },'GET').then(res => {
  25. if(res.code==0){
  26. this.brandList=res.data.brands.split(',')
  27. }
  28. })
  29. }
  30. }
  31. }
  32. </script>
  33. <style scoped>
  34. .line{
  35. padding: 24rpx;
  36. border-bottom: 1px solid #eaeaea;
  37. }
  38. </style>