600字范文,内容丰富有趣,生活中的好帮手!
600字范文 > 美团饿了么外卖红包cps赚钱小程序源码

美团饿了么外卖红包cps赚钱小程序源码

时间:2020-04-20 19:50:46

相关推荐

美团饿了么外卖红包cps赚钱小程序源码

美团/饿了么外卖CPS联盟返利公众号小程序裂变核心源码

什么是CPS?简单点讲就是你帮助商家销售产品,商家给你结算一定的佣金。

如何快速开发一个外卖CPS类型的小程序呢?当然是站在巨人的肩膀上会更快!你只需要会git使用,简单的小程序开发工具使用就可以快速搭建一个属于你自己的小程序。本文将教你如何快速搭建一个外卖CPS平台。

源代码地址

步骤

下载以上源代码到本地

修改为你自己的微信小程序,打开 /dist/pages/ele/index.js

微信小程序->开发管理->开发设置 添加 request的域名: 地址:

https://mp./wxamp/devprofile/get_profile?token=271531762&lang=zh_CN

小程序管理后台配置你的链接

后台地址:

进去之后选择小程序管理->无裂变小程序管理->添加小程序->填入你自己的链接

微信开发者工具,导入项目,提交审核

成品展示

代码

#!/usr/bin/env node(function() {var fs = require('fs');var he = require('../he.js');var strings = process.argv.splice(2);var stdin = process.stdin;var data;var timeout;var action;var options = {};var log = console.log;var main = function() {var option = strings[0];var count = 0;if (/^(?:-h|--help|undefined)$/.test(option)) {log('he v%s - https://mths.be/he',he.version);log(['\nUsage:\n','\the [--escape] string','\the [--encode] [--use-named-refs] [--everything] [--allow-unsafe] [--decimal] string','\the [--decode] [--attribute] [--strict] string','\the [-v | --version]','\the [-h | --help]','\nExamples:\n','\the --escape \\<img\\ src\\=\\\'x\\\'\\ onerror\\=\\"prompt\\(1\\)\\"\\>','\techo \'&copy; &#x1D306;\' | he --decode'].join('\n'));return process.exit(option ? 0 : 1);}if (/^(?:-v|--version)$/.test(option)) {log('v%s', he.version);return process.exit(0);}strings.forEach(function(string) {// Process optionsif (string == '--escape') {action = 'escape';return;}if (string == '--encode') {action = 'encode';return;}if (string == '--use-named-refs') {action = 'encode';options.useNamedReferences = true;return;}if (string == '--everything') {action = 'encode';options.encodeEverything = true;return;}if (string == '--allow-unsafe') {action = 'encode';options.allowUnsafeSymbols = true;return;}if (string == '--decimal') {action = 'encode';options.decimal = true;return;}if (string == '--decode') {action = 'decode';return;}if (string == '--attribute') {action = 'decode';options.isAttributeValue = true;return;}if (string == '--strict') {action = 'decode';options.strict = true;return;}// Process string(s)var result;if (!action) {log('Error: he requires at least one option and a string argument.');log('Try `he --help` for more information.');return process.exit(1);}try {result = he[action](string, options);log(result);count++;} catch(error) {log(error.message + '\n');log('Error: failed to %s.', action);log('If you think this is a bug in he, please report it:');log('/mathiasbynens/he/issues/new');log('\nStack trace using he@%s:\n',he.version);log(error.stack);return process.exit(1);}});if (!count) {log('Error: he requires a string argument.');log('Try `he --help` for more information.');return process.exit(1);}// Return with exit status 0 outside of the `forEach` loop, in case// multiple strings were passed in.return process.exit(0);};if (stdin.isTTY) {// handle shell argumentsmain();} else {// Either the script is called from within a non-TTY context, or `stdin`// content is being piped in.if (!process.stdout.isTTY) {// The script was called from a non-TTY context. This is a rather uncommon// use case we don’t actively support. However, we don’t want the script// to wait forever in such cases, so…timeout = setTimeout(function() {// …if no piped data arrived after a whole minute, handle shell// arguments instead.main();}, 60000);}data = '';stdin.on('data', function(chunk) {clearTimeout(timeout);data += chunk;});stdin.on('end', function() {strings.push(data.trim());main();});stdin.resume();}}());

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。