From ba7e34e82ac1634db15f5bb0396ec65528738b9d Mon Sep 17 00:00:00 2001
From: TianYu <332368756@qq.com>
Date: Mon, 5 Jun 2023 15:56:27 +0800
Subject: [PATCH] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9E=E6=8E=A8=E5=B9=BF?=
=?UTF-8?q?=E5=91=98=E7=94=B3=E8=AF=B7=E6=B3=A8=E5=86=8C=E5=8A=9F=E8=83=BD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/views/system/tenant/index.vue | 2 +-
yudao-ui-app/App.vue | 8 +
yudao-ui-app/api/user.js | 5 +
yudao-ui-app/config/cache.js | 2 +
yudao-ui-app/libs/login.js | 1 -
yudao-ui-app/pages/users/login/index.vue | 77 +++--
yudao-ui-app/pages/users/promoter/index.vue | 324 ++++--------------
yudao-ui-app/pages/users/register/success.vue | 8 +-
yudao-ui-app/store/getters.js | 1 +
yudao-ui-app/store/modules/app.js | 5 +
10 files changed, 138 insertions(+), 295 deletions(-)
diff --git a/yudao-ui-admin/src/views/system/tenant/index.vue b/yudao-ui-admin/src/views/system/tenant/index.vue
index 9b39e3b70..bb481684b 100755
--- a/yudao-ui-admin/src/views/system/tenant/index.vue
+++ b/yudao-ui-admin/src/views/system/tenant/index.vue
@@ -342,7 +342,7 @@ export default {
this.resetForm('form');
},
handleQRCode(row) {
- const url =`${config.spreadDomain}${config.spreadLink}?redirectUrl=${config.spreadDomain}&tenantId=${row.id}`
+ const url =`${config.spreadDomain}${config.spreadLink}?redirectUrl=${config.spreadDomain}&tenantId=${row.id}&isProperty=1`
QRCode.toCanvas(document.getElementById(`id-${row.id}`), url, {
scale: 2
}, function (error) {
diff --git a/yudao-ui-app/App.vue b/yudao-ui-app/App.vue
index 928d6f416..90948cb41 100644
--- a/yudao-ui-app/App.vue
+++ b/yudao-ui-app/App.vue
@@ -186,6 +186,7 @@
methods: {
async initLoad() {
this.isQRCode()
+ this.isProperty()
this.setSpreadId()
if (this.$store.getters.isLogin && !this.$Cache.get('USER_INFO')) {
await this.$store.dispatch('USERINFO');
@@ -215,6 +216,13 @@
`${wechatUrl}&redirect_uri=${redirectUrl}/pages/member_application/index?tenantId=${tenantId}&spreadId=${spreadId}&response_type=code&scope=snsapi_base#wechat_redirect`
}
},
+ // 是否扫物业二维码
+ isProperty() {
+ const is_property = this.$route.query.isProperty || false
+ if(parseInt(is_property) === 1){
+ this.$store.commit("SET_IS_PROPERTY", !!is_property)
+ }
+ },
// 获取租户信息
getTenantInfo() {
fetchTenantInfo(this.tenantId).then(res => {
diff --git a/yudao-ui-app/api/user.js b/yudao-ui-app/api/user.js
index d329eedcc..fce6a308a 100644
--- a/yudao-ui-app/api/user.js
+++ b/yudao-ui-app/api/user.js
@@ -59,6 +59,11 @@ export function register(data) {
return request.post("member/auth/register", data, { noAuth : true });
}
+// 注册推广员
+export function registerPromoter(data) {
+ return request.post("member/user/create", data, { noAuth : true });
+}
+
/**
* 用户手机号修改密码
* @param data object 用户手机号 验证码 密码
diff --git a/yudao-ui-app/config/cache.js b/yudao-ui-app/config/cache.js
index e211f4324..f5537916c 100644
--- a/yudao-ui-app/config/cache.js
+++ b/yudao-ui-app/config/cache.js
@@ -10,6 +10,8 @@ module.exports = {
OPEN_ID: 'OPEN_ID',
// 推广员ID
SPREAD_ID: 'SPREAD_ID',
+ // 是否扫物业推广码
+ IS_PROPERTY: 'IS_PROPERTY',
//用户信息
USER_INFO: 'USER_INFO',
//租户信息
diff --git a/yudao-ui-app/libs/login.js b/yudao-ui-app/libs/login.js
index 6fbe9db3a..f2811b55d 100644
--- a/yudao-ui-app/libs/login.js
+++ b/yudao-ui-app/libs/login.js
@@ -75,7 +75,6 @@ export function _toLogin(push, pathLogin) {
export function isWhiteList(){
let path = prePage();
- console.log('path111', path)
return whiteListPage.indexOf(path) > -1
}
diff --git a/yudao-ui-app/pages/users/login/index.vue b/yudao-ui-app/pages/users/login/index.vue
index 00592da7c..cf1cdad4a 100644
--- a/yudao-ui-app/pages/users/login/index.vue
+++ b/yudao-ui-app/pages/users/login/index.vue
@@ -35,8 +35,10 @@
-