liujd 6 лет назад
Родитель
Сommit
f7f87c30df

+ 2 - 3
mobile-code/src/manifest.json

@@ -38,11 +38,10 @@
             "publicPath" : "/"
         },
         "devServer": {
-            // "host": "bd.meijiabang.com",
-            "port": 80,
+            "port": 7777,
             "proxy": {
                 "/api": {
-                    "target": "http://mobile.huaml.com",
+                    "target": "http://api.m.huaml.com",
                     "secure": false,
                     "changeOrigin": true,
                     "pathRewrite": {

+ 12 - 6
mobile-code/src/pages.json

@@ -30,12 +30,6 @@
 				"navigationBarTitleText": "加载中..."
 			}
 		},
-		{
-			"path": "pages/home/login/index",
-			"style": {
-				"navigationBarTitleText": "登录"
-			}
-		},
 		{
 			"path": "pages/home/webview/index",
 			"style": {
@@ -147,6 +141,18 @@
 					}
 				}
 			]
+		},
+		{
+			"root": "pages/chat",
+			"pages": [
+				{
+					"path": "index",
+					"style": {
+						"navigationBarTitleText": "客服",
+						"enablePullDownRefresh": true
+					}
+				}
+			]
 		}
 	],
 	"globalStyle": {

+ 162 - 0
mobile-code/src/pages/chat/index.vue

@@ -0,0 +1,162 @@
+<template>
+	<div class="app-content">
+		<div class="chat-top-wrap">
+			<scroll-view class="chat-list-wrap" scroll-y :style="{height: '642px'}">
+				<div class="chat-list" :class="[index == 2 ? 'chat-list-l' : 'chat-list-r' ]" v-for="(item, index) in 4" :key="index">
+					<div class="list-time">15:20</div>
+					<div class="list-blo">
+						<!-- 左边时 -->
+						<div class="list-attr" v-if="index == 2">
+							<img src="../../static/images/user/attr-default.png" alt />
+						</div>
+						<div class="list-content" v-if="index == 2">花之物语~ 红色系列 贼啦美丽贼 啦魅力贼拉有品德高尚的情操,快 客来拉拉~</div>
+						<div class="list-content list-img" v-else>
+							<div class="list-content-img">
+								<img src="../../static/images/logout.png" alt mode="center" />
+							</div>
+							<div class="list-img-text">注册会员</div>
+						</div>
+						<!-- 右边时 -->
+						<div class="list-attr" v-if="index != 2">
+							<img src="../../static/images/user/attr-default.png" alt />
+						</div>
+					</div>
+				</div>
+			</scroll-view>
+		</div>
+		<!-- 底部 -->
+		<div class="chat-bottom-wrap app-footer">
+			<!-- 快捷 -->
+			<div class="tool-wrap">
+				<div class="tool-tit">我想</div>
+				<div class="tool-list">发链接</div>
+				<div class="tool-list">发商品图</div>
+				<div class="tool-list">发照片</div>
+			</div>
+		</div>
+	</div>
+</template>
+
+<script>
+export default {
+	name: 'chat-index',
+	data() {
+		return {
+			height: 667
+		}
+	},
+	onLoad(option) {
+		// setTimeout(() => {
+		// 	uni.getSystemInfo({
+		// 		success: res => {
+		// 			this.height = res.windowHeight
+		// 		}
+		// 	})
+		// }, 50)
+	},
+	computed: {
+		scrollHei() {
+			return uni.upx2px(1334 - 170) + 'px'
+		}
+	}
+}
+</script>
+
+<style lang="scss" scoped>
+	.chat-top-wrap {
+        height: calc(100% - 170px);
+		.chat-list {
+			width: calc(100% - 52px);
+			padding: 0 26px;
+			.list-time {
+				color: $fontColor3;
+				text-align: center;
+				margin-top: 30px;
+			}
+			.list-blo {
+				@include disFlex(flex-start, flex-start);
+				margin-top: 20px;
+				.list-attr {
+					width: 70px;
+					height: 70px;
+					border-radius: 50%;
+					img {
+						border-radius: 50%;
+					}
+				}
+				.list-content {
+					padding: 18px 20px;
+					background-color: #fff;
+					border-radius: 10px;
+					font-size: 30px;
+					position: relative;
+					color: #000;
+					max-width: 66%;
+					line-height: 1.4;
+					&::before {
+						content: '';
+						position: absolute;
+						width: 0;
+						height: 0;
+						top: 16px;
+						border: 12px solid #fff;
+					}
+					&.list-img {
+						background-color: #fff !important;
+						.list-content-img {
+							width: 260px;
+							height: 260px;
+							img {
+								height: 260px;
+							}
+						}
+						.list-img-text {
+							margin-top: 12px;
+							font-size: 28px;
+						}
+					}
+				}
+			}
+		}
+		// 左边的消息
+		.chat-list-l {
+			.list-content {
+				margin-left: 26px;
+				&::before {
+					right: 100%;
+					border-color: transparent #fff transparent transparent !important;
+				}
+			}
+		}
+		// 右边的消息
+		.chat-list-r {
+			.list-blo {
+				justify-content: flex-end;
+				.list-content {
+					margin-right: 26px;
+					background-color: #a9e368;
+					&::before {
+						left: 100%;
+						border-color: transparent transparent transparent #a9e368 !important;
+					}
+					&.list-img {
+						&::before {
+							border-color: transparent transparent transparent #fff !important;
+						}
+					}
+				}
+			}
+		}
+	}
+	.chat-bottom-wrap {
+        width: calc(100% - 40px);
+        height: 170px;
+		padding: 0 20px;
+		// 快捷
+		.tool-wrap {
+			@include disFlex(center, flex-start);
+			.tool-tit {
+			}
+		}
+	}
+</style>

+ 1 - 0
mobile-code/src/pages/home/index.vue

@@ -3,6 +3,7 @@
 		<button @click="toPay">去支付页</button>
 		<button @click="$util.pageTo('/pages/callback/index')">支付回调</button>
 		<button @click="$util.pageTo('/pages/user/register')">注册</button>
+		<button @click="$util.pageTo('/pages/chat/index')">聊天</button>
 		<!-- <app-footer /> -->
 		<app-activily-coupon :show="false" />
 	</div>

+ 1 - 1
mobile-code/src/pages/home/login/index.vue → mobile-code/src/pages/login/index.vue

@@ -97,7 +97,7 @@ export default {
 		height: 100%;
 		.top {
 			height: 282px;
-			background: url('../../../static/images/bg.png');
+			background: url('../../static/images/bg.png');
 			background-size: cover;
 			.top-title {
 				line-height: 282px;

+ 2 - 0
mobile-code/src/uni.scss

@@ -1,6 +1,8 @@
 /***
 全局scss 变量和方法 存放处
  */
+//  uniapp upx换算函数
+//  uni.upx2px(val) + 'px'
 /* 引入minxin */
 @import '~@/static/css/minxin.scss';