Authored by 李奇

Merge branch 'feature/detail-store-qrcode' into 'master'

Feature/detail store qrcode



See merge request !9
... ... @@ -93,7 +93,7 @@ class App extends Component {
color: '#bbb',
selectedColor: '#08304B',
backgroundColor: '#fff',
borderStyle: '#eee',
borderStyle: 'black',
list: [{
pagePath: 'pages/index/index',
text: '首页',
... ...
... ... @@ -188,6 +188,11 @@ Page({
goProtocol: function () {
let url = `http://m.yohobuy.com/activity/student/detail/renzhen?openby:yohobuy={\"action\":\"go.h5\",\"params\":{\"url\":\"https://activity.yoho.cn/feature/3189.html?title=买家协议\"}}`;
if (this.data.isStore) {
url = `http://m.yohobuy.com/activity/student/detail/renzhen?openby:yohobuy={\"action\":\"go.h5\",\"params\":{\"url\":\"https://activity.yoho.cn/feature/4281.html?title=买家协议\"}}`;
}
router.goUrl(url);
},
})
... ...
... ... @@ -122,12 +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) {
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 => {
});
... ...