外卖返利软件系统小程序公众号美团饿了么电影加油系统

外卖分销返佣分佣程序外卖cps小程序返利系统外卖项目优惠券返利

外卖cps带分销返利源码# 源代码地址

http://www.mybei.cn

部署搭建步骤

成品展示

截图

在这里插入图片描述

步骤

(wx.webpackJsonp = wx.webpackJsonp || []).push([ [ 10 ], {
129: function(e, t, n) {
e.exports = n.p + “component/loginDialog/index.wxml”;
},
357: function(e, t, n) {
“use strict”;
n(129);
},
358: function(e, t, n) {},
479: function(e, t, n) {
“use strict”;
n.r(t);
n(357);
var o, r, a, s = n(3), i = n.n(s), c = n(1), u = n.n©, p = n(7), l = n.n§, d = n(8), f = n(22), g = n.n(f), h = n(0), m = n.n(h), _ = n(2), b = n(5), y = n(13), v = n(6), w = (n(358),
function() {
function defineProperties(e, t) {
for (var n = 0; n < t.length; n++) {
var o = t[n];
o.enumerable = o.enumerable || !1, o.configurable = !0, “value” in o && (o.writable = !0),
Object.defineProperty(e, o.key, o);
}
}
return function(e, t, n) {
return t && defineProperties(e.prototype, t), n && defineProperties(e, n), e;
};
}());
function _asyncToGenerator(e) {
return function() {
var t = e.apply(this, arguments);
return new Promise(function(e, n) {
return function step(o, r) {
try {
var a = to, s = a.value;
} catch (e) {
return void n(e);
}
if (!a.done) return Promise.resolve(s).then(function(e) {
step(“next”, e);
}, function(e) {
step(“throw”, e);
});
e(s);
}(“next”);
});
};
}
function _classCallCheck(e, t) {
if (!(e instanceof t)) throw new TypeError(“Cannot call a class as a function”);
}
function possibleConstructorReturn(e, t) {
if (!e) throw new ReferenceError(“this hasn’t been initialised - super() hasn’t been called”);
return !t || “object” != typeof t && “function” != typeof t ? e : t;
}
var C = Object(d.connect)(function mapState(e) {
return {
user: e.user,
share: e.share
};
}, function mapDispatch(e) {
return {
onUpdateMp: function onUpdateMp(t) {
e(Object(y.g)(t));
},
onUpdateAgent: function onUpdateAgent(t) {
e(Object(y.a)(t));
},
onUpdateBlock: function onUpdateBlock(t) {
e(Object(y.c)(t));
},
onUpdateTrusted: function onUpdateTrusted(t) {
e(Object(y.i)(t));
},
onUpdateLoginStatus: function onUpdateLoginStatus(t) {
e(Object(y.f)(t));
}
};
})((a = r = function(e) {
function LoginDialog() {
var e, t, n, o, r = this;
classCallCheck(this, LoginDialog);
for (var a = arguments.length, s = Array(a), c = 0; c < a; c++) s[c] = arguments[c];
return t = n = possibleConstructorReturn(this, (e = LoginDialog.proto || Object.getPrototypeOf(LoginDialog)).call.apply(e, [ this ].concat(s))),
n.KaTeX parse error: Expected group after '_' at position 16: usedState = [ "_̲anonymousState__temp", "
KaTeX parse error: Expected group after '_' at position 15: anonymousState_̲_temp2", "_anonymousState__temp3", "
KaTeX parse error: Expected group after '_' at position 15: anonymousState_̲_temp4", "_anonymousState__temp5", "
KaTeX parse error: Expected group after '_' at position 15: anonymousState_̲_temp6", "timer…® {
for (;😉 switch (r.prev = r.next) {
case 0:
if (e) {
r.next = 2;
break;
}
return r.abrupt(“return”, !1);

                      case 2:
                        if (e.detail) {
                            r.next = 4;
                            break;
                        }
                        return r.abrupt("return", !1);

                      case 4:
                        if (e.detail.encryptedData) {
                            r.next = 6;
                            break;
                        }
                        return r.abrupt("return", !1);

                      case 6:
                        return n.setState({
                            _show: !1
                        }), n.props.onCloseLogin(), t = e.detail, o = t.encryptedData, a = t.iv, s = {
                            code: n.state.code,
                            encryptedData: o,
                            iv: a
                        }, (c = n.getScene()) && (s.scene = c), u = n.props.share, p = _.e.SHARE_AGENT_ID, 
                        (l = u.agentId || m.a.getStorageSync(p) || "") && (d = n.props.user, f = d.currentWeappMp, 
                        g = f.miniServiceType, 9 === f.mpType ? s.wmShareAgentId = l : 2 === g || 3 === g ? s.tgShareAgentId = l : 1 === g && (s.flShareAgentId = l)), 
                        n.props.isNeedCreateAgent && (s.isNeedCreateAgent = 1), m.a.showLoading({
                            title: "正在登录"
                        }), r.next = 20, b.m.saveXcxUserInfo(s);

                      case 20:
                        if (h = r.sent, 1 != (y = h.data).code && 2 != y.code) {
                            r.next = 28;
                            break;
                        }
                        return Object(v.m)(y), n.props.onUpdateLoginStatus(!0), r.next = 27, n.refreshUserInfo();

                      case 27:
                        return r.abrupt("return", !1);

                      case 28:
                        m.a.hideLoading(), y.msg = y.msg || "登录失败", m.a.showToast({
                            title: y.msg,
                            icon: "none"
                        });

                      case 31:
                      case "end":
                        return r.stop();
                    }
                }, _callee, r);
            })), function(e) {
                return o.apply(this, arguments);
            }), n.getUserProfile = _asyncToGenerator(i.a.mark(function _callee3() {
                return i.a.wrap(function _callee3$(e) {
                    for (;;) switch (e.prev = e.next) {
                      case 0:
                        n.setState({
                            _show: !1
                        }), n.props.onCloseLogin(), wx.getUserProfile({
                            lang: "zh_CN",
                            desc: "获取用户信息",
                            success: function() {
                                var e = _asyncToGenerator(i.a.mark(function _callee2(e) {
                                    var t, o, a, s, c, u, p, l, d, f = e.userInfo;
                                    return i.a.wrap(function _callee2$(e) {
                                        for (;;) switch (e.prev = e.next) {
                                          case 0:
                                            return e.next = 2, m.a.login();

                                          case 2:
                                            return t = e.sent, o = t.code, a = {
                                                code: o,
                                                encryptedData: JSON.stringify(f)
                                            }, (s = n.getScene()) && (a.scene = s), (c = n.props.share.agentId) && (a.shareAgentId = c, 
                                            u = n.props.user.currentWeappMp, p = u.miniServiceType, 9 === u.mpType ? a.wmShareAgentId = c : 2 === p || 3 === p ? a.tgShareAgentId = c : 1 === p && (a.flShareAgentId = c)), 
                                            n.props.isNeedCreateAgent && (a.isNeedCreateAgent = 1), m.a.showLoading({
                                                title: "正在登录"
                                            }), e.next = 13, b.m.saveXcxUserInfoNew(a);

                                          case 13:
                                            if (l = e.sent, 1 != (d = l.data).code && 2 != d.code) {
                                                e.next = 21;
                                                break;
                                            }
                                            return Object(v.m)(d), n.props.onUpdateLoginStatus(!0), e.next = 20, n.refreshUserInfo();

                                          case 20:
                                            return e.abrupt("return", !1);

                                          case 21:
                                            m.a.hideLoading(), d.msg = d.msg || "登录失败", m.a.showToast({
                                                title: d.msg,
                                                icon: "none"
                                            });

                                          case 24:
                                          case "end":
                                            return e.stop();
                                        }
                                    }, _callee2, r);
                                }));
                                return function success(t) {
                                    return e.apply(this, arguments);
                                };
                            }(),
                            fail: function fail(e) {
                                console.log(e);
                            }
                        });

                      case 3:
                      case "end":
                        return e.stop();
                    }
                }, _callee3, r);
            })), n.navigate = function() {
                var e = n.props.onSuccess;
                return e && g()(e) ? (n.props.onSuccess(), !1) : n.redirectUrl ? (m.a.reLaunch({
                    url: n.redirectUrl
                }), !1) : void m.a.reLaunch({
                    url: "/pages/main/home/index"
                });
            }, n.phoneInput = function(e) {
                n.setState({
                    phoneNum: e.detail.value
                });
            }, n.checkCodeInput = function(e) {
                n.setState({
                    checkCode: e.detail.value
                });
            }, n.getCheckCode = function() {
                if ("获取校验码" != n.state.timerText) return !1;
                var e = n.state.phoneNum;
                if (!(e = e.trim())) return m.a.showToast({
                    title: "请输入手机号码",
                    icon: "none"
                }), !1;
                if (!/^1\d{10}$/.test(e)) return m.a.showToast({
                    title: "请输入有效的手机号码",
                    icon: "none"
                }), !1;
                var t = {
                    phoneNum: e
                };
                b.a.getCheckCode(t).then(function(e) {
                    var t = e.data;
                    return 0 == t.code ? (m.a.showToast({
                        title: "发送成功",
                        icon: "none"
                    }), n.startTimer(), !1) : -1 == t.mpUserCode ? (Object(v.n)(), !1) : (t.msg = t.msg || "发送失败", 
                    void m.a.showToast({
                        title: t.msg,
                        icon: "none"
                    }));
                });
            }, n.startTimer = function() {
                var e = 180, t = setInterval(function() {
                    if (e) return n.setState({
                        timerText: e--
                    }), !1;
                    n.setState({
                        timerText: "获取校验码"
                    }), clearInterval(t), t = null;
                }, 1e3);
            }, n.submitBind = _asyncToGenerator(i.a.mark(function _callee4() {
                var e, t, o;
                return i.a.wrap(function _callee4$(r) {
                    for (;;) switch (r.prev = r.next) {
                      case 0:
                        if (e = (e = n.state.phoneNum).trim()) {
                            r.next = 5;
                            break;
                        }
                        return m.a.showToast({
                            title: "请输入手机号码",
                            icon: "none"
                        }), r.abrupt("return", !1);

                      case 5:
                        if (t = (t = n.state.checkCode).trim()) {
                            r.next = 10;
                            break;
                        }
                        return m.a.showToast({
                            title: "请输入验证码",
                            icon: "none"
                        }), r.abrupt("return", !1);

                      case 10:
                        o = {
                            phoneNum: e,
                            code: t
                        }, b.a.setPhone(o).then(function(e) {
                            var t = e.data;
                            return 0 == t.code ? (m.a.showToast({
                                title: "绑定成功",
                                icon: "none"
                            }), n.refreshUserInfo(), !1) : -1 == t.mpUserCode ? (Object(v.n)(), !1) : (t.msg = t.msg || "设置失败", 
                            void m.a.showToast({
                                title: t.msg,
                                icon: "none"
                            }));
                        });

                      case 12:
                      case "end":
                        return r.stop();
                    }
                }, _callee4, r);
            })), n.refreshUserInfo = _asyncToGenerator(i.a.mark(function _callee5() {
                var e, t, o, a, s, c, u, p, l, d;
                return i.a.wrap(function _callee5$(r) {
                    for (;;) switch (r.prev = r.next) {
                      case 0:
                        return r.next = 2, b.a.fetchForMine();

                      case 2:
                        if (0 != (e = r.sent).data.code) {
                            r.next = 24;
                            break;
                        }
                        if (-1 !== (t = e.data.agent).agentStatus) {
                            r.next = 9;
                            break;
                        }
                        return m.a.hideLoading(), m.a.showToast({
                            title: e.data.msg || "该账号状态异常,无法登录",
                            icon: "none"
                        }), r.abrupt("return", !1);

                      case 9:
                        return m.a.setStorageSync(_.e.AGENT_INFO, e.data), n.props.onUpdateAgent(t), r.next = 13, 
                        Object(v.k)(t);

                      case 13:
                        return o = r.sent, n.props.onUpdateTrusted(o), r.next = 17, Object(v.l)();

                      case 17:
                        return a = r.sent, n.props.onUpdateBlock(a), s = {
                            agentId: t.agentId
                        }, r.next = 22, b.c.getMpByAgent(s);

                      case 22:
                        0 == (c = r.sent).data.code && (u = _.e.MP_INFO, m.a.setStorageSync(u, c.data.mp), 
                        n.props.onUpdateMp(c.data.mp));

                      case 24:
                        return r.next = 26, b.c.getDefalutRatio();

                      case 26:
                        if (0 == (p = r.sent).data.code && (l = _.e.DEFAULT_RATIO, m.a.setStorageSync(l, p.data.ratio)), 
                        m.a.hideLoading(), !(d = Object(v.c)()).agentId && !d.unionId) {
                            r.next = 33;
                            break;
                        }
                        return n.navigate(), r.abrupt("return", !1);

                      case 33:
                        if (!Object(v.a)()) {
                            r.next = 37;
                            break;
                        }
                        return n.navigate(), r.abrupt("return", !1);

                      case 37:
                        n.setState({
                            bind: !0
                        });

                      case 38:
                      case "end":
                        return r.stop();
                    }
                }, _callee5, r);
            })), n.closeLogin = function() {
                n.props.onCloseLogin && n.props.onCloseLogin();
            }, n.closeBind = function() {
                n.props.onCloseBind && n.props.onCloseBind();
            }, n.customComponents = [], _possibleConstructorReturn(n, t);
        }
        return function _inherits(e, t) {
            if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t);
            e.prototype = Object.create(t && t.prototype, {
                constructor: {
                    value: e,
                    enumerable: !1,
                    writable: !0,
                    configurable: !0
                }
            }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);
        }(LoginDialog, e), w(LoginDialog, [ {
            key: "_constructor",
            value: function _constructor(e) {
                (function get(e, t, n) {
                    null === e && (e = Function.prototype);
                    var o = Object.getOwnPropertyDescriptor(e, t);
                    if (void 0 === o) {
                        var r = Object.getPrototypeOf(e);
                        return null === r ? void 0 : get(r, t, n);
                    }
                    if ("value" in o) return o.value;
                    var a = o.get;
                    return void 0 !== a ? a.call(n) : void 0;
                })(LoginDialog.prototype.__proto__ || Object.getPrototypeOf(LoginDialog.prototype), "_constructor", this).call(this, e), 
                this.state = {
                    code: "",
                    _show: !1,
                    bind: !1,
                    phoneNum: "",
                    checkCode: "",
                    timerText: "获取校验码"
                }, this.redirectUrl = "", this.$$refs = new m.a.RefsArray();
            }
        }, {
            key: "componentWillReceiveProps",
            value: function componentWillReceiveProps(e) {
                this.state.bind !== e.bind && e.bind && this.setState({
                    bind: !0
                }), this.state._show !== e.show && (this.setState({
                    _show: e.show
                }), e.show && this.getLoginCode()), this.redirectUrl !== e.redirectUrl && (this.redirectUrl = e.redirectUrl);
            }
        }, {
            key: "shouldComponentUpdate",
            value: function shouldComponentUpdate(e, t) {
                return this.props.show !== e.show || (this.props.isNeedCreateAgent !== e.isNeedCreateAgent || (this.state._show !== t._show || (this.state.bind !== t.bind || (this.redirectUrl !== e.redirectUrl || this.props.enableClose !== e.enableClose))));
            }
        }, {
            key: "_createData",
            value: function _createData() {
                var e, t, n, o, r, a;
                this.__state = arguments[0] || this.state || {}, this.__props = arguments[1] || this.props || {};
                this.$prefix;
                console.log("src/component/loginDialog/index.jsx/LoginDialog/render");
                var s = this.__props, i = s.enableClose, c = s.user, u = c.currentWeappMp, p = u.miniServiceType, d = u.mpType, f = this.__state, g = (f.bind, 
                f._show);
                f.phoneNum, f.checkCode, f.timerText;
                return 1 !== p && 9 !== d || (e = l()("at-float-layout", {
                    "at-float-layout--active": g
                }), t = l()("btn", "login", {
                    takeout: 9 === d
                }, {
                    taoker: 1 === p
                }), n = "WEAPP" === m.a.getEnv(), o = "WEAPP" === m.a.getEnv()), g && (r = "WEAPP" === m.a.getEnv(), 
                a = "WEAPP" === m.a.getEnv()), Object.assign(this.__state, {
                    _$anonymousState__temp: e,
                    _$anonymousState__temp2: t,
                    _$anonymousState__temp3: n,
                    _$anonymousState__temp4: o,
                    _$anonymousState__temp5: r,
                    _$anonymousState__temp6: a,
                    enableClose: i,
                    miniServiceType: p,
                    mpType: d
                }), this.__state;
            }
        } ]), LoginDialog;
    }(h.Component), r.$$events = [ "phoneInput", "getCheckCode", "checkCodeInput", "submitBind", "closeLogin", "getUserProfile" ], 
    r.$$componentPath = "component/loginDialog/index", o = a)) || o;
    C.defaultProps = {
        show: !1,
        bind: !1,
        redirectUrl: "",
        enableClose: !1,
        isNeedCreateAgent: 0,
        onCloseLogin: function onCloseLogin() {},
        onCloseBind: function onCloseBind() {},
        onSuccess: null
    }, C.propType = {
        show: u.a.bool,
        bind: u.a.bool,
        redirectUrl: u.a.string,
        enableClose: u.a.bool,
        isNeedCreateAgent: u.a.number,
        onCloseLogin: u.a.func,(wx.webpackJsonp = wx.webpackJsonp || []).push([ [ 12 ], {
131: function(e, t, o) {
    e.exports = o.p + "component/pageLoading/index.wxml";
},
361: function(e, t, o) {
    "use strict";
    o(131);
},
362: function(e, t, o) {},
480: function(e, t, o) {
    "use strict";
    o.r(t);
    o(361);
    var n, r, a = o(0), i = o.n(a), s = o(2), c = (o(362), function() {
        function defineProperties(e, t) {
            for (var o = 0; o < t.length; o++) {
                var n = t[o];
                n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), 
                Object.defineProperty(e, n.key, n);
            }
        }
        return function(e, t, o) {
            return t && defineProperties(e.prototype, t), o && defineProperties(e, o), e;
        };
    }());
    function _classCallCheck(e, t) {
        if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
    }
    function _possibleConstructorReturn(e, t) {
        if (!e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
        return !t || "object" != typeof t && "function" != typeof t ? e : t;
    }
    var p = "" + s.c.url + s.c.loading.url + s.c.loading.spinner, u = (r = n = function(e) {
        function PageLoading() {
            var e, t, o;
            _classCallCheck(this, PageLoading);
            for (var n = arguments.length, r = Array(n), a = 0; a < n; a++) r[a] = arguments[a];
            return t = o = _possibleConstructorReturn(this, (e = PageLoading.__proto__ || Object.getPrototypeOf(PageLoading)).call.apply(e, [ this ].concat(r))), 
            o.$usedState = [ "show", "loading" ], o.customComponents = [], _possibleConstructorReturn(o, t);
        }
        return function _inherits(e, t) {
            if ("function" != typeof t && null !== t) throw new TypeError("Super expression must either be null or a function, not " + typeof t);
            e.prototype = Object.create(t && t.prototype, {
                constructor: {
                    value: e,
                    enumerable: !1,
                    writable: !0,
                    configurable: !0
                }
            }), t && (Object.setPrototypeOf ? Object.setPrototypeOf(e, t) : e.__proto__ = t);
        }(PageLoading, e), c(PageLoading, [ {
            key: "_constructor",
            value: function _constructor(e) {
                (function get(e, t, o) {
                    null === e && (e = Function.prototype);
                    var n = Object.getOwnPropertyDescriptor(e, t);
                    if (void 0 === n) {
                        var r = Object.getPrototypeOf(e);
                        return null === r ? void 0 : get(r, t, o);
                    }
                    if ("value" in n) return n.value;
                    var a = n.get;
                    return void 0 !== a ? a.call(o) : void 0;
                })(PageLoading.prototype.__proto__ || Object.getPrototypeOf(PageLoading.prototype), "_constructor", this).call(this, e), 
                this.state = {}, this.$$refs = new i.a.RefsArray();
            }
        }, {
            key: "shouldComponentUpdate",
            value: function shouldComponentUpdate(e) {
                return this.props.show !== e.show;
            }
        }, {
            key: "_createData",
            value: function _createData() {
                this.__state = arguments[0] || this.state || {}, this.__props = arguments[1] || this.props || {};
                this.$prefix;
                console.log("src/component/pageLoading/index.js/PageLoading/rennder");
                var e = this.__props.show;
                return Object.assign(this.__state, {
                    show: e,
                    loading: p
                }), this.__state;
            }
        } ]), PageLoading;
    }(a.Component), n.$$events = [], n.defaultProps = {
        show: !1
    }, n.$$componentPath = "component/pageLoading/index", r);
    Component(o(0).default.createComponent(u));
}

}, [ [ 480, 0, 1, 2 ] ] ]);
onCloseBind: u.a.func,
onSuccess: u.a.oneOfType([ u.a.object, u.a.func ])
};
Component(n(0).default.createComponent©);
}
}, [ [ 479, 0, 1, 2 ] ] ]);

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值