铝交易,微信公众号
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.

112 lines
2.3 KiB

10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 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"]),
  33. },
  34. methods: {
  35. selectIdentity(identity) {
  36. // if (userInfo)
  37. if (identity == 0 && this.$store.state.buy) {
  38. this.$store.commit('setShop', false)
  39. uni.reLaunch({
  40. url: '/pages/index/index'
  41. })
  42. } else if (identity == 1 && this.$store.state.shopData) {
  43. this.$store.commit('setShop', true)
  44. uni.reLaunch({
  45. url: '/pages/index/index'
  46. })
  47. } else {
  48. uni.navigateTo({
  49. url: `/pages_order/auth/registerShop?identity=${identity}`
  50. })
  51. }
  52. },
  53. }
  54. }
  55. </script>
  56. <style scoped lang="scss">
  57. * {
  58. box-sizing: border-box;
  59. }
  60. .container {
  61. display: flex;
  62. flex-direction: column;
  63. align-items: center;
  64. justify-content: center;
  65. //height: 100vh;
  66. background-color: #f5f5f5;
  67. .title {
  68. font-size: 40rpx;
  69. color: #333;
  70. margin: 80rpx 0;
  71. }
  72. .button-group {
  73. display: flex;
  74. flex-direction: column;
  75. align-items: center;
  76. justify-content: center;
  77. width: 100vw;
  78. //padding: 0 20px;
  79. .identity-button {
  80. display: flex;
  81. align-items: center;
  82. justify-content: space-between;
  83. width: 80%;
  84. margin-bottom: 40rpx;
  85. padding: 40rpx 50rpx;
  86. background-color: #2d2f59;
  87. border-radius: 20rpx;
  88. color: white;
  89. .identity-text {
  90. font-size: 40rpx;
  91. }
  92. .identity-icon {
  93. width: 130rpx;
  94. height: 130rpx;
  95. }
  96. }
  97. }
  98. }
  99. </style>