* [story#75371,doing,0.1h] Remove module official website.

This commit is contained in:
zhangjialiang
2025-06-16 09:27:22 +08:00
parent 503af25b65
commit 5692ef4b12
7 changed files with 0 additions and 467 deletions
-139
View File
@@ -1,139 +0,0 @@
<?php
/**
* The control file of officialwebsite currentModule of ZenTaoPMS.
*
* @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Jialiang Zhang <zhangjialiang@chandao.com>
* @package officialwebsite
* @link https://www.zentao.net
*/
class officialwebsite extends control
{
/**
* 绑定社区账号。
* Bind community account.
*
* @access public
* @return int|void|null
*/
public function index()
{
$bindCommunity = $this->config->global->bindCommunity;
$this->view->bindCommunity = $bindCommunity;
if($bindCommunity)
{
$agreeUX = $this->config->global->agreeUX;
$bindCommunityMobile = $this->config->global->bindCommunityMobile;
$this->view->agreeUX = $agreeUX;
$this->view->bindCommunityMobile = $bindCommunityMobile;
}
else
{
if(!empty($_POST))
{
$apiRoot = 'https://zentao.xsj.oop.cc';
$apiURL = $apiRoot . "/user-mobileLogin.json";
$_POST['sn'] = $this->config->global->sn;
$response = common::http($apiURL, $_POST);
$response = json_decode($response, true);
// if($response['result'] == 'fail')
// {
// return $this->send(array('result' => 'fail', 'message' => $response['message']));
// }
if(!isset($this->config->global)) $this->config->global = new stdclass();
$this->loadModel('setting')->setItem('system.common.global.bindCommunity', true);
$this->loadModel('setting')->setItem('system.common.global.bindCommunityMobile', $this->post->mobile);
$agreeUX = $this->post->agreeUX;
$agreeUX = $agreeUX == '1';
if($agreeUX)
{
$this->loadModel('setting')->setItem('system.common.global.agreeUX', true);
}
return $this->send(array('result' => 'success', 'load' => inlink('index') . '#app=admin'));
}
}
$this->display();
}
/**
* 解绑社区账号
* Unbind community account。
*
* @return int|null
*/
public function unBindCommunity()
{
$this->loadModel('setting')->setItem('system.common.global.bindCommunity', false);
$this->loadModel('setting')->setItem('system.common.global.bindCommunityMobile', '');
$this->config->global->agreeUX = false;
$this->config->global->bindCommunityMobile = '';
return $this->send(array('result' => 'success', 'message' => '已解绑', 'load' => inlink('index') . '#app=admin'));
}
/**
* 切换同意改进计划
* Change the agreement to improve the plan。
*
* @return int|null
*/
public function changeAgreeUX()
{
$agreeUX = $this->post->agreeUX;
$agreeUX = $agreeUX == 'true';
$this->loadModel('setting')->setItem('system.common.global.agreeUX', $agreeUX);
$this->config->global->agreeUX = $agreeUX;
$message = $agreeUX ? '已同意' : '已取消';
return $this->send(array('result' => 'success', 'message' => $message));
}
/**
* 获取图形验证码
* Obtain graphical captcha。
*
* @return int|null
*/
public function getCaptcha()
{
$apiRoot = 'https://zentao.xsj.oop.cc';
$apiURL = $apiRoot . "/guarder-getCaptcha.json";
$response = common::http($apiURL);
$response = json_decode($response, true);
return $this->send($response);
}
/**
* 发动短信验证码
* Activate SMS verification code
*
* @return int|null
*/
public function sendcode()
{
$apiRoot = 'https://zentao.xsj.oop.cc';
$apiURL = $apiRoot . "/sms-sendcode.json";
$response = common::http($apiURL, $_POST);
$response = json_decode($response, true);
return $this->send($response);
}
/**
* 用户体验改进计划详情
*
* @return void
*/
public function planModal()
{
$this->display();
}
}
-9
View File
@@ -1,9 +0,0 @@
#mainContent{width: 600px}
.panel-form{margin-top: 200px}
.mobile-captcha {display: inline; width: 83%;}
.a-captcha {height: 34px; line-height: 24px; width: 120px; margin-left:12px;max-width: 30%;}
.captcha-mobile-sender {width: 204px; height: 124px; position: absolute; top: 36px; right: 0; box-shadow: 0px 2px 24px 3px #1F232914; background-color: #fff; margin-top: 7px;}
.captcha-wrapper {height:68px; margin-bottom: 12px;}
.captcha-wrapper img, .image-box {width: 100%;height: 100%;}
#checkMobileSender {height: 36px; line-height: 36px; color: #007AFF; background: #fff; padding:0;}
#checkMobileSender:hover,#checkMobileSender:active,#checkMobileSender:focus{box-shadow: none;}
-92
View File
@@ -1,92 +0,0 @@
$('#agreeUX').on('change', function(e)
{
$.post($.createLink('admin', 'changeAgreeUX'),{agreeUX:e.target.checked},function(response)
{
response = JSON.parse(response);
zui.Messager.show(response.message);
});
});
$('#unBind').on('click', function(e)
{
$.post($.createLink('admin', 'unBindCommunity'),{},function(response)
{
response = JSON.parse(response);
zui.Messager.show(response.message);
if(response.result == 'success')
{
setTimeout(function() {
location.href = response.load;
}, 1000);
}
});
});
$().ready(function()
{
getCaptchaContent($('.image-box'));
});
$('.image-box').on('click', function()
{
getCaptchaContent($('.image-box'));
});
function getCaptchaContent($ele)
{
$.get($.createLink('admin', 'getCaptcha'), function(response)
{
response = JSON.parse(response);
if(response.result == 'success') $ele.html(response.captchaContent);
});
}
$('#captcha-btn').on('click', function(e)
{
$('.captcha-mobile-sender').show();
});
$('#checkMobileSender').on('click', function(e)
{
e.preventDefault();
$('#captchaImageError').html('');
$('#captchaMobileError').html('');
$.post($.createLink('admin', 'sendcode'),{mobile:$('#mobile-captcha').val(), captchaContent: $('#captchaImage').val()},function(response)
{
response = JSON.parse(response);
if(response.result == 'success')
{
countdown = 60;
setSmsSenderTime();
$('.captcha-mobile-sender').hide();
zui.Messager.show({
message: response.message,
type: 'primary',
})
$('#captchaMobileError').html(response.message);
}
else
{
$('#captchaImageError').html(response.message);
if(response.captchaContent) $('.captch-box .image-box').html(response.captchaContent);
}
});
});
function setSmsSenderTime()
{
$('#captcha-btn').html(countdown + 's').off('click').removeClass('captcha-btn-class');
smsSenderTimer = setInterval(function(){
countdown -= 1;
if(countdown > 0){
$('#captcha-btn').html(countdown + 's').off('click').removeClass('captcha-btn-class');
}else{
window.clearInterval(smsSenderTimer);
$('#captchaMobileError').html('');
$('#captcha-btn').html('重新发送').on('click', function(e)
{
$('#captchaMobileError').html('');
$('.captcha-mobile-sender').show();
}).addClass('captcha-btn-class');
}
},1000);
}
-14
View File
@@ -1,14 +0,0 @@
<?php
/**
* The officialwebsite module zh-cn file of ZenTaoPMS.
*
* @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Jialiang Zhang <zhangjialiang@chandao.com>
* @package officialwebsite
* @version $Id: zh-cn.php 4972 2013-07-02 06:50:10Z zhujinyonging@gmail.com $
* @link https://www.zentao.net
*/
$lang->officialwebsite->common = '禅道社区';
$lang->officialwebsite->index = '禅道社区';
-15
View File
@@ -1,15 +0,0 @@
<?php
/**
* The model file of officialwebsite module of ZenTaoPMS.
*
* @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Jialiang Zhang <zhangjialiang@chandao.com>
* @package officialwebsite
* @link https://www.zentao.net
*/
class officialwebsiteModel extends model
{
}
-179
View File
@@ -1,179 +0,0 @@
<?php
declare(strict_types=1);
/**
* The index view file of officialwebsite module of ZenTaoPMS.
* @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.zentao.net)
* @license ZPL(https://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Jialiang Zhang <zhangjialiang@chandao.com>
* @package officialwebsite
* @link https://www.zentao.net
*/
namespace zin;
set::zui(true);
modalHeader(set::title('加入禅道社区'));
if($bindCommunity)
{
panel
(
setID('main'),
setClass('flex justify-center'),
div
(
setID('mainContent'),
setClass('px-1 mt-2 w-full max-w-7xl'),
div(
setClass('max-w-7xl h-40'),
'禅道官网 ',
br(),
span(
$bindCommunityMobile
),
div(
html("<button class='btn btn-wide btn-primary' id='unBind'>解绑</button>")
)
),
div(
'加入',
a
(
setID('experience-plan-show'),
set('data-size', 'sm'),
'《用户体验计划》',
set::href(createLink('admin', 'planModal')),
set('data-toggle', 'modal')
),
'情况',
),
div(
html("<input type='checkbox' id='agreeUX' " . $checked . "/>")
)
)
);
}
else {
div
(
setID('main'),
setClass('flex justify-center'),
div
(
setID('mainContent'),
setClass('px-1 mt-2 w-full max-w-7xl'),
formPanel
(
set::formID('joinForm'),
div(
setClass('max-w-7xl h-40'),
),
setClass('bg-canvas m-auto mw-auto'),
set::headingClass('w-96 m-auto'),
set::submitBtnText($lang->save),
formRow
(
setClass('w-96 m-auto'),
formGroup
(
set::label('手机号'),
input
(
set::name('mobile'),
setID('mobile-captcha')
)
)
),
p
(
setID('captchaImageError')
),
p
(
setID('captchaMobileError')
),
formRow
(
setClass('w-96 m-auto'),
formGroup
(
set::label('短信验证码'),
input
(
set::name('captcha')
)
),
a
(
setID('captcha-btn'),
setClass('captcha-btn-class'),
set('href', 'javascript:;'),
'获取验证码'
)
),
formRow
(
setClass('w-96 m-auto'),
formGroup
(
checkbox
(
set::name('agreeUX'),
set::value(1)
),
span
(
'加入',
a
(
setID('experience-plan-show'),
set('data-size', 'sm'),
'《用户体验计划》',
set::href(createLink('admin', 'planModal')),
set('data-toggle', 'modal')
),
'帮助我们...'
)
)
)
),
div(
setClass('captcha-mobile-sender captch-box'),
set::style(array('display' => 'none')),
div
(
setClass('form-group captch-box'),
set::style(array('margin-bottom' => 0)),
div
(
set::style(array('padding-right' => 0)),
setClass('captcha-wrapper'),
div
(
setClass('image-box')
)
)
),
div
(
setClass('w-96 m-auto'),
input
(
set::name('captchaImage'),
set::placeholder('请输入图形验证码')
)
),
btn
(
setID('checkMobileSender'),
setClass('px-4'),
set::type('primary'),
'确定'
)
)
)
);
if (strpos($_SERVER['REQUEST_URI'], '_single=1') !== false) {
render('pagebase');
}
}
@@ -1,19 +0,0 @@
<?php
declare(strict_types=1);
/**
* The plan modal view file of officialwebsite module of ZenTaoPMS.
*
* @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.zentao.net)
* @license ZPL(https://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Jialiang Zhang <zhangjialiang@chandao.com>
* @package officialwebsite
* @link https://www.zentao.net
*/
namespace zin;
modalHeader(set::title('用户体验计划'));
panel
(
'用户体验计划详情'
);