Commit ee3dbc54 by LJM

bug

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