帮扶登录页
This commit is contained in:
@@ -40,6 +40,7 @@
|
|||||||
const placeholderStyle = 'font-size:30rpx'
|
const placeholderStyle = 'font-size:30rpx'
|
||||||
const checked = ref(true)
|
const checked = ref(true)
|
||||||
const codeUrl = ref('')
|
const codeUrl = ref('')
|
||||||
|
const flag=ref('hlw')
|
||||||
|
|
||||||
const form = reactive({
|
const form = reactive({
|
||||||
username: 'langchaojituan',
|
username: 'langchaojituan',
|
||||||
@@ -49,8 +50,9 @@
|
|||||||
uuid: ''
|
uuid: ''
|
||||||
})
|
})
|
||||||
|
|
||||||
onLoad(() => {
|
onLoad((option) => {
|
||||||
|
console.log("option",option)
|
||||||
|
flag.value=option.flag
|
||||||
})
|
})
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
@@ -83,27 +85,51 @@
|
|||||||
title: '登录中...',
|
title: '登录中...',
|
||||||
mask: true
|
mask: true
|
||||||
})
|
})
|
||||||
$api.myRequest('/auth/login',form,'post',10100).then((res) => {
|
if(flag.value=='hlw'){
|
||||||
console.log(res, 'res')
|
$api.myRequest('/auth/login',form,'post',10100).then((res) => {
|
||||||
uni.setStorageSync('Padmin-Token', res.data.access_token)
|
uni.setStorageSync('Padmin-Token', res.data.access_token)
|
||||||
uni.reLaunch({
|
uni.reLaunch({
|
||||||
url: '/pages/index/index'
|
url: '/pages/index/index'
|
||||||
|
})
|
||||||
|
codeUrl.value = 'data:image/gif;base64,' + res.img
|
||||||
|
}).catch(() => {
|
||||||
|
uni.hideLoading()
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'none',
|
||||||
|
title: '登录失败,请重试'
|
||||||
|
})
|
||||||
})
|
})
|
||||||
codeUrl.value = 'data:image/gif;base64,' + res.img
|
}else if(flag.value=='nw'){
|
||||||
}).catch(() => {
|
$api.myRequest('/auth/login',form,'post',9100).then((res) => {
|
||||||
uni.hideLoading()
|
uni.setStorageSync('Padmin-Token', res.data.access_token)
|
||||||
uni.showToast({
|
uni.reLaunch({
|
||||||
icon: 'none',
|
url: '/packageB/priority/helpFilter'
|
||||||
title: '登录失败,请重试'
|
})
|
||||||
|
codeUrl.value = 'data:image/gif;base64,' + res.img
|
||||||
|
}).catch(() => {
|
||||||
|
uni.hideLoading()
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'none',
|
||||||
|
title: '登录失败,请重试'
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function getCodeImg() {
|
function getCodeImg() {
|
||||||
$api.myRequest('/code',{},'get',10100).then((resData) => {
|
if(flag.value=='hlw'){
|
||||||
codeUrl.value = 'data:image/gif;base64,' + resData.img
|
$api.myRequest('/code',{},'get',10100).then((resData) => {
|
||||||
form.uuid = resData.uuid
|
codeUrl.value = 'data:image/gif;base64,' + resData.img
|
||||||
});
|
form.uuid = resData.uuid
|
||||||
|
});
|
||||||
|
}else if(flag.value=='nw'){
|
||||||
|
$api.myRequest('/code',{},'get',9100).then((resData) => {
|
||||||
|
codeUrl.value = 'data:image/gif;base64,' + resData.img
|
||||||
|
form.uuid = resData.uuid
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -749,7 +749,8 @@ const navToTestPage = () => {
|
|||||||
navTo('/pages/test/homepage-test');
|
navTo('/pages/test/homepage-test');
|
||||||
};
|
};
|
||||||
const navToPage = () =>{
|
const navToPage = () =>{
|
||||||
navTo('/packageB/priority/helpFilter');
|
navTo('/packageB/login?flag=nw');
|
||||||
|
// navTo('/packageB/priority/helpFilter');
|
||||||
}
|
}
|
||||||
|
|
||||||
async function loadData() {
|
async function loadData() {
|
||||||
|
|||||||
Reference in New Issue
Block a user