Commit 055ffba5333ac36686c99aa5c0617fdee36af41c
1 parent
8fb5b883
商品详情页跳转
Showing
1 changed file
with
13 additions
and
2 deletions
src/pages/goodDetails/goodDetails.vue
| @@ -170,8 +170,19 @@ export default { | @@ -170,8 +170,19 @@ export default { | ||
| 170 | * @param {Object} item [数据对象] | 170 | * @param {Object} item [数据对象] |
| 171 | */ | 171 | */ |
| 172 | toDetail (item) { | 172 | toDetail (item) { |
| 173 | - let url = this.mode == "prod" ? "https://managemall.cnlive.com/html/select_good/1/#/" : "https://wjjshop.cnlive.com/html/select_good/1/#/" | ||
| 174 | - window.open = url + "goodDetails?goodsId=" + item.id + "&uid" + this.getStore("uid"); | 173 | + // 跳转封装 |
| 174 | + if (typeof this.$parent.gotoDetail === 'function') { | ||
| 175 | + | ||
| 176 | + // 设置跳转参数 | ||
| 177 | + let params = { | ||
| 178 | + type: '5', | ||
| 179 | + to: window.location.origin + '/html/select_good/1/#/goodDetails?goodsId' + item.id + "&uid" + this.getStore("uid"), | ||
| 180 | + shop_type: '' | ||
| 181 | + }; | ||
| 182 | + | ||
| 183 | + // 页面跳转 | ||
| 184 | + this.$parent.gotoDetail(params); | ||
| 185 | + } | ||
| 175 | }, | 186 | }, |
| 176 | // 兑换 | 187 | // 兑换 |
| 177 | exchange () { | 188 | exchange () { |