新增双11

This commit is contained in:
letwind 2020-10-30 11:36:42 +08:00
parent 76a5da8aa4
commit 8b07d9cd63
5 changed files with 52 additions and 8 deletions

22
README.md Normal file
View File

@ -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
```

View File

@ -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])
}
}

BIN
static/11.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

BIN
static/coupon/11.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

View File

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB