苹果CMS对接小程序最新可用源码分享,带搭建详细教程
源码分享仅供用于学习交流, 请于下载后的24小时内自行删除
安装说明
- 安装环境:
建议服务器装宝塔面板,最好使用Linux CentOS 7+ 系统。环境php7.0 — 安装fileinfo、redis、sg11扩展(然后重启php服务)。mysql5.5、Nginx 1.18.0。
- 创建一个网站,设置https证书。上传小程序后端整合苹果cms文件到根目录解压。
- 在目录文件中/wxapi/config/dbs.php (此为接口配置,要单独设置) 修改当前为当前数据库账号信息。
- 在浏览器打开网站首页网址,开始一键安装网站。
按步骤安装即可。 - ⚠️ 警告 ⚠️
安装完进入后台首页,不要点升级苹果CMS。 因为小程序功能是二开的,升级苹果CMS后二开的功能会没掉
前端配置说明:
- 小程序用户中心http://mp.weixin.qq.com开发管理配置request合法域名添加:https://api.douban.com;https://frodo.douban.com;https://m.douban.com; https://mip.chinaz.com 再加上你自己的域名,注意要https 共5个。只需要填request合法域名
- 微信开发者工具导入前端mp-weixin目录。在/common/main.js中 搜索cjurl 设置成你https://xx.xxx.com/,要带https
其他三处分别对应授权码、IV、KEY。 将app标识也设置和授权码一样。(这几个码自己编,iv和key必须为16位字符串) 。 将数据加密:开启
修改APPID,左侧或右侧修改 APPID在小程序用户中心http://mp.weixin.qq.com开发管理那里获取
在小程序前端代码上禁用这个代码。pages/detail/detail.js这个文件,可以删除或者用/ / 注释,然后上传审核
(这个功能本来是跳转小程序功能,设置开启时是正常的,关闭的时候有时候会出现跳转到腾讯小程序的错误。
所以可以在小程序前端代码上禁用这个代码。 有能力的小伙伴可以自己修改解决)复制代码 隐藏代码
if("1"==o.$config.detail.play.radio&&o.$config.detail.play.APPID)o.$config.detail.play.APPID.indexOf("pages")>=0?t.navigateTo({url:o.$config.detail.play.APPID}):t.showModal({title:"",content:"该版本即将停用,前往新版使用",confirmText:"确定",success:function(e){e.confirm&&t.navigateToMiniProgram({appId:o.$config.detail.play.APPID,path:"pages/detail/detail?id="+a.voddata.vod_id,success:function(t){}})}});else
后台配置:
后台需要配置的东西有点多,如果有不明白的地方可以回帖,我会尽量回答大家
- 点开小程序后台系统 > 开放API配置如下图设置开启
- 点击小程序配置,添加微信(小程序)对接,这里可以多开,创建多个小程序对接,广告这些独立设置。但是视频数据是统一的。
- 点击编辑进入设置首页分类推荐的标题,
分类ID
是视频数据的推荐权重, 后面会介绍
- 分类列表类型
复制代码 隐藏代码
[{"type_name":"连续剧","type_id":"2","type_extend":{"class":["全部","言情","喜剧","悬疑","都市","偶像","古装","军事","警匪","历史","励志","神话","谍战","青春","家庭","动作","情景","武侠","科幻","其他"],"area":["全部","大陆","美国","香港","台湾","韩国","泰国","日本","英国","新加坡"],"lang":"全部,国语,英语,粤语,闽南语,韩语,日语,其它","year":["全部","2020","2019","2018","2017","2016","2015","2014","2013","2012","2011","2010","2009","2008","2006","2005","2004"]}},{"type_name":"电影","type_id":"1","type_extend":{"class":["全部","喜剧","爱情","动作","恐怖","科幻","剧情","犯罪","奇幻","战争","悬疑","动画","文艺","伦理","纪录","传记","歌舞","古装","历史","惊悚","其他"],"area":["全部","大陆","美国","香港","韩国","日本","法国","英国","德国","台湾","泰国","印度","其他"],"year":["全部","2020","2019","2018","2017","2016","2015","2014","2013","2012","2011","2010"]}},{"type_name":"综艺","type_id":"3","type_extend":{"class":["全部","选秀","情感","访谈","播报","旅游","音乐","美食","纪实","曲艺","生活","游戏互动","财经","求职","其他"],"area":["全部","内地","港台","日韩","欧美","其他"],"year":["全部","2020","2019","2018","2017","2016","2015","2014","2013","2012","2011","2010"]}},{"type_name":"动漫","type_id":"4","type_extend":{"class":["全部","热血","科幻","美少女","魔幻","经典","励志","少儿","冒险","搞笑","推理","恋爱","治愈","幻想","校园","动物","机战","亲子","儿歌","运动","悬疑","怪物","战争","益智","青春","童话","竞技","动作","社会","友情","真人版","电影版","OVA版","TV版","新番动画","完结动画"],"area":["全部","日本","美国","大陆"],"lang":"全部,国语,英语,粤语,闽南语,韩语,日语,其它","year":["全部","2020","2019","2018","2017","2016","2015","2014","2013","2012","2011","2010","2009","2008","2007","2006","2005","2004"]}}]
- 首页推荐影片数据的方法:请对应:推荐1=视频分类大类ID1、推荐2=视频分类大类ID2、以此类推。
但是注意:推荐9=小程序首页上面幻灯片 - 视频采集来源大家可以自己设置,或者使用采集插件,压缩包里面我放了一个采集插件。