Showing
2 changed files
with
17 additions
and
6 deletions
@@ -30,7 +30,7 @@ | @@ -30,7 +30,7 @@ | ||
30 | "list": [] | 30 | "list": [] |
31 | }, | 31 | }, |
32 | "miniprogram": { | 32 | "miniprogram": { |
33 | - "current": 12, | 33 | + "current": 13, |
34 | "list": [ | 34 | "list": [ |
35 | { | 35 | { |
36 | "id": -1, | 36 | "id": -1, |
@@ -110,6 +110,13 @@ | @@ -110,6 +110,13 @@ | ||
110 | "pathName": "pages/productDetail/index", | 110 | "pathName": "pages/productDetail/index", |
111 | "query": "q=https%3A%2F%2Fo.yohobuy.com%2Fufo%3Fp%3D6096%2C70%26skup%3D6096", | 111 | "query": "q=https%3A%2F%2Fo.yohobuy.com%2Fufo%3Fp%3D6096%2C70%26skup%3D6096", |
112 | "scene": "1011" | 112 | "scene": "1011" |
113 | + }, | ||
114 | + { | ||
115 | + "id": 13, | ||
116 | + "name": "商品详情线下店", | ||
117 | + "pathName": "pages/productDetail/index", | ||
118 | + "query": "q=https%3A%2F%2Fo.yohobuy.com%2Fufo%3Fp%3D6096%2C70%26productId%3D10001099", | ||
119 | + "scene": "1011" | ||
113 | } | 120 | } |
114 | ] | 121 | ] |
115 | } | 122 | } |
@@ -103,11 +103,15 @@ export default class ProductDetail extends Component { | @@ -103,11 +103,15 @@ export default class ProductDetail extends Component { | ||
103 | const p = queryObj.p; | 103 | const p = queryObj.p; |
104 | const storeArr = p.split(',') || []; | 104 | const storeArr = p.split(',') || []; |
105 | const storeId = storeArr[1]; | 105 | const storeId = storeArr[1]; |
106 | - this.setState({ | ||
107 | - skup: queryObj.skup, | ||
108 | - storeId | ||
109 | - }) | ||
110 | - this.loadStoreProductInfo(queryObj.skup, storeId); | 106 | + if (queryObj.skup) { |
107 | + this.setState({ | ||
108 | + skup: queryObj.skup, | ||
109 | + storeId | ||
110 | + }) | ||
111 | + this.loadStoreProductInfo(queryObj.skup, storeId); | ||
112 | + } else { | ||
113 | + this.loadElement({id: queryObj.productId || queryObj.skn}); | ||
114 | + } | ||
111 | } | 115 | } |
112 | } else { | 116 | } else { |
113 | if (options && options.scene) { | 117 | if (options && options.scene) { |
-
Please register or login to post a comment