<?php
namespace app\api\controller;
use Decode\Decode\Decode;
use think\Request;
use think\Controller;
use think\Db;
use \phpmail\Phpmailer;
class Wxapps extends Controller
{
/*Diy方法开始*/
public function doPagehomepage()
{
$uniacid = input("uniacid");
$res = Db::table('ims_sudu8_page_base')->where("uniacid", $uniacid)->field("homepage")->find();
if (!$res) {
$res['homepage'] = 1;
}
//找到使用的模板
$tplinfo = Db::table('ims_sudu8_page_diypagetpl')->where("uniacid", $uniacid)->where("status", 1)->find();
$pageids = explode(",", $tplinfo['pageid']);
if ($tplinfo) {
$pageid = Db::table('ims_sudu8_page_diypage')->where("uniacid", $uniacid)->where("id", "in", $pageids)->where("index", 1)->field("id")->find();
} else {
$pageid = Db::table('ims_sudu8_page_diypage')->where("uniacid", $uniacid)->where("index", 1)->field("id")->find();
}
$foot = Db::table('ims_sudu8_page_diypageset')->where("uniacid", $uniacid)->field("foot_is")->find();
if ($pageid) {
$res['pageid'] = $pageid['id'];
} else {
$res['pageid'] = 0;
}
$res['foot_is'] = $foot['foot_is'] ? $foot['foot_is'] : 1;
$result['data'] = $res;
return json_encode($result);
}
private function emoji_encode($nickname){
$strEncode = '';
$length = mb_strlen($nickname,'utf-8');
for ($i=0; $i < $length; $i++) {
$_tmpStr = mb_substr($nickname,$i,1,'utf-8');
if(strlen($_tmpStr) >= 4){
// $strEncode .= '[[EMOJI:'.rawurlencode($_tmpStr).']]';
$strEncode .= rawurlencode($_tmpStr);
}else{
$strEncode .= $_tmpStr;
}
}
return $strEncode;
}
public function doPageDiypage()
{
$uniacid = input("uniacid");
$pageid = input("pageid");
$foot = Db::table('ims_sudu8_page_diypageset')->where("uniacid", $uniacid)->field("foot_is")->find();
$tplinfo = Db::table('ims_sudu8_page_diypagetpl')->where("uniacid", $uniacid)->where("status", 1)->find();
$pageids = explode(",", $tplinfo['pageid']);
if (!in_array($pageid, $pageids)) {
$err = array();
$err['data'] = 3;
return json_encode($err);
exit;
}
$data = Db::table('ims_sudu8_page_diypage')->where("id", $pageid)->where("uniacid", $uniacid)->find();
$data['foot'] = $foot['foot_is'] ? $foot['foot_is'] : 1;
if ($data['page'] != '') {
$data['page'] = unserialize($data['page']);
if (isset($data['page']['url']) && $data['page']['url'] != "") {
$data['page']['url'] = remote($uniacid, $data['page']['url'], 1);
}
}
if ($data['items'] != '') {
$data['items'] = array_values(unserialize($data['items']));
include 'videoInfo.php';
$videoInfo = new videoInfo();
foreach ($data['items'] as $k => &$v) {
if (is_array($v)) {
if (isset($v['id'])) {
if ($v['id'] == 'title2' || $v['id'] == 'title' || $v['id'] == 'line' || $v['id'] == 'blank' || $v['id'] == 'anniu' || $v['id'] == 'notice' || $v['id'] == 'service' || $v['id'] == 'listmenu' || $v['id'] == 'joblist' || $v['id'] == 'personlist' || $v['id'] == 'msmk' || $v['id'] == 'multiple' || $v['id'] == 'mlist' || $v['id'] == 'goods' || $v['id'] == 'tabbar' || $v['id'] == 'cases' || $v['id'] == 'listdesc' || $v['id'] == 'pt' || $v['id'] == 'dt' || $v['id'] == 'ssk' || $v['id'] == 'xnlf' || $v['id'] == 'yhq' || $v['id'] == 'dnfw' || $v['id'] == 'yuyin' || $v['id'] == 'feedback') {
if ($v['params']['backgroundimg'] != "") {
$v['params']['backgroundimg'] = remote($uniacid, $v['params']['backgroundimg'], 1);
}
}else if ($v['id'] == 'bigimg' || $v['id'] == 'classfit' || $v['id'] == 'banner' || $v['id'] == 'menu' || $v['id'] == 'picture' || $v['id'] == 'picturew') {
if ($v['params']['backgroundimg'] != "") {
$v['params']['backgroundimg'] = remote($uniacid, $v['params']['backgroundimg'], 1);
}
if ($v['data']) {
foreach ($v['data'] as $ki => $vi) {
if ($vi['imgurl'] != "") {
if (strpos($vi['imgurl'], "diypage/resource") !== false) {
$v['data'][$ki]['imgurl'] = ROOT_HOST . $vi['imgurl'];
} else {
$v['data'][$ki]['imgurl'] = remote($uniacid, $vi['imgurl'], 1);
}
}
}
}
}else if ($v['id'] == 'contact') {
if ($v['params']['backgroundimg'] != "") {
$v['params']['backgroundimg'] = remote($uniacid, $v['params']['backgroundimg'], 1);
}
if ($v['params']['src'] != "") {
if (strpos($v['params']['src'], "diypage/resource") !== false) {
$v['params']['src'] = ROOT_HOST . $v['params']['src'];
} else {
$v['params']['src'] = remote($uniacid, $v['params']['src'], 1);
}
}
if ($v['params']['ewm'] != "") {
if (strpos($v['params']['ewm'], "diypage/resource") !== false) {
$v['params']['ewm'] = ROOT_HOST . $v['params']['ewm'];
} else {
$v['params']['ewm'] = remote($uniacid, $v['params']['ewm'], 1);
}
}
}else if ($v['id'] == 'video') {
if (isset($v['params']['backgroundimg']) && $v['params']['backgroundimg'] != "") {
$v['params']['backgroundimg'] = remote($uniacid, $v['params']['backgroundimg'], 1);
}
if ($v['params']['poster'] != "") {
if (strpos($v['params']['poster'], "diypage/resource") !== false) {
$v['params']['poster'] = ROOT_HOST . $v['params']['poster'];
} else {
$v['params']['poster'] = remote($uniacid, $v['params']['poster'], 1);
}
}
}else if ($v['id'] == 'logo' || $v['id'] == 'dp') {
if ($v['params']['backgroundimg'] != "") {
$v['params']['backgroundimg'] = remote($uniacid, $v['params']['backgroundimg'], 1);
}
if ($v['params']['src'] != "") {
if (strpos($v['params']['src'], "diypage/resource") !== false) {
$v['params']['src'] = ROOT_HOST . $v['params']['src'];
} else {
$v['params']['src'] = remote($uniacid, $v['params']['src'], 1);
}
}
}else if ($v['id'] == 'footmenu') {
if ($v['data']) {
foreach ($v['data'] as $ki => $vi) {
没有合适的资源?快使用搜索试试~ 我知道了~
ThinkPHP内核全行业小程序运营管理系统源码 - 支持DIY布局.zip
共2000个文件
php:1652个
png:674个
jpg:581个
需积分: 49 55 下载量 102 浏览量
2020-03-01
11:21:06
上传
评论 9
收藏 73.9MB ZIP 举报
温馨提示
ThinkPHP内核全行业小程序运营管理系统源码 - 支持DIY布局,界面自由DIY,打造个性小程序 可拖拽式DIY布局,开启自定义功能新征程,无需繁琐操作,轻松拖拽即可实现界面布局;同步实时预览,可视化操作让您所见即所得,随心打造个性小程序。 丰富功能组件,应多种场景需求
资源推荐
资源详情
资源评论
收起资源包目录
ThinkPHP内核全行业小程序运营管理系统源码 - 支持DIY布局.zip (2000个子文件)
phpunit.bat 117B
test.bmp 0B
config 1KB
config 1KB
config 1KB
config 1KB
config 1KB
config 1KB
config 1KB
config 1KB
config 1KB
config 1KB
config 1KB
config 1KB
config 1KB
config 1KB
config 1KB
config 1KB
config 1KB
config 1KB
common.css 677KB
common.css 421KB
site.css 328KB
iconfont.css 195KB
bootstrap.min.css 124KB
bootstrap.min.css 115KB
bootstrap1.css 111KB
bootstrap.min.css 103KB
style.css 73KB
diy.min.css 65KB
animate.css 63KB
glyphicons.css 54KB
fwpublic.css 50KB
ueditor.css 44KB
index.css 41KB
iconfont.css 41KB
iconfont.css 41KB
emotions.css 39KB
ueditor.css 39KB
fwanimation.css 38KB
select2.css 37KB
font-awesome.min.css 37KB
ueditor.min.css 34KB
app.css 31KB
bootstrap2.css 30KB
font-awesome.css 29KB
jquery-ui.min.css 28KB
wnmd.css 26KB
drag.css 25KB
new-index.css 25KB
foxui.diy.css 24KB
font-awesome.min.css 22KB
halflings.css 21KB
video-js.css 21KB
swiper.min.css 19KB
index.css 19KB
image.css 19KB
iconfont2.css 19KB
jquery.datetimepicker.css 17KB
bootstrap-responsive.min.css 16KB
datepicker.css 16KB
video.css 15KB
select2_metro.css 15KB
attachment.css 15KB
layer.css 14KB
jquery-confirm.css 13KB
spectrum.css 13KB
datetimepicker.css 12KB
chosen.css 12KB
custom.css 12KB
webuploader.css 12KB
fullcalendar.css 11KB
video-js.min.css 11KB
uniform.default.css 11KB
dropzone.css 11KB
style-metro.css 9KB
light.css 9KB
style-responsive.css 9KB
nv.d3.min.css 9KB
inbox.css 9KB
web-icons.css 9KB
web.css 8KB
laydate.css 8KB
purple.css 7KB
brown.css 7KB
blue.css 7KB
grey.css 7KB
iconfont_new.css 7KB
toastr.min.css 7KB
style.css 7KB
gray.css 7KB
red.css 7KB
green.css 7KB
jedate.css 7KB
pricing-tables.css 7KB
web-icons.min.css 6KB
article_cate.css 6KB
demo.css 6KB
skitter.css 6KB
bootstrap-toggle-buttons.css 6KB
共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
资源评论
优雅草·央千澈
- 粉丝: 1452
- 资源: 85
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功