diff --git a/src/assets/img/mini-code.png b/src/assets/img/mini-code.png new file mode 100644 index 0000000..72678f4 Binary files /dev/null and b/src/assets/img/mini-code.png differ diff --git a/src/assets/img/mini-code1.png b/src/assets/img/mini-code1.png new file mode 100644 index 0000000..0e5754a Binary files /dev/null and b/src/assets/img/mini-code1.png differ diff --git a/src/router/index.js b/src/router/index.js index 7149a93..43a628c 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -169,6 +169,11 @@ let router = new Router({ component: () => import('../views/join'), // meta: { title: '个人中心' } }, + { + path: '/success', + component: () => import('../views/join/success'), + // meta: { title: '个人中心' } + }, { path: '*', redirect: '/404' @@ -180,7 +185,7 @@ router.beforeEach(function(to, from, next) { // 根据路由元信息设置文档标题 window.document.title = to.meta.title || '中台'; //使用钩子函数对路由进行权限跳转 - if (!sessionStorage.getItem('token') && to.path !== '/login' && to.path !== '/join') { + if (!sessionStorage.getItem('token') && to.path !== '/login' && to.path !== '/join' && to.path !== '/success') { next('/login'); } else { next(); diff --git a/src/setting.js b/src/setting.js index 70e8e90..f688425 100644 --- a/src/setting.js +++ b/src/setting.js @@ -10,8 +10,8 @@ let host = `${location.origin}:9000/` if (isDev) { jumpPath = "http://192.168.31.125:8087/"; // 本地调试-需要启动本地判分点系统 // host = 'http://39.108.250.202:9000/' - host = 'http://192.168.31.151:9000/'// 榕 - // host = 'http://192.168.31.137:9000/'// 赓 + // host = 'http://192.168.31.151:9000/'// 榕 + host = 'http://192.168.31.137:9000/'// 赓 } else if (isPro) { jumpPath = "http://www.huorantech.cn/judgmentPoint/"; } diff --git a/src/utils/api.js b/src/utils/api.js index 3c87fe1..efe8c3b 100644 --- a/src/utils/api.js +++ b/src/utils/api.js @@ -269,5 +269,6 @@ export default { partnerAccountList: `nakadai/partnerAccount/partnerAccountList`, savePartnerAccount: `nakadai/partnerAccount/savePartnerAccount`, generateInvitationCode: `nakadai/partnerAccount/generateInvitationCode`, - generationQrCode: `nakadai/partnerAccount/generationQrCode `, + generationQrCode: `nakadai/partnerAccount/generationQrCode`, + queryUserInfoByPhone: `nakadai/partner-team/queryUserInfoByPhone`, }; \ No newline at end of file diff --git a/src/views/join/index.vue b/src/views/join/index.vue index feb855d..5181b83 100644 --- a/src/views/join/index.vue +++ b/src/views/join/index.vue @@ -11,14 +11,14 @@
+ + + - + - - - - +
@@ -44,7 +44,7 @@ export default { form: { id: this.$route.query.accountId, partnerClassificationId: this.$route.query.id, - isTeam: 0, + isTeam: this.$route.query.isTeam, // 移动端创建的为成员(0),pc创建的为团队(1) account: '', phone: '', code: '', @@ -64,6 +64,7 @@ export default { { required: true, message: "请输入验证码", trigger: 'blur' } ] }, + repeat: false, // 是否有已存在用户,有的话禁填用户名和账号 phoneDisabled: false, phoneTimer: null, phoneOpener: '', @@ -122,6 +123,25 @@ export default { } }).catch(res => {}) }, + // 手机号输入完后,带出信息 + phoneChange() { + // 添加成员才需要 + if (!this.form.isTeam) { + const { form } = this + this.$get(this.api.queryUserInfoByPhone, { + phone: form.phone + }).then(({ info }) => { + // 返回了信息,则赋值,并禁止输入 + if (info) { + this.repeat = true + form.account = info.account + form.userName = info.userName + } else { + this.repeat = false + } + }).catch(res => {}) + } + }, // 提交 submit() { this.$refs.form.validate((valid) => { @@ -132,13 +152,9 @@ export default { if (this.emailRepeat) return util.warningMsg("该邮箱已存在") const { form } = this form.uniqueIdentification = Date.now() - form.isTeam = this.isMobile ? 0 : 1 // 移动端创建的为成员(0),pc创建的为团队(1) this.submiting = true this.$post(this.api.savePartnerAccount, form).then(res => { - util.successMsg('加入成功!') - setTimeout(() => { - location.reload() - }, 1000) + this.$router.push('/success') }).catch(res => { this.submiting = false }) diff --git a/src/views/join/success.vue b/src/views/join/success.vue new file mode 100644 index 0000000..b3f96ac --- /dev/null +++ b/src/views/join/success.vue @@ -0,0 +1,68 @@ + + + + + diff --git a/src/views/parner/staff.vue b/src/views/parner/staff.vue index bd899f3..28d5de7 100644 --- a/src/views/parner/staff.vue +++ b/src/views/parner/staff.vue @@ -256,7 +256,11 @@ export default { list.map(e => { e.ids = ids ? [...ids, e.id] : [e.id] if (e.children.length) { - handleLeaf(e.children, e.ids) + if (e.isTeam) { + delete e.children + } else { + handleLeaf(e.children, e.ids) + } } else { delete e.children } @@ -428,7 +432,7 @@ export default { this.expireTime = `${date.getFullYear()}-${util.preZero(date.getMonth() + 1)}-${util.preZero(date.getDate())} ${util.preZero(date.getHours())}:${util.preZero(date.getMinutes())}:${util.preZero(date.getMinutes())}` this.parnerVisible = true const cur = this.$refs.orgTree.getCurrentKey() - const link = `${location.origin}${Setting.isDev || Setting.isPro ? '' : '/nakadai'}/#/join?accountId=${accountId}&id=${cur || ''}` + const link = `${location.origin}${Setting.isDev || Setting.isPro ? '' : '/nakadai'}/#/join?accountId=${accountId}&id=${cur || ''}&isTeam=1` // 生成二维码 this.link = link diff --git a/src/views/system/manageLog.vue b/src/views/system/manageLog.vue index 670e65b..151e37d 100644 --- a/src/views/system/manageLog.vue +++ b/src/views/system/manageLog.vue @@ -42,8 +42,10 @@
- 已撤回 - 撤销 +
diff --git a/src/views/system/staff.vue b/src/views/system/staff.vue index 9bc90be..75122b5 100644 --- a/src/views/system/staff.vue +++ b/src/views/system/staff.vue @@ -672,7 +672,6 @@ export default { }) } else { form.uniqueIdentification = new Date().getTime() - form.userAvatars = this.$store.state.avatar this.$post(this.api.saveStaff, form).then(res => { util.successMsg("新增成功!") this.staffVisible = false