随身购物袋依托手淘端,通过扫一扫连接线上线下,是全渠道业务的重要组成。支持二维码、条形码、商品实物、log多种形式。为赋能商家,将随身购物袋扫码链路中的扫码承接页(扫码后呈现的“随身购物袋”页面)开放,让商家在消费者决策和消费链路上有更灵活自主的运营阵地,通过互动游戏、领取线上或线下权益、品牌故事、商品设计理念介绍、加入会员、等各种内容或者权益,来提高顾客转化。

<script src="https://g.alicdn.com/taefed/smg-open-module/0.0.7/smgModule.js"></script>
var smgModule = new SmgModule({
el: document.body
onStoreChange: function ( error, data ) {}
});
类型:HTMLElement
默认值:document.body
作用:提供一个在页面上已存在的DOM元素作为商品展示组件的挂载目标。
类型:Function
默认值:空函数
作用:切换门店时执行的回调函数
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>随身购物袋</title>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-touch-fullscreen" content="yes">
<meta name="format-detection" content="telephone=no, email=no">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
</head>
<body>
<div class="smg-module-view">
</div>
<script src="https://g.alicdn.com/taefed/smg-open-module/0.0.7/smgModule.js"></script>
<script>
var smgModule = new SmgModule({
el: document.querySelector('.smg-module-view'),
onStoreChange: function ( error, data ) {
console.log(error) //异常信息,无异常为null
console.log(data) //门店信息
}
});
</script>
</body>
</html>
1、页面务必在手淘环境中加载。
2、引入官方组件的页面url务必传入itemId(主商品id)和sellerId(店铺id)参数。