From ce92192f0b4c082bc0204265a4bc61fc8194f065 Mon Sep 17 00:00:00 2001 From: yujialong <479214531@qq.com> Date: Wed, 8 Jun 2022 18:28:03 +0800 Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/img/mini-code.png | Bin 0 -> 3056 bytes src/assets/img/mini-code1.png | Bin 0 -> 3273 bytes src/router/index.js | 7 +++- src/setting.js | 4 +- src/utils/api.js | 3 +- src/views/join/index.vue | 38 ++++++++++++------ src/views/join/success.vue | 68 +++++++++++++++++++++++++++++++++ src/views/parner/staff.vue | 8 +++- src/views/system/manageLog.vue | 6 ++- src/views/system/staff.vue | 1 - 10 files changed, 115 insertions(+), 20 deletions(-) create mode 100644 src/assets/img/mini-code.png create mode 100644 src/assets/img/mini-code1.png create mode 100644 src/views/join/success.vue diff --git a/src/assets/img/mini-code.png b/src/assets/img/mini-code.png new file mode 100644 index 0000000000000000000000000000000000000000..72678f49b4f2339a7b236c01a630aaae197dbb35 GIT binary patch literal 3056 zcmb7`Yfw^Y7{{qLtyXMrQK@7T+hs;g%M#6yY*cV6t!&nj6g3Sc5^rRf;i;UlF;dbd zbF|cK*DjlO5xg6@WHKcxnSvJTSfUk2-9#`?hqH&>o#|U1KD_hHoDc6j&w2m<-}BGe zA4J11vs;G4;qZZUzk@j30=@YxS%`k|6Vo+lS(-!-OU2=ApPJ8tD^9ldINbLYfquS+ z_}9QUz6EbR35$K%&Xd4saYESr?p`U*ZTxZ2p54E!c-9M<=4L)F+Vuhna>SiUAF=)6 z*9n~Ow+ht>(8HOC!D~%ya&DZVvMQYS_k|kH?yQxR6cfy%Y9(Y)-hMi#twgIJuBE?O zaPH~+r7&AYXo*#_l@cLc6||4|5HUG6Jj`;O)>^;S)>IV<>{=QYeV60C>r(x^rTbly zy5j2I?GcVR7>R-buF=F(dSikg>cK#9nAKyA##yo;d_3h~xRKrHV@CAy<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FeCt)au38V&Xa#S|*r`>PQyDJ}IA}UtJYvN5@Ma}jnsC>9 z81Qa5V*T6>qwdvw;L^YONt2ljyyh6v$Q3eHTrMMZiqB+ha{nGnFH$4if8AmD`s@R# zi$FNx`M$aqhm2+#v((~BDrn~|fJs!Ex?lE*Y_<2omii_PE1Lv(6f1~rt6ls|m}8{p zf2RcO|6sScX;I?~?!)6AHF*P6x~HM|#EQ9D*ca3_q!Bg&Uw8+AZ&lE@ns*sL}gLgJ&+6 z&el~ryNGr^@Qh^(ffJt)=Sy7_EhS8_uP0Q<%duFT_ny^@6CNkAyyO0#t!aK(co^4& zT1lb62!~e|94IM#_b09VBvCP?v8Z}T$auQpBoc}Ri^sdrjLw~{0Tlqukt1e^iFDb~ z_US8xlSEMTR)el9F>4Hq zN8oPkP&(uu0=-iH6yBbAhapyeczq^^fyrZtt`~MqY4v`Chnpg^nxY*i+(gQn3Enxr zeY1#b9-oYXBG6P|=^NOHq=!3)^nUzxFy^`0@8bKz`r_yM7n3k_l?P$7&gYQ%k)6_~ z**Iv;;)6qhZB@e>1{TF3F* K-M_o~@qYnfh^%)2 literal 0 HcmV?d00001 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