diff --git a/README.md b/README.md new file mode 100644 index 0000000..5acddca --- /dev/null +++ b/README.md @@ -0,0 +1,22 @@ +# 美团饿了吗CPS红包,别人领红包下单,你拿佣金 + +### 使用方法 + +源码为uniapp项目,需使用hbuilder打包,可编译成h5或小程序(跳转地址需改为小程序路径) + +### 常见问题 +1. 如何获取美团饿了吗的推广链接 + +美团联盟:https://union.meituan.com/ + +饿了么、双十一:https://pub.alimama.com/ + +​ 2.如何打包成小程序 + +编译成小程序的话,需要把coupons里的跳转地址改成小程序的,点击立即领取也要改成跳转小程序 + +比如跳转美团小程序: + +``` +/index/pages/h5/h5?weburl=https%3A%2F%2Frunion.meituan.com%2Furl%3Fkey%3Dcd23768d09c339d1641b2738df39aa67%26url%3Dhttps%253A%252F%252Fi.meituan.com%252Fawp%252Fhfe%252Fblock%252Fa13b87919a9ace9cfab4%252F89400%252Findex.html%253Fappkey%253Dcd23768d09c339d1641b2738df39aa67%253Ajuhe%26sid%3Djuhe&lch=cps:waimai:5:cd23768d09c339d1641b2738df39aa67:juhe&f_token=1&f_userId=1 +``` \ No newline at end of file diff --git a/pages/index/index.vue b/pages/index/index.vue index 0baadda..e6ab045 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -28,23 +28,33 @@ export default { tabs: [ { icon: '/static/all.png', - text: '全部' + text: '全部', + tabId: 0, }, { icon: '/static/ele.png', - text: '饿了么' + text: '饿了么', + tabId: 1, }, { icon: '/static/meituan.png', - text: '美团' + text: '美团', + tabId: 2, + }, + { + icon: '/static/11.png', + text: '双十一', + tabId: 5, }, { icon: '/static/jd.png', - text: '京东' + text: '京东', + tabId: 3, }, { icon: '/static/vip.png', - text: 'VIP会员' + text: 'VIP会员', + tabId: 4, } ], couponList: [], @@ -89,13 +99,25 @@ export default { type: 1, tabId: 1 }, + { + name: '抽红包立减', + icon: '/static/11.png', + bannerPic: '/static/coupon/11.jpg', + url:'https://s.click.taobao.com/Gcs9vuu', + type: 2, + tabId: 5 + }, ] }; }, onLoad() { let tabId = this.$route.query.tabId ? parseInt(this.$route.query.tabId) : 0 - this.current = tabId - this.changeTab(tabId) + for(let i in this.tabs){ + if(tabId == this.tabs[i].tabId){ + this.current = parseInt(i) + } + } + this.changeTab(this.current) }, methods: { changeTab(index) { @@ -108,7 +130,7 @@ export default { this.couponList = this.coupons }else{ for(let i in this.coupons){ - if(this.coupons[i].tabId == index){ + if(this.coupons[i].tabId == this.tabs[index].tabId){ this.couponList.push(this.coupons[i]) } } diff --git a/static/11.png b/static/11.png new file mode 100644 index 0000000..16456a3 Binary files /dev/null and b/static/11.png differ diff --git a/static/coupon/11.jpg b/static/coupon/11.jpg new file mode 100644 index 0000000..bd15cb4 Binary files /dev/null and b/static/coupon/11.jpg differ diff --git a/static/coupon/elem_guosu.png b/static/coupon/ele_guosu.png similarity index 100% rename from static/coupon/elem_guosu.png rename to static/coupon/ele_guosu.png