页面功能修改

This commit is contained in:
浅念
2025-03-21 17:57:32 +08:00
parent ddcf63d131
commit 7d1884ad0b
18 changed files with 1403 additions and 590 deletions
+20 -2
View File
@@ -10,7 +10,13 @@
<view class="inputs_button">
<view class="inputs">
<view class="account">
<input type="text" v-model="email" :placeholder="$t('account')" />
<u--input
type="text"
:placeholder="$t('account')"
v-model="email"
border="none"
></u--input>
<!-- <input type="text" v-model="email" :placeholder="$t('account')" /> -->
</view>
<view class="password">
<u--input
@@ -81,9 +87,15 @@
id: 'ru'
}]
],
language:'zh-Hans'
}
},
onLoad() {
if(uni.getStorageSync('token')){
uni.reLaunch({
url: '/pages/index/index',// 替换为你要跳转的页面路径
});
}
},
methods: {
close(){
@@ -96,6 +108,7 @@
confirmlang(e) {
this.$i18n.locale = e.value[0].id
uni.setStorageSync('i18locale', e.value[0].id);
this.language = e.value[0].id
this.showlang = false
this.columns =[
[{
@@ -166,12 +179,16 @@
});
return false
}
if(this.language=='zh-Hans'){
this.language= 'zh_CN'
}
request({
url:'user/login',
method:'POST',
data:{
email: this.email,
password: this.password,
language: this.language,
}
}).then(res => {
console.log(res.data.data)
@@ -179,10 +196,11 @@
uni.showToast({
title: res.data.message,
icon: 'none'
});token
});
} else if (res.data.code == 0) {
//存取session
uni.setStorageSync('userinfo',JSON.stringify(res.data.data));
uni.setStorageSync('token', res.data.data.token);
//返回数据接收成功
uni.reLaunch({