微信小程序积分商城接入兑吧
用户获取积分后,可进入积分通兑商城消耗用户企业积分进行兑换;提高用户满意度及用户黏性。
积分商城说明
1、兑吧的积分商城为HTML5页面,需要通过小程序的
<web-view/>
组件来加载。
2、每个页面只能有一个,会自动铺满整个页面,并覆盖其他组件。
使用示例:
<template lang="pug">
web-view(:src='mallurl')
</template>
3、使用
src
表示webview
指向网页的链接。可打开关联的公众号的文章,其它网页需登录小程序管理后台配置业务域名。
4、接入兑吧h5网页,需要到兑吧后台配置免登录
url
兑吧后台地址:http://hd.dlp.duiba.com.cn/login#!/login/signIn
通过接口请求获取兑吧免登录URL地址:
<script>
export default {
data() {
return {
mallurl: '' // 商城url
}
},
onShow() {
this.getAutoLoginUrl()
},
methods: {
async getAutoLoginUrl() {
let re = await this.$api.resolve('getAutoLoginUrl')
this.mallurl = re
}
}
}
</script>
**
必须对接技术对接点
**
1. 免登录接口
生成跳转到兑吧页面的免登录url
接口文档:https://www.duiba.com.cn/tech_doc_book/server/servers/general_autologin_url_2.html
2. 扣积分接口
用与用户产生抽奖或者兑换行为,告知开发者给用户扣除的积分数
接口文档:https://www.duiba.com.cn/tech_doc_book/server/servers/consume_credits_api_2.html
3. 兑换结果通知接口
用于同步开发者该笔订单最终的状态
接口文档:https://www.duiba.com.cn/tech_doc_book/server/servers/notify_api_2.html
**
常用选择技术对接接口
**
1. 加积分接口
用于活动中,返还用户积分的情况
http://docs.duiba.com.cn/tech_doc_book/server/add_credits_api.html
2. 虚拟商品充值接口
虚拟商品是指开发者自身系统发放:虚拟卡券积分奖励,电子券等。商品是有开发者自己接口或者平台给用户发放。
http://docs.duiba.com.cn/tech_doc_book/optional/virtual.html
3. 其余接口根据自己的需求选择对接
完整api:http://docs.duiba.com.cn/tech_doc_book/
参考:
官方文档:https://www.duiba.com.cn/tech_doc_book/appendix/way_weixin.html