郭宇琦 2 weeks ago
parent
commit
428349383f

+ 3 - 0
common/config_gyq.js

@@ -42,5 +42,8 @@ var config = {
 	
 	//共享用车人详情
 	API_FLK_CAR_EDIT_SHARE_INFO: api_web_url +'?r=flk/car/share-info',
+	
+	//修改用户昵称、头像
+	API_USER_MODIFY_USER_INFO: api_web_url +'?r=user/modify-user-info',
 };
 module.exports = config;

+ 3 - 0
pages/loginRegister/changePassword.vue

@@ -25,6 +25,8 @@
 
 <script>
 import ZxInput from './components/ZxInput.vue'
+var config = require('../../common/config_gyq.js');
+	var http = require('../../common/request.js');
 export default {
     data() {
         return {
@@ -43,6 +45,7 @@ export default {
     },
     methods: {
         changePassword() {
+			
         }
     }
 }

+ 2 - 2
pages/message/index.vue

@@ -6,13 +6,13 @@
                     <view>{{ $t('设备消息') }}</view>
                     <view class="bage">{{ deviceInfo.unread }}</view>
                 </view>
-                <view class="time">06:57</view>
+                <view class="time">{{deviceInfo.message_date}}</view>
             </view>
             <view class="device-info">
                 <image class="img" :src="deviceInfo.image" />
                 <view class="info">
                     <view class="name">{{ deviceInfo.car_name }}</view>
-                    <view class="status">异常震动</view>
+                    <view class="status">{{deviceInfo.message_overview}}</view>
                 </view>
             </view>
         </view>

+ 27 - 2
pages/my/set.vue

@@ -10,7 +10,11 @@
         >
           <view class="title">{{ item.title }}</view>
           <view :class="['text-right', item.hideArrow && 'hide-arrow']">
-            {{ userInfo[item.textProp] || '' }}
+			  <input class="inp" @input="inpfn" v-if="item.textProp == 'nickname'" v-model="userInfo[item.textProp]" type="text" />
+			  <block v-else>
+				  {{ userInfo[item.textProp] || '' }}
+			  </block>
+            
           </view>
         </view>
       </view>
@@ -21,6 +25,9 @@
   <script>
   const storage = require('@/common/storage.js')
   import { QINIU_URL, defaultHeadImg } from '@/common/constant'
+  var config = require('../../common/config_gyq.js');
+  var http = require('../../common/request');
+  const common = require('../../common/common.js');
   export default {
     data() {
       return {
@@ -42,6 +49,20 @@
       user_token && this.loadUserInfo()
     },
     methods: {
+		 inpfn(e){
+			console.log(e.detail.value)
+		},
+		editAvatarFn(){
+			common.upLoadImgQiNiu( (imgUrl)=> {
+			   console.log(imgUrl)
+			});
+		},
+		async editUserInfoFn(){
+			let {data} = await http.postApi(config.API_USER_MODIFY_USER_INFO,{
+				nickname:this.userInfo.nickname,
+				head_img:this.userInfo.head_img,
+			})
+		},
       loadUserInfo() {
         const userInfo = storage.getUserInfoData()
         console.log('userInfo', userInfo)
@@ -73,7 +94,11 @@
   
   <style lang="scss">
   @import "@/libs/css/layout.scss";
-  
+  .inp{
+	  font-size: 30rpx;
+	  color: #060809;
+	  text-align: right;
+  }
   .set-page {
     display: flex;
     flex-direction: column;

+ 3 - 1
pages/powerSetting/powerSetting.vue

@@ -157,7 +157,9 @@
 			async editFn(){
 				let {
 					data
-				} = await http.postApi(config.API_FLK_CAR_ADD_SHARE_USER,this.form)
+				} = await http.postApi(config.API_FLK_CAR_EDIT_SHARE_USER,{
+					...this.form,
+				})
 			}
 		}
 	};