index.vue 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <template>
  2. <div class="app-container personal-info">
  3. <div class="title">个人资料</div>
  4. <el-divider />
  5. <el-row>
  6. <el-col :span="5">公司名称:</el-col>
  7. <el-col :span="19">{{ supplierInfo.shopName }}</el-col>
  8. </el-row>
  9. <el-divider />
  10. <el-row>
  11. <el-col :span="5">所属类型:</el-col>
  12. <el-col :span="8">{{ supplierInfo.shopType === 1 ? '品牌方' : '代理商' }}</el-col>
  13. </el-row>
  14. <el-divider />
  15. <el-row>
  16. <el-col :span="5">手机号:</el-col>
  17. <el-col :span="8">{{ supplierInfo.mobile }}</el-col>
  18. <el-col :span="8">
  19. <router-link class="link" to="/personal/mobile"><i class="el-icon-edit" /><span>修改手机号</span></router-link>
  20. </el-col>
  21. </el-row>
  22. <el-divider />
  23. <el-row>
  24. <el-col :span="5">登录账号:</el-col>
  25. <el-col :span="8">{{ supplierInfo.loginAccount ? supplierInfo.loginAccount : '暂未绑定' }}</el-col>
  26. <el-col v-if="!supplierInfo.loginAccount" :span="8">
  27. <router-link class="link" to="/personal/account"><i class="el-icon-link" /><span>去绑定</span></router-link>
  28. </el-col>
  29. </el-row>
  30. <el-divider />
  31. <template v-if="supplierInfo.shopType === 2">
  32. <el-row>
  33. <el-col :span="5">代理品牌:</el-col>
  34. <el-col :span="8">{{ brandList }}</el-col>
  35. </el-row>
  36. <el-divider />
  37. </template>
  38. <el-row>
  39. <el-col :span="5">会员状态:</el-col>
  40. <el-col :span="8">
  41. <span v-if="supplierInfo.vipStatus === 1">会员</span>
  42. <span v-if="supplierInfo.vipStatus === 3">非会员</span>
  43. </el-col>
  44. <el-col :span="8">
  45. <router-link v-if="supplierInfo.vipStatus === 3" class="link" to="/vip/vip-open">
  46. <i class="el-icon-thumb" /><span>开通会员</span>
  47. </router-link>
  48. <router-link v-if="supplierInfo.vipStatus === 1" class="link" to="/vip/vip-open">
  49. <i class="el-icon-thumb" /><span>续费会员</span>
  50. </router-link>
  51. </el-col>
  52. </el-row>
  53. </div>
  54. </template>
  55. <script>
  56. import { getSupplierById } from '@/api/supplier'
  57. export default {
  58. data() {
  59. return {
  60. supplierInfo: {}
  61. }
  62. },
  63. computed: {
  64. brandList() {
  65. return this.supplierInfo.shopInfo.map(item => item.brandName).join('/')
  66. }
  67. },
  68. created() {
  69. this.fetchSupplierInfo()
  70. },
  71. methods: {
  72. // 获取供应商信息
  73. fetchSupplierInfo() {
  74. getSupplierById({ authUserId: this.$store.getters.authUserId }).then(res => {
  75. console.log(res)
  76. this.supplierInfo = res.data
  77. })
  78. }
  79. }
  80. }
  81. </script>
  82. <style scoped lang="scss">
  83. .personal-info {
  84. width: 600px;
  85. margin: 0 auto;
  86. margin-top: 60px;
  87. color: #101010;
  88. .link {
  89. color: #409eff;
  90. font-size: 14px;
  91. &:hover {
  92. text-decoration: underline;
  93. }
  94. }
  95. .el-row {
  96. .el-col:nth-child(2) {
  97. color: #404040;
  98. }
  99. }
  100. }
  101. .title {
  102. font-size: 24px;
  103. font-weight: bold;
  104. }
  105. </style>