Browse Source

我的头像增加更改,轮胎保按钮更改、增加客户电话

liyuan 1 day ago
parent
commit
ca5776c0a6
4 changed files with 31 additions and 22 deletions
  1. 9 0
      api/home/store.js
  2. 2 2
      pages/home/insurance/details.vue
  3. 4 4
      pages/home/insurance/index.vue
  4. 16 16
      pages/me/index.vue

+ 9 - 0
api/home/store.js

@@ -66,3 +66,12 @@ export function generateQrCode(data) {
 		data
 		data
 	})
 	})
 }
 }
+
+
+export function updateCarUserDetail(data) {
+	return http.request({
+		url: '/blade-user/carowner/updateCarUserDetail',
+		method: 'POST',
+		data: data
+	})
+}

+ 2 - 2
pages/home/insurance/details.vue

@@ -189,12 +189,12 @@
 		data() {
 		data() {
 			return {
 			return {
 				buttonGroup: [{
 				buttonGroup: [{
-					text: '确认信息',
+					text: '提交',
 					backgroundColor: '#03803B',
 					backgroundColor: '#03803B',
 					color: '#fff'
 					color: '#fff'
 				}],
 				}],
 				buttonGroup2: [{
 				buttonGroup2: [{
-						text: '确认信息',
+						text: '提交',
 						backgroundColor: '#03803B',
 						backgroundColor: '#03803B',
 						color: '#fff'
 						color: '#fff'
 					},
 					},

+ 4 - 4
pages/home/insurance/index.vue

@@ -32,9 +32,9 @@
 								<view style="font-weight: 800;color: #03803B;">
 								<view style="font-weight: 800;color: #03803B;">
 									{{item.vehicleNumber||'暂无车牌'}}
 									{{item.vehicleNumber||'暂无车牌'}}
 								</view>
 								</view>
-								<!-- <view class="">
-									轮胎规格: {{item.tyreSpecs||'-'}}
-								</view> -->
+								 <view class="">
+									{{item.consumerPhone||'-'}}
+								</view>
 							</view>
 							</view>
 							<view class="list-item">
 							<view class="list-item">
 								<view class="">
 								<view class="">
@@ -257,4 +257,4 @@
 			}
 			}
 		}
 		}
 	}
 	}
-</style>
+</style>

+ 16 - 16
pages/me/index.vue

@@ -155,7 +155,8 @@
 <script>
 <script>
 	import {
 	import {
 		getAppDetails,
 		getAppDetails,
-    generateQrCode
+    generateQrCode,
+    updateCarUserDetail
 	} from '@/api/home/store.js'
 	} from '@/api/home/store.js'
 	export default {
 	export default {
 		data() {
 		data() {
@@ -202,9 +203,10 @@
 				})
 				})
 			},
 			},
 			showActionSheet() {
 			showActionSheet() {
-				if (this.userData.checkStatus != '通过') {
+        console.info('this.userData.checkStatus----', this.userData)
+				if (this.shopInfo.checkStatus !== '审核通过') {
 					uni.showToast({
 					uni.showToast({
-						title: "当前用户未授权,请联系客服",
+						title: "当前用户未授权,请联系经销商",
 						icon: "none",
 						icon: "none",
 						mask: true
 						mask: true
 					});
 					});
@@ -238,11 +240,19 @@
 					},
 					},
 				})
 				})
 			},
 			},
+      updateUserAvatar(avatar) {
+        updateCarUserDetail({avatar: avatar, id: this.userData.id}).then(res => {
+          uni.showToast({
+            title: res.msg,
+            icon: "none",
+          });
+        })
+      },
 			uploadFiles() {
 			uploadFiles() {
 				const uploadTasks = this.tempFilePaths.map((filePath, index) => {
 				const uploadTasks = this.tempFilePaths.map((filePath, index) => {
 					return new Promise((resolve, reject) => {
 					return new Promise((resolve, reject) => {
 						uni.uploadFile({
 						uni.uploadFile({
-							url: 'https://lt.echepei.com/api/blade-resource/oss/endpoint/put-file',
+							url: 'https://b2b.gubersail.com:9000/api/blade-resource/oss/endpoint/put-file',
 							filePath: filePath,
 							filePath: filePath,
 							name: 'file',
 							name: 'file',
 							header: {
 							header: {
@@ -250,18 +260,8 @@
 								appId: uni.getAccountInfoSync().miniProgram.appId
 								appId: uni.getAccountInfoSync().miniProgram.appId
 							},
 							},
 							success: (uploadRes) => {
 							success: (uploadRes) => {
-								let obj = {
-									id: this.userData.userId,
-									avatar: JSON.parse(uploadRes.data).data.link
-								}
-								// updateUserAvatar(obj).then(res => {
-								// 	uni.showToast({
-								// 		title: "上传成功",
-								// 		icon: "none",
-								// 		mask: true
-								// 	});
-								// 	this.getUserData()
-								// })
+                this.userData.avatar = JSON.parse(uploadRes.data).data.link
+                this.updateUserAvatar(this.userData.avatar)
 							},
 							},
 							fail: (err) => {
 							fail: (err) => {
 								reject(err)
 								reject(err)