Browse Source

同上

feature/societyOrg
zhaoyongnian 4 years ago
parent
commit
f689c5f709
  1. 28
      epdc-resident-mp-yushan/subpages/property/components/inviteFriendDialog/inviteFriendDialog.js
  2. 2
      epdc-resident-mp-yushan/subpages/property/components/inviteFriendDialog/inviteFriendDialog.wxml

28
epdc-resident-mp-yushan/subpages/property/components/inviteFriendDialog/inviteFriendDialog.js

@ -1,5 +1,5 @@
import { createQRCode } from '../../utils/api' import { createQRCode } from '../../utils/api'
var api = require('../../../../utils/api.js')
Component({ Component({
data: { data: {
qrcodeValue: 'https://www.baidu.com', qrcodeValue: 'https://www.baidu.com',
@ -28,7 +28,7 @@ Component({
}, },
pageLifetimes: { pageLifetimes: {
show () { show () {
this.createQRCode() this.getGridList()
} }
}, },
methods: { methods: {
@ -51,6 +51,30 @@ Component({
visible: false 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 () { createQRCode () {
const para = { const para = {
gridId: '1169158285790900226', gridId: '1169158285790900226',

2
epdc-resident-mp-yushan/subpages/property/components/inviteFriendDialog/inviteFriendDialog.wxml

@ -10,7 +10,7 @@
<image src="{{qrCodeImage}}" /> <image src="{{qrCodeImage}}" />
</view> </view>
</view> </view>
<view class="tip">邀请您的好友,好友扫码注册现代榆山,再邀请好友进入群</view> <view class="tip">邀请您的好友,好友扫码注册现代榆山,再邀请好友进入物业群</view>
</view> </view>
</view> </view>
<image bindtap="closeDialog" class="close" src="../../images/close.png" /> <image bindtap="closeDialog" class="close" src="../../images/close.png" />

Loading…
Cancel
Save