Przeglądaj źródła

添加个人信息页面

306132416@qq.com 6 lat temu
rodzic
commit
4da65202e4

+ 1 - 0
.gitignore

@@ -0,0 +1 @@
+/unpackage

+ 3 - 1
pages.json

@@ -17,7 +17,9 @@
         }
 		,{
 		    "path" : "pages/selfInfo/selfInfo",
-		    "style" : {}
+		    "style" : {
+				"navigationBarTitleText": "我的"
+			}
 		}
         ,{
             "path" : "pages/selfInfo/selfDetail/selfDetail",

+ 39 - 22
pages/index/index.vue

@@ -34,8 +34,8 @@
 				
 			</view>
 			<view class="send-box">
-				<input type="number" class="enter-box">
-				<button type="primary" class="submit-message">发送</button>
+				<input type="number" class="enter-box" v-model="inputInfo">
+				<button type="primary" class="submit-message" @click="sendInputInfo()">发送</button>
 			</view>
 		</view>
 </template>
@@ -48,6 +48,7 @@
 				title: 'RABOT',
 				nowTime:'',
 				nowHeight:'622px',
+				inputInfo:'',
 				talkList:[
 					{
 						talkType:1 ,// 代表用户
@@ -88,26 +89,42 @@
 			this.getNowTime();
 		},
 		methods: {
-		getNowTime(){
-			let time = new Date();
-			let y=time.getFullYear();
-			let m=time.getMonth()+1;
-			let d=time.getDate();
-			let h=time.getHours();
-			let i=time.getMinutes();
-			i = i > 10 ? i : '0' + i;  
-			this.nowTime = y+"年"+m+"月"+d+"日"+"   "+h+":"+i
-		},
-		getEquipmentHeight() {
-			let height = uni.getSystemInfoSync().windowHeight;
-			this.nowHeight = height  + 'px';
-		},
-		customConduct(){
-                uni.navigateTo({
-                	url:'../selfInfo/selfInfo'
-                })
-            }
-		}
+			getNowTime(){
+				let time = new Date();
+				let y=time.getFullYear();
+				let m=time.getMonth()+1;
+				let d=time.getDate();
+				let h=time.getHours();
+				let i=time.getMinutes();
+				i = i > 10 ? i : '0' + i;  
+				this.nowTime = y+"年"+m+"月"+d+"日"+"   "+h+":"+i
+			},
+			getEquipmentHeight() {
+				let height = uni.getSystemInfoSync().windowHeight;
+				this.nowHeight = height  + 'px';
+			},
+			customConduct(){
+					uni.navigateTo({
+						url:'../selfInfo/selfInfo'
+					})
+				},
+			sendInputInfo(){
+					if(!this.inputInfo){
+						uni.showToast({
+							title: '请输入股票代码',
+							icon: 'none'
+						});
+					}else {
+						let obj = {
+								talkType:1 ,// 代表用户
+								headUrl:'../../static/alienware.png',
+								content:this.inputInfo,
+							}
+						this.talkList.push(obj);
+						this.inputInfo = '';	
+					}
+				}
+			},
 	}
 </script>
 

+ 168 - 21
pages/selfInfo/selfInfo.vue

@@ -1,24 +1,82 @@
 <template>
-	<view class="content">
-		<image class="logo" src="/static/logo.png" mode="aspectFit"></image>
-		<view class="text-area">
-			<text class="title">{{title}}</text>
+	<view class="content" :style="{height:nowHeight}">
+		
+		<view class="self-title-box">
+			<image src="../../static/logo.png" mode=""></image>
+			<text>芝麻开花</text>
 		</view>
