Authored by 李奇

商品详情页支持线下店skup、storeId小程序码

... ... @@ -93,7 +93,7 @@ class App extends Component {
color: '#bbb',
selectedColor: '#08304B',
backgroundColor: '#fff',
borderStyle: '#eee',
borderStyle: 'black',
list: [{
pagePath: 'pages/index/index',
text: '首页',
... ...
... ... @@ -122,11 +122,20 @@ export default class ProductDetail extends Component {
} else {
if (options && options.scene) {
console.log(options.scene);
// let code = '073c8bb068f4fc9d8dc573b5d4284e3f';
let code = options.scene;
getQRCodeSource(code).then(json => {
if (json) {
this.loadElement(json);
console.log(json)
if (json.skup) {
wx.hideShareMenu();
this.setState({
skup: json.skup,
storeId: json.storeId
});
this.loadStoreProductInfo(json.skup, json.storeId);
} else {
this.loadElement(json);
}
}
})
.catch(error => {
... ...