外卖CPS红包小程序源码分享
外卖券外卖省省外卖探探美团饿了么外卖联盟优惠券小程序系统软件开发源码 美团/饿了么外卖CPS联盟返利公众号小程序裂变核心源码
今天和大家分享下外卖CPS项目,这个其实和做淘客有点类似,淘客是别人通过你的推广购物产生佣金,同理外卖CPS也就是别人通过你的推广点了外卖产生佣金,和做淘客一个原理
饿了么、美团优惠开发(外卖cps,三级裂变源码)
源码搭建
http://mtw.so/6wav8W
截图
步骤
- 下载以上源代码到本地
http://mtw.so/6wav8W
- 修改为你自己的微信小程序,打开 /dist/pages/ele/index.js
- 微信小程序->开发管理->开发设置 添加 request的域名: 地址:
https://mp.weixin.qq.com/wxamp/devprofile/get_profile?token=271531762&lang=zh_CN
- 小程序管理后台配置你的链接
后台地址: http://q.mybei.cn - 进去之后选择小程序管理->无裂变小程序管理->添加小程序->填入你自己的链接
- 微信开发者工具,导入项目,提交审核
没用的代码
package com.github.kr328.clash.service
import android.content.Context
import android.net.Uri
import com.github.kr328.clash.common.log.Log
import com.github.kr328.clash.core.Clash
import com.github.kr328.clash.service.data.Imported
import com.github.kr328.clash.service.data.ImportedDao
import com.github.kr328.clash.service.data.Pending
import com.github.kr328.clash.service.data.PendingDao
import com.github.kr328.clash.service.model.Profile
import com.github.kr328.clash.service.remote.IFetchObserver
import com.github.kr328.clash.service.store.ServiceStore
import com.github.kr328.clash.service.util.importedDir
import com.github.kr328.clash.service.util.pendingDir
import com.github.kr328.clash.service.util.processingDir
import com.github.kr328.clash.service.util.sendProfileChanged
import kotlinx.coroutines.NonCancellable
import kotlinx.coroutines.sync.Mutex
import kotlinx.coroutines.sync.withLock
import kotlinx.coroutines.withContext
import java.util.*
import java.util.concurrent.TimeUnit
object ProfileProcessor {
private val profileLock = Mutex()
private val processLock = Mutex()
suspend fun apply(context: Context, uuid: UUID, callback: IFetchObserver? = null) {
withContext(NonCancellable) {
processLock.withLock {
val snapshot = profileLock.withLock {
val pending = PendingDao().queryByUUID(uuid)
?: throw IllegalArgumentException("profile $uuid not found")
pending.enforceFieldValid()
context.processingDir.deleteRecursively()
context.processingDir.mkdirs()
context.pendingDir.resolve(pending.uuid.toString())
.copyRecursively(context.processingDir, overwrite = true)
pending
}
val force = snapshot.type != Profile.Type.File
var cb = callback
Clash.fetchAndValid(context.processingDir, snapshot.source, force) {
try {
cb?.updateStatus(it)
}