-	</view>
+		
+		<view class="self-search-box">
+			<view class="search-content">
+				<view class="search-content-value">160</view>
+				<view class="search-content-text">剩余查询次数(次)</view>
+			</view>
+			<view class="line"></view>
+			<view class="search-content">
+				<view class="search-content-value">300</view>
+				<view class="search-content-text">总查询次数(次)</view>
+			</view>
+		</view>
+		
+		<view class="self-pay-box">
+			<view class="search-content">
+				<view class="search-content-value" style="color:#000;font-size: 38upx;margin-left: -11%;">查询套餐</view>
+				<view class="search-content-text">限时优惠进行中</view>
+			</view>
+			<view class="search-content" style="width: 33%;height: 180rpx;">
+				<image src="../../static/payIcon.png" mode=""></image>
+				<button type="primary">去购买</button>
+			</view>
+		</view>
+		
+		<view class="self-setting-box">
+			<view class="setting-content-box" style="border-bottom: 1upx solid #d9d9d9">
+				<view class="setting-content-text">
+					<image src="../../static/icon/moneyIcon.png" mode=""></image>
+				    <text>充值记录</text>
+				</view>
+				<view style="margin-right: 2%;margin-top: 2%;">
+					<image src="../../static/icon/arrowIcon.png" mode="" style="width: 32upx;height:32upx;"></image>
+				</view>
+			</view>
+			
+			<view class="setting-content-box" @click.stop="goMyAskPage()">
+				<view class="setting-content-text">
+					<image src="../../static/icon/askIcon.png" mode="" class="askIcon"></image>
+				    <text>我的咨询</text>
+				</view>
+				<view style="margin-right: 2%;margin-top: 2%;">
+					<image src="../../static/icon/arrowIcon.png" mode="" style="width: 32upx;height:32upx;"></image>
+				</view>
+			</view>
+		</view>
+	</view>	
 </template>
 
 <script>
 	export default {
 		data() {
 			return {
-				title: '个人中心页面'
+				title: '个人中心页面',
+				nowHeight:'',
 			}
 		},
 		onLoad() {
-
+          this.getEquipmentHeight();
 		},
 		methods: {
-
+			getEquipmentHeight() {
+				let height = uni.getSystemInfoSync().windowHeight;
+				this.nowHeight = height  + 'px';
+			},
+			goMyAskPage(){
+				uni.navigateTo({
+					url: '../index/index',
+					success: res => {},
+					fail: () => {},
+					complete: () => {}
+				});
+			}
 		}
 	}
 </script>
@@ -28,25 +86,114 @@
 		display: flex;
 		flex-direction: column;
 		align-items: center;
-		justify-content: center;
+		justify-content: flex-start;
+		background: #f4f5f7;
 	}
 
-	.logo {
+	
+	.self-title-box {
+		height: 120upx;
+		width: 100%;
+		background: #27BCEF;
+		display: flex;
+		justify-content: flex-start;
+		align-items: center;
+		color: #fff;
+	}
+	.self-title-box image {
+		width: 90rpx;
+		height:90rpx;
+		border-radius: 45rpx;
+		margin-left: 7%;
+		margin-right: 5%;
+	}
+	
+	.self-search-box {
 		height: 200upx;
-		width: 200upx;
-		margin-top: 200upx;
-		margin-left: auto;
-		margin-right: auto;
-		margin-bottom: 50upx;
+		width: 85%;
+		background: #fff;
+		margin-top: 5%;
+		display: flex;
+		justify-content: space-around;
+		align-items: center;
 	}
+	.line {
+		height: 150rpx;
+		width: 1rpx;
+		background: #D9D9D9;
 
-	.text-area {
+	}
+	.search-content {
+		height: 150upx;
+		width: 45%;
 		display: flex;
-		justify-content: center;
+		flex-direction: column;
+		justify-content: space-around;
+		align-items: center;
 	}
-
-	.title {
-		font-size: 36upx;
-		color: #8f8f94;
+	.search-content-value {
+		color:  #27BCEF;
+		font-weight: bold;
+		font-size: 42rpx;
+	}
+	.search-content-text {
+		color: #888;
+		font-size: 26rpx;
+	}
+	.self-pay-box {
+		height: 200upx;
+		width: 85%;
+		background: #fff;
+		margin-top: 5%;
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+	}
+	.search-content image {
+		width: 120rpx;
+		height:90rpx;
+	}
+	.search-content button {
+		width: 120rpx;
+		height:60rpx;
+		line-height: 60rpx;
+		font-size: 26rpx;
+		color: #fff;
+		background-color: #27BCEF!important;
+		padding-left: 0;
+		padding-right: 0;
+	}
+	
+	.self-setting-box {
+		height: 200upx;
+		width: 90%;
+		background: #fff;
+		margin-top: 5%;
+	}
+	.setting-content-box {
+		display: flex;
+		justify-content: space-between;
+		align-items: center;
+		height: 100upx;
+	}
+	.setting-content-text {
+		display: flex;
+		align-items: center;
+		width: 50%;
+	}
+	.setting-content-text image {
+		width: 60upx;
+		height:60upx;
+		margin-left: 5%;
+		margin-right: 3%;
+	}
+	.askIcon{
+		width: 45rpx!important;
+		height: 45rpx!important;
+		margin-left: 8%!important;
+		margin-right: 5%!important;
+	}
+	.setting-content-text text {
+		font-size:30rpx;
 	}
 </style>

BIN
static/icon/arrowIcon.png


BIN
static/icon/askIcon.png


BIN
static/icon/moneyIcon.png


BIN
static/payIcon.png