|
|
- <template>
- <view class="top-bar">
- <!--左边-->
- <view class="titleCls">
- <view>
- <img src="../../static/image/cart/1.png" style="width:100%;height:100%;">
- </view>
- <span class="text">铝产品现货交易平台</span>
- </view>
- <!--右边-->
- <view v-if="showRight == '1'" @click="switchIdentity" class="change">
- {{ $t('pages.index.index.purchaser') }}
- </view>
- </view>
- </template>
-
- <script>
- export default {
- props : {
- showRight : {
- default : '0',
- type : String,
- }
- },
- data(){
- return {
-
- }
- },
- methods : {
- // 切换身份
- switchIdentity() {
- uni.navigateTo({
- url: '/pages_order/auth/selectionIdentity'
- })
- },
- }
- }
- </script>
-
- <style lang="scss" scoped>
- // 顶部栏
- .top-bar {
- display: flex;
- justify-content: space-between;
- height: 120rpx;
- background-color: $uni-color;
-
- .titleCls {
- display: flex;
- padding: 20rpx 10rpx;
-
- .text {
- display: flex;
- justify-content: center;
- align-items: center;
- font-size: 30rpx;
- color: #FFFFFF;
- margin-left: 20rpx;
- }
- }
-
- .change {
- display: flex;
- align-items: center;
- justify-content: center;
- width: 30%;
- height: 70rpx;
- border-radius: 40rpx;
- color: white;
- font-size: 28rpx;
- margin: 20rpx 10rpx 0 0;
- background: $uni-color;
- border: 1px solid #757986;
- //margin-top: 20rpx;
- border-radius: 40rpx;
- }
- }
- </style>
|