|
|
@ -401,7 +401,7 @@ |
|
|
|
|
|
|
|
}, |
|
|
|
methods: { |
|
|
|
onKeyInput() { |
|
|
|
onKeyInput(event) { |
|
|
|
this.transferInfo.remarks = event.target.value |
|
|
|
}, |
|
|
|
shareGift() { |
|
|
@ -467,7 +467,9 @@ |
|
|
|
this.getcount() |
|
|
|
}, |
|
|
|
jia(item) { |
|
|
|
item.count = Number(item.count) + 1 |
|
|
|
if (item.count < item.goodsNumber) |
|
|
|
item.count = Number(item.count) + 1 |
|
|
|
|
|
|
|
this.getcount() |
|
|
|
this.addGoods(item) |
|
|
|
}, |
|
|
@ -509,14 +511,14 @@ |
|
|
|
}, |
|
|
|
|
|
|
|
gotoShopp() { |
|
|
|
// uni.switchTab({ |
|
|
|
// url: '/pages/home/cloudCard2', |
|
|
|
// }) |
|
|
|
|
|
|
|
uni.navigateTo({ |
|
|
|
url: '/pages/bind/bind_cloudCard' |
|
|
|
uni.switchTab({ |
|
|
|
url: '/pages/home/cloudCard2', |
|
|
|
}) |
|
|
|
|
|
|
|
// uni.navigateTo({ |
|
|
|
// url: '/pages/bind/bind_cloudCard' |
|
|
|
// }) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
transfer() { |
|
|
@ -558,115 +560,72 @@ |
|
|
|
this.showModal3 = false |
|
|
|
}, |
|
|
|
onShareAppMessage: function(res) { |
|
|
|
wx.showLoading({ |
|
|
|
title: '加载中', |
|
|
|
icon: 'loading', |
|
|
|
duration: 10000 |
|
|
|
}); |
|
|
|
|
|
|
|
let _this = this |
|
|
|
const promise = new Promise(resolve => { |
|
|
|
// 模拟网络请求 |
|
|
|
setTimeout(() => { |
|
|
|
|
|
|
|
var list = [] |
|
|
|
for (var i = 0; i < this.pickingUpGoods.length; i++) { |
|
|
|
var item = this.pickingUpGoods[i] |
|
|
|
|
|
|
|
if (item.count > 0) { |
|
|
|
list.push({ |
|
|
|
goodsSid: item.goodsSid, |
|
|
|
select: item.count |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
var params = { |
|
|
|
customerSid: getApp().globalData.sid, |
|
|
|
brandId: _this.brandType, |
|
|
|
remarks: _this.transferInfo.remarks, |
|
|
|
vos: list |
|
|
|
} |
|
|
|
|
|
|
|
console.log("=========0", params); |
|
|
|
|
|
|
|
_this.$api.transSubmission(params).then((resp) => { |
|
|
|
|
|
|
|
console.log("=========", resp); |
|
|
|
_this.showModal3 = false |
|
|
|
|
|
|
|
let shareData = JSON.stringify({ |
|
|
|
params: { |
|
|
|
code: resp.transferCode, |
|
|
|
codeKey: resp.sid |
|
|
|
}, |
|
|
|
functionName: 'bindCard', |
|
|
|
url: '/pages/bind/bind_cloudCard?code=' + resp |
|
|
|
.transferCode + "&codeKey=" + resp.sid |
|
|
|
|
|
|
|
// url: '/pages/home/cloudCard2?shareSid=' + getApp().globalData.sid, |
|
|
|
// functionName: 'share' |
|
|
|
}) |
|
|
|
// 转码传输 |
|
|
|
let value = encodeURIComponent(shareData) |
|
|
|
|
|
|
|
var list = [] |
|
|
|
for (var i = 0; i < this.pickingUpGoods.length; i++) { |
|
|
|
var item = this.pickingUpGoods[i] |
|
|
|
|
|
|
|
if (item.count > 0) { |
|
|
|
list.push({ |
|
|
|
goodsSid: item.goodsSid, |
|
|
|
select: item.count |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
var params = { |
|
|
|
customerSid: getApp().globalData.sid, |
|
|
|
brandId: this.brandType, |
|
|
|
vos: list |
|
|
|
} |
|
|
|
|
|
|
|
console.log("=========0", params); |
|
|
|
|
|
|
|
_this.$api.transSubmission(params).then((resp) => { |
|
|
|
|
|
|
|
console.log("=========", resp); |
|
|
|
|
|
|
|
const promise = new Promise(resolve => { |
|
|
|
// 模拟网络请求 |
|
|
|
setTimeout(() => { |
|
|
|
wx.hideLoading() |
|
|
|
this.showModal3 = false |
|
|
|
resolve({ |
|
|
|
title: '标题', |
|
|
|
path: '页面' |
|
|
|
title: '汇融惠享-云菜窖', |
|
|
|
// ② |
|
|
|
path: '/pages/login/login?data=' + value, |
|
|
|
imageUrl: 'https://supervise.yxtsoft.com/lpk/image/shareAffeection.png', //自定义图片路径,显示图片长宽比是 5:4。 |
|
|
|
|
|
|
|
}) |
|
|
|
}, 3000) |
|
|
|
}) |
|
|
|
|
|
|
|
return { |
|
|
|
promise |
|
|
|
} |
|
|
|
}).catch(e => { |
|
|
|
_this.shortToast('发生错误,请稍后再试.') |
|
|
|
return |
|
|
|
}) |
|
|
|
|
|
|
|
}).catch(e => { |
|
|
|
this.shortToast('发生错误,请稍后再试.') |
|
|
|
return |
|
|
|
}, 0) |
|
|
|
}) |
|
|
|
|
|
|
|
// this.shareCard() |
|
|
|
// wx.showLoading({ |
|
|
|
// title: '加载中', |
|
|
|
// icon: 'loading', |
|
|
|
// duration: 10000 |
|
|
|
// }); |
|
|
|
// const promise = new Promise(resolve => { |
|
|
|
// // 模拟网络请求 |
|
|
|
// setTimeout(() => { |
|
|
|
// wx.hideLoading() |
|
|
|
// this.showModal3 = false |
|
|
|
// resolve({ |
|
|
|
// title: '标题', |
|
|
|
// path: '页面' |
|
|
|
// }) |
|
|
|
// }, 3000) |
|
|
|
// }) |
|
|
|
return promise |
|
|
|
|
|
|
|
// return { |
|
|
|
// promise |
|
|
|
// } |
|
|
|
|
|
|
|
// console.log("res", res) |
|
|
|
// console.log("data", res.target.dataset) |
|
|
|
// var data = res.target.dataset.info |
|
|
|
|
|
|
|
// // ① |
|
|
|
// let shareData = JSON.stringify({ |
|
|
|
// params: { |
|
|
|
// code: data.code, |
|
|
|
// codeKey: data.codeKey, |
|
|
|
// customerSid: '' |
|
|
|
// }, |
|
|
|
// functionName: 'bindCard', |
|
|
|
// url: '/pages/detail/detail_affeection?sid=' + data.sid |
|
|
|
|
|
|
|
// // url: '/pages/home/cloudCard2?shareSid=' + getApp().globalData.sid, |
|
|
|
// // functionName: 'share' |
|
|
|
// }) |
|
|
|
// // 转码传输 |
|
|
|
// let value = encodeURIComponent(shareData) |
|
|
|
|
|
|
|
// return { |
|
|
|
// title: '汇融惠享-云菜窖', |
|
|
|
// // ② |
|
|
|
// path: '/pages/login/login?data=' + value, |
|
|
|
// imageUrl: 'https://supervise.yxtsoft.com/lpk/image/shareAffeection.png', //自定义图片路径,显示图片长宽比是 5:4。 |
|
|
|
// success: function(res) { |
|
|
|
// console.log('aaaa', "分享成功") |
|
|
|
// }, |
|
|
|
// fail: function(res) { |
|
|
|
// // 转发失败 |
|
|
|
// console.log('aaaa', "用户点击了取消") |
|
|
|
// } |
|
|
|
// } |
|
|
|
}, |
|
|
|
|
|
|
|
shareCard() { |
|
|
|