diff --git a/common/css/component.scss b/common/css/component.scss index b45a06797d97739cf90af7de758f5b8c8e50c40a..916fc15e77c718538bc4e60ecc3653492171cc05 100644 --- a/common/css/component.scss +++ b/common/css/component.scss @@ -1,3 +1,4 @@ +//数量提示小红点气泡 @mixin no-read-css { display: flex; height: 32rpx; diff --git a/common/css/style.scss b/common/css/style.scss index 1dabeb65963079e82ed4be981bd75053baef9c9a..73a907ce0f087b8e4f8dd71d0e15e9b01c785d77 100644 --- a/common/css/style.scss +++ b/common/css/style.scss @@ -1,6 +1,8 @@ //主色调 $global-primary: #29105D !default; +$global-center: lighten($global-primary, 45%) !default; + //次色调 $global-minor: #9C94FF !default; @@ -8,4 +10,10 @@ $global-minor: #9C94FF !default; $global-general: #F7F7F7 !default; //红色提示 -$global-red: #f56c6c !default \ No newline at end of file +$global-red: #f56c6c !default; + +//性别女 +$sex-girl: #FF0080 !default; + +//性别男 +$sex-boy: #60baff !default; \ No newline at end of file diff --git a/components/my-tabbar.vue b/components/my-tabbar.vue index a8ed90f8b78c4eca59825ba6e68074d0b839c5ed..25e64abd87715abbd79464a847d74e614764ed35 100644 --- a/components/my-tabbar.vue +++ b/components/my-tabbar.vue @@ -16,7 +16,7 @@ - + {{ item.title }} @@ -56,7 +56,8 @@ height: calc(100rpx + constant(safe-area-inset-bottom)); height: calc(100rpx + env(safe-area-inset-bottom)); .custom-tabbar-fixed { - //box-shadow:4px 4px 8px #999999; + box-shadow: 0 10px 16px $global-primary; + //border-top: 1px solid $global-minor; background-color: $global-general; width: 100%; position: fixed; @@ -72,13 +73,11 @@ display: flex; justify-content: space-between; .tabbar-item { - - padding-top: 18rpx; + padding-top: 10rpx; display: flex; flex: 1; flex-direction: column; align-items: center; - justify-content: center; .image-box { position: relative; @@ -91,12 +90,16 @@ } } .image-area { - width: 44rpx; - height: 44rpx; + font-size: 0; + width: 40rpx; + height: 40rpx; } .title { - padding-top: 5rpx; font-size: 22rpx; + color: #999999; + &.active { + color: $global-primary; + } } } } diff --git a/components/my-topbar.vue b/components/my-topbar.vue index 182f4c5a2c2ef0ebcc8c923ad39dfb6e3ac0cae9..5d51c1a10300c88f2749dc01d604ef50d64663db 100644 --- a/components/my-topbar.vue +++ b/components/my-topbar.vue @@ -35,7 +35,8 @@ diff --git a/pages/tabs/my-center/my-center.vue b/pages/tabs/my-center/my-center.vue index 045d28274083f2c5cd4904581ba2c1ac97554b0e..85e0dea92e1ceca4561c6cf6cb19a8ad7e65ee41 100644 --- a/pages/tabs/my-center/my-center.vue +++ b/pages/tabs/my-center/my-center.vue @@ -95,16 +95,18 @@ diff --git a/pages/user-add/user-add-topbar.vue b/pages/user-add/user-add-topbar.vue index 24f1058eb955ac84ddfc76f34aa8af68342f653f..e1bddad1177dfe5627b3232b987694187c38bedd 100644 --- a/pages/user-add/user-add-topbar.vue +++ b/pages/user-add/user-add-topbar.vue @@ -8,9 +8,9 @@ + @search="handleSearch" placeholder="输入账户或者昵称"> - + @@ -60,7 +60,7 @@ padding: 0 35rpx; height: 100%; .left { - + color: #ffffff } .search { flex: 1; diff --git a/pages/user-add/user-add.vue b/pages/user-add/user-add.vue index 23122e0b9c80fbffa3a88d3fb8e69a9662a31115..ac68e7a35da64577ed2f6a24b762e61dbf27ab5b 100644 --- a/pages/user-add/user-add.vue +++ b/pages/user-add/user-add.vue @@ -10,7 +10,7 @@ :src="item.avatar" mode="circle"> - {{`${item.showName}(${item.userName})`}} + {{`${remarkName(item)}(${item.userName})`}} @@ -31,7 +31,7 @@ import ToastUtil from "@/common/js/util/toast-util.js" import userApi from "@/api/user/info.js" import relationReqApi from "@/api/relation/single-relation-req.js" - import {mapGetters} from "vuex"; + import {mapGetters,mapMutations,mapState} from "vuex" export default { components: { @@ -41,6 +41,25 @@ ...mapGetters({ userInfo: "user/getUserInfo", }), + ...mapState({ + relationList: (state) => state.relation.relationList, + }), + //备注名 + remarkName() { + return (item) =>{ + let uid = item.id + let relationIndex = this.relationList.findIndex(e => e.targetUserInfo.id == uid) + if(relationIndex > -1) { + let remark = this.relationList[relationIndex].remark + //如果有备注就直接取备注 + if(remark) { + return remark + } + } + + return item.showName + } + } }, data() { return { @@ -119,10 +138,10 @@ border-radius: 4rpx; color: #999999; .woman { - color: #FF0080; + color: $sex-girl; } .man { - color: $global-primary; + color: $sex-boy; } } .comment { diff --git a/pages/user-detail/user-detail-topbar.vue b/pages/user-detail/user-detail-topbar.vue index d3e7df4b04bdddeafece98e1cd89d59bf804cc04..ecd7ff6344ef59eee8f32647f5bc7dd5d49270d5 100644 --- a/pages/user-detail/user-detail-topbar.vue +++ b/pages/user-detail/user-detail-topbar.vue @@ -44,14 +44,14 @@ padding: 0 15rpx; .left { font-size: 48rpx; - color: $global-primary; + color: #ffffff; } .center { font-size: 32rpx; } .action { font-size: 48rpx; - color: $global-primary; + color: #ffffff; padding-right: 15rpx; } } diff --git a/pages/user-detail/user-detail.vue b/pages/user-detail/user-detail.vue index 3c23434b25f1df2199ffed900d549008f2fdd012..ef96663680f005d53cee91b81651ae60a4c0c5aa 100644 --- a/pages/user-detail/user-detail.vue +++ b/pages/user-detail/user-detail.vue @@ -11,7 +11,7 @@ - {{userDetail.showName}} + {{remarkName(userDetail)}} @@ -75,6 +75,23 @@ //最近联系人列表,为了得到未阅读数量 latelyList: (state) => state.chat.latelyList, }), + //备注名 + remarkName() { + return (item) =>{ + + let uid = item.id + let relationIndex = this.relationList.findIndex(e => e.targetUserInfo.id == uid) + if(relationIndex > -1) { + let remark = this.relationList[relationIndex].remark + //如果有备注就直接取备注 + if(remark) { + return remark + } + } + + return item.showName + } + } }, data() { return { @@ -246,12 +263,13 @@ overflow: hidden; white-space: nowrap; max-width: 350rpx; + margin-right: 10rpx; } .woman { - color: #FF0080; + color: $sex-girl; } .man { - color: $global-primary; + color: $sex-boy; } } .username-area { @@ -269,7 +287,7 @@ } } .bottom-box { - padding: 0 10rpx; + padding: 10rpx; .simple-btn { border-radius: 14rpx; padding: 15rpx 0; diff --git a/pages/user-relation-request/user-relation-req-topbar.vue b/pages/user-relation-request/user-relation-req-topbar.vue index 33d9b3bc46c86cfa94ab82241ec229edab444ffc..fcfed5c3e6f6abcc8a419e26c82000b196c72f57 100644 --- a/pages/user-relation-request/user-relation-req-topbar.vue +++ b/pages/user-relation-request/user-relation-req-topbar.vue @@ -46,14 +46,14 @@ padding: 0 15rpx; .left { font-size: 48rpx; - color: $global-primary; + color: #ffffff; } .center { font-size: 32rpx; } .action { font-size: 32rpx; - color: $global-primary; + color: #ffffff; padding-right: 15rpx; } } diff --git a/pages/user-relation-request/user-relation-request.vue b/pages/user-relation-request/user-relation-request.vue index 6a3956942180a88a0911855439198781a41903b7..dcd152a1f54aaeb16bea5e7356558d6f39a810a2 100644 --- a/pages/user-relation-request/user-relation-request.vue +++ b/pages/user-relation-request/user-relation-request.vue @@ -219,10 +219,10 @@ border-radius: 4rpx; color: #999999; .woman { - color: #FF0080; + color: $sex-girl; } .man { - color: $global-primary; + color: $sex-boy; } } .comment { diff --git a/uview-ui/components/u-tabs-swiper/u-tabs-swiper.vue b/uview-ui/components/u-tabs-swiper/u-tabs-swiper.vue index a53e261825cc1a5b42104f9bfa69b3a81406e8a1..14aec14dc09c73bff2a89b93d8e74be353e83eaa 100644 --- a/uview-ui/components/u-tabs-swiper/u-tabs-swiper.vue +++ b/uview-ui/components/u-tabs-swiper/u-tabs-swiper.vue @@ -91,7 +91,7 @@ // 选中项的主题颜色 activeColor: { type: String, - default: '#2979ff' + default: '#29105D' }, // 未选中项的颜色 inactiveColor: {