var config = require('./config.js')
module.exports = {
fetchFilms: function(url, city, start, count, cb) {
var that = this
if (that.data.hasMore) {
fetch(url + '?city=' + config.city + '&start=' + start + '&count=' + count).then(function(response){
response.json().then(function(data){
if(data.subjects.length === 0){
that.setData({
hasMore: false,
})
}else{
that.setData({
films: that.data.films.concat(data.subjects),
start: that.data.start + data.subjects.length,
showLoading: false
})
}
typeof cb == 'function' && cb(res.data)
})
})
}
},
fetchFilmDetail: function(url, id, cb) {
var that = this;
fetch(url + id).then(function(response){
response.json().then(function(data){
that.setData({
showLoading: false,
filmDetail: data
})
wx.setNavigationBarTitle({
title: data.title
})
typeof cb == 'function' && cb(data)
})
})
},
fetchPersonDetail: function(url, id, cb) {
var that = this;
fetch(url + id).then(function(response){
response.json().then(function(data){
that.setData({
showLoading: false,
personDetail: data
})
wx.setNavigationBarTitle({
title: data.name
})
typeof cb == 'function' && cb(data)
})
})
},
search: function(url, keyword, start, count, cb){
var that = this
var url = decodeURIComponent(url)
if (that.data.hasMore) {
fetch(url + keyword + '&start=' + start + '&count=' + count).then(function(response){
response.json().then(function(data){
if(data.subjects.length === 0){
that.setData({
hasMore: false,
showLoading: false
})
}else{
that.setData({
films: that.data.films.concat(data.subjects),
start: that.data.start + data.subjects.length,
showLoading: false
})
wx.setNavigationBarTitle({
title: keyword
})
}
typeof cb == 'function' && cb(res.data)
})
})
}
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
电影推荐微信小程序源码(含截图).rar
共52个文件
png:12个
wxss:11个
js:11个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
5星 · 超过95%的资源 2 下载量 109 浏览量
2023-04-09
18:02:53
上传
评论 4
收藏 1.19MB RAR 举报
温馨提示
电影推荐微信小程序源码(含截图)
资源推荐
资源详情
资源评论
收起资源包目录
电影推荐微信小程序源码(含截图).rar (52个子文件)
电影推荐微信小程序源码(含截图)
pages
filmDetail
filmDetail.json 46B
filmDetail.wxss 2KB
filmDetail.wxml 4KB
filmDetail.js 757B
popular
popular.wxss 49B
popular.json 79B
popular.js 1KB
popular.wxml 190B
searchResult
searchResult.wxss 49B
searchResult.wxml 190B
searchResult.json 79B
searchResult.js 1KB
search
search.json 40B
search.wxss 1KB
search.js 2KB
search.wxml 1KB
personDetail
personDetail.wxss 2KB
personDetail.wxml 1KB
personDetail.json 46B
personDetail.js 466B
top
top.js 1KB
top.wxss 49B
top.wxml 190B
top.json 79B
coming
coming.wxml 190B
coming.json 79B
coming.wxss 49B
coming.js 1KB
app.json 1KB
3.png 274KB
app.js 235B
1.png 168KB
app.wxss 660B
dist
images
popular_icon.png 2KB
search_icon.png 3KB
loading.gif 16KB
coming_active_icon.png 2KB
top_icon.png 2KB
popular_active_icon.png 2KB
search_active_icon.png 2KB
top_active_icon.png 2KB
coming_icon.png 3KB
component
message
message.wxss 1KB
message.js 672B
message.wxml 319B
filmList
filmList.wxss 2KB
filmList.wxml 2KB
4.png 348KB
comm
style
animation.wxss 843B
script
fetch.js 2KB
config.js 54B
2.png 378KB
共 52 条
- 1
HappyGirl快乐女孩
- 粉丝: 1w+
- 资源: 4159
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
- 3
前往页