suppliers.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. <template>
  2. <!-- 经销商基本信息 -->
  3. <view class="whole">
  4. <view class="head">
  5. <view class="behind"></view>
  6. <view class="below">
  7. <view class="nothing" v-if="judge==true">
  8. <u-empty mode="page" :text="$t('unified.nodata')"></u-empty>
  9. </view>
  10. <view class="content" v-for="(item, index) in supplier_s" :key="index">
  11. <view class="content_s">
  12. <view class="title">
  13. <view></view>
  14. <h3>{{item.agentName}}</h3>
  15. </view>
  16. <view class="information_E">
  17. <u-image width="250rpx" v-for="(item2, index) in item.brandList" :key="index" :src="item2" mode="widthFix"></u-image>
  18. </view>
  19. </view>
  20. </view>
  21. </view>
  22. </view>
  23. </view>
  24. </template>
  25. <script>
  26. import {
  27. request
  28. } from '../../common/request/request'
  29. require("promise.prototype.finally").shim()
  30. export default {
  31. data() {
  32. return {
  33. judge: true,
  34. supplier_s: [] //经销商信息
  35. }
  36. },
  37. created() {
  38. uni.setNavigationBarTitle({
  39. title: this.$t('supplier.title')
  40. });
  41. uni.showLoading({
  42. title: this.$t('unified.Loading')
  43. });
  44. setTimeout(function() {
  45. uni.hideLoading();
  46. }, 1000);
  47. this.supplier()
  48. },
  49. methods: {
  50. supplier() {
  51. request({
  52. url: '/myapp/storeSelectAgent',
  53. method: 'Post',
  54. data: {
  55. storeId: this.$store.state.storeInfo.storeId,
  56. userId: this.$store.state.storeInfo.userId
  57. }
  58. }).then(res => {
  59. this.supplier_s = res.data.data
  60. if (this.supplier_s.length != 0) {
  61. this.judge = false
  62. }
  63. }).catch(err => {
  64. if (this.supplier_s.length != 0) {
  65. this.judge = false
  66. }
  67. }).finally(() => {
  68. // Loading.close()
  69. })
  70. }
  71. }
  72. }
  73. </script>
  74. <style lang="scss" scoped>
  75. .behind {
  76. width: 750rpx;
  77. height: 462rpx;
  78. background: url(../../static/sailun/behind.png) no-repeat;
  79. background-size: 100% 100%;
  80. background-repeat: no-repeat;
  81. margin-top: -150rpx;
  82. padding-top: 100px;
  83. }
  84. .below {
  85. margin-top: -270rpx;
  86. }
  87. .nothing {
  88. width: 96%;
  89. height: 800rpx;
  90. background-color: #FFFFFF;
  91. margin: 0 auto;
  92. margin-top: 20rpx;
  93. border-radius: 20rpx;
  94. box-shadow: 0 0 24rpx 0 rgba(101, 176, 249, 0.41);
  95. }
  96. .content {
  97. width: 667rpx;
  98. height: auto;
  99. background: #FFFFFF;
  100. box-shadow: 0px 10rpx 30rpx 0px rgba(223, 223, 223, 0.51);
  101. border-radius: 18px;
  102. margin: 0 auto;
  103. padding-top: 30rpx;
  104. margin-top: 20rpx;
  105. padding-bottom: 40rpx;
  106. .content_s {
  107. width: 92%;
  108. // height: 330rpx;
  109. height: auto;
  110. margin: 0 auto;
  111. margin-top: 10rpx;
  112. .information {
  113. margin-top: 10rpx;
  114. }
  115. .information_E {
  116. display: flex;
  117. width: 100%;
  118. flex-flow: wrap;
  119. justify-content: space-around;
  120. align-items: center;
  121. }
  122. .title {
  123. border-bottom: 1rpx solid #EBEBEB;
  124. padding-bottom: 15rpx;
  125. view {
  126. width: 6px;
  127. height: 20px;
  128. background: #0292FD;
  129. float: left;
  130. margin-right: 10rpx;
  131. margin-top: 5rpx;
  132. }
  133. }
  134. }
  135. }
  136. </style>