소스 검색

Merge branch 'master' of http://git.zthymaoyi.com/zyw/tourism

achao 1 년 전
부모
커밋
7b66202a5e
5개의 변경된 파일129개의 추가작업 그리고 7개의 파일을 삭제
  1. 1 0
      uni_applet/App.vue
  2. 8 0
      uni_applet/pageA/login/index.vue
  3. 9 0
      uni_applet/pages.json
  4. 111 7
      uni_applet/pages/my/my.vue
  5. BIN
      uni_applet/static/logo.png

+ 1 - 0
uni_applet/App.vue

@@ -76,6 +76,7 @@
 	.detailedAddress{
 		width:600rpx;
 		text-align:center;
+		color:#999 ;
 	}
 	.merchants_button,.merchants_unable_button,.merchants_default_button,.merchants_caution_button{
 		background:#5F7DE9;

+ 8 - 0
uni_applet/pageA/login/index.vue

@@ -0,0 +1,8 @@
+<template>
+</template>
+
+<script>
+</script>
+
+<style>
+</style>

+ 9 - 0
uni_applet/pages.json

@@ -391,6 +391,15 @@
                 }
                 
                 }
+				,{
+				    "path" : "login/index",
+				    "style" :                                                                                    
+				{
+				    "navigationBarTitleText": "登录",
+				    "enablePullDownRefresh": false
+				}
+				
+				}
             ]
 	}],
 	"preloadRule": {

+ 111 - 7
uni_applet/pages/my/my.vue

@@ -1,12 +1,66 @@
 <template>
 	<view class="content">
+		<view class='user'>
+			<view class='flex userWrap justify-space-between'>
+				<view class='flex'>
+					<view style='margin-right:20rpx;'>
+						<u--image width='60' height='60' :src="userInfo.head" shape="circle"></u--image>
+					</view>
+					<view>
+						<view class='flex'>
+							<view v-if='!edit'>{{userInfo.nickname}}</view>
+							<view v-else> <u--input
+								placeholder="请输入内容"
+								border="bottom"
+								v-model='userInfo.nickname'
+								clearable
+							  ></u--input></view>
+							<u-icon  v-if='!edit' @click='edit = true' name="edit-pen-fill" color="#2979ff" size="24"></u-icon>
+							<u-icon  v-else @click='editNickName' name="checkbox-mark" color="#2979ff" size="24"></u-icon>
+						</view>
+						<view>{{userInfo.phone1}}</view>
+					</view>
+				</view>	
+				<view>
+					<u-icon name="bell" color="#2979ff" size="28"></u-icon>
+				</view>
+			</view>
+			
+		</view>
 		<view class="wrap">
-			<view></view>
-			<view>
-				
+			<view class='orderList'>
+				<view class="orderItem align-item-center">
+					<view style='position:relative;'>
+						<u-icon name="home-fill" color="#2979ff" size="28"></u-icon>
+						<u-badge :offset='offset' absolute='true'  bgColor='red' max="99" :value="value"></u-badge>
+					</view>
+					<view class='orderName'>入住订单</view>
+				</view>
+				<view class="orderItem align-item-center">
+					<view style='position:relative;'>
+						<u-icon name="home-fill" color="#2979ff" size="28"></u-icon>
+						<u-badge :offset='offset' absolute='true'  bgColor='red' max="99" :value="value"></u-badge>
+					</view>
+					<view class='orderName'>特产订单</view>
+				</view>
+				<view class="orderItem align-item-center">
+					<view style='position:relative;'>
+						<u-icon name="home-fill" color="#2979ff" size="28"></u-icon>
+						<u-badge :offset='offset' absolute='true'  bgColor='red' max="99" :value="value"></u-badge>
+					</view>
+					<view class='orderName'>团购订单</view>
+				</view>
+				<view class="orderItem align-item-center">
+					<view style='position:relative;'>
+						<u-icon name="home-fill" color="#2979ff" size="28"></u-icon>
+						<u-badge :offset='offset' absolute='true'  bgColor='red' max="99" :value="value"></u-badge>
+					</view>
+					<view class='orderName'>门票订单</view>
+					
+				</view>
 			</view>
 			<view style='width:100%;'>
-				<u-cell-group>
+				<u-cell-group :border='false'>
 					<u-cell
 					    title="收货地址"
 					    isLink
@@ -63,7 +117,12 @@
 		},
 		data() {
 			return {
-				title: 'Hello'
+				edit:false,
+				offset:['-2','-27%'],
+				type:"warning",
+				value:'88',
+				title: 'Hello',
+				userInfo:{},
 			}
 		},
 		onLoad() {
@@ -73,15 +132,32 @@
 			if(!uni.getStorageSync("userInfo").phone){
 				this.$refs.loginpopup.open()
 			}else{
+				this.userInfo = uni.getStorageSync("userInfo")
+				  var reg = /1(\d{2})\d{4}(\d{4})/g;
+				this.userInfo.phone1 = this.userInfo.phone.replace(reg,"1$1****$2");
+				console.log(this.userInfo)
 			}
 		},
 		methods: {
-
+			editNickName(){
+				this.$request.baseRequest('admin.unimall.commonUserInfo', 'update', {
+					commonUserInfo:JSON.stringify(this.userInfo)
+				}, failres => {
+					uni.showToast({
+						icon: "none",
+						title: failres.errmsg,
+						duration: 3000
+					});	
+				}).then(res => {
+					uni.setStorageSync("userInfo",this.userInfo)
+					this.edit=false
+				})
+			}
 		}
 	}
 </script>
 
-<style>
+<style lang='scss' scoped>
 	.content {
 		display: flex;
 		flex-direction: column;
@@ -110,4 +186,32 @@
 	.wrap{
 		width:92vw;
 	}
+	.orderList{
+		display:flex;
+		flex-wrap: wrap;
+		.orderItem{
+			width:48%;
+			padding:20rpx;
+			background:#E5EBFF;
+			box-sizing:border-box;
+			margin:5rpx;
+			border-radius:10rpx;
+			display:flex;
+		}
+		/deep/.u-badge{
+			z-index:50;
+		}
+		.orderName{
+			margin-left:20rpx;
+		}
+	}
+	.user{
+		background:#fff;
+		width:100%;
+		padding:10rpx 20rpx;
+	}
+	.userWrap{
+		width:92vw;
+		margin:0 auto;
+	}
 </style>

BIN
uni_applet/static/logo.png