|
|
@ -16,6 +16,7 @@ |
|
|
<fui-input borderTop placeholder="登录账号" v-model="user" @input="input" |
|
|
<fui-input borderTop placeholder="登录账号" v-model="user" @input="input" |
|
|
backgroundColor="#f2f2f2"></fui-input> |
|
|
backgroundColor="#f2f2f2"></fui-input> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
<view style="width: 95%;margin: auto;"> |
|
|
<view style="width: 95%;margin: auto;"> |
|
|
<fui-input borderTop :padding="['20rpx','32rpx']" v-model="password1" placeholder="登录密码" |
|
|
<fui-input borderTop :padding="['20rpx','32rpx']" v-model="password1" placeholder="登录密码" |
|
|
:password="password" @input="input" backgroundColor="#f2f2f2"> |
|
|
:password="password" @input="input" backgroundColor="#f2f2f2"> |
|
|
@ -23,6 +24,28 @@ |
|
|
@click="change"></fui-icon> |
|
|
@click="change"></fui-icon> |
|
|
</fui-input> |
|
|
</fui-input> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
|
<view style="width: 95%;height: 30rpx;"></view> |
|
|
|
|
|
<view style="width: 95%;margin:30rpx auto;"> |
|
|
|
|
|
<fui-input |
|
|
|
|
|
@click="picker_show_loginType=true" |
|
|
|
|
|
v-model="loginType_str" |
|
|
|
|
|
placeholder="请选择登录类型" |
|
|
|
|
|
backgroundColor="#f2f2f2" |
|
|
|
|
|
> |
|
|
|
|
|
<fui-icon name="arrowdown" color="#B2B2B2" :size="50" |
|
|
|
|
|
@click="change"></fui-icon> |
|
|
|
|
|
</fui-input> |
|
|
|
|
|
<fui-picker |
|
|
|
|
|
layer="1" |
|
|
|
|
|
:linkage="true" |
|
|
|
|
|
:options="loginType_Arr" |
|
|
|
|
|
:show="picker_show_loginType" |
|
|
|
|
|
@change="changePicker_loginType" |
|
|
|
|
|
@cancel="picker_show_loginType=false" |
|
|
|
|
|
></fui-picker> |
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
<view style="width: 95%;margin:60rpx auto;"> |
|
|
<view style="width: 95%;margin:60rpx auto;"> |
|
|
<fui-button background="#00be8c" radius="5rpx" @click="login">登录</fui-button> |
|
|
<fui-button background="#00be8c" radius="5rpx" @click="login">登录</fui-button> |
|
|
</view> |
|
|
</view> |
|
|
@ -44,11 +67,30 @@ export default { |
|
|
password: true, |
|
|
password: true, |
|
|
user: '15374889135', //账户 |
|
|
user: '15374889135', //账户 |
|
|
password1: '15374889135', //密码 |
|
|
password1: '15374889135', //密码 |
|
|
|
|
|
|
|
|
loginType:'',//登陆类型|1=教练,2=销售,3=学员 |
|
|
loginType:'',//登陆类型|1=教练,2=销售,3=学员 |
|
|
|
|
|
loginType_str:'',//登陆类型中文名字 |
|
|
|
|
|
loginType_Arr:[ |
|
|
|
|
|
{ |
|
|
|
|
|
value: '1', |
|
|
|
|
|
text: '教师登陆' |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
value: '2', |
|
|
|
|
|
text: '销售登陆' |
|
|
|
|
|
}, |
|
|
|
|
|
{ |
|
|
|
|
|
value: '3', |
|
|
|
|
|
text: '学员登陆' |
|
|
|
|
|
} |
|
|
|
|
|
], |
|
|
|
|
|
picker_show_loginType:false,//是否显示下拉窗组件 |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
onLoad(options) { |
|
|
onLoad(options) { |
|
|
this.loginType = options.loginType ?? '1'//登陆类型|1=教练,2=销售,3=学员 |
|
|
this.loginType = options.loginType ?? '2'//登陆类型|1=教练,2=销售,3=学员 |
|
|
|
|
|
const selectedItem = this.loginType_Arr.find(item => item.value === String(this.loginType)); |
|
|
|
|
|
this.loginType_str = selectedItem ? selectedItem.text : '未知类型'; |
|
|
// uni.hideHomeButton() |
|
|
// uni.hideHomeButton() |
|
|
// console.log(uni.getStorageSync('um_id')) |
|
|
// console.log(uni.getStorageSync('um_id')) |
|
|
}, |
|
|
}, |
|
|
@ -66,6 +108,8 @@ export default { |
|
|
}, |
|
|
}, |
|
|
//登陆 |
|
|
//登陆 |
|
|
async login() { |
|
|
async login() { |
|
|
|
|
|
alert(this.loginType) |
|
|
|
|
|
return |
|
|
let item = {}; |
|
|
let item = {}; |
|
|
item['username'] = this.user |
|
|
item['username'] = this.user |
|
|
item['password'] = this.password1 |
|
|
item['password'] = this.password1 |
|
|
@ -154,6 +198,14 @@ export default { |
|
|
} |
|
|
} |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
//登录类型选择相关 |
|
|
|
|
|
changePicker_loginType(e){ |
|
|
|
|
|
console.log('监听选择', e) |
|
|
|
|
|
this.loginType = e.value |
|
|
|
|
|
this.loginType_str = e.text |
|
|
|
|
|
this.picker_show_loginType = false |
|
|
|
|
|
}, |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
</script> |
|
|
</script> |
|
|
|