Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 测试提单修复 #1341

Merged
merged 4 commits into from
May 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 8 additions & 10 deletions webfe/package_vue/src/components/paas-header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,14 @@ export default {
this.isShowInput = false;
});

this.getCurrentUser();
// 入口请求成功,说明用户已认证
bus.$on('on-user-data', (user) => {
this.userInitialized = true;
this.user = user;
if (user.avatarUrl) {
this.avatars = user.avatarUrl;
}
});
},
methods: {
goRouter(sitem) {
Expand Down Expand Up @@ -562,15 +569,6 @@ export default {
this.filterKey = '';
this.$refs.dropdown.close();
},
getCurrentUser() {
auth.requestCurrentUser().then((user) => {
this.userInitialized = true;
this.user = user;
if (user.avatarUrl) {
this.avatars = user.avatarUrl;
}
});
},
// 监听滚动事件(滚动是头部样式切换)
handleScroll() {
if (window.scrollY > 0) {
Expand Down
5 changes: 3 additions & 2 deletions webfe/package_vue/src/components/paas-module-bar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ import store from '@/store';
import router from '@/router';
import { bkMessage } from 'bk-magic-vue';
import { bus } from '@/common/bus';
import i18n from '@/language/i18n';

export default defineComponent({
name: 'EditorStatus',
Expand Down Expand Up @@ -207,7 +208,7 @@ export default defineComponent({
const isSmartApp = computed(() => curAppModule.source_origin === vm.proxy.GLOBAL.APP_TYPES.SMART_APP);

// 新建模块禁用提示
const disableTips = computed(() => (isSmartApp.value ? 'S-mart 应用不允许在页面上新建模块' : '当前应用不允许创建其他模块'));
const disableTips = computed(() => (isSmartApp.value ? i18n.t('S-mart 应用不允许在页面上新建模块') : i18n.t('当前应用不允许创建其他模块')));

// 切换tab
const handleTabChange = async () => {
Expand Down Expand Up @@ -269,7 +270,7 @@ export default defineComponent({
});
bkMessage({
theme: 'success',
message: '模块删除成功',
message: i18n.t('模块删除成功'),
});
await store.dispatch('getAppInfo', {
appCode: props.appCode,
Expand Down
4 changes: 2 additions & 2 deletions webfe/package_vue/src/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ auth.requestCurrentUser().then((user) => {
methods: {},
template: '<App />',
});

bus.$emit('on-user-data', user);
window.GLOBAL_I18N = global.paasVue;
}
}, (err) => {
Expand Down Expand Up @@ -277,4 +277,4 @@ auth.requestCurrentUser().then((user) => {
</div>
</bk-exception>`,
});
});
});
5 changes: 3 additions & 2 deletions webfe/package_vue/src/store/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,9 @@ const mutations = {
state.curAppInfo.name = product.name;
state.curAppInfo.application.name = product.name;
},
updateCurAppProductLogo(state, logo) {
state.curAppInfo.application.logo_url = logo;
updateCurAppBaseInfo(state, data) {
state.curAppInfo.application.logo_url = data.logo_url;
state.curAppInfo.application.name = data.name_zh_cn;
},
updateCurAppMarketPublished(state, flag) {
if (state.curAppInfo.application && state.curAppInfo.application.config_info) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -396,6 +396,7 @@ export default {
// 更新基本信息
async updateAppBasicInfo() {
try {
this.appBaseInfoConfig.isLoading = true;
const data = new FormData();
data.append('name', this.localeAppInfo.name);
if (this.appBaseInfoConfig.logoData) {
Expand All @@ -411,8 +412,7 @@ export default {
});
this.resetAppBaseInfoConfig();
this.localeAppInfo.logo = res.logo_url;
this.$emit('current-app-info-updated');
this.$store.commit('updateCurAppProductLogo', this.localeAppInfo.logo);
this.$store.commit('updateCurAppBaseInfo', res);
} catch (e) {
this.localeAppInfo.name = this.curAppName;
this.$paasMessage({
Expand All @@ -421,6 +421,7 @@ export default {
});
} finally {
this.$refs.appNmaeRef?.clearError();
this.appBaseInfoConfig.isLoading = false;
}
},

Expand Down Expand Up @@ -565,7 +566,6 @@ export default {
// 基本信息提交
handleSubmitBaseInfo() {
this.$refs.formNameRef?.validate().then(async () => {
this.appBaseInfoConfig.isLoading = true;
this.updateAppBasicInfo();
}, (e) => {
console.error(e);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default {
<style lang="scss" scoped>
.success-top-bar {
position: relative;
top: 50px;
top: calc(var(--app-notice-height) + 50px);
width: 100%;
height: 52px;
font-size: 16px;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@

.biz-create-success {
background: #F5F7FA;
padding: 74px 0 20px 0;
padding-bottom: 20px;
padding-top: calc(var(--app-notice-height) + 74px);
}
.success-wrapper {
.info,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ export default {

.biz-create-success {
background: #f5f7fa;
padding: 74px 0 20px 0;
padding-bottom: 20px;
padding-top: calc(var(--app-notice-height) + 74px);
}
.success-wrapper {
.info {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ export default {

.biz-create-success {
background: #f5f7fa;
padding: 76px 0 20px 0;
padding-bottom: 20px;
padding-top: calc(var(--app-notice-height) + 74px);
}
.success-wrapper {
.info {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,8 @@ export default {

.biz-create-success {
background: #f5f7fa;
padding: 66px 0 20px 0;
padding-bottom: 20px;
padding-top: calc(var(--app-notice-height) + 66px);
}
.success-wrapper {
margin-top: 16px;
Expand Down