Browse Source

add default invite code

master
filesite 5 months ago
parent
commit
e13e1163cf
  1. 18
      controller/Controller.php
  2. 5
      themes/tajian/views/site/register.php
  3. 18
      www/js/tajian.js

18
controller/Controller.php

@ -164,16 +164,14 @@ Class Controller { @@ -164,16 +164,14 @@ Class Controller {
//error log
protected function logError($error_message) {
if (!empty(FSC::$app['config']['debug'])) {
$thisUrl = FSC::$app['requestUrl'];
$logTime = date('Y-m-d H:i:s');
$logDir = __DIR__ . '/../runtime/logs/';
$logFilename = 'error.log';
$logOk = @error_log("{$logTime}\t{$thisUrl}\tERROR: {$error_message}\n", 3, "{$logDir}{$logFilename}");
if (!$logOk) { //try to mkdir
@mkdir($logDir, 0700, true);
@error_log("{$logTime}\t{$thisUrl}\tERROR: {$error_message}\n", 3, "{$logDir}{$logFilename}");
}
$thisUrl = FSC::$app['requestUrl'];
$logTime = date('Y-m-d H:i:s');
$logDir = __DIR__ . '/../runtime/logs/';
$logFilename = 'error.log';
$logOk = @error_log("{$logTime}\t{$thisUrl}\tERROR: {$error_message}\n", 3, "{$logDir}{$logFilename}");
if (!$logOk) { //try to mkdir
@mkdir($logDir, 0700, true);
@error_log("{$logTime}\t{$thisUrl}\tERROR: {$error_message}\n", 3, "{$logDir}{$logFilename}");
}
}

5
themes/tajian/views/site/register.php

@ -3,10 +3,7 @@ @@ -3,10 +3,7 @@
<div class="mb-3 pt20 twocol">
<label for="text_input_code" class="form-label">邀请码</label>
<input id="text_input_code" name="friendscode" placeholder="邀请者手机号末 6 位" type="number">
<button class="smsbtn bt_kf_JS button button-sm button-shadow" type="button" data-hide="隐藏客服微信">加客服索要</button>
<p class="mt10 hide kf_wx_JS">
<img src="/tajian/wx_jialuoma.jpeg" alt="Ta荐客服微信二维码" width="200" class="kfwx">
</p>
<button class="smsbtn bt_kf_JS button button-sm button-shadow" type="button" data-default-code="946847">帮我填</button>
</div>
<div class="mb-3">
<label for="text_input_username" class="form-label">手机号码</label>

18
www/js/tajian.js

@ -175,24 +175,12 @@ if ($('#add_video_form').get(0)) { @@ -175,24 +175,12 @@ if ($('#add_video_form').get(0)) {
$('#add_video_form').submit(handle_add_fav);
}
// 注册/登录等页面展示客服微信二维码切换按钮
// 注册帮用户填默认邀请码
if ($('.bt_kf_JS').get(0)) {
var kf_hide_text = $('.bt_kf_JS').attr('data-hide'),
kf_text = $('.bt_kf_JS').text();
var kf_default_code = $('.bt_kf_JS').attr('data-default-code');
$('.bt_kf_JS').click(function(e) {
if ($('.kf_wx_JS').hasClass('hide')) {
$('.kf_wx_JS').removeClass('hide');
$('.bt_kf_JS').text(kf_hide_text);
}else {
$('.kf_wx_JS').addClass('hide');
$('.bt_kf_JS').text(kf_text);
}
$('input[name=friendscode]').val(kf_default_code);
});
var win_width = $(window).width();
if (win_width > 768 && $('.tajian_index').get(0)) {
$('.bt_kf_JS').click().addClass('hide');
}
}
//验证码发送

Loading…
Cancel
Save