lalala 6 лет назад
Родитель
Сommit
8db3248477

+ 1 - 1
mobile-code/src/admin/interest/my-invite.vue

@@ -6,7 +6,7 @@
 					<div class="user-wrap-left">
 					<div class="user-wrap-left">
 						<app-avatar-module :width="100" />
 						<app-avatar-module :width="100" />
 						<div class="user-det">
 						<div class="user-det">
-							<div class="user-name">{{ userInfo.merchantName }}</div>
+							<!-- <div class="user-name">{{ userInfo.merchantName }}</div> -->
 							<div class="app-color-3">三级代理</div>
 							<div class="app-color-3">三级代理</div>
 						</div>
 						</div>
 					</div>
 					</div>

+ 4 - 3
mobile-code/src/admin/setting/password.vue

@@ -33,6 +33,7 @@ import { mapGetters } from 'vuex'
 import TuiListCell from '@/components/plugin/list-cell'
 import TuiListCell from '@/components/plugin/list-cell'
 const form = require('@/utils/formValidation.js')
 const form = require('@/utils/formValidation.js')
 // api
 // api
+import { getSelfInfo } from '@/utils/auth'
 import { updatePassword, updateConfirmPassword } from '@/api/login'
 import { updatePassword, updateConfirmPassword } from '@/api/login'
 export default {
 export default {
 	name: 'password-setting',
 	name: 'password-setting',
@@ -69,15 +70,15 @@ export default {
 	computed: {
 	computed: {
 		...mapGetters({ selfInfo: 'getSelfInfo' }),
 		...mapGetters({ selfInfo: 'getSelfInfo' }),
 		isOldPass() {
 		isOldPass() {
-			let status = this.tabIndex == 1 ? this.selfInfo.password : this.selfInfo.confirmPassword
+			let status = this.selfInfo ? this.tabIndex == 1 ? this.selfInfo.password : this.selfInfo.confirmPassword : false
 			return !!status
 			return !!status
 		}
 		}
 	},
 	},
 	onLoad() {
 	onLoad() {
-		// getSelfInfo().then(res => {
+		getSelfInfo().then(res => {
 		// 	console.log(res)
 		// 	console.log(res)
 		// 	// if (res.) {}
 		// 	// if (res.) {}
-		// })
+		})
 	},
 	},
 	methods: {
 	methods: {
 		changeTab(index) {
 		changeTab(index) {

+ 6 - 3
mobile-code/src/mixins/globalMixins.js

@@ -15,9 +15,9 @@ export default {
 			pageTo: pageTo
 			pageTo: pageTo
 		}
 		}
 	},
 	},
-	computed: {
-		...mapGetters({ userInfo: 'getUser' })
-	},
+	// computed: {
+	// 	...mapGetters({ userInfo: 'getUser' })
+	// },
 	// 页面生命周期才触发
 	// 页面生命周期才触发
 	onLoad: function(option) {
 	onLoad: function(option) {
 		this.option = option || null
 		this.option = option || null
@@ -38,6 +38,7 @@ export default {
 			if (isLogin()) {
 			if (isLogin()) {
 				// #ifdef H5
 				// #ifdef H5
 				if (this.init) {
 				if (this.init) {
+					getUser()
 					this.init()
 					this.init()
 					// console.log('init', this.init)
 					// console.log('init', this.init)
 				}
 				}
@@ -45,6 +46,7 @@ export default {
 				// #ifdef MP-WEIXIN
 				// #ifdef MP-WEIXIN
 				wxLoginFn().then(res => {
 				wxLoginFn().then(res => {
 					if (this.init) {
 					if (this.init) {
+						getUser()
 						this.init()
 						this.init()
 					}
 					}
 				})
 				})
@@ -62,6 +64,7 @@ export default {
 				// #ifdef MP-WEIXIN
 				// #ifdef MP-WEIXIN
 				wxLoginFn().then(res => {
 				wxLoginFn().then(res => {
 					if (this.init) {
 					if (this.init) {
+						getUser()
 						this.init()
 						this.init()
 					}
 					}
 				})
 				})

+ 1 - 1
mobile-code/src/utils/auth.js

@@ -35,7 +35,7 @@ export async function getShopUser(update) {
 }
 }
 
 
 /**
 /**
- * 获取后台用户信息
+ * 获取后台商户用户信息
  * @parmas update为true时会重新触发请求,重置vuex的数据
  * @parmas update为true时会重新触发请求,重置vuex的数据
  */
  */
 export async function getUser(update) {
 export async function getUser(update) {