function t(t, e, i) {
return e in t ? Object.defineProperty(t, e, {
value: i,
enumerable: !0,
configurable: !0,
writable: !0
}) : t[e] = i, t;
}
var e, i, o = getApp(), s = require("../../1A7FD9A7867180BF7C19B1A0A9E83172.js");
Page((i = {
data: (e = {
details: {
Cover: "../../images/recipe/cover_null.jpg",
Title: "菜谱数据加载中...",
AuthorAvatar: "../../images/common/default_avatar.png",
AuthorName: "{菜谱作者}",
ViewCount: "{0}",
LikeCount: "{0}",
UserName: "{菜谱作者}"
},
request_status: !0,
height: "",
head_occupy: 128,
status_bar_height: 40,
type: 0,
recipe_id: ""
}, t(e, "type", ""), t(e, "cover", ""), t(e, "video_cover", ""), t(e, "title", ""),
t(e, "video_url", ""), t(e, "view_count", ""), t(e, "like_count", ""), t(e, "user_name", ""),
t(e, "user_avatar", ""), t(e, "intro", ""), t(e, "cookie_time", ""), t(e, "enjoy_user", ""),
t(e, "recipe_food", []), t(e, "recipe_step", []), t(e, "step_count", 0), t(e, "tips", ""),
t(e, "digg_recipe", ""), t(e, "recipe_digg_status", !1), t(e, "update_time", ""),
t(e, "comment", []), t(e, "related_recipe", ""), t(e, "isfavrite", !1), t(e, "isattention", !1),
t(e, "isdigg", !1), t(e, "type_class", "recipe-default"), t(e, "head_hide", ""),
t(e, "return_img", ""), t(e, "bottom_but_class", "comment-but-hide"), t(e, "step_show", "step-hide"),
t(e, "unfurl_type", !1), t(e, "cook_time_right", ""), t(e, "textarea_type", !1),
t(e, "add_comment_hide", "add-comment-hide"), t(e, "user_comment_content", ""),
t(e, "comment_text_height", 890), t(e, "food_ad_list", []), t(e, "food_fold_status", "food-hide"),
t(e, "fold_food_btn", "fold-show"), t(e, "fold_step_btn", "fold-show"), t(e, "fold_height", 1334),
t(e, "fold_btn_height", 1060), t(e, "fold_status", "none"), e),
conf: {
lock: !1,
login_status: !1,
type: 0,
isfavrite: !1,
scroll_top: 0,
recipe_id: "",
recipe_title: "",
baidu_title: "",
recipe_picurl: "",
offset: 0,
scroll_type: !1,
step_show: !1,
digg_storagep: [],
recipe_digg: 0,
recipe_digg_storagep: [],
comment_digg_storagep: [],
recipe_digg_type: !1,
pages_num: 0,
step_img: [],
scroll_up_lock: !0,
scroll_down_lock: !0,
interface_lock: !0,
rebound_lock: !0,
return_top: !0,
page_info_lock: !1,
comment_height: 280,
page_position: "video",
height: 667,
page_height: 667,
pull_up: 150,
drop_down: 571,
scroll_direction: "down",
direction_but_class: "",
direction_but_lock: !0,
but_scroll_lock: !0,
direction_but_height: 15,
add_comment_lock: !0,
comment_content: "",
share_title: o.conf.shareinfo.title,
share_desc: o.conf.shareinfo.content,
share_img: o.conf.shareinfo.picurl,
clipboard_msg: "",
page_info: []
},
onLoad: function(t) {
var e = t.id, i = (t.type, s.isLogin());
this.conf.recipe_id = e, this.conf.login_status = i;
var n = o.conf.systeminfo;
n.statusBarHeight;
this.data.fold_height = 2 * n.screenHeight, this.data.fold_btn_height = 2 * n.screenHeight - 206 - 60,
this.getDetail();
},
onShow: function() {
var t = this;
this.conf.login_status = s.isLogin(), s.loginChange(function(e) {
t.conf.login_status = !0, t.getDetail(), wx.showToast({
title: "登录成功",
icon: "success",
duration: 1500
});
});
var e = getCurrentPages();
this.conf.pages_num = e.length;
},
onReachBottom: function() {
this.conf.direction_but_lock = !1, this.setData({
bottom_but_class: ""
});
},
onPageScroll: function(t) {
var e = t.scrollTop;
e > 0 && (0 == e ? this.conf.scroll_top = e : (e > this.conf.scroll_top && e - this.conf.scroll_top > this.conf.direction_but_height && this.conf.but_scroll_lock && (this.conf.scroll_direction = "up",
this.conf.but_scroll_lock = !1, this.conf.direction_but_lock = !0), e < this.conf.scroll_top && this.conf.scroll_top - e > this.conf.direction_but_height && !this.conf.but_scroll_lock && (this.conf.scroll_direction = "down",
this.conf.but_scroll_lock = !0), this.conf.scroll_top = e)), this.directionBut(e);
},
directionBut: function(t) {
var e = this;
"" == this.conf.direction_but_class && "up" == this.conf.scroll_direction && this.conf.direction_but_lock && (this.setData({
bottom_but_class: "button-gradually-hide"
}), setTimeout(function(t) {
e.setData({
bottom_but_class: "comment-but-hide"
}), e.conf.direction_but_class = "comment-but-hide";
}, 500)), "comment-but-hide" == this.conf.direction_but_class && "down" == this.conf.scroll_direction && (this.setData({
bottom_but_class: ""
}), this.conf.direction_but_class = "");
},
return_but: function(t) {
this.conf.pages_num > 1 ? wx.navigateBack({
delta: 1
}) : wx.switchTab({
url: "/pages/index/index"
});
},
getDetail: function() {
this.conf.lock || (this.conf.lock = !0, s.get("Content/Recipe/getDetail", {
rid: this.conf.recipe_id
}, this.getDetailSuccess.bind(this), this.getDetailFail.bind(this)));
},
getDetailSuccess: function(t) {
if (200 != t.Status || !t.Result.RecipeStep) return this.setData({
request_status: !1
}), !1;
var e = [];
t.Result.Food && t.Result.Food.List.length > 0 && (e = t.Result.Food.List);
var i = [], n = 0;
t.Result.RecipeStep && t.Result.RecipeStep.List.length > 0 && (i = t.Result.RecipeStep.List,
n = t.Result.RecipeStep.Count, this.conf.step_img = t.Result.StepImg);
var c = [], a = [];
if (t.Result.Comment && t.Result.Comment.List.length > 0) {
a = "" != s.getStorage("comment") ? s.getStorage("comment") : [];
for (var r = 0; r < t.Result.Comment.List.length; r++) a.includes(t.Result.Comment.List[r].CommentId) ? t.Result.Comment.List[r].DiggStatus = !0 : t.Result.Comment.List[r].DiggStatus = !1;
c = t.Result.Comment.List;
}
var l = [];
if (t.Result.RelatedRecipe && t.Result.RelatedRecipe.List.length > 0) {
var _ = t.Result.RelatedRecipe.List.length;
if (!o.videomode) {
for (var u = 0; u < _; u++) t.Result.RelatedRecipe.List[u].Style || (t.Result.RelatedRecipe.List[u].Type = 0);
t.Result.Type = 0;
}
l = t.Result.RelatedRecipe.List;
}
var d = "recipe-default", h = !1, f = this.data.head_hide, p = "";
if (2 == t.Result.Type && (d = "", h = !0, p = "comment-but-hide", f = "head-hide",
void 0 == this.video)) {
var g = wx.createVideoContext("recipe_video");
this.video = g;
}
var m = s.getStorage("recipe"), R = !!(m = "" == m ? [] : m).includes(t.Result.RecipeId), v = !!R, b = "";
b = "" != t.Result.BaiduTitle ? t.Result.BaiduTitle : t.Result.Title;
var S = t.Result.EnjoyUser, D = t.Result.CookieTime, C = "";
"" == S && (C = "text-align: right;"), "" != t.Result.RecipeId && "" != b && 0 != i.length || (this.setData({
request_status: !1
}), this.conf.lock = !1);
var k = t.Result.Cover, w = "";
"" != k && (w = k.replace(/_360/, "_720"));
var y = this.data.food_fold_status, L = this.data.fold_height, T = this.data.fold_btn_he
没有合适的资源?快使用搜索试试~ 我知道了~
外卖小程序带流量主版本 可接入流量主
共172个文件
png:112个
js:16个
wxss:14个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 20 浏览量
2022-02-15
14:44:47
上传
评论
收藏 1.62MB ZIP 举报
温馨提示
外卖小程序带流量主版本,修复增加可流量主接入功能。 不需要服务器!个人可以过审! 教程: 合法域名填:https://api.jxcaipu.com 首页修改的路径为:pages/index/index.js 菜谱页修改的路径为:pages/index2/index.js
资源推荐
资源详情
资源评论
收起资源包目录
外卖小程序带流量主版本 可接入流量主 (172个子文件)
.DS_Store 6KB
.DS_Store 6KB
ascf.jpg 96KB
cover_null.jpg 12KB
recipe.js 17KB
index.js 9KB
list.js 6KB
user.js 6KB
comment.js 6KB
index.js 5KB
cate.js 5KB
userinfo.js 5KB
1A7FD9A7867180BF7C19B1A0A9E83172.js 4KB
9CE874B1867180BFFA8E1CB67DD83172.js 4KB
ranklist.js 3KB
all_cate.js 2KB
food.js 2KB
app.js 2KB
all_food.js 2KB
util.js 632B
project.config.json 2KB
app.json 1KB
index.json 234B
sitemap.json 191B
index.json 113B
comment.json 78B
recipe.json 78B
cate.json 78B
ranklist.json 78B
food.json 78B
all_food.json 75B
userinfo.json 75B
all_cate.json 75B
user.json 69B
mf.png 142KB
22.png 25KB
24.png 23KB
2.png 21KB
3.png 21KB
27.png 21KB
19.png 21KB
32.png 21KB
10.png 21KB
4.png 21KB
14.png 20KB
13.png 20KB
6.png 20KB
30.png 20KB
1.png 20KB
17.png 20KB
18.png 20KB
8.png 19KB
7.png 19KB
9.png 19KB
15.png 19KB
29.png 19KB
31.png 19KB
20.png 19KB
26.png 19KB
33.png 19KB
12.png 18KB
25.png 18KB
5.png 18KB
34.png 18KB
16.png 18KB
28.png 18KB
21.png 18KB
null_favorite.png 17KB
11.png 17KB
23.png 16KB
null_comment.png 12KB
sl.png 12KB
14.png 10KB
11.png 10KB
23.png 10KB
19.png 10KB
7.png 10KB
16.png 9KB
5.png 9KB
8.png 9KB
2.png 9KB
4.png 9KB
null_data.png 8KB
21.png 8KB
6.png 8KB
12.png 8KB
20.png 8KB
24.png 8KB
15.png 8KB
10.png 8KB
17.png 8KB
13.png 8KB
sx.png 8KB
18.png 8KB
9.png 8KB
22.png 8KB
xiao.png 7KB
3.png 7KB
1.png 7KB
wm.png 7KB
共 172 条
- 1
- 2
资源评论
智慧浩海
- 粉丝: 1w+
- 资源: 5175
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功