Commit 797a3da6 authored by youjie's avatar youjie

no message

parent e231f5f1
......@@ -139,17 +139,29 @@
},
addFriend(){
let msg = {
// WeChatImg: uni.setStorageSync('userWxInfo').userInfo.avatarUrl,
// WeChatName: uni.setStorageSync('userWxInfo').userInfo.nickName,
WeChatImg: data.getUserWxInfo.userInfo.avatarUrl,
WeChatName: data.getUserWxInfo.userInfo.nickName,
OldUnionId: data.shareUnionId,
NewUnionId: data.currentWxUserAuth.unionid
}
uni.showLoading()
// uni.showModal({
// title: '提示',
// content: JSON.stringify(msg),
// success: function (res) {
// if (res.confirm) {
// } else if (res.cancel) {
// }
// }
// });
SetFriend(msg).then(res=>{
if (res.Code==1) {
uni.hideLoading()
data.loading = true
methods.setUserLoginByUnionId(data.currentWxUserAuth.unionid,data.getUserWxInfo.userInfo.nickName,data.getUserWxInfo.userInfo.avatarUrl)
methods.setUserLoginByUnionId(data.currentWxUserAuth.unionid)
}else{
uni.hideLoading()
data.loading = true
......@@ -158,25 +170,14 @@
title: res.Message,
icon: "none",
});
},2000)
uni.showModal({
title: '提示',
// 'OldUnionId='+msg.OldUnionId+'&NewUnionId='+msg.NewUnionId+'&Name='+msg.WeChatName+'&WeChatImg='+msg.WeChatImg
content: JSON.stringify(msg),
success: function (res) {
if (res.confirm) {
} else if (res.cancel) {
}
}
});
},2000)
}
});
},
setUserLoginByUnionId(uid,wname,wimage){
loginByUnionId({uid,wname,wimage}).then(r=>{
setUserLoginByUnionId(uid){
loginByUnionId({uid}).then(r=>{
if(r.Code!=1){
uni.hideLoading()
data.loading = true
......@@ -291,6 +292,17 @@
url:'/pages/login/login'
})
}
// uni.showModal({
// title: '提示',
// content: JSON.stringify(options),
// success: function (res) {
// if (res.confirm) {
// } else if (res.cancel) {
// }
// }
// });
},
onShow(){
this.getData()
......
......@@ -292,8 +292,10 @@
if (res.Code==1) {
uni.hideLoading()
data.QRcodeImg = data.erpUrl+res.Data
// console.log(data.QRcodeImg,'----')
data.showPopup = true
uni.previewImage({
urls:[data.QRcodeImg]
})
// data.showPopup = true
}else{
uni.hideLoading()
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment