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 @@
- 登录
- 登录
+ 登录
+ 登录
{{ current === 1 ? '账号密码登录' : '短信验证码登录' }}
@@ -44,7 +46,7 @@
-
+
我已阅读并同意 《创盈商城用户协议》
@@ -79,7 +81,9 @@
import {
VUE_APP_API_URL
} from "@/utils";
-
+ import {
+ mapGetters
+ } from 'vuex'
const BACK_URL = "login_back_url";
export default {
@@ -97,6 +101,9 @@
loading: false
};
},
+ computed: {
+ ...mapGetters(['isProperty'])
+ },
mounted: function() {
// this.getLogoImage();
},
@@ -104,7 +111,7 @@
},
methods: {
- onLinkUserPrivacy(){
+ onLinkUserPrivacy() {
uni.navigateTo({
url: '/pages/users/privacy/index'
})
@@ -120,16 +127,17 @@
if (!that.mobile) return that.$util.Tips({
title: '请填写手机号码'
});
- if (!/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/.test(that.mobile)) return that.$util.Tips({
- title: '请输入正确的手机号码'
- });
+ if (!/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/.test(that.mobile))
+ return that.$util.Tips({
+ title: '请输入正确的手机号码'
+ });
if (!that.captcha) return that.$util.Tips({
title: '请填写验证码'
});
if (!/^[\w\d]+$/i.test(that.captcha)) return that.$util.Tips({
title: '请输入正确的验证码'
});
- if(that.checked.length === 0) return that.$util.Tips({
+ if (that.checked.length === 0) return that.$util.Tips({
title: '请勾选同意用户协议'
});
that.loading = true
@@ -151,7 +159,7 @@
that.$util.Tips({
title: res
});
- }).finally(()=>{
+ }).finally(() => {
that.loading = false
})
},
@@ -161,9 +169,10 @@
if (!that.mobile) return that.$util.Tips({
title: '请填写手机号码'
});
- if (!/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/.test(that.mobile)) return that.$util.Tips({
- title: '请输入正确的手机号码'
- });
+ if (!/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/.test(that.mobile))
+ return that.$util.Tips({
+ title: '请输入正确的手机号码'
+ });
if (!that.captcha) return that.$util.Tips({
title: '请填写验证码'
});
@@ -209,9 +218,10 @@
if (!that.mobile) return that.$util.Tips({
title: '请填写手机号码'
});
- if (!/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/.test(that.mobile)) return that.$util.Tips({
- title: '请输入正确的手机号码'
- });
+ if (!/^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/.test(that.mobile))
+ return that.$util.Tips({
+ title: '请输入正确的手机号码'
+ });
await registerVerify(that.mobile, 1)
.then(res => {
that.$util.Tips({
@@ -239,7 +249,7 @@
if (!that.password) return that.$util.Tips({
title: '请填写密码'
});
- if(that.checked.length === 0) return that.$util.Tips({
+ if (that.checked.length === 0) return that.$util.Tips({
title: '请勾选同意用户协议'
});
that.loading = true
@@ -261,7 +271,7 @@
that.$util.Tips({
title: e
});
- }).finally(()=>{
+ }).finally(() => {
that.loading = false
})
},
@@ -274,15 +284,20 @@
getUserInfo().then(res => {
this.$store.commit("UPDATE_USERINFO", res.data);
// let backUrl = this.$Cache.get(BACK_URL) || "/pages/index/index";
- let backUrl = "/pages/member_application/index";
// let backUrl = "/pages/index/index";
// if (backUrl.indexOf('/pages/users/login/index') !== -1) {
// backUrl = '/pages/index/index';
// }
+ let backUrl = ''
+ if (this.isProperty && !res.data.isPromoter) {
+ backUrl = "/pages/users/promoter/index"
+ } else {
+ backUrl = "/pages/member_application/index"
+ }
uni.reLaunch({
url: backUrl
});
- }).finally(()=>{
+ }).finally(() => {
uni.hideLoading()
})
}
@@ -381,14 +396,15 @@
.login-wrapper {
padding: 30rpx 52rpx;
background: url('@/static/images/bg-linear.png') center 0 no-repeat;
- background-size:100% 672rpx;
+ background-size: 100% 672rpx;
.logo-wrap {
margin: 185rpx 0 85rpx 0;
- display:flex;
- align-items:center;
- img{
- margin-right: 20rpx;
+ display: flex;
+ align-items: center;
+
+ img {
+ margin-right: 20rpx;
}
}
@@ -430,6 +446,7 @@
margin-bottom: 38rpx;
height: 98rpx;
display: flex;
+
&:last-child {
margin-bottom: 0;
}
@@ -498,14 +515,16 @@
justify-content: space-between;
}
- .protocol-wrap{
- margin: 131rpx 0 80rpx 0;
+ .protocol-wrap {
+ margin: 131rpx 0 80rpx 0;
display: flex;
justify-content: center;
- .text{
+
+ .text {
font-size: 24rpx;
color: #000;
- .link{
+
+ .link {
color: #F35981;
}
}
diff --git a/yudao-ui-app/pages/users/promoter/index.vue b/yudao-ui-app/pages/users/promoter/index.vue
index 00592da7c..60b836aa7 100644
--- a/yudao-ui-app/pages/users/promoter/index.vue
+++ b/yudao-ui-app/pages/users/promoter/index.vue
@@ -4,291 +4,83 @@
- 登录
+ 注册推广员