|
@@ -1,15 +1,13 @@
|
|
|
<template>
|
|
|
- <view class="main">
|
|
|
- <view class="content">
|
|
|
- <view class="top">
|
|
|
- <image :src="ip + item.avatar" mode="widthFix" class="avatar" v-if="item.avatar"></image>
|
|
|
- <view class="title">{{ item.name }}</view>
|
|
|
- </view>
|
|
|
- <view class="con">
|
|
|
- <u-divider text="人物介绍"></u-divider>
|
|
|
- <u-parse :content="item.introduce" v-if="item.introduce"></u-parse>
|
|
|
- <u-empty v-else text="暂无介绍资料"></u-empty>
|
|
|
- </view>
|
|
|
+ <view class="detail">
|
|
|
+ <view class="top">
|
|
|
+ <image :src="ip + item.avatar" mode="widthFix" class="avatar" v-if="item.avatar"></image>
|
|
|
+ <view class="title">{{ item.name }}</view>
|
|
|
+ </view>
|
|
|
+ <view class="con">
|
|
|
+ <u-divider text="人物介绍"></u-divider>
|
|
|
+ <u-parse :content="item.introduce" v-if="item.introduce"></u-parse>
|
|
|
+ <u-empty v-else text="暂无介绍资料"></u-empty>
|
|
|
</view>
|
|
|
</view>
|
|
|
</template>
|
|
@@ -27,7 +25,9 @@ export default {
|
|
|
url: '/app/doctor/detail/' + e.id,
|
|
|
success: (res) => {
|
|
|
this.item = res.data.data;
|
|
|
- this.item.introduce = res.data.data.introduce.replace(new RegExp('/profile/upload/', 'g'), this.http.ip + '/profile/upload/');
|
|
|
+ if (res.data.data.introduce) {
|
|
|
+ this.item.introduce = res.data.data.introduce.replace(new RegExp('/profile/upload/', 'g'), this.http.ip + '/profile/upload/');
|
|
|
+ }
|
|
|
}
|
|
|
});
|
|
|
},
|
|
@@ -36,30 +36,7 @@ export default {
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss">
|
|
|
-.main {
|
|
|
- padding: 0px 10px 10px 10px;
|
|
|
-}
|
|
|
-.content {
|
|
|
- padding: 15px;
|
|
|
+page {
|
|
|
background-color: white;
|
|
|
- border-radius: 8px;
|
|
|
- .top {
|
|
|
- text-align: center;
|
|
|
- .avatar {
|
|
|
- width: 55%;
|
|
|
- border-radius: 5px;
|
|
|
- }
|
|
|
- .title {
|
|
|
- font-size: 18px;
|
|
|
- padding-top: 3px;
|
|
|
- }
|
|
|
- }
|
|
|
- .con {
|
|
|
- font-size: 14px;
|
|
|
- line-height: 23px;
|
|
|
- image {
|
|
|
- border-radius: 5px !important;
|
|
|
- }
|
|
|
- }
|
|
|
}
|
|
|
</style>
|