<?php
include 'resource/function/function_pdo.php';
include 'resource/function/function.php';
include 'resource/extends/wxBizDataCrypt.php';
defined('IN_IA') or exit('Access Denied');
class Dg_costreadModuleWxapp extends WeModuleWxapp
{
public $uniacid;
public function __construct()
{
global $_W;
$this->uniacid = $_W['uniacid'];
//pc端发布|修改文章链接
if(!file_exists(IA_ROOT.'/web/costreadart.php')){
copy(IA_ROOT.'/addons/dg_costread/ziyuan/pcartpush/costreadart.php',IA_ROOT.'/web/costreadart.php');
}else{
@unlink(IA_ROOT.'/web/costreadart.php');
copy(IA_ROOT.'/addons/dg_costread/ziyuan/pcartpush/costreadart.php',IA_ROOT.'/web/costreadart.php');
}
if(!file_exists(IA_ROOT.'/web/themes/default/costreadart.html')){
copy(IA_ROOT.'/addons/dg_costread/ziyuan/pcartpush/costreadart.html',IA_ROOT.'/web/themes/default/costreadart.html');
}else{
@unlink(IA_ROOT.'/web/themes/default/costreadart.html');
copy(IA_ROOT.'/addons/dg_costread/ziyuan/pcartpush/costreadart.html',IA_ROOT.'/web/themes/default/costreadart.html');
}
if(!file_exists(IA_ROOT.'/web/resource/bootstrap-fileinput/js/fileinput.js') ){
$this->copydir(IA_ROOT.'/addons/dg_costread/ziyuan/pcartpush/bootstrap-fileinput',IA_ROOT.'/web/resource/bootstrap-fileinput');
}
if(!file_exists(IA_ROOT.'/web/resource/tinymce/zh_CN.js')){
$this->copydir(IA_ROOT."/addons/dg_costread/ziyuan/pcartpush/tinymce",IA_ROOT."/web/resource/tinymce");
}
}
/**
* 复制文件夹
* @param $source
* @param $dest
*/
function copydir($source, $dest)
{
if (!file_exists($dest)){ $this->makeDir($dest);}
$handle = opendir($source);
while (($item = readdir($handle)) !== false) {
if ($item == '.' || $item == '..') continue;
$_source = $source . '/' . $item;
$_dest = $dest . '/' . $item;
if (is_file($_source)) copy($_source, $_dest);
if (is_dir($_source)) $this->copydir($_source, $_dest);
}
closedir($handle);
}
public function doPageBinding()
{
global $_GPC;
$uniacid = $this->uniacid;
$fuser = pdo_select('dg_article_user', '', 'openid,fopenid', "uniacid=:uniacid and id = :id", '', "", array(':uniacid' => $uniacid, 'id' => $_GPC['fxid']));
$user = pdo_select('dg_article_user', '', 'openid,fopenid', "uniacid=:uniacid and id = :id", '', "", array(':uniacid' => $uniacid, 'id' => $_GPC['uid']));
//屏蔽自己绑定自己,屏蔽双方相互分享绑定关系
if ($fuser['data']['openid'] && empty($user['data']['fopenid']) && ($user['data']['openid'] != $fuser['data']['openid']) && ($user['data']['openid'] != $fuser['data']['fopenid'])) {
$data = array(
'fopenid' => $fuser['data']['openid']
);
$res = pdo_update('dg_article_user', $data, array('id' => $_GPC['uid']));
} else {
$res = '不符合绑定关系的条件';
}
return $this->result(0, '绑定结果', $res);
}
function doPageSystem()
{
$uniacid = $this->uniacid;
$modules = pdo_fetch("SELECT settings FROM " . tablename("uni_account_modules") . " WHERE uniacid=:uniacid and module = :module", array(":uniacid" => $uniacid, ':module' => 'dg_costread'));
$cfg = unserialize($modules['settings']);
$backgroundcolor = $cfg['backgroundcolor'] ? $cfg['backgroundcolor'] : '#07bb45';
$tabbarcolor = $cfg['tabbarcolor'] ? $cfg['tabbarcolor'] : '#ffffff';
$textcolor = $cfg['textcolor'] ? $cfg['textcolor'] : '#000000';
$frontColor = $cfg['frontColor'] ? $cfg['frontColor'] : '#ffffff';
$topBackcolor = $cfg['topBackcolor'] ? $cfg['topBackcolor'] : '#07bb45';
$title = $cfg['dg_article_title'] ? $cfg['dg_article_title'] : '付费阅读';
$share_title = $cfg['share_title'] ? $cfg['share_title'] : '';
//$Tabbar = pdo_select('dg_article_tabbar_design', 'all', '', "uniacid=$uniacid", 'sort DESC', '');
$Tabbar=pdo_fetchall("select * from ".tablename('dg_article_tabbar_design')." where uniacid=$uniacid order by sort DESC");
$data = array(
'color' => $backgroundcolor,
//'tabbar' => $Tabbar['data'],
'tabbar' => $Tabbar,
'tabbarcolor' => $tabbarcolor,
'textcolor' => $textcolor,
'frontColor' => $frontColor,
'topBackcolor' => $topBackcolor,
'title' => $title,
'share_title' => $share_title
);
return $this->result(0, 0, $data);
}
public function doPageIndex()
{
$uniacid = $this->uniacid;
$modules = pdo_select('uni_account_modules', '', 'settings', "uniacid=:uniacid", '', "", array(':uniacid' => $uniacid));
$modules = unserialize($modules['data']['settings']);
$adv = pdo_select('dg_article_adv', 'all', 'adv_img,adv_href,adv_href_one,appid', "uniacid=:uniacid and adv_status = 2", 'displayorder DESC', '', array(':uniacid' => $uniacid));
foreach ($adv['data'] as $k => $v) {
if (strpos($v['adv_href'], 'http') !== false) {
$adv['data'][$k]['http'] = 1;
}
}
$recom = pdo_select('dg_article', 'all', 'id,title,appoint,description,author,thumb,clickNum,zanNum,pay_money,author_id,types', "uniacid=:uniacid and status = 2 and recommend = 2", 'displayorder DESC', '20', array(':uniacid' => $uniacid));
$new = pdo_select('dg_article', 'all', 'id,title,appoint,description,author,thumb,clickNum,zanNum,pay_money,author_id,types', "uniacid=:uniacid and status = 2", 'id DESC', '1,10', array(':uniacid' => $uniacid));
//区分是后台的文章,还是前台的文章
foreach ($new['data'] as $k => $v) {
if (is_numeric($v['description']) && $v['description']) {
$new['data'][$k]['description'] = '';
} else {
$new['data'][$k]['description'] = trim(strip_tags(html_entity_decode($v['description'])));
}
}
$column = pdo_select('dg_article_serialize', 'all', 'id,serialize_title,serialize_img,serialize_price,clickNum,serialize_desc,author_nickname,ser_type', "uniacid=:uniacid and status = 2", 'id DESC', '1,8', array(':uniacid' => $uniacid));
$list = pdo_select('dg_article_index_design', 'all', '', "uniacid=:uniacid", 'displayorder DESC ', '', array(':uniacid' => $uniacid));
$data = array();
$data['modules'] = $modules;
$data['adv'] = $adv['data'];
$data['recom'] = $recom['data'];
$data['new'] = $new['data'];
$data['column'] = $column['data'];
$data['nav'] = $list['data'];
return $this->result(0, '首页数据', $data);
}
//举报
public function doPageReport()
{
global $_GPC;
$uniacid = $this->uniacid;
$data = array(
'uniacid' => $uniacid,
'type' => $_GPC['types'],
'content' => $_GPC['report_content'],
'a_id' => $_GPC['a_id'],
'u_id' => $_GPC['u_id'],
'nickname' => $_GPC['nickname'],
'avatar' => $_GPC['avatar'],
);
$return = pdo_insert('dg_article_report', $data);
return $this->result(0, 0, $return);
}
//分类
public function doPageClassify()
{
global $_GPC;
$uniacid = $this->uniacid;
$children = array();
$category = pdo_select('dg_article_category', 'all', 'id,name,parentid', 'uniacid=:uniacid', 'parentid, displayorder DESC', '', array(':uniacid' => $
没有合适的资源?快使用搜索试试~ 我知道了~
付费阅读微信小程序源码 付费阅读公众号双版本源码 付费阅读独立版源码支持免费观看部分文字、视频和音频内容.rar
共2000个文件
js:649个
html:252个
png:222个
需积分: 5 1 下载量 92 浏览量
2023-08-21
14:42:33
上传
评论
收藏 7.9MB RAR 举报
温馨提示
这是付费阅读微信小程序合集包含6种源码的V1.8.5版本,包括了付费阅读小程序和付费阅读公众号双版本的前后端开源源码。 该源码支持免费观看部分文字、视频和音频内容,而其他部分则需要付费才能继续观看。此版本是独立版小程序,与原付费阅读公众号版的数据不通。该源码支持月费、季费和年费等多种付费设置,灵活满足用户的不同需求。 特色功能包括: 1.音频和视频内容的付费设置,可以设置免费观看/收听的时长; 2.支持会员功能,让用户可以享受更多特权和优惠; 3.支持作者申请功能,方便作者加入平台并发布自己的作品; 4.支持手机端发布文章,方便作者随时更新内容; 5.支持分类独立页面,让用户可以根据自己的兴趣选择感兴趣的内容; 6.支持导航栏自定义,让用户可以根据自己的喜好设置导航栏的样式和顺序。 这个付费阅读微信小程序源码版本简单易用,适合学习和使用。请注意,使用时请遵守相关法律法规,并且仅限于合法和合理的用途。
资源推荐
资源详情
资源评论
收起资源包目录
付费阅读微信小程序源码 付费阅读公众号双版本源码 付费阅读独立版源码支持免费观看部分文字、视频和音频内容.rar (2000个子文件)
【点击查最新更新】.bat 25B
bootstrap.min.css 118KB
bootstrap.min.css 118KB
bootstrap.min.css 118KB
bootstrap.min.css 118KB
bootstrap.min.css 118KB
bootstrap.min.css 118KB
bootstrap.min.css 94KB
bootstrap.min.css 94KB
bootstrap.min.css 94KB
bootstrap.min.css 94KB
bootstrap.min.css 94KB
animate.css 70KB
animate.css 67KB
animate.css 67KB
animate.css 67KB
animate.css 67KB
animate.css 67KB
font-awesome.min.css 30KB
font-awesome.min.css 30KB
font-awesome.min.css 30KB
font-awesome.min.css 30KB
font-awesome.min.css 30KB
font-awesome.min.css 30KB
comfigHome.css 25KB
comfigHome.css 25KB
comfigHome.css 25KB
comfigHome.css 25KB
comfigHome.css 25KB
comfigHome.css 25KB
bootstrap-table-group-by.css 24KB
bootstrap-table-group-by.css 24KB
bootstrap-table-group-by.css 24KB
layer.css 14KB
layer.css 14KB
layer.css 14KB
layer.css 14KB
layer.css 14KB
layer.css 14KB
layer.css 11KB
layer.css 11KB
layer.css 11KB
layer.css 11KB
layer.css 11KB
layer.css 11KB
colpick.css 9KB
colpick.css 9KB
colpick.css 9KB
colpick.css 9KB
colpick.css 9KB
colpick.css 9KB
module1.css 8KB
shop-indexSet.css 8KB
index.css 8KB
shop-indexSet.css 8KB
shop-indexSet.css 8KB
shop-indexSet.css 8KB
shop-indexSet.css 8KB
shop-indexSet.css 8KB
index.css 8KB
index.css 8KB
index.css 8KB
index.css 8KB
index.css 8KB
module1.css 8KB
module1.css 8KB
module1.css 8KB
module1.css 8KB
module1.css 8KB
bootstrap-table.css 8KB
bootstrap-table.css 8KB
bootstrap-table.css 8KB
iconfont.css 5KB
iconfont.css 5KB
iconfont.css 5KB
iconfont.css 5KB
iconfont.css 5KB
fileinput.css 4KB
fileinput.css 4KB
fileinput.css 4KB
fileinput.css 4KB
fileinput.css 4KB
fileinput.min.css 3KB
fileinput.min.css 3KB
fileinput.min.css 3KB
fileinput.min.css 3KB
fileinput.min.css 3KB
bootstrap-table-reorder-rows.css 819B
bootstrap-table-reorder-rows.css 819B
bootstrap-table-reorder-rows.css 819B
bootstrap-table-tree-column.css 582B
bootstrap-table-tree-column.css 582B
bootstrap-table-tree-column.css 582B
bootstrap-table-sticky-header.css 416B
bootstrap-table-sticky-header.css 416B
bootstrap-table-sticky-header.css 416B
bootstrap-table-multiple-selection-row.css 306B
bootstrap-table-multiple-selection-row.css 306B
bootstrap-table-multiple-selection-row.css 306B
bootstrap-table-group-by.css 215B
共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
资源评论
执刀人的工具库
- 粉丝: 1120
- 资源: 1364
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功