Commit a3842167 authored by youjie's avatar youjie

no message

parent 7bf4e94a
......@@ -137,7 +137,7 @@ export function GetOrderPage(data) {
*/
export function SetMyChild(data) {
return request({
url: '/AppletCenter/SetMyChild',
url: '/AppletCenter/SetMyChild_V2',
method: 'post',
data
})
......
......@@ -88,7 +88,9 @@
let {
proxy
} = getCurrentInstance();
const { ctx } = getCurrentInstance();
let data = reactive({
options:null,
nickName:'',
AccountName:'',
OldUnionId:'',
......@@ -207,23 +209,52 @@
})
},
async getData() {
uni.showLoading()
// uni.showLoading()
let res = await GetUserInfoByUnionId(data.msg);
if (res.Code==1) {
uni.hideLoading()
// uni.hideLoading()
data.nickName = res.Data.WeChatName
}else{
uni.hideLoading()
// uni.hideLoading()
uni.showToast({
title: res.Message,
icon: "none",
});
}
uni.showModal({
title: '提示res',
content: JSON.stringify(res.Data),
success: function (res) {
if (res.confirm) {
} else if (res.cancel) {
}
}
});
},
};
let that = methods;
onMounted(() => {
var url = ctx.$scope.$page.fullPath;
data.OldUnionId = decodeURIComponent(url.split('=')[1])
data.AccountName = decodeURIComponent(url.split('=')[2])
data.msg.Unionid = data.OldUnionId
uni.showModal({
title: 'ctx',
content: JSON.stringify(ctx.$scope.$page.fullPath),
success: function (res) {
if (res.confirm) {
} else if (res.cancel) {
}
}
});
});
return {
...toRefs(data),
......@@ -231,9 +262,18 @@
};
},
onLoad(options) {
this.OldUnionId = options.unionId
this.AccountName = options.AccountName
this.msg.Unionid = this.OldUnionId
uni.showModal({
title: 'options',
content: JSON.stringify(options),
success: function (res) {
if (res.confirm) {
} else if (res.cancel) {
}
}
});
},
onShow(){
this.getData()
......
......@@ -260,6 +260,8 @@
let res = RemoveMyChild(msg);
if (res.Code==1) {
uni.hideLoading()
data.dataList = []
data.msg.pageIndex = 1
that.getData()
}else{
uni.hideLoading()
......@@ -280,7 +282,8 @@
async QRcode(){
uni.showLoading()
let msg = {
url: `/pages/FriendsAndRelatives/addFriendsAndRelatives?unionid=${data.wxUserAuthInfo.unionid}&AccountName=${data.erpUserInfo.AccountName}`,
// url:'/pages/index/index',
url: `/pages/FriendsAndRelatives/addFriendsAndRelatives?unionId=${data.wxUserAuthInfo.unionid}&AccountName=${data.erpUserInfo.AccountName}`,
width: 200
}
let res = await CreateFriendQrCode(msg);
......@@ -310,6 +313,7 @@
} else {
data.pageState = "more";
}
data.FriendCount = data.dataList.length
}
},
};
......@@ -332,6 +336,7 @@
this.wxUserAuthInfo = uni.getStorageSync('wxUserAuthInfo')
this.erpUserInfo = uni.getStorageSync('erpUserInfo')
this.getData()
encodeURIComponent
},
onReachBottom() {
......@@ -339,8 +344,8 @@
onShareAppMessage() {
return {
title: `${this.erpUserInfo.AccountName}邀请你加入亲友团`,
path:`/pages/FriendsAndRelatives/addFriendsAndRelatives??unionid=${this.wxUserAuthInfo.unionid}&AccountName=${this.erpUserInfo.AccountName}`,
query: ``,
path:`/pages/FriendsAndRelatives/addFriendsAndRelatives`,
query:`unionId=${this.wxUserAuthInfo.unionid}&AccountName=${this.erpUserInfo.AccountName}`,
imageUrl: "https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1664163809000_838.png",
};
},
......
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