添加点击调用接口

This commit is contained in:
luyuan 2020-09-01 17:33:11 +08:00
parent 69c56b4772
commit e54282b839
Signed by: theluyuan
GPG Key ID: A7972FD973317FF3

View File

@ -552,6 +552,23 @@ export default {
},
xuanzhong(i){
let that = this
const token = uni.getStorageSync('token');
if(this.$store.state.hasLogin){
uni.request({
url:"https://mall.dmygkeji.com/api/Specialci/viewingOPproducts",
data:{
good_id:that.list[i].goods_id,
exple_id:that.info.user_id
},
method:"POST",
header:{
"Authorization" : 'Bearer' + " " + token
},
success(a){
console.log(a)
}
})
}
uni.navigateTo({
url: `/pageB/sdetails/index?id=${that.list[i].goods_id}&type=1`
});