Browse Source

add default invite code

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

2
controller/Controller.php

@ -164,7 +164,6 @@ Class Controller {
//error log //error log
protected function logError($error_message) { protected function logError($error_message) {
if (!empty(FSC::$app['config']['debug'])) {
$thisUrl = FSC::$app['requestUrl']; $thisUrl = FSC::$app['requestUrl'];
$logTime = date('Y-m-d H:i:s'); $logTime = date('Y-m-d H:i:s');
$logDir = __DIR__ . '/../runtime/logs/'; $logDir = __DIR__ . '/../runtime/logs/';
@ -175,7 +174,6 @@ Class Controller {
@error_log("{$logTime}\t{$thisUrl}\tERROR: {$error_message}\n", 3, "{$logDir}{$logFilename}"); @error_log("{$logTime}\t{$thisUrl}\tERROR: {$error_message}\n", 3, "{$logDir}{$logFilename}");
} }
} }
}
//get user real ip //get user real ip
protected function getUserIp() { protected function getUserIp() {

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

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

18
www/js/tajian.js

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

Loading…
Cancel
Save