|
@@ -57,9 +57,20 @@ Page({
|
|
|
console.log(addUserRelationOption);
|
|
|
addUserRelation(addUserRelationOption).then((res) => {
|
|
|
console.log(res);
|
|
|
- wx.navigateTo({
|
|
|
- url: '/pages/chat/chat?toUid=' + this.data.uid + '&goodsId=' + this.data.id + '&pic=' + this.data.pic,
|
|
|
- })
|
|
|
+ let addUserRelationOptionParse = {
|
|
|
+ goodsId:$id,
|
|
|
+ owner:_this.uid,
|
|
|
+ target:wx.getStorageSync('uid'),
|
|
|
+ type:1
|
|
|
+ }
|
|
|
+ addUserRelation(addUserRelationOptionParse).then((res) => {
|
|
|
+ console.log(res);
|
|
|
+ wx.navigateTo({
|
|
|
+ url: '/pages/chat/chat?toUid=' + this.data.uid + '&goodsId=' + this.data.id + '&pic=' + this.data.pic,
|
|
|
+ })
|
|
|
+ }).catch((err) => {
|
|
|
+ console.log(err);
|
|
|
+ })
|
|
|
}).catch((err) => {
|
|
|
console.log(err);
|
|
|
})
|