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 1/4] =?UTF-8?q?feat:=20=E6=96=B0=E5=A2=9E=E6=8E=A8?=
=?UTF-8?q?=E5=B9=BF=E5=91=98=E7=94=B3=E8=AF=B7=E6=B3=A8=E5=86=8C=E5=8A=9F?=
=?UTF-8?q?=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 @@
- 登录
- 登录
+ 登录
+ 登录
{{ 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 @@
- 登录
+ 注册推广员
From 793e2a4a5e36e33f910adf855244e5fd37ac2128 Mon Sep 17 00:00:00 2001
From: TianYu <332368756@qq.com>
Date: Tue, 6 Jun 2023 14:21:06 +0800
Subject: [PATCH 3/4] =?UTF-8?q?fix:=20=E8=AF=9D=E8=B4=B9=E8=BF=94=E5=9B=9E?=
=?UTF-8?q?=E6=97=B6=E9=97=B4=E5=89=8D=E7=AB=AF=E4=B8=8D=E5=81=9A=E5=A4=84?=
=?UTF-8?q?=E7=90=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
yudao-ui-app/pages/member_equity/index.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/yudao-ui-app/pages/member_equity/index.vue b/yudao-ui-app/pages/member_equity/index.vue
index ed5dfd6d2..e73f92899 100644
--- a/yudao-ui-app/pages/member_equity/index.vue
+++ b/yudao-ui-app/pages/member_equity/index.vue
@@ -56,7 +56,7 @@
返费结束时间
- {{dateConvert(item.startTime)}}
+ {{item.startTime}}
From bc1ff1422e7659dd7906d1f809058017c4dd6d5c Mon Sep 17 00:00:00 2001
From: TianYu <332368756@qq.com>
Date: Wed, 7 Jun 2023 09:17:13 +0800
Subject: [PATCH 4/4] =?UTF-8?q?fix:=20=E4=B8=8B=E6=9E=B6=E6=8E=A8=E5=B9=BF?=
=?UTF-8?q?=E5=91=98=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
---
yudao-ui-app/App.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/yudao-ui-app/App.vue b/yudao-ui-app/App.vue
index 90948cb41..053700573 100644
--- a/yudao-ui-app/App.vue
+++ b/yudao-ui-app/App.vue
@@ -186,7 +186,7 @@
methods: {
async initLoad() {
this.isQRCode()
- this.isProperty()
+ // this.isProperty()
this.setSpreadId()
if (this.$store.getters.isLogin && !this.$Cache.get('USER_INFO')) {
await this.$store.dispatch('USERINFO');