Identity_switching.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. <template>
  2. <view class="center">
  3. <view v-for="(item , index) in lists" :Key="index">
  4. <view>
  5. <view class="company">{{item.customerType}}</view>
  6. <view class="guess-item" @click="navToDetailPage(item)">
  7. <view class="infos">
  8. <view class="info">{{item.customerName}}
  9. <view class='cu-tag radius line-pink but'>{{item.authenticationStatus}}</view>
  10. </view>
  11. <view class="info">{{item.customerPhone}}</view>
  12. <label>
  13. <checkbox /><text>设置默认</text>
  14. </label>
  15. </view>
  16. </view>
  17. </view>
  18. </view>
  19. </view>
  20. </view>
  21. </view>
  22. </template>
  23. <script>
  24. import {
  25. mapState
  26. } from 'vuex';
  27. export default {
  28. name: "buy",
  29. data() {
  30. return {
  31. lists:[],
  32. PageCur: "buy",
  33. buyInfo: [],
  34. pages: 1, //页数
  35. limit: 10, //每次取条目数
  36. loadStatus: 'loading', //加载样式:more-加载前样式,loading-加载中样式,nomore-没有数据样式
  37. isLoadMore: false, //是否加载中
  38. showTran: true,
  39. scrollTop: 0,
  40. TabCur: 0,
  41. current: 1,
  42. identityAuthenticationInfo: {
  43. pageSize: 10,
  44. currentPage: 1,
  45. commonId: "",
  46. },
  47. };
  48. },
  49. onLoad() {
  50. this.getList()
  51. },
  52. computed: {
  53. ...mapState(['hasLogin', 'userInfo'])
  54. },
  55. methods: {
  56. getList() {
  57. this.identityAuthenticationInfo.commonId = this.userInfo.id
  58. console.log(12313)
  59. this.$api.doRequest('get', '/identityAuthenticationInfo/selectIdentityAuthenticationInfo', {
  60. pageSize: 10,
  61. currentPage: 1,
  62. commonId: this.userInfo.id
  63. }, 'application/json;charset=UTF-8').then(res => {
  64. console.log("成功连接123")
  65. this.lists = res.data.data.records
  66. })
  67. .catch(res => {
  68. uni.showToast({
  69. title: res.errmsg,
  70. icon: 'none',
  71. duration: 2000
  72. })
  73. });
  74. },
  75. // adddriver(index) {
  76. // if (index == 1) {
  77. // uni.navigateTo({
  78. // url: `/pageD/identity/companyIdentity`
  79. // })
  80. // } else {
  81. // uni.navigateTo({
  82. // url: `/pageD/identity/driverIdentity`
  83. // })
  84. // }
  85. // },
  86. navToDetailPage(item) {
  87. // if (index == 1) {
  88. uni.navigateTo({
  89. url: `/pageA/product/business_buy?id=${item.id}&customerName=${item.customerName}`
  90. })
  91. },
  92. // } else {
  93. // uni.navigateTo({
  94. // url: `/pageD/identity/driverIdentityLook`
  95. // })
  96. // }
  97. }
  98. }
  99. </script>
  100. <style>
  101. .center {
  102. padding: 10px 20px;
  103. }
  104. .title {
  105. font-size: 18px;
  106. font-weight: 900;
  107. margin-right: 20px;
  108. display: initial;
  109. }
  110. .company {
  111. font-size: 16px;
  112. margin-top: 10px;
  113. }
  114. .infos {
  115. /* margin: 10px 20px; */
  116. width: 100%;
  117. display: inline-table;
  118. }
  119. .info {
  120. line-height: 20px;
  121. }
  122. .but {
  123. right: 3px;
  124. float: right;
  125. }
  126. </style>