lilei 2 年之前
父节点
当前提交
84f2a4c443
共有 1 个文件被更改,包括 11 次插入5 次删除
  1. 11 5
      pages/storeManage/editAdminAuth.vue

+ 11 - 5
pages/storeManage/editAdminAuth.vue

@@ -33,6 +33,7 @@
 <script>
 	import { getPowerRoleList } from '@/api/powerRole-md.js'
 	import {saveEmployee,setManager} from '@/api/employee'
+	import { getCurrUserInfo } from '@/api/data.js';
 	export default{
 		data(){
 			return{
@@ -56,11 +57,7 @@
 		},
 		onLoad(opts) {
 			this.userInfo = this.$store.state.vuex_nowStaffData
-			this.formData = Object.assign({},this.formData,this.userInfo)
-		},
-		onShow() {
-			this.pageNo = 1
-			this.getRoleList()
+			this.getCurrUserInfo()
 		},
 		// 下一页
 		onReachBottom() {
@@ -101,6 +98,15 @@
 				   _this.status = "loadmore"
 				 })
 			},
+			getCurrUserInfo(){
+				getCurrUserInfo().then(res => {
+					if(res.data){
+						this.formData = Object.assign({},this.formData,res.data)
+						this.pageNo = 1
+						this.getRoleList()
+					}
+				})
+			},
 			//  保存
 			save(name){
 				if(!this.formData.roleIds){