From 41ee0d759c512d7a1cf023b48269e5e5d4ee954c Mon Sep 17 00:00:00 2001 From: queenwuli <942534046@qq.com> Date: Wed, 16 Dec 2020 15:00:29 +0800 Subject: [PATCH] gx --- hive-app/pages/mine/setting.vue | 8 +- hive-app/pages/mine/knowledge.vue | 81 +++++++++++++++++++++++--- hive-app/App.vue | 2 hive-app/common/styles/index.css | 8 ++ hive-app/pages.json | 13 ---- hive-app/pages/member/detail.vue | 44 ++++++++++++-- 6 files changed, 121 insertions(+), 35 deletions(-) diff --git a/hive-app/App.vue b/hive-app/App.vue index 3695683..426b262 100644 --- a/hive-app/App.vue +++ b/hive-app/App.vue @@ -16,5 +16,5 @@ /*每个页面公共css */ @import url("./common/styles/index"); @import url("./static/iconfont/iconfont.css"); -@import url("//at.alicdn.com/t/font_2263696_ewq7if2rje9.css"); +@import url("//at.alicdn.com/t/font_2263696_9yynz69zizb.css"); </style> diff --git a/hive-app/common/styles/index.css b/hive-app/common/styles/index.css index 594a0c9..194ae4b 100644 --- a/hive-app/common/styles/index.css +++ b/hive-app/common/styles/index.css @@ -163,4 +163,12 @@ border: 0; color: #FFFFFF; font-size: 16px; +} + +/* 蓝色边框白底按钮 */ +.white-btn{ + background: #FFFFFF; + border: 1px solid #518EFF; + color: #518EFF; + font-size: 16px; } \ No newline at end of file diff --git a/hive-app/pages.json b/hive-app/pages.json index e8cbaa4..e470bbb 100644 --- a/hive-app/pages.json +++ b/hive-app/pages.json @@ -54,18 +54,7 @@ "navigationBarTitleText": "", "navigationBarBackgroundColor":"#518EFF", "app-plus":{ - "scrollIndicator": "none", - "titleNView": { - "buttons": [ - { - "text": "\ue696", - "fontSrc": "/static/iconfont/iconfont.ttf", - "fontSize": "18px", - "width":"25px", - "float":"right" - } - ] - } + "scrollIndicator": "none" } } }, diff --git a/hive-app/pages/member/detail.vue b/hive-app/pages/member/detail.vue index 76eeab0..9c4d634 100644 --- a/hive-app/pages/member/detail.vue +++ b/hive-app/pages/member/detail.vue @@ -8,7 +8,10 @@ <image class="header-img" src="../../static/images/head-img.jpg"></image> <text class="font-18 white mt-5">333</text> <text class="font-14 white mt-5">会员编号: 101010</text> - <text class="font-12 white mt-5">湖南 长沙 22</text> + <view class="flex align-center mt-5"> + <text class="font-12 white mr-10">{{this.eye==false?encryptAccount(15569216885):'15569216885'}}</text> + <text class="icon iconfont white" :class="this.eye==false?'iconyanjing':'iconyanjing1'" @click="eyeSwitch"></text> + </view> <view class="flex align-center mt-10"> <view class="icon-box flex justify-center align-center mr-20"> <text class="icon iconfont icondianhua blue"></text> @@ -68,10 +71,33 @@ </view> </view> </view> + <view class="flex content-btn justify-around"> + <button class="white-btn btn">开单</button> + <button class="blue-btn btn">预约</button> + </view> </view> </template> <script> + export default{ + data(){ + return{ + eye:false + } + }, + methods:{ + encryptAccount(val) { + if (/^1[3456789]\d{9}$/.test(val)) { + return String(val).substr(0, 3) + '****' + String(val).substr(7); + } else { + return val; + } + }, + eyeSwitch(){ + this.eye=!this.eye + } + } + } </script> <style> @@ -112,12 +138,16 @@ .detail-item{ width: 25%; } - .detail-icon-box{ - width: 32px; - height: 32px; - } .detail-icon{ - width: 32px; - height: 32px; + width: 28px; + height: 28px; + } + .content-btn{ + position: absolute; + bottom: 15px; + width: 100%; + } + .btn{ + width: 45%; } </style> diff --git a/hive-app/pages/mine/knowledge.vue b/hive-app/pages/mine/knowledge.vue index d4bc24a..488ed59 100644 --- a/hive-app/pages/mine/knowledge.vue +++ b/hive-app/pages/mine/knowledge.vue @@ -1,15 +1,23 @@ <template> <!-- 知识库 --> - <view> + <view class="container flex"> <scroll-view class="list-left" scroll-y> - <view v-for="(item,index) in list" @click="show(item)"> - {{item.primaryTitle}} - <view v-for="sub in item.subTitle" v-show="item.isShow"> + <view v-for="(item,index) in list" class="list-left-row"> + <text @click="show(item)">{{item.primaryTitle}}</text> + <view v-for="(sub,index) in item.subTitle" v-show="item.isShow" class="list-left-row-item" @click="selectItem(index)" :class="index==select?'select-item':''"> {{sub}} </view> </view> </scroll-view> - <scroll-view class="list-right"></scroll-view> + <scroll-view class="list-right" scroll-y> + <view class="flex align-center list-right-row"> + <image class="list-right-img ml-10" mode="aspectFit" src="../../static/images/head-img.jpg"></image> + <view class="flex flex-v ml-10"> + <text class="overflow-nowrap">我是文章的标题</text> + <text class="overflow-omit">我是文章的内容我是文章的内容我是文章的内容我是文章的内容</text> + </view> + </view> + </scroll-view> </view> </template> @@ -17,32 +25,83 @@ export default{ data(){ return{ - primaryTitle:['院装产品','美容套餐','美容客装','美容试装'], - subTitle:['院装产品','院装产品','院装产品','院装产品'], list:[ { primaryTitle:'院装产品', - subTitle:['院装产品','院装产品','院装产品','院装产品'], - isShow:false + subTitle:['水果','蔬菜'], + isShow:false, }, { primaryTitle:'美容套餐', - subTitle:['美容套餐','美容套餐','美容套餐','美容套餐'], + subTitle:['水果','蔬菜'], isShow:false } ], + select:'0' } }, methods:{ show(item){ item.isShow=!item.isShow + this.select=0 + }, + selectItem(index){ + this.select=index } } } </script> <style> + .container{ + padding: 0 10px; + } .list-left{ - width: 100px; + /* width: 100px; */ + width: 25%; + text-align: center; + } + .list-left-row{ + padding: 0 10px; + margin-top: 10px; + font-size: 16px; + display: flex; + flex-direction: column; + align-items: center; + } + .list-left-row-item{ + width: 80px; + margin-top: 8px; + font-size: 14px; + } + .select-item{ + background: red; + border-radius: 20px; + color: #FFFFFF; + } + .list-right{ + width: 75%; + } + .list-right-row{ + border-left: 1px solid #ABB1CC; + border-bottom: 1px solid #ABB1CC; + } + .list-right-img{ + width: 200px; + height: 100px; + } + + /* 超过两行显示省略号 */ + .overflow-omit{ + text-overflow: -o-ellipsis-lastline; + overflow: hidden; + text-overflow: ellipsis; + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; + } + /* 只能一行,超出显示省略号 */ + .overflow-nowrap{ + white-space:nowrap; } </style> diff --git a/hive-app/pages/mine/setting.vue b/hive-app/pages/mine/setting.vue index f5aff33..6e6a6ae 100644 --- a/hive-app/pages/mine/setting.vue +++ b/hive-app/pages/mine/setting.vue @@ -16,11 +16,11 @@ </script> <style> - .container:first-child{ - border-top: 1px solid #ABB1CC; + .container{ + padding: 0 15px; } .content-row{ - padding: 10px 15px; - border-bottom: 1px solid #ABB1CC; + padding: 10px 0px; + border-bottom: 1px solid #EDEAF4; } </style> -- Gitblit v1.9.1