Ver código fonte

fix:优化小程序

lsw 10 meses atrás
pai
commit
6e5b783e78

+ 43 - 1
app/common/common.scss

@@ -282,4 +282,46 @@
 		text-align: center;
 		padding-top: 5px;
 	}
-}
+}
+.detail {
+	padding: 15px;
+	background-color: white;
+	border-radius: 8px;
+	.top {
+		text-align: center;
+		.avatar {
+			width: 55%;
+			border-radius: 5px;
+		}
+		.title {
+			font-size: 18px;
+			padding-top: 3px;
+		}
+	}
+	.desc {
+		padding-top: 15px;
+		font-size: 13px;
+		color: #7c8388;
+		.time {
+			padding-right: 25px;
+		}
+		.fx {
+			background-color: white;
+			float: right;
+			font-size: 15px;
+			margin-right: -14px;
+			margin-top: -13px;
+			color: $main-color;
+			.icon {
+				padding-right: 3px;
+			}
+		}
+	}
+	.con {
+		font-size: 14px;
+		line-height: 23px;
+		image {
+			border-radius: 5px !important;
+		}
+	}
+}

+ 13 - 36
app/pages/doctor/detail.vue

@@ -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>

+ 4 - 28
app/pages/introduction/index.vue

@@ -1,9 +1,7 @@
 <template>
-	<view class="main">
-		<view class="content">
-			<view class="con">
-				<u-parse :content="item.brief"></u-parse>
-			</view>
+	<view class="detail">
+		<view class="con">
+			<u-parse :content="item.brief"></u-parse>
 		</view>
 	</view>
 </template>
@@ -23,34 +21,12 @@ export default {
 				this.item.brief = res.data.data.brief.replace(new RegExp('/profile/upload/', 'g'), this.http.ip + '/profile/upload/');
 			}
 		});
-	},
-	methods: {},
-	//分享
-	onShareAppMessage: function (res) {
-		return {
-			title: this.item.title,
-			path: '/pages/news/detail?id=' + this.item.id,
-			success: (res) => {},
-			fail: (res) => {}
-		};
 	}
 };
 </script>
 
 <style lang="scss">
-.main {
-	padding: 0px 10px 10px 10px;
-}
-.content {
-	padding: 15px;
+page {
 	background-color: white;
-	border-radius: 8px;
-	.con {
-		font-size: 14px;
-		line-height: 23px;
-		image {
-			border-radius: 5px !important;
-		}
-	}
 }
 </style>

+ 13 - 49
app/pages/knowledge/detail.vue

@@ -1,18 +1,16 @@
 <template>
-	<view class="main">
-		<view class="content">
-			<view class="title">{{ item.title }}</view>
-			<view class="desc">
-				<text class="time">发布于:{{ item.createTime }}</text>
-				<button class="fx" open-type="share">
-					<text class="icon">&#xe637;</text>
-					<text>分享</text>
-				</button>
-			</view>
-			<view class="con">
-				<u-divider :dot="true"></u-divider>
-				<u-parse :content="item.content"></u-parse>
-			</view>
+	<view class="detail">
+		<view class="title">{{ item.title }}</view>
+		<view class="desc">
+			<text class="time">发布于:{{ item.createTime }}</text>
+			<button class="fx" open-type="share">
+				<text class="icon">&#xe637;</text>
+				<text>分享</text>
+			</button>
+		</view>
+		<view class="con">
+			<u-divider :dot="true"></u-divider>
+			<u-parse :content="item.content"></u-parse>
 		</view>
 	</view>
 </template>
@@ -47,41 +45,7 @@ export default {
 </script>
 
 <style lang="scss">
-.main {
-	padding: 0px 10px 10px 10px;
-}
-.content {
-	padding: 15px;
+page {
 	background-color: white;
-	border-radius: 8px;
-	.title {
-		font-size: 18px;
-	}
-	.desc {
-		padding-top: 15px;
-		font-size: 13px;
-		color: #7c8388;
-		.time {
-			padding-right: 25px;
-		}
-		.fx {
-			background-color: white;
-			float: right;
-			font-size: 15px;
-			margin-right: -14px;
-			margin-top: -13px;
-			color: $main-color;
-			.icon {
-				padding-right: 3px;
-			}
-		}
-	}
-	.con {
-		font-size: 14px;
-		line-height: 23px;
-		image {
-			border-radius: 5px !important;
-		}
-	}
 }
 </style>

+ 1 - 1
app/pages/user/bind/index.vue

@@ -60,7 +60,7 @@ export default {
 			});
 		},
 		go(url) {
-			//uni.navigateTo({ url: url });
+			uni.navigateTo({ url: url });
 		}
 	}
 };

+ 3 - 3
app/pages/user/index.vue

@@ -42,7 +42,7 @@
 				<text class="icon arrow">&#xe62b;</text>
 			</view>
 		</view>
-		<u-action-sheet round="20" :actions="user.bindUserList" key="patientName" @select="selectClick" cancelText="取消" :show="show" @close="show = false"></u-action-sheet>
+		<u-action-sheet round="20" title="切换就诊人" :actions="user.bindUserList" @select="selectClick" cancelText="取消" :show="show" @close="show = false"></u-action-sheet>
 	</view>
 </template>
 <script>
@@ -55,8 +55,8 @@ export default {
 		};
 	},
 	onShow() {
-		/* 		 		this.user = {
-			token: 'eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6IjE3MTkwODMzLWNiNDgtNDkxMC1iZjE1LTEzNDYzMDNkZDI0YSJ9.AWgnb6GT20QIb8DxUwqt0LHaPmfb9WXKlCM1xm20AyOHpnCUtYdf1sCO47gReeIjVKm1MGBoTytUV5YxE5buew'
+		/* 		this.user = {
+			token: 'eyJhbGciOiJIUzUxMiJ9.eyJsb2dpbl91c2VyX2tleSI6ImI3ZjVlNDYwLThjY2YtNDkxZi1hNTBjLWI1MjQzNDUzNjFkZiJ9.VTDBJ3929h8qGWMZFkfq-dQAkWOptIfQk7f5CaIahgltFV4QACgf3QBabcswisGTMQZaJMkxt5uCzjv3AkN48w'
 		};
 		uni.setStorageSync('user', this.user); */
 		if (this.hasLogin()) {