diff --git a/cmd/gopcomm/yap/user_edit_yap.html b/cmd/gopcomm/yap/user_edit_yap.html
index 21a9e6c6..444caeab 100644
--- a/cmd/gopcomm/yap/user_edit_yap.html
+++ b/cmd/gopcomm/yap/user_edit_yap.html
@@ -276,7 +276,6 @@
Bind accounts
const canSubmit = ref(true)
function customRequest(option) {
canSubmit.value = false
- console.log("option", option)
const file = option.file
const avatarData = new FormData();
avatarData.append('file', file.file);
@@ -683,7 +682,6 @@ Bind accounts
if (provider === null || !provider.type) {
return "";
}
- console.log("provider:", provider)
let endpoint = authInfo[provider.type].endpoint;
let redirectUri = `${casdoorUrl}/callback`;
const scope = authInfo[provider.type].scope;
@@ -928,34 +926,21 @@ Bind accounts
if(prov) {
return prov.provider
}
- return {};
+ return undefined;
}
/*======= register vue component =======*/
const app = Vue.createApp({
data() {
- return {
- wechatModel,
- buttonTheme,
- inputTheme,
- selectTheme,
- datePickerTheme,
- tabsTheme,
- formRef,
- rules,
- canSubmit,
- userProfile,
- genderOptions,
- fileList,
- user,
- accountList: [
+ const accountList = []
+ let temp = [
{
img: "/static/img/social_github.png",
platform: "GitHub",
desc: "https://github.com",
bind: accountBinds.Github,
provider: authInfo.GitHub,
- url: getAuthUrl(findProvider("GitHub"), "link")
+ url: ""
},
{
img: "/static/img/social_twitter.png",
@@ -963,7 +948,7 @@ Bind accounts
desc: "https://twitter.com",
bind: accountBinds.Twitter,
provider: authInfo.Twitter,
- url: getAuthUrl(findProvider("Twitter"), "link")
+ url: ""
},
{
img: "/static/img/social_facebook.png",
@@ -971,7 +956,7 @@ Bind accounts
desc: "https://facebook.com",
bind: accountBinds.Facebook,
provider: authInfo.Facebook,
- url: getAuthUrl(findProvider("Facebook"), "link")
+ url: ""
},
{
img: "/static/img/social_wechat.png",
@@ -979,9 +964,37 @@ Bind accounts
desc: "https://weixin.qq.com",
bind: accountBinds.WeChat,
provider: authInfo.WeChat,
- url: "WeChat"
+ url: ""
}
]
+ temp.forEach((e,i) => {
+ let provider = findProvider(e.platform)
+ if(!provider) {
+ return
+ }
+ if(e.platform === "WeChat") {
+ e.url = "WeChat"
+ }else {
+ e.url = getAuthUrl(provider, "link")
+ }
+
+ accountList.push(e)
+ })
+ return {
+ wechatModel,
+ buttonTheme,
+ inputTheme,
+ selectTheme,
+ datePickerTheme,
+ tabsTheme,
+ formRef,
+ rules,
+ canSubmit,
+ userProfile,
+ genderOptions,
+ fileList,
+ user,
+ accountList
}
},
methods: {