Переглянути джерело

feat:添加各个二维码的类型

zhanghui 1 рік тому
батько
коміт
c37a89c9d8

+ 2 - 2
pages/index/attach/attach.vue

@@ -87,7 +87,7 @@
 				qrCreateTime:'',
 				roleBindRuleList:[],
 				userInfo:{},
-				qrcodeUrl:this.$xcxUrl+'?expandUserId={expandUserId}&ruleId={ruleId}&timestamp={timestamp}',
+				qrcodeUrl:this.$xcxUrl+'?expandUserId={expandUserId}&ruleId={ruleId}&timestamp={timestamp}&type=1',
 				options: {
 					// 指定二维码前景,一般可在中间放logo
 					foregroundImagePadding:2,
@@ -156,7 +156,7 @@
 			createQrCodePopupChange(e){
 				console.log(e)
 				if (!e.show){
-					this.qrcodeUrl=this.$xcxUrl+'?expandUserId={expandUserId}&ruleId={ruleId}&timestamp={timestamp}'
+					this.qrcodeUrl=this.$xcxUrl+'?expandUserId={expandUserId}&ruleId={ruleId}&timestamp={timestamp}&type=1'
 				}
 			},
 			closePopup(){

+ 2 - 2
pages/index/manager/manager.vue

@@ -191,7 +191,7 @@
 				roleNoBindRuleList: [], //角色没有绑定的规则
 				roleBindRuleParam: {},
 				value: 1,
-				qrcodeUrl: this.$tkUrl + '?roleId={roleId}&parentId={parentId}&timestamp={timestamp}',
+				qrcodeUrl: this.$tkUrl + '?roleId={roleId}&parentId={parentId}&timestamp={timestamp}&type=2',
 				options: {
 					// 指定二维码前景,一般可在中间放logo
 					foregroundImagePadding: 2,
@@ -315,7 +315,7 @@
 			createQrCodePopupChange(e) {
 				console.log(e)
 				if (!e.show) {
-					this.qrcodeUrl = this.$tkUrl + '?roleId={roleId}&parentId={parentId}&timestamp={timestamp}'
+					this.qrcodeUrl = this.$tkUrl + '?roleId={roleId}&parentId={parentId}&timestamp={timestamp}&type=2'
 				}
 			},
 			addRule() {

+ 1 - 0
pages/my/index.rpx.css

@@ -127,6 +127,7 @@
 	color: #999999;
 }
 .popupTitle{
+	height: 80rpx;
 	line-height: 100rpx;
 	font-size: 32rpx;
 	font-weight: bold;

+ 10 - 4
pages/my/my.vue

@@ -80,12 +80,13 @@
 			</uni-list>
 		</view>
 
-<!--		<button @click="anniu">按钮</button>-->
+<!--		<button @click="">按钮</button>-->
 
 		<uni-popup ref="qrCodePopup" type="center" @change="qrCodePopupChange">
 			<view class="flex-col qrCodePopupView">
 				<view class="flex-row justify-center">
-					<text class="popupTitle">推广码</text>
+<!--					标题不要了-->
+					<text class="popupTitle">&nbsp;</text>
 				</view>
 				<view class="xoIcon" @click="closePopup">
 					<u-icon name="close-circle" color="#666" size="24"></u-icon>
@@ -109,7 +110,7 @@
 		components: {UniPopup},
 		data() {
 			return {
-				qrcodeUrl:this.$xcxUrl+'?expandUserId={expandUserId}&ruleId={ruleId}&timestamp={timestamp}',
+				qrcodeUrl:this.$xcxUrl+'?expandUserId={expandUserId}&ruleId={ruleId}&timestamp={timestamp}&type=',
 				options: {
 					// 指定二维码前景,一般可在中间放logo
 					foregroundImagePadding:2,
@@ -165,6 +166,11 @@
 						let regexp = new RegExp("{" + key + "}"); // 构造正则表达式
 						this.qrcodeUrl = this.qrcodeUrl.replace(regexp, data[key]); // 执行替换操作
 					}
+					if (this.userInfo.isManager === '1'){
+						this.qrcodeUrl = this.qrcodeUrl + '4'
+					}else {
+						this.qrcodeUrl = this.qrcodeUrl + '3'
+					}
 					this.formatDate()
 					console.log('生成的链接',this.qrcodeUrl)
 					this.$refs.qrCodePopup.open()
@@ -175,7 +181,7 @@
 			qrCodePopupChange(e){
 				console.log(e)
 				if (!e.show){
-					this.qrcodeUrl=this.$xcxUrl+'?expandUserId={expandUserId}&ruleId={ruleId}&timestamp={timestamp}'
+					this.qrcodeUrl=this.$xcxUrl+'?expandUserId={expandUserId}&ruleId={ruleId}&timestamp={timestamp}&type='
 				}
 			},
 

+ 6 - 1
pages/register/register.vue

@@ -177,6 +177,10 @@
                 this.form.roleId = e.roleId
                 console.log('获取到的id', e.roleId)
             }
+            if (e.type) {
+                this.form.type = e.type
+                console.log('获取到的type', e.type)
+            }
             if (e.parentId) {
                 this.form.parentId = e.parentId
                 console.log('获取到的name', e.parentId)
@@ -211,7 +215,8 @@
                 console.log("+++++++++++++角色id++++++++++++++", this.form.roleId)
                 this.$api.service.addRecordForManager({
                     expandUserId: this.form.parentId,
-                    roleId: this.form.roleId
+                    roleId: this.form.roleId,
+                    type: this.form.type
                 }).then(res => {
                     console.log("获取到的记录id", res.data.data)
                     this.recordId = res.data.data