Ver Fonte

bug 修复

lilei há 2 anos atrás
pai
commit
3246d0a646
5 ficheiros alterados com 26 adições e 9 exclusões
  1. 1 1
      App.vue
  2. 8 1
      api/employee.js
  3. 4 3
      pages/index/index.vue
  4. 3 2
      pages/personData/personData.vue
  5. 10 2
      pages/storeManage/storeAuth.vue

+ 1 - 1
App.vue

@@ -1,7 +1,7 @@
 <script>
 	export default {
 		globalData: {
-			// baseUrl: 'http://192.168.0.215:9110/saas/clz/', // 本地
+			// baseUrl: 'http://192.168.0.103:9110/saas/clz/', // 本地
 			baseUrl: 'https://md.test.zyucgj.com/saas/clz/', // 预发布
 			// baseUrl: 'https://car.zyucgj.com/saas/clz/' // 生产
 		},

+ 8 - 1
api/employee.js

@@ -36,7 +36,14 @@ export const saveEmployee = params => {
     method: 'POST'
   })
 }
-
+// 修改图像
+export const saveHeadImage = params => {
+  return request({
+    url: 'employee/setSelfHeadImage',
+    data: params,
+    method: 'POST'
+  })
+}
 // 员工信息列表
 export const searchEmployee = params => {
   let url = `employee/queryLike/${params.pageNo}/${params.pageSize}`

+ 4 - 3
pages/index/index.vue

@@ -29,8 +29,8 @@
 			<view class="userCard flex align_center justify_between" @click="toUser">
 				<view class="userCard-info flex align_center justify_between">
 					<view>
-						<u-image v-if="!hasLogin" src="/static/def_personal_avatar.png" width="90" height="90"></u-image>
-						<u-image v-else :src="avatarUrl||'/static/def_personal_avatar.png'" width="90" height="90"></u-image>
+						<u-image shape='circle' v-if="!hasLogin" src="/static/def_personal_avatar.png" width="90" height="90"></u-image>
+						<u-image shape='circle' v-else :src="avatarUrl||'/static/def_personal_avatar.png'" width="90" height="90"></u-image>
 					</view>
 					<view class="user-info">
 						<view v-if="!hasLogin" style="font-size: 40rpx;">
@@ -174,12 +174,13 @@
 			if(this.hasLogin){
 				// 查询门店认证信息
 				this.findLastApply()
+				// 用户头像
+				this.avatarUrl = this.userInfo.extInfo&&this.userInfo.extInfo.userExtInfo ? this.userInfo.extInfo.userExtInfo.headImage : ''
 			}
 		},
 		methods: {
 			pageInit(){
 				if(this.hasLogin){
-					this.avatarUrl = this.userInfo.extInfo&&this.userInfo.extInfo.userExtInfo ? this.userInfo.extInfo.userExtInfo.headImage : ''
 					// 获取扫描记录
 					this.getVinLog()
 					

+ 3 - 2
pages/personData/personData.vue

@@ -57,7 +57,7 @@
 <script>
 	import uniPopup from '@/components/uni-popup/uni-popup.vue'
 	import uniPopupDialog from '@/components/uni-popup/uni-popup-dialog.vue'
-	import {saveEmployee } from '@/api/employee'
+	import {saveHeadImage } from '@/api/employee'
 	const baseUrl = getApp().globalData.baseUrl
     import {
         mapState,
@@ -99,7 +99,8 @@
 					console.log(ret,'uploadFileRes')
 					if(ret.status == 200){
 						_this.avatarUrl = ret.data
-						saveEmployee({id:_this.userInfo.userid,photo: ret.data}).then(res => {
+						_this.$store.state.vuex_userInfo.extInfo.userExtInfo.headImage = ret.data
+						saveHeadImage({photo: ret.data}).then(res => {
 							if(res.status == 200){
 								uni.showToast({
 									icon: "none",

+ 10 - 2
pages/storeManage/storeAuth.vue

@@ -46,7 +46,7 @@
 					{{form.contactPhone}}
 				</u-form-item>
 				<u-form-item label="汽配商邀请码">
-					<u-input v-model="form.inviteCode" @blur="findDealer" @confirm="findDealer" placeholder="如没有可不填"/>
+					<u-input v-model="form.inviteCode" :clearable="false" @input="inputDealer" @blur="findDealer" @confirm="findDealer" placeholder="如没有可不填"/>
 				</u-form-item>
 				<u-form-item label="汽配商" v-if="form.inviteName.length">
 					{{form.inviteName||'--'}}
@@ -207,8 +207,16 @@
 			removeYyzzPhoto(index){
 				this.form.licenseImage = ''
 			},
+			inputDealer(v){
+				if(!this.form.inviteCode){
+					this.form.inviteName = ''
+				}
+			},
 			findDealer(v){
-				if(!this.form.inviteCode){return}
+				if(!this.form.inviteCode){
+					this.form.inviteName = ''
+					return
+				}
 				uni.showLoading({
 					title: "正在查询"
 				})