作者 王晓刚
1 个管道 的构建 通过 耗费 22 秒

合并分支 'wxg' 到 'master'

修改问题文档



查看合并请求 !97
... ... @@ -290,14 +290,14 @@ class Goods extends Frontend
}
$data[$key]['insurance'] = $insurance;
//当前用户若不是会员加密部分信息
if($encrypt == '2'){
/*if($encrypt == '2'){
$text = '';
if(empty($user_id)){
$text = "(请您先登录)";
}
$data[$key]['store_phone'] = "***********$text";
$data[$key]['store_address'] = "***********$text";
}
}*/
//计算平均分
$score_count = $evaluateModel->where(['goods_id'=>$vo['id']])->count();
$score_sum = $evaluateModel->where(['goods_id'=>$vo['id']])->sum('level');
... ...
... ... @@ -54,10 +54,10 @@ class Shop extends Frontend
}
$data['is_collect'] = $is_collect;
//当前用户若不是会员加密部分信息
if($encrypt == '2'){
/*if($encrypt == '2'){
$data['phone'] = "***********";
$data['address'] = "***********";
}
}*/
$this->assign('data',$data);
// dump(collection($data)->toArray());
if($this->request->isAjax()){
... ...
... ... @@ -121,6 +121,10 @@ class User extends Frontend
if($result['password'] != $password){
$this->error('密码错误');
}
$user = Db::name('user')->where(['id'=>$result['id']])->find();
if($user['status'] != 'normal'){
$this->error('抱歉,您已被加入黑名单');
}
$arr3['logintime'] = time();
$arr3['loginip'] = $this->request->ip(0, true);
$result3 = $userModel->updateData(['id'=>$result['id']],$arr3);
... ... @@ -164,6 +168,10 @@ class User extends Frontend
if($data['code'] != $code){
$this->error('验证码错误');
}
$user = Db::name('user')->where(['id'=>$result1['id']])->find();
if($user['status'] != 'normal'){
$this->error('抱歉,您已被加入黑名单');
}
$arr3['logintime'] = time();
$arr3['loginip'] = $this->request->ip(0, true);
$result3 = $userModel->updateData(['id'=>$result1['id']],$arr3);
... ... @@ -337,12 +345,12 @@ class User extends Frontend
}
// $token = generate_user_token($result1);
// session('token',$token);
$this->auth->direct($result1);
$this->auth->direct($data['id']);
$token = $this->auth->getToken();
session('token',$token);
Cookie::set('token',$token);
Db::commit();
$this->success('SUCCESS','user/login_view');
$this->success('SUCCESS','index/index');
}
/**
... ...
... ... @@ -107,7 +107,7 @@
<!--首页内容-->
<div class="content">
<div class="contentMain">
<h1>都在用的工业品购销平台</h1>
<div style="color:rgba(255,255,255,1);font-size: 40px;text-align: center;margin: 130px 0 30px 0;"><b>都在用的工业品购销平台</b></div>
<!--搜索框-->
<div class="searchBox">
<input id="searchVal" type="text" class="search" placeholder="请输入型号、参数查找元器件" onkeypress="carriage(event)" />
... ...
... ... @@ -359,7 +359,7 @@
testVerificationCode();
testPassword();
testCheckbox();
if(!testPassword() || !testUserName() || !testPhoneNum() || testVerificationCode() || testCheckbox()){
if(!testPassword() || !testUserName() || !testPhoneNum() || !testVerificationCode() || !testCheckbox()){
return false;
}
var username = $('#userName').val();
... ...