diff --git a/.env.development b/.env.development index bbc6474..251315a 100644 --- a/.env.development +++ b/.env.development @@ -1,3 +1,3 @@ NODE_ENV = 'development' VUE_APP_URL = 'http://121.41.26.225:8004/' -VUE_APP_STATIC = 'http://121.41.26.225:8004/' \ No newline at end of file +VUE_APP_STATIC = 'https://saas.kaidalai.cn/resource/' \ No newline at end of file diff --git a/.env.production b/.env.production index 87ee745..e089e8c 100644 --- a/.env.production +++ b/.env.production @@ -1,3 +1,3 @@ NODE_ENV = 'production' -VUE_APP_URL = 'http://121.41.26.225:8004/' -VUE_APP_STATIC = 'http://121.41.26.225:8004/' \ No newline at end of file +VUE_APP_URL = 'https://saas.kaidalai.cn/api/' +VUE_APP_STATIC = 'https://saas.kaidalai.cn/resource/' \ No newline at end of file diff --git a/src/main.js b/src/main.js index 66627e8..31b520a 100644 --- a/src/main.js +++ b/src/main.js @@ -18,9 +18,9 @@ const communityCode = store.getters.getCommunityCode; Vue.prototype.$baseUrl = process.env.VUE_APP_URL + communityCode + '/manage' Vue.config.productionTip = false import commonTable from './components/table' - // 注册组件 Vue.component('commonTable', commonTable) + new Vue({ render: h => h(App), router, diff --git a/src/mixins/index.js b/src/mixins/index.js index f0e6b28..03a8b12 100644 --- a/src/mixins/index.js +++ b/src/mixins/index.js @@ -12,10 +12,10 @@ export default { install(Vue) { Vue.mixin({ computed: { - ...mapGetters(['getToken','getSelectedKeys', 'getOpenKeys']) + ...mapGetters(['getToken','getCommunityCode','getSelectedKeys', 'getOpenKeys']) }, methods: { - ...mapActions(['setToken','setSelectedKeys', 'setOpenKeys']) + ...mapActions(['setToken','setCommunityCode','setSelectedKeys', 'setOpenKeys']) } }) } diff --git a/src/store/actions.js b/src/store/actions.js index 7481f53..e4f1be1 100644 --- a/src/store/actions.js +++ b/src/store/actions.js @@ -11,7 +11,7 @@ const actions = { commit('setToken', log) }, setCommunityCode: ({commit}, log) => { - commit('communityCode', log) + commit('setCommunityCode', log) }, setSelectedKeys: ({commit}, log) => { commit('setSelectedKeys', log) diff --git a/src/store/mutations.js b/src/store/mutations.js index 51008c7..145f2eb 100644 --- a/src/store/mutations.js +++ b/src/store/mutations.js @@ -22,7 +22,7 @@ const mutations = { sessionStorage.setItem('token', log); }, setCommunityCode: (state, log) => { - state.token = log; + state.communityCode = log; sessionStorage.setItem('communityCode', log); }, } diff --git a/src/store/state.js b/src/store/state.js index 376a622..8071246 100644 --- a/src/store/state.js +++ b/src/store/state.js @@ -10,6 +10,6 @@ const state = { selectedKeys: JSON.parse(sessionStorage.getItem('selectedKeys')) || ['/'], openKeys: JSON.parse(sessionStorage.getItem('openKeys')) || [], token: sessionStorage.getItem('token') || "", - communityCode: sessionStorage.getItem('communityCode') || "123456", + communityCode: sessionStorage.getItem('communityCode') || "", } export default state \ No newline at end of file diff --git a/src/utils/util.js b/src/utils/util.js index 212ef6a..4253d95 100644 --- a/src/utils/util.js +++ b/src/utils/util.js @@ -1,6 +1,8 @@ +import store from '@/store' export default { install: function (Vue) { - Vue.prototype.$upload = process.env.VUE_APP_URL + '123456/manage/user/upload/uploadTestMinioImg' + const communityCode = store.getters.getCommunityCode; + Vue.prototype.$upload = process.env.VUE_APP_URL + communityCode +'/manage/user/upload/uploadTestMinioImg' Vue.prototype.ImgUrl = (src) => { return process.env.VUE_APP_STATIC + src } diff --git a/src/views/Basic/Employee/depend/form.vue b/src/views/Basic/Employee/depend/form.vue index 3d99bbe..bb9aff5 100644 --- a/src/views/Basic/Employee/depend/form.vue +++ b/src/views/Basic/Employee/depend/form.vue @@ -246,7 +246,6 @@ export default { this.form.password = data.password this.form.email = data.email this.form.address = data.address - this.form.idCardImgUrls = data.idCardImgUrls this.form.entryDate = data.entryDate this.form.salary = data.salary this.form.emergencyContact = data.emergencyContact @@ -267,6 +266,7 @@ export default { this.cascVal.push(Number(element)) }); // 图片 + this.form.idCardImgUrls = data.idCardImgUrls || [] }) }, immediate: true, @@ -370,6 +370,7 @@ export default { if(this.form.tel === this.telephoneNum){ this.form.tel = null } + console.log(this.form); EditManageUser(this.form).then((res) => { if(res.code===200){ this.$message.success(res.msg) diff --git a/src/views/Login/index.vue b/src/views/Login/index.vue index a736bfc..a3acbd0 100644 --- a/src/views/Login/index.vue +++ b/src/views/Login/index.vue @@ -228,8 +228,9 @@ export default { }, }; }, - created() { + mounted() { this.keyupEnter(); + this.setCommunityCode(123456); }, methods: { // 绑定enter事件 @@ -247,9 +248,6 @@ export default { this.$message.success(res.msg); // 存储token this.setToken(res.data); - // 存储小区识别码 - this.setCommunityCode(123456) - // this.setCommunityCode(res.communityCode) this.$router.push("/"); } else { this.$message.error(res.msg);