chenrui 1 год назад
Родитель
Сommit
510bbcb9b9
1 измененных файлов с 5 добавлено и 6 удалено
  1. 5 6
      pages/userCenter/index.vue

+ 5 - 6
pages/userCenter/index.vue

@@ -39,7 +39,8 @@
 		<view class="user-btn">
 			<u-button type="success" :custom-style="{background:$config('primaryColor')}" hover-class="none" @click="quitOutSys" shape="circle">退出登录</u-button>
 		</view>
-		<u-action-sheet :list="orglist" v-model="show" @click="changeAcount" :tips="tips" :cancel-btn="true"></u-action-sheet>
+		<u-select v-model="show" value-name="orgSn" label-name="orgName" :list="orglist" title="切换帐户" @confirm = "changeAcount"></u-select>
+		<!-- <u-action-sheet :list="orglist" v-model="show" @click="changeAcount" :tips="tips" :cancel-btn="true"></u-action-sheet> -->
 	</view>
 </template>
 
@@ -127,12 +128,10 @@
 				});
 			},
 			// 切换账户
-			changeAcount(index){
+			changeAcount(item){
 				const _this = this
-				const item = this.orglist[index]
-				console.log(index,item)
-				this.$store.state.vuex_changeOrg = item.orgSn
-				this.$set(getApp().globalData,'changeOrg',item.orgSn)
+				this.$store.state.vuex_changeOrg = item.value
+				this.$set(getApp().globalData,'changeOrg',item.value)
 				setTimeout(()=>{
 					//  登录
 					login({ username: '', password: '' }).then(res => {