feat:放开github登录

This commit is contained in:
fanxb 2023-04-01 17:29:45 +08:00
parent 58a8cefaf5
commit 35d3420470
3 changed files with 14 additions and 13 deletions

View File

@ -49,7 +49,6 @@ public class ConfigServiceImpl implements ConfigService {
List<GlobalConfigPo> pos = globalConfigDao.selectByMap(Collections.emptyMap());
Map<String, String> map = pos.stream().collect(Collectors.toMap(GlobalConfigPo::getCode, GlobalConfigPo::getValue));
GlobalConfigVo vo = new GlobalConfigVo();
vo.setProxyExist(HttpUtil.getProxyExist());
vo.setBingImgSrc(getCacheBingImg());
vo.setMap(map);
return vo;

View File

@ -24,7 +24,7 @@
</div>
<div class="thirdPart">
<span>第三方登陆</span>
<a-tooltip v-if="serverConfig.proxyExist" title="github登陆" class="oneIcon" placement="bottom">
<a-tooltip title="github登陆" class="oneIcon" placement="bottom">
<a-icon type="github" @click="toGithub" style="font-size: 1.4em" />
</a-tooltip>
</div>
@ -39,35 +39,36 @@ import Header from "@/components/public/Switch.vue";
import httpUtil from "../../../util/HttpUtil.js";
import { mapMutations, mapState } from "vuex";
import HttpUtil from "../../../util/HttpUtil.js";
export default {
name: "Login",
components: {
Header,
Header
},
computed: {
...mapState("globalConfig", ["serverConfig"]),
...mapState("globalConfig", ["serverConfig"])
},
data() {
return {
form: {
str: "",
password: "",
rememberMe: false,
rememberMe: false
},
rules: {
str: [
{ required: true, message: "请输入用户名", trigger: "blur" },
{ min: 1, max: 50, message: "最短1最长50", trigger: "change" },
{ min: 1, max: 50, message: "最短1最长50", trigger: "change" }
],
password: [
{ required: true, message: "请输入密码", trigger: "blur" },
{ pattern: "^\\w{6,18}$", message: "密码为6-18位数字,字母,下划线组合", trigger: "change" },
],
{ pattern: "^\\w{6,18}$", message: "密码为6-18位数字,字母,下划线组合", trigger: "change" }
]
},
loading: false, //
oauthLogining: false, //true:oauth
page: null, //oauth
redirect: null,
redirect: null
};
},
async created() {
@ -130,8 +131,8 @@ export default {
} finally {
this.loading = false;
}
},
},
}
}
};
</script>
@ -139,11 +140,13 @@ export default {
.form {
margin: 0.3rem;
margin-bottom: 0.1rem;
.reset {
display: flex;
justify-content: space-between;
}
}
.thirdPart {
display: flex;
justify-content: space-between;

View File

@ -7,8 +7,7 @@ module.exports = {
proxy: {
"/bookmark/api": {
//这里最好有一个 /
// target: "http://localhost:8088", // 服务器端接口地址
target: "https://bm.fleyx.com", // 服务器端接口地址
target: "http://localhost:8088", // 服务器端接口地址
ws: true, //如果要代理 websockets配置这个参数
// 如果是https接口需要配置这个参数
changeOrigin: true, //是否跨域