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

89 lines
1.7 KiB

4 months ago
6 months ago
5 months ago
5 months ago
6 months ago
5 months ago
6 months ago
5 months ago
6 months ago
4 months ago
6 months ago
  1. <template>
  2. <view class="top-bar">
  3. <!--左边-->
  4. <view class="titleCls">
  5. <view>
  6. <img src="../../static/image/logo.png" style="width: 70rpx;height: 70rpx;border-radius: 50%;">
  7. </view>
  8. <span class="text"> {{ $t('pageTitle.proName') }}</span>
  9. </view>
  10. <!--右边-->
  11. <view v-if="showRight == '1'" @click="switchIdentity" class="change">
  12. <!-- {{ $t('pages.index.index.purchaser') }} -->
  13. {{ userShop ? '供应商' : '采购商' }}
  14. </view>
  15. </view>
  16. </template>
  17. <script>
  18. import {mapGetters} from 'vuex'
  19. export default {
  20. props: {
  21. showRight: {
  22. default: '0',
  23. type: String,
  24. }
  25. },
  26. mounted() {
  27. console.log(this.$store.state, "this.$store.state")
  28. },
  29. data() {
  30. return {
  31. }
  32. },
  33. computed: {
  34. ...mapGetters(['userShop']),
  35. },
  36. methods: {
  37. // 切换身份
  38. switchIdentity() {
  39. uni.navigateTo({
  40. url: '/pages_order/auth/selectionIdentity'
  41. })
  42. }
  43. ,
  44. }
  45. }
  46. </script>
  47. <style lang="scss" scoped>
  48. // 顶部栏
  49. .top-bar {
  50. display: flex;
  51. justify-content: space-between;
  52. height: 120rpx;
  53. background-color: $uni-color;
  54. .titleCls {
  55. display: flex;
  56. padding: 20rpx 10rpx;
  57. align-items: center;
  58. .text {
  59. display: flex;
  60. justify-content: center;
  61. align-items: center;
  62. font-size: 30rpx;
  63. color: #FFFFFF;
  64. margin-left: 20rpx;
  65. }
  66. }
  67. .change {
  68. display: flex;
  69. align-items: center;
  70. justify-content: center;
  71. width: 30%;
  72. height: 70rpx;
  73. border-radius: 40rpx;
  74. color: white;
  75. font-size: 28rpx;
  76. margin: 20rpx 10rpx 0 0;
  77. background: $uni-color;
  78. border: 1px solid #757986;
  79. //margin-top: 20rpx;
  80. border-radius: 40rpx;
  81. }
  82. }
  83. </style>