浏览代码

bug 修复

lilei 2 年之前
父节点
当前提交
a421d32f29

+ 42 - 65
pages/digitalShelf/choosePart.vue

@@ -255,7 +255,7 @@
 			// 游客
 			if(this.userInfo.sysUserFlag == '0'){
 				// 未认证
-				if(!storeApply.auditStatus){
+				if(!this.storeApply.auditStatus){
 					this.showPopup = true
 				}
 			}
@@ -271,15 +271,10 @@
 				})
 			},
 			callPhone() {
-				// 游客未认证
-				if(this.userInfo.sysUserFlag == '0'){
-					this.showPopup = true
-				}else{
-					if(this.dealerPhone!=''){
-						uni.makePhoneCall({
-							phoneNumber: this.dealerPhone
-						})
-					}
+				if(this.dealerPhone!=''){
+					uni.makePhoneCall({
+						phoneNumber: this.dealerPhone
+					})
 				}
 			},
 			viewImg(item){
@@ -515,77 +510,59 @@
 				})
 				return [partList,tempList]
 			},
-			validRz(){
+			// 立即提交
+			submitForm(){
 				// 游客去认证
 				if(this.userInfo.sysUserFlag == '0'){
 					// 未认证
-					if(!storeApply.auditStatus){
+					if(this.storeApply&&!this.storeApply.auditStatus){
 						this.showPopup = true
-						return true
 					}
-					// 认证
-					if(storeApply&&storeApply.auditStatus=='WAIT'){
+					// 认证通过
+					if(this.storeApply&&(this.storeApply.auditStatus=='WAIT' || this.storeApply.auditStatus == 'REFUSE')){
 						uni.showModal({
 							title: '提示',
-							content: '门店认证资料审核中,请耐心等待!',
+							content: this.storeApply.auditStatus=='WAIT' ? '门店认证资料审核中,请耐心等待!' : '门店认证资料审核不通过,请重新提交审核!',
 							confirmText: '好的',
 							showCancel: false
 						})
 					}
-					
-					// 认证通过
-					if(storeApply&&(storeApply.auditStatus=='WAIT' || storeApply.auditStatus == 'REFUSE')){
-						uni.showModal({
-							title: '提示',
-							content: storeApply.auditStatus=='WAIT' ? '门店认证资料审核中,请耐心等待!' : '门店认证资料审核不通过,请重新提交审核!',
-							confirmText: '好的',
-							showCancel: false
+				}else{
+					// 已认证用户
+					if(this.partListData.length==0){
+						uni.showToast({
+							icon: 'none',
+							title: '请选择配件'
 						})
+						return
 					}
 					
-					return true
-				}
-				
-				return false
-			},
-			// 立即提交
-			submitForm(){
-				if(this.validRz()){
-					return
-				}
-				if(this.partListData.length==0){
-					uni.showToast({
-						icon: 'none',
-						title: '请选择配件'
+					// 开始提交
+					const params = {
+						shelfOrderDetailList: this.formatData()[0],
+						tempBillDetailList: this.formatData()[1],
+						vin: this.vinNumber,
+						vehicleModel: this.modelLabel || '',
+						vehicleLogo: this.carInfo.icon||'',
+					}
+					console.log(params,'立即提交')
+					this.saveLoading = true
+					saveShelfOrder(params).then(res => {
+						console.log(res,'saveShelfOrder')
+						if(res.status == 200){
+							// 提交成功
+							uni.redirectTo({
+								url:"/pages/digitalShelf/choosePartResult?data="+encodeURIComponent(JSON.stringify(res.data))+"&state=1"
+							})
+						}else{
+							// 或失败
+							uni.redirectTo({
+								url:"/pages/digitalShelf/choosePartResult?data="+encodeURIComponent(JSON.stringify({shelfOrder:{remindMessage:res.message}}))+"&state=0"
+							})
+						}
+						this.saveLoading = false
 					})
-					return
 				}
-				
-				// 开始提交
-				const params = {
-					shelfOrderDetailList: this.formatData()[0],
-					tempBillDetailList: this.formatData()[1],
-					vin: this.vinNumber,
-					vehicleModel: this.modelLabel || '',
-					vehicleLogo: this.carInfo.icon||'',
-				}
-				console.log(params,'立即提交')
-				this.saveLoading = true
-				saveShelfOrder(params).then(res => {
-					console.log(res,'saveShelfOrder')
-					if(res.status == 200){
-						// 提交成功
-						uni.redirectTo({
-							url:"/pages/digitalShelf/choosePartResult?data="+encodeURIComponent(JSON.stringify(res.data))+"&state=1"
-						})
-					}else{
-						// 或失败
-						uni.redirectTo({
-							url:"/pages/digitalShelf/choosePartResult?data="+encodeURIComponent(JSON.stringify({shelfOrder:{remindMessage:res.message}}))+"&state=0"
-						})
-					}
-					this.saveLoading = false
-				})
 			}
 		}
 	}

+ 1 - 1
pages/digitalShelf/choosePartResult.vue

@@ -1,6 +1,6 @@
 <template>
 	<view class="choosePartResult flex flex_column">
-		<view class="contHead" :style="{background:state==1?'#1283d4':'#ff5500',color:'#fff'}">
+		<view class="contHead" v-if="state" :style="{background:state==1?'#1283d4':'#ff5500',color:'#fff'}">
 			<view class="statusH">
 				<view class="flex flex_column align_center">
 					<view class="status-row">

+ 2 - 2
pages/index/index.vue

@@ -180,7 +180,7 @@
 					this.findLastApply()
 				}
 				// 用户头像
-				this.avatarUrl = this.userInfo.extInfo&&this.userInfo.extInfo.userExtInfo ? this.userInfo.extInfo.userExtInfo.headImage : ''
+				this.avatarUrl = this.$store.state.vuex_userPhoto
 			}
 		},
 		methods: {
@@ -322,7 +322,7 @@
 						}else{
 							uni.showModal({
 								title: '提示',
-								content: '个人用户扫描VIN限10次/天,您的次数已用完!',
+								content: '个人用户扫描VIN限10次,您的次数已用完!',
 								confirmText: '好的',
 								showCancel: false,
 								success(res) {}

文件差异内容过多而无法显示
+ 0 - 1
pages/login/login.vue


文件差异内容过多而无法显示
+ 0 - 1
pages/login/phoneLogin.vue


+ 7 - 8
pages/personData/personData.vue

@@ -73,10 +73,6 @@
 				avatarUrl:""
             }
         },
-		onShow() {
-			//检测是否登录
-			this.$store.dispatch('checkLogin')
-		},
 		computed: {
 			...mapState(['hasLogin']),
 			userInfo(){
@@ -86,6 +82,12 @@
 				return this.$store.state.vuex_storeShelf
 			},
 		},
+		onShow() {
+			//检测是否登录
+			this.$store.dispatch('checkLogin')
+			this.avatarUrl = this.$store.state.vuex_userPhoto
+			console.log(this.avatarUrl,'this.avatarUrl')
+		},
         methods: {
 		  onChooseAvatar(e) {
 			const _this = this
@@ -99,7 +101,7 @@
 					console.log(ret,'uploadFileRes')
 					if(ret.status == 200){
 						_this.avatarUrl = ret.data
-						_this.$store.state.vuex_userInfo.extInfo.userExtInfo.headImage = ret.data
+						_this.$store.state.vuex_userPhoto = ret.data
 						saveHeadImage({photo: ret.data}).then(res => {
 							if(res.status == 200){
 								uni.showToast({
@@ -130,9 +132,6 @@
 			},300)
 		  }
         },
-		onLoad() {
-			this.avatarUrl = this.userInfo.extInfo.userExtInfo ? this.userInfo.extInfo.userExtInfo.headImage : ''
-		},
     }
 </script>
 

+ 1 - 1
pages/scan-frame/scan-frame.vue

@@ -179,7 +179,7 @@ export default {
 				}else{
 					uni.showModal({
 						title: '提示',
-						content: '个人用户扫描VIN限10次/天,您的次数已用完!',
+						content: '个人用户扫描VIN限10次,您的次数已用完!',
 						confirmText: '好的',
 						showCancel: false,
 						success(res) {}

+ 1 - 1
pages/storeManage/personnel.vue

@@ -17,7 +17,7 @@
 								</view>
 								<view class="u-mobile">
 									<text v-if="item.isManager == 1">门店负责人 / </text>
-									<text v-else>{{item.roleNames}} / </text>
+									<text v-if="item.isManager == 0 && item.roleNames">{{item.roleNames}} / </text>
 									{{item.mobile}}
 								</view>
 							</view>

+ 1 - 1
pages/vinInput/confirmVin.vue

@@ -97,7 +97,7 @@
 					}else{
 						uni.showModal({
 							title: '提示',
-							content: '个人用户扫描VIN限10次/天,您的次数已用完!',
+							content: '个人用户扫描VIN限10次,您的次数已用完!',
 							confirmText: '好的',
 							showCancel: false,
 							success(res) {}

二进制
static/logo-s.png


+ 5 - 2
store/index.js

@@ -15,7 +15,7 @@ try{
 }
 
 // 需要永久存储,且下次APP启动需要取出的,在state中的变量名
-let saveStateKeys = ['vuex_carBrandList'];
+let saveStateKeys = ['vuex_carBrandList','vuex_userInfo'];
 
 // 保存变量到本地存储中
 const saveLifeData = function(key, value){
@@ -50,6 +50,7 @@ const store = new Vuex.Store({
 		vuex_allLookUp: [],  //  数据字典
 		vuex_paymentTypeList: [], // 支付方式
 		vuex_userInfo: null, // 用户信息
+		vuex_userPhoto: null, // 用户头像
 		vuex_permCodes: [], // 权限码
 		vuex_openid: "",
 		vuex_nowStaffData: null, // 员工临时数据
@@ -68,6 +69,7 @@ const store = new Vuex.Store({
 			console.log(data,'-----loginSucees-----')
             state.hasLogin = true;
 			state.vuex_userInfo = data.auth_user;
+			state.vuex_userPhoto = data.auth_user.extInfo&&data.auth_user.extInfo.userExtInfo ? data.auth_user.extInfo.userExtInfo.headImage : ''
 			// VISITOR:游客,EMPLOYEE:雇员
 			data.auth_user['identifyType'] = data.sysUserFlag == '0' ? 'VISITOR' : 'EMPLOYEE';
 			data.auth_user['sysUserFlag'] = data.sysUserFlag;
@@ -86,6 +88,7 @@ const store = new Vuex.Store({
 			uni.removeStorageSync('permCodes')
 			state.vuex_storeShelf = null
 			state.vuex_userInfo = null
+			state.vuex_userPhoto = null
 			state.vuex_permCodes = null
         },
 		openId(state,id) {
@@ -133,7 +136,7 @@ const store = new Vuex.Store({
 				console.log(res)
 				context.commit('setStoreAuthInfo',res.data || null)
 				if(res.status == 200){
-					if(res.data.auditStatus=='PASS'){
+					if(res.data&&res.data.auditStatus=='PASS'){
 						uni.showModal({
 							title: '提示',
 							content: '门店认证审核已通过,请重新登录!',

部分文件因为文件数量过多而无法显示