收藏
回答

closeSocket:fail:taskID not exist 的问题?

下单之后提示这个。

var _home = require("../../../modules/home"), _address = require("../../../modules/address"), addressModule = new _address.address(), homeModule = new _home.home(), app = getApp();


Page({
    data: {
        time_bg: !0,
        weight_bg: !0,
        pay_bg: !0,
        tip_bg: !0,
        floor_bg: !0,
        imgs: "",
        img_temp: [],
        goods_list: [],
        goods_idx: -1,
        day: "",
        hour: "立即帮买",
        minute: "",
        isImmediately: 0,
        xday: "",
        remark: "",
        tip_money: 0,
        my_money: 0,
        weight: 1,
        distance: 0,
        duration: 0,
        coupons: {},
        money: 0,
        actual_payment: -1,
        price_detail: {},
        pay_method: 2,
        help: 1,
        buy_type: 0,
        floor: [ -1 ],
        goods_predict: 0,
        bargain: 0,
        showcheck: -1,
        red_bag: !1,
        new_person: {},
        fahuo: {},
        shouhuo: {}
    },
    onLoad: function(t) {
        wx.setStorageSync("is_remove_shou", 1), wx.removeStorageSync("coupons"), this.setData({
            goods_list: wx.getStorageSync("buy_goods_list"),
            goods_idx: app.globalData.buy_goods_idx,
            remark: app.globalData.buy_remark
        });
    },
    onReady: function() {
        app.setNavigation(), wx.setNavigationBarTitle({
            title: app.globalData.syStem.business_type[1].title
        });
    },
    onShow: function() {
        this.isCoupons(), this.examineAddress();
    },
    confirm: function() {
        var t = this.data.shouhuo, a = this.data.fahuo;
        if (!t.person_tel) return app.hint("选择收货地址");
        var e = this.data.goods_idx;
        if (e < 0) return app.hint("请选择物品类型");
        var i = this.data.goods_list[e].id, o = this.data.goods_list[e].name, s = this.data.price_detail.coupon_money, d = this.data.coupons.id;
        d || s || (s = d = 0);
        var n = wx.getStorageSync("city"), r = {};
        if ("立即帮买" == this.data.hour ? r = 1 : ((r = {}).day = this.data.day, r.hour = this.data.hour, 
        r.minute = this.data.minute), this.data.floor[0] < 0) return app.hint("请选择楼层~");
        var h = {
            weight_num: this.data.weight,
            remark: this.data.remark,
            distance: this.data.distance,
            duration: this.data.duration,
            time: r,
            hour: "立即帮买",
            coupons_id: d,
            standard_id: i,
            city: n,
            imgs: this.data.imgs,
            coupons_money: s,
            goods_name: o,
            order_type: 1,
            buy_type: this.data.buy_type,
            pay_method: this.data.pay_method,
            moneys: this.data.money,
            floor: this.data.floor[0],
            goods_predict: this.data.goods_predict,
            bargain: this.data.bargain,
            night_price: this.data.price_detail.night_price,
            change_price: this.data.price_detail.change_price,
            discount_price: this.data.price_detail.discount_price,
            distance_price: this.data.price_detail.distance_price,
            actual_payment: this.data.actual_payment,
            tip_money: this.data.tip_money,
            floor_price: this.data.price_detail.floor_price,
            fahuo: 1 == this.data.buy_type ? "" : a,
            shouhuo: t
        };
        wx.setStorageSync("order", h), wx.navigateTo({
            url: "/make_speed/order/order"
        });
    },
    goodsPredict: function(t) {
        this.setData({
            goods_predict: t.detail.value
        });
    },
    bargain: function(t) {
        this.setData({
            bargain: t.currentTarget.dataset.id
        });
    },
    sGoods: function(t) {
        this.setData({
            goods_idx: t.currentTarget.dataset.idx
        });
    },
    textarea: function(t) {
        this.setData({
            remark: t.detail.value
        });
    },
    isCoupons: function() {
        var t = wx.getStorageSync("coupons");
        t ? this.setData({
            coupons: t
        }) : this.setData({
            coupons: {}
        });
    },
    examineAddress: function() {
        var a = this, t = wx.getStorageSync("fahuo") || {}, e = wx.getStorageSync("shouhuo") || {};
        if (this.setData({
            fahuo: t,
            shouhuo: e
        }), t.title && e.person_tel || e.person_tel && 1 == this.data.buy_type) {
            if (1 == this.data.buy_type) return void this.getPrice(0, this.data.weight);
            var i = setInterval(function() {
                app.globalData.syStem.gaode_key && (clearInterval(i), addressModule.getDistance(3, app.globalData.syStem.gaode_key, t, e).then(function(t) {
                    a.setData({
                        distance: t.distance,
                        duration: t.duration
                    }), a.getPrice(t.distance, a.data.weight);
                }, function(t) {}));
            }, 10, t, e);
        } else this.setData({
            distance: 0,
            actual_payment: -1
        });
    },
    getPrice: function(t, a) {
        if (1 == this.data.buy_type) {
            var e = this.data.shouhuo;
            e && e.person_tel && homeModule.moneys(this, 0, a, 1, this.data.floor[0]);
        } else homeModule.moneys(this, t, a, 1, this.data.floor[0]);
    },
    getGoods: function() {
        var a = this;
        homeModule.getGoodsList({
            order_type: 1
        }).then(function(t) {
            a.setData({
                goods_list: t
            });
        }, function(t) {});
    },
    imgUpload: function(t) {
        this.setData({
            img_temp: t.detail.img_temp,
            imgs: t.detail.imgs
        });
    },
    buyType: function(t) {
        var a = t.detail.buy_type;
        1 == a && this.setData({
            duration: 0
        }), this.setData({
            buy_type: a
        }), this.examineAddress();
    },
    sFloor: function(t) {
        var a = t.detail.select;
        1 == a ? (this.setData({
            floor_bg: !0,
            floor: t.detail.floor
        }), this.getPrice(this.data.distance, this.data.weight)) : 2 == a ? this.setData({
            floor_bg: !0
        }) : this.setData({
            floor_bg: !1,
            floor: this.data.floor
        });
    },
    sTime: function(t) {
        var e = this, a = t.detail.select;
        1 == a ? (this.setData({
            day: t.detail.day,
            hour: t.detail.hour,
            minute: t.detail.minute,
            isImmediately: t.detail.isImmediately,
            time_bg: !0
        }), this.getPrice(this.data.distance, this.data.weight)) : 2 == a ? this.setData({
            time_bg: !0
        }) : homeModule.getTime().then(function(t) {
            var a = homeModule.date(t.days, t.hours, t.minutes, 1);
            e.setData({
                xTime: a,
                time_bg: !1
            });
        }, function(t) {});
    },
    sWeight: function(t) {
        this.setData({
            weight: t.detail.value
        }), this.getPrice(this.data.distance, t.detail.value);
    },
    weight: function(t) {
        var a = t.currentTarget.dataset.id, e = this.data.weight;
        if (0 == a) {
            if (1 == e) return;
            e--, this.setData({
                weight: e
            });
        } else e++, this.setData({
            weight: e
        });
        this.getPrice(this.data.distance, e);
    },
    sTip: function(t) {
        var a = t.detail.select;
        1 == a ? (this.setData({
            tip_bg: !0,
            tip_money: t.detail.tip_money
        }), this.getPrice(this.data.distance, this.data.weight)) : 2 == a ? this.setData({
            tip_bg: !0
        }) : this.setData({
            tip_bg: !1
        });
    },
    sCoupon: function() {
        if (this.data.goods_idx < 0) return app.hint("请先选择物品类型");
        wx.navigateTo({
            url: "/make_speed/coupons/coupons?distance=" + this.data.distance + "&money=" + this.data.money + "&order_type=1"
        });
    },
    sPay: function(t) {
        var a = this;
        if (this.data.goods_idx < 0) return app.hint("请先选择物品类型");
        var e = t.detail.select;
        1 == e ? this.setData({
            pay_bg: !0,
            pay_method: t.detail.pay_method
        }) : 2 == e ? this.setData({
            pay_bg: !0
        }) : homeModule.getMoney().then(function(t) {
            a.setData({
                pay_bg: !1,
                my_money: t.valid
            });
        }, function(t) {});
    },
    onHide: function() {},
    onUnload: function() {
        wx.removeStorageSync("coupons");
    },
    onPullDownRefresh: function() {},
    onReachBottom: function() {},
    onShareAppMessage: function() {
        return app.getShare(), {
            title: app.globalData.syStem.user_program_title,
            path: "/make_speed/router/router?recommend_id=" + app.globalData.user_id,
            imageUrl: app.globalData.syStem.user_share_img ? app.globalData.syStem.user_share_img : ""
        };
    }
});
回答关注问题邀请回答
收藏

5 个回答

  • 化成风 William
    化成风 William
    2023-09-17

    有大佬解决了吗 ?

    2023-09-17
    有用
    回复
  • 2020-09-07

    解决了吗?你们怎么处理的呢?

    2020-09-07
    有用
    回复
  • Lemon
    Lemon
    2020-08-21

    我也碰到这个问题,现在已经好了,是域名过期导致的,请检查下域名是否过期!

    2020-08-21
    有用
    回复 1
    • li
      li
      2022-06-04
      是域名备案过期了吗
      2022-06-04
      回复
  • Demo_达子
    Demo_达子
    2020-03-31

    我也是这样 请问解决了吗

    2020-03-31
    有用
    回复 2
    • Lemon
      Lemon
      2020-08-21
      我也碰到这个问题,现在已经好了,是域名过期导致的,请检查下域名是否过期!
      2020-08-21
      回复
    • 李赛飞
      李赛飞
      2020-10-24回复张勇(明一)
      请问是如何解决的呢
      2020-10-24
      回复
  • 灵芝
    灵芝
    2020-03-30

    你好,麻烦提供出现问题的具体机型、微信版本号、系统版本号,以及能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html

    2020-03-30
    有用
    回复
登录 后发表内容
问题标签