铝交易,微信公众号
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

106 lines
2.2 KiB

7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
  1. <template>
  2. <view>
  3. <navbar :title="$t('pageTitle.selectIdentity')" :leftClick="!$route.query.back"
  4. @leftClick="$utils.navigateBack" />
  5. <view class="container">
  6. <view class="title">{{ $t('components.selectIdentity') }}</view>
  7. <view class="button-group">
  8. <!--供应商-->
  9. <view class="identity-button" @click="selectIdentity(0)">
  10. <view class="identity-text"> {{ $t('other.iAmBuyer') }}</view>
  11. <view class="identity-icon">
  12. <img src="../../static/image/index/5.png" style="width: 100%; height: 100%;">
  13. </view>
  14. </view>
  15. <!--采购-->
  16. <view class="identity-button" @click="selectIdentity(1)">
  17. <view class="identity-text"> {{ $t('other.iAmSupplier') }}</view>
  18. <view class="identity-icon">
  19. <img src="../../static/image/index/6.png" style="width: 100%; height: 100%;">
  20. </view>
  21. </view>
  22. </view>
  23. </view>
  24. </view>
  25. </template>
  26. <script>
  27. import {
  28. mapGetters
  29. } from 'vuex'
  30. export default {
  31. computed: {
  32. ...mapGetters(['userShop', "userInfo", 'buy', 'shopData']),
  33. },
  34. methods: {
  35. selectIdentity(identity) {
  36. // if (userInfo)
  37. if (identity == 0 && this.buy) {
  38. this.$store.commit('setShop', false)
  39. } else if (identity == 1 && this.shopData) {
  40. this.$store.commit('setShop', true)
  41. } else {
  42. uni.navigateTo({
  43. url: `/pages_order/auth/registerShop?identity=${identity}`
  44. })
  45. }
  46. },
  47. }
  48. }
  49. </script>
  50. <style scoped lang="scss">
  51. * {
  52. box-sizing: border-box;
  53. }
  54. .container {
  55. display: flex;
  56. flex-direction: column;
  57. align-items: center;
  58. justify-content: center;
  59. //height: 100vh;
  60. background-color: #f5f5f5;
  61. .title {
  62. font-size: 40rpx;
  63. color: #333;
  64. margin: 80rpx 0;
  65. }
  66. .button-group {
  67. display: flex;
  68. flex-direction: column;
  69. align-items: center;
  70. justify-content: center;
  71. width: 100vw;
  72. //padding: 0 20px;
  73. .identity-button {
  74. display: flex;
  75. align-items: center;
  76. justify-content: space-between;
  77. width: 80%;
  78. margin-bottom: 40rpx;
  79. padding: 40rpx 50rpx;
  80. background-color: #2d2f59;
  81. border-radius: 20rpx;
  82. color: white;
  83. .identity-text {
  84. font-size: 40rpx;
  85. }
  86. .identity-icon {
  87. width: 130rpx;
  88. height: 130rpx;
  89. }
  90. }
  91. }
  92. }
  93. </style>