Commit ee3dbc54 by LJM

bug

parent 627a2326
......@@ -94,12 +94,15 @@
::v-deep .uni-drawer__content {
width: 85% !important;
height: 100%;
box-sizing: border-box;
}
.uni-drawer-picking {
width: 100%;
background-color: #ffffff;
padding: 22rpx 22rpx 0 22rpx;
padding: 22rpx 22rpx 10rpx 22rpx;
box-sizing: border-box;
.title {
position: relative;
.iconfont {
......@@ -243,11 +246,7 @@
margin-bottom: 17rpx;
}
.btn {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
z-index: 99;
margin: 0 auto;
.btn1 {
width: 100%;
height: 75rpx;
......
......@@ -17,7 +17,7 @@
<text class="label row rowCenter verCenter">密码</text>
<input class="uni-input" password placeholder="请输入账号密码" placeholder-style="color:#919399" v-model="passwd" />
</view>
<view class="btn row rowCenter verCenter" @click="submit()">登录</view>
<button class="btn row rowCenter verCenter" @click="submit()" :disabled="disabled">登录</button>
<text class="copyright">© 深圳市猎芯科技有限公司</text>
</view>
</template>
......@@ -32,7 +32,8 @@ export default {
index: 0,
array: ['深圳市猎芯科技有限公司', '深贸电子有限公司'],
name: '',
passwd: ''
passwd: '',
disabled: false
};
},
onLoad() {
......@@ -54,6 +55,7 @@ export default {
bindPickerChange: function(e) {
console.log('picker发送选择改变,携带值为', e.detail.value);
this.index = e.detail.value;
this.disabled = false;
},
/**
* 组织切换
......@@ -61,7 +63,18 @@ export default {
changeOrgId() {
this.request(API.changeOrgId, 'POST', { org_id: Number(this.index) + 1 }, false).then(res => {
if (res.code === 0) {
this.disabled = false;
uni.showToast({
title: '登录成功',
icon: 'success'
});
setTimeout(() => {
uni.redirectTo({
url: '/pages/index/index'
});
}, 2000);
} else {
this.disabled = true;
uni.showModal({
title: '提示',
content: res.msg,
......@@ -98,16 +111,8 @@ export default {
uni.setStorageSync('oa_skey', res.data.skey);
uni.setStorageSync('oa_user_id', res.data.userId);
uni.setStorageSync('company_id', Number(this.index) + 1);
//调用选用组织
this.changeOrgId();
uni.showToast({
title: '登录成功',
icon: 'success'
});
setTimeout(() => {
uni.redirectTo({
url: '/pages/index/index'
});
}, 2000);
} else {
uni.showModal({
title: '提示',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment