zhengkaixin 4 年 前
コミット
3cf62edf96

+ 7 - 3
pages/car/login.js

@@ -70,9 +70,9 @@ import {
 					  
 						this.$refs.common.alert(phoneResult)
 					} else {
-					
+					this.$refs.common.showLoading()
 						API_user.getVerifyCode(this.subFormCode).then(response => {
-							 
+							this.$refs.common.showLoading(false) 
 							if(response.message){
 								//倒计时
 								this.msgTimeInterval();
@@ -130,8 +130,12 @@ import {
 				this.back=true;
 			}
 			console.log(ob)
-			
 			this.subFormCode.openId = this.carhelp.getOpenId();
+			
+			if (process.car.SIMPLE_RUN) {
+				this.subFormCode.openId = "test";
+				
+			}
 			console.log(this.carhelp.getPrefix())
 			
 				

+ 14 - 9
pages/index/index.js

@@ -32,7 +32,19 @@ export default {
 		},
 		methods: {
 			getNewNum(){
-			
+				
+				
+				var pages = getCurrentPages();
+				var page = (pages[pages.length - 1]).route;
+				
+				if(page=="pages/index/index"||
+				page=="pages/my/index"||
+				page=="pages/news/index"){
+					setTimeout(this.getNewNum,10000)
+				}else{
+					setTimeout(this.getNewNum,1000)
+					return;
+				}
 				API.passengerMessageNoReadNum().then((res) => {
 					var num=res.data.num;
 					
@@ -50,14 +62,7 @@ export default {
 				}).catch(error => {
 					
 				})   
-				if(page=="pages/index/index"||
-				page=="pages/my/index"||
-				page=="pages/news/index"){
-					
-					setTimeout(this.getNewNum,10000)
-				}else{
-					setTimeout(this.getNewNum,30000)
-				}
+				
 			
 			
 		} ,

+ 1 - 1
pages/my/index.vue

@@ -10,7 +10,7 @@
 				<view class="u-font-18 u-p-b-20">{{user.name}}</view>
 			</view>
 			<view class="u-m-l-10 u-p-10">
-				<u-button type="primary" plain size="mini" shape="circle" v-if="false" @click="gotoUrl('/pages/my/user/updateinfo')">修改资料</u-button>
+				<u-button type="primary" plain size="mini" shape="circle"  @click="gotoUrl('/pages/my/user/updateinfo')">修改资料</u-button>
 			</view>
 		</view>
 		<!-- <view class="u-flex user-box u-p-l-30 u-p-r-20 u-p-b-30 u-p-t-30">

+ 1 - 0
pages/my/user/updateinfo.js

@@ -10,6 +10,7 @@ export default {
 			
 		},
 		methods: {
+			 
 			gotoUrl(url){
 				uni.navigateTo({
 					url:url

+ 22 - 5
pages/my/user/updateinfo.vue

@@ -13,14 +13,31 @@
 		</view> -->
 		 
 		<u-cell-group>
-			<u-cell-item title="用户名"  :arrow="false"  >{{user.name}}</u-cell-item>
-			<u-cell-item title="手机号码"  :arrow="false" ></u-cell-item>
-			<u-cell-item title="人脸识别照片"  ><u-avatar :src="pic" size="50"></u-avatar></u-cell-item>
+			<u-field style="color: #606266;"
+						v-model="user.name"
+						label="用户名"
+						placeholder="请填写用户名"
+						input-align="right"
+					></u-field>
+				
+		
+			<u-cell-item title="手机号码"  :arrow="false" >{{showphone(user.phone)}}</u-cell-item>
+			<u-cell-item title="人脸识别照片"  >
+				<u-avatar :src="pic" size="50"></u-avatar>
+				</u-cell-item>
 			
 		</u-cell-group>
 		<view class="u-m-t-20">
 			<u-cell-group>
-				<u-cell-item title="是否接收乘车消息"  :arrow="false" ></u-cell-item>
+				<u-cell-item title="是否接收乘车消息"  :arrow="false" >
+					<u-checkbox 
+									shape="circle"
+									v-model="user.acceptMessage" 
+								
+								></u-checkbox>
+					
+					
+				</u-cell-item>
 				
 			</u-cell-group>
 		</view>
@@ -28,7 +45,7 @@
 		
 		
 		<view class="upload-button">
-			<u-button type="primary" shape="circle">提交</u-button>
+			<u-button type="primary" shape="circle" @click="submit()">提交</u-button>
 		</view>
 	</view>
 </template>

+ 2 - 2
pages/my/user/updatephone/change.js

@@ -73,9 +73,9 @@ import {
 						  
 							this.$refs.common.alert(phoneResult)
 						} else {
-						
+						this.$refs.common.showLoading()
 							API_user.getVerifyCode(this.subFormCode).then(response => {
-								 
+								 this.$refs.common.showLoading(false)
 								if(response.message){
 									//倒计时
 									this.msgTimeInterval();

+ 2 - 2
pages/my/user/updatephone/verification.js

@@ -71,9 +71,9 @@ import {
 					  
 						this.$refs.common.alert(phoneResult)
 					} else {
-					
+					this.$refs.common.showLoading()
 						API_user.getVerifyCode(this.subFormCode).then(response => {
-							 
+							this.$refs.common.showLoading(false) 
 							if(response.message){
 								//倒计时
 								this.msgTimeInterval();

+ 6 - 3
pages/news/index.js

@@ -24,7 +24,8 @@ export default {
 					{
 						id:item.id,
 						upStationName:item.stationName,
-						upStationId:item.stationId
+						upStationId:item.stationId,
+						imageUrl:item.imageUrl
 					}
 				], //当前添加的2人
 				list: [] // 一共添加的人 
@@ -43,8 +44,10 @@ export default {
 				return;
 			}
 		},
-		passengerMessage() {
-			this.$refs.common.showLoading();
+		passengerMessage() {
+			if(this.$refs.common){
+				this.$refs.common.showLoading();
+			}
 
 			API.passengerMessage(this.listForm).then((res) => {
 				var response=res.data;