pifa
fanfan 4 months ago
parent 009436f340
commit 050ef466d4
  1. 20
      pages/goods/detail.vue
  2. 105
      pages/goods/seckillDetail.vue

@ -828,6 +828,7 @@
}, },
// //
toJDdetal() { toJDdetal() {
if (this.goods.jd_short_url) {
wx.navigateToMiniProgram({ wx.navigateToMiniProgram({
appId: 'wx91d27dbf599dff74', //app.json appId: 'wx91d27dbf599dff74', //app.json
path: 'pages/union/proxy/proxy?spreadUrl=' + encodeURIComponent(this.goods.jd_short_url), path: 'pages/union/proxy/proxy?spreadUrl=' + encodeURIComponent(this.goods.jd_short_url),
@ -841,6 +842,25 @@
console.log("打开成功") console.log("打开成功")
} }
}) })
// #ifndef MP-WEIXIN
window.location.href = this.goods.link;
// #endif
} else {
// #ifdef MP-WEIXIN
wx.navigateToMiniProgram({
appId: 'wx91d27dbf599dff74',
path: '/pages/item/detail/detail?sku=' + this.goods_sku_no,
envVersion: 'release',
success(res) {
//
console.log(res);
}
})
// #endif
// #ifndef MP-WEIXIN
window.location.href = this.goods.link;
// #endif
}
}, },
// //
openPirce(type) { openPirce(type) {

@ -499,7 +499,7 @@
city: '南京市', city: '南京市',
district: '玄武区' district: '玄武区'
}, },
setting:{} setting: {}
} }
}, },
computed: { computed: {
@ -540,34 +540,34 @@
}, },
methods: { methods: {
// 线 // 线
handleContact() { handleContact() {
// //
const setting = this.setting const setting = this.setting
// //
if (setting.provider == 'wxqykf') { if (setting.provider == 'wxqykf') {
if (!setting.config.wxqykf.url || !setting.config.wxqykf.corpId) { if (!setting.config.wxqykf.url || !setting.config.wxqykf.corpId) {
this.$toast('客服链接和企业ID不能为空') this.$toast('客服链接和企业ID不能为空')
return return
} }
// #ifdef H5 // #ifdef H5
window.open(setting.config.wxqykf.url) window.open(setting.config.wxqykf.url)
// #endif // #endif
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN
wx.openCustomerServiceChat({ wx.openCustomerServiceChat({
extInfo: { extInfo: {
url: setting.config.wxqykf.url url: setting.config.wxqykf.url
}, },
corpId: setting.config.wxqykf.corpId, corpId: setting.config.wxqykf.corpId,
success(res) {}, success(res) {},
fail(res){ fail(res) {
console.log(res,'企业微信') console.log(res, '企业微信')
}
})
// #endif
}else{
this.$toast('暂不支持企业微信客服')
} }
}, })
// #endif
} else {
this.$toast('暂不支持企业微信客服')
}
},
onLook(isLink, url) { onLook(isLink, url) {
if (isLink) { if (isLink) {
uni.navigateTo({ uni.navigateTo({
@ -734,19 +734,39 @@
}, },
// //
toJDdetal() { toJDdetal() {
wx.navigateToMiniProgram({ if (this.goods.jd_short_url) {
appId: 'wx91d27dbf599dff74', //app.json wx.navigateToMiniProgram({
path: 'pages/union/proxy/proxy?spreadUrl=' + encodeURIComponent(this.goods.jd_short_url), appId: 'wx91d27dbf599dff74', //app.json
extraData: { path: 'pages/union/proxy/proxy?spreadUrl=' + encodeURIComponent(this.goods.jd_short_url),
foo: 'bar' extraData: {
}, foo: 'bar'
envVersion: 'release', },
success(res) { envVersion: 'release',
// success(res) {
console.log(res); //
console.log("打开成功") console.log(res);
} console.log("打开成功")
}) }
})
// #ifndef MP-WEIXIN
window.location.href = this.goods.link;
// #endif
} else {
// #ifdef MP-WEIXIN
wx.navigateToMiniProgram({
appId: 'wx91d27dbf599dff74',
path: '/pages/item/detail/detail?sku=' + this.goods_sku_no,
envVersion: 'release',
success(res) {
//
console.log(res);
}
})
// #endif
// #ifndef MP-WEIXIN
window.location.href = this.goods.link;
// #endif
}
}, },
// //
openPirce(type) { openPirce(type) {
@ -984,7 +1004,8 @@
that.goods_sku_no = "" that.goods_sku_no = ""
if (info.skuList && info.skuList.length > 0) { if (info.skuList && info.skuList.length > 0) {
if (info.goods_id) { if (info.goods_id) {
that.goods_sku_no = info.skuList.filter(item => item.goods_id === info.goods_id)[0].goods_sku_no; that.goods_sku_no = info.skuList.filter(item => item.goods_id === info
.goods_id)[0].goods_sku_no;
} }
// that.goods_sku_no = info.skuList[0].goods_sku_no // that.goods_sku_no = info.skuList[0].goods_sku_no
} }

Loading…
Cancel
Save