当前位置:   article > 正文

美团/饿了么外卖cps红包返利裂变分销小程序源码(附0基础搭建教程)_美团代付源码小程序

美团代付源码小程序

美团/饿了么外卖小程序源码

只需注册阿里妈妈/美团联盟,就可以轻松获取推广佣金。
小程序目前有两个版本,分为静态版和Dcloud云开发版,云开发板可以在Dcloud后台管理中直接修改推广链接和推广项目。
也可以生成H5。

外卖红包小程序 美团外卖小程序 饿了么外卖小程序 美团饿了吗红包,先领红包再下单。外卖红包,cps分成,别人领红包下单,你拿佣金。

外卖cps带分销返利源码

源代码地址

http://www.mybei.cn

成品展示

在这里插入图片描述

截图

在这里插入图片描述

import React, { useCallback, useEffect, useState } from "react";
import "@tarojs/taro/html.css";
// import '~taro-parse/dist/style/main.scss'
import {
  View,
  Button,
  Swiper,
  SwiperItem,
  Image,
  ScrollView,
  Text,
  RichText
} from "@tarojs/components";
import Taro, {
  useShareAppMessage,
  useReady,
  request,
  useDidShow,
  usePullDownRefresh,
  useRouter,
  useReachBottom
} from "@tarojs/taro";
import "./index.scss";
import classes from "./index.module.scss";

// import classes from "./index.module.scss";
// import classnames from "classnames";

// const id = useRouter().params.id;
//
// const contents = useRouter().params.content;
function Index() {
  const [title, setTitle] = useState("");
  const [contentHtml, setContentHtml] = useState('');

  useReady(() => {
    requestList();
  });

  const escape2Html = str => {
    var arrEntities = { lt: "<", gt: ">", nbsp: " ", amp: "&", quot: '"' };
    return str
      .replace(/&(lt|gt|nbsp|amp|quot);/gi, function(all, t) {
        return arrEntities[t];
      })
      .replace(/<section/g, "<div")
      .replace(/<img/gi, '<img style="max-width:100%;height:auto" ')
      .replace(/<u>/g, "")
      .replace(/<u style="">/g, "")
      .replace(/<\/u>/g, "");
  };

  const requestList = () => {
    Taro.showLoading({
      title: "加载中"
    });

    setTimeout(function() {
      Taro.hideLoading();
    }, 5000);
    Taro.request({
      url:
        "https://xcf.haozii.com/wp-json/wp/v2/posts/" +
        Taro.getStorageSync("id"),
      data: {},
      success: function(res) {
        Taro.hideLoading();
        setTitle(res.data.title.rendered);
        setContentHtml(res.data.content.rendered);
      },
      fail: function() {
        Taro.hideLoading();
      }
    });
  };

  useShareAppMessage(() => ({}));
  useDidShow(() => {});
  return (
    <View className="page">
      <View className="title">{title}</View>
      <View dangerouslySetInnerHTML={{ __html: contentHtml }} className="content"></View>
    </View>
  );
}
export default Index;

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/菜鸟追梦旅行/article/detail/231766
推荐阅读
相关标签
  

闽ICP备14008679号