From f689c5f709e181e2309f25d110e3544f629bd600 Mon Sep 17 00:00:00 2001
From: zhaoyongnian <541231643@qq.com>
Date: Thu, 8 Jul 2021 20:06:52 +0800
Subject: [PATCH] =?UTF-8?q?=E5=90=8C=E4=B8=8A?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../inviteFriendDialog/inviteFriendDialog.js | 28 +++++++++++++++++--
.../inviteFriendDialog.wxml | 2 +-
2 files changed, 27 insertions(+), 3 deletions(-)
diff --git a/epdc-resident-mp-yushan/subpages/property/components/inviteFriendDialog/inviteFriendDialog.js b/epdc-resident-mp-yushan/subpages/property/components/inviteFriendDialog/inviteFriendDialog.js
index 3aa3d07..dd2eea6 100644
--- a/epdc-resident-mp-yushan/subpages/property/components/inviteFriendDialog/inviteFriendDialog.js
+++ b/epdc-resident-mp-yushan/subpages/property/components/inviteFriendDialog/inviteFriendDialog.js
@@ -1,5 +1,5 @@
import { createQRCode } from '../../utils/api'
-
+var api = require('../../../../utils/api.js')
Component({
data: {
qrcodeValue: 'https://www.baidu.com',
@@ -28,7 +28,7 @@ Component({
},
pageLifetimes: {
show () {
- this.createQRCode()
+ this.getGridList()
}
},
methods: {
@@ -51,6 +51,30 @@ Component({
visible: false
})
},
+ // 获取当前用户所有网格
+ getGridList() {
+ api.getGridList().then(res => {
+ res.data.forEach((item,index) => {
+ if(index==0){
+ this.setData({
+ gridId:item.gridId
+ })
+ }
+ })
+ this.getUserInfo()
+ }).catch(err => {
+ })
+ },
+ // 获取用户信息
+ getUserInfo () {
+ api.getUserInfo().then(res => {
+ this.setData({
+ inviteUserId:res.data.id
+ })
+ this.createQRCode()
+ }).catch(err => {
+ })
+ },
createQRCode () {
const para = {
gridId: '1169158285790900226',
diff --git a/epdc-resident-mp-yushan/subpages/property/components/inviteFriendDialog/inviteFriendDialog.wxml b/epdc-resident-mp-yushan/subpages/property/components/inviteFriendDialog/inviteFriendDialog.wxml
index 203b6d2..ecf8a1f 100644
--- a/epdc-resident-mp-yushan/subpages/property/components/inviteFriendDialog/inviteFriendDialog.wxml
+++ b/epdc-resident-mp-yushan/subpages/property/components/inviteFriendDialog/inviteFriendDialog.wxml
@@ -10,7 +10,7 @@
- 邀请您的好友,好友扫码注册现代榆山,再邀请好友进入社群
+ 邀请您的好友,好友扫码注册现代榆山,再邀请好友进入物业群