Commit 797a3da6 authored by youjie's avatar youjie

no message

parent e231f5f1
...@@ -139,17 +139,29 @@ ...@@ -139,17 +139,29 @@
}, },
addFriend(){ addFriend(){
let msg = { let msg = {
// WeChatImg: uni.setStorageSync('userWxInfo').userInfo.avatarUrl,
// WeChatName: uni.setStorageSync('userWxInfo').userInfo.nickName,
WeChatImg: data.getUserWxInfo.userInfo.avatarUrl, WeChatImg: data.getUserWxInfo.userInfo.avatarUrl,
WeChatName: data.getUserWxInfo.userInfo.nickName, WeChatName: data.getUserWxInfo.userInfo.nickName,
OldUnionId: data.shareUnionId, OldUnionId: data.shareUnionId,
NewUnionId: data.currentWxUserAuth.unionid NewUnionId: data.currentWxUserAuth.unionid
} }
uni.showLoading() uni.showLoading()
// uni.showModal({
// title: '提示',
// content: JSON.stringify(msg),
// success: function (res) {
// if (res.confirm) {
// } else if (res.cancel) {
// }
// }
// });
SetFriend(msg).then(res=>{ SetFriend(msg).then(res=>{
if (res.Code==1) { if (res.Code==1) {
uni.hideLoading() methods.setUserLoginByUnionId(data.currentWxUserAuth.unionid)
data.loading = true
methods.setUserLoginByUnionId(data.currentWxUserAuth.unionid,data.getUserWxInfo.userInfo.nickName,data.getUserWxInfo.userInfo.avatarUrl)
}else{ }else{
uni.hideLoading() uni.hideLoading()
data.loading = true data.loading = true
...@@ -158,25 +170,14 @@ ...@@ -158,25 +170,14 @@
title: res.Message, title: res.Message,
icon: "none", icon: "none",
}); });
},2000) },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) {
}
}
});
} }
}); });
}, },
setUserLoginByUnionId(uid,wname,wimage){ setUserLoginByUnionId(uid){
loginByUnionId({uid,wname,wimage}).then(r=>{ loginByUnionId({uid}).then(r=>{
if(r.Code!=1){ if(r.Code!=1){
uni.hideLoading() uni.hideLoading()
data.loading = true data.loading = true
...@@ -291,6 +292,17 @@ ...@@ -291,6 +292,17 @@
url:'/pages/login/login' url:'/pages/login/login'
}) })
} }
// uni.showModal({
// title: '提示',
// content: JSON.stringify(options),
// success: function (res) {
// if (res.confirm) {
// } else if (res.cancel) {
// }
// }
// });
}, },
onShow(){ onShow(){
this.getData() this.getData()
......
...@@ -292,8 +292,10 @@ ...@@ -292,8 +292,10 @@
if (res.Code==1) { if (res.Code==1) {
uni.hideLoading() uni.hideLoading()
data.QRcodeImg = data.erpUrl+res.Data data.QRcodeImg = data.erpUrl+res.Data
// console.log(data.QRcodeImg,'----') uni.previewImage({
data.showPopup = true urls:[data.QRcodeImg]
})
// data.showPopup = true
}else{ }else{
uni.hideLoading() 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