Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
eduline
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
冷斌
eduline
Commits
0df4d2a0
Commit
0df4d2a0
authored
Jun 29, 2020
by
刘海龙
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://132.232.91.252:9999/ice/eduline
parents
ad7704be
5c86af7d
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
172 additions
and
45 deletions
+172
-45
addons/model/PassportModel.class.php
+13
-1
apps/basic/Lib/Action/MessageAction.class.php
+46
-25
apps/basic/Lib/Action/PassportAction.class.php
+19
-3
apps/basic/Tpl/default/Message/mynotify_w3g.html
+6
-3
apps/classroom/Lib/Action/PayAction.class.php
+2
-0
apps/classroom/Tpl/default/Index/theme_x7_w3g.html
+5
-3
apps/exams/Lib/Action/AdminPaperAction.class.php
+18
-2
apps/exams/Lib/Action/IndexAction.class.php
+6
-0
apps/exams/Lib/Model/ExamsPaperModel.class.php
+1
-2
apps/exams/Tpl/default/Index/examsroom_w3g.html
+8
-1
apps/exams/_static/js/public_exam_3g.js
+40
-2
apps/mall/Tpl/default/Goods/index_w3g.html
+8
-3
No files found.
addons/model/PassportModel.class.php
View file @
0df4d2a0
...
@@ -155,6 +155,14 @@ class PassportModel extends Model
...
@@ -155,6 +155,14 @@ class PassportModel extends Model
}
}
}
}
public
function
wxLogin
(
$uid
)
{
$user
=
model
(
'User'
)
->
where
([
'uid'
=>
$uid
])
->
find
();
// 记录登录日志,首次登录判断
$this
->
rel
=
D
(
'LoginRecord'
)
->
where
(
"uid = "
.
$uid
)
->
field
(
'locktime'
)
->
find
();
$this
->
_recordLogin
(
$uid
,
true
);
}
/**
/**
* 根据标示符(email或uid)和未加密的密码获取本地用户(密码为null时不参与验证)
* 根据标示符(email或uid)和未加密的密码获取本地用户(密码为null时不参与验证)
* @param string $login 标示符内容(为数字时:标示符类型为uid,其他:标示符类型为email)
* @param string $login 标示符内容(为数字时:标示符类型为uid,其他:标示符类型为email)
...
@@ -429,7 +437,11 @@ class PassportModel extends Model
...
@@ -429,7 +437,11 @@ class PassportModel extends Model
return
$user
;
return
$user
;
}
else
{
}
else
{
return
$user
[
'uid'
]
>
0
?
$this
->
_recordLogin
(
$user
[
'uid'
],
$is_remember_me
)
:
false
;
if
(
$user
[
'uid'
]
>
0
)
{
$this
->
_recordLogin
(
$user
[
'uid'
],
$is_remember_me
);
return
$user
;
}
return
false
;
}
}
}
}
...
...
apps/basic/Lib/Action/MessageAction.class.php
View file @
0df4d2a0
...
@@ -16,7 +16,7 @@ class MessageAction extends Action
...
@@ -16,7 +16,7 @@ class MessageAction extends Action
* @return void
* @return void
*/
*/
function
_initialize
(){
function
_initialize
(){
}
}
/**
/**
...
@@ -24,28 +24,50 @@ class MessageAction extends Action
...
@@ -24,28 +24,50 @@ class MessageAction extends Action
* @return void
* @return void
*/
*/
public
function
index
()
{
public
function
index
()
{
$and_uid
=
$_GET
[
'and_uid'
]
?
:
''
;
// $and_uid = $_GET['and_uid'] ? :'';
//
// $dao = model('Message');
// $list = $dao->getMessageListByUid($this->mid, array(MessageModel::ONE_ON_ONE_CHAT, MessageModel::MULTIPLAYER_CHAT), $and_uid);
//
// $this->assign($list);
// if(isAjax()){
// Response::create(['status'=>1,'data'=>['html'=>$this->fetch('index_w3g_ajax')]],'json')->code(200)->send();exit;
// }
// // 设置信息已读(在右上角提示去掉),
// $dao->setMessageIsRead(t($POST['id']), $this->mid, 1);
// $this->setTitle('我的私信');
// $userInfo = model('User')->getUserInfo($this->mid);
//
// $this->setKeywords($userInfo['uname'].'的私信');
// $this->display();
$dao
=
model
(
'Message'
);
$map
[
'uid'
]
=
$this
->
mid
;
$list
=
$dao
->
getMessageListByUid
(
$this
->
mid
,
array
(
MessageModel
::
ONE_ON_ONE_CHAT
,
MessageModel
::
MULTIPLAYER_CHAT
),
$and_uid
);
$map
[
'node'
]
=
[
'neq'
,
'live_notify'
];
$list
=
D
(
'notify_message'
)
->
where
(
$map
)
->
order
(
'ctime desc'
)
->
findpage
(
20
);
foreach
(
$list
[
'data'
]
as
$k
=>&
$v
){
if
(
$appname
!=
'public'
){
$list
[
'data'
][
$k
][
'app'
]
=
model
(
'App'
)
->
getAppByName
(
$v
[
'appname'
]);
}
if
(
$v
[
'node'
]
==
'live_notify'
&&
strpos
(
$v
[
'body'
],
"
{
SITE_URL
}
"
)){
$v
[
'body'
]
=
str_replace
(
"
{
SITE_URL
}
"
,
SITE_URL
,
$v
[
'body'
]);
}
}
unset
(
$v
);
model
(
'Notify'
)
->
setRead
(
$this
->
mid
);
$this
->
assign
(
$list
);
$this
->
assign
(
'list'
,
$list
);
if
(
isAjax
()){
if
(
isAjax
()){
Response
::
create
([
'status'
=>
1
,
'data'
=>
[
'html'
=>
$this
->
fetch
(
'
index
_w3g_ajax'
)]],
'json'
)
->
code
(
200
)
->
send
();
exit
;
Response
::
create
([
'status'
=>
1
,
'data'
=>
[
'html'
=>
$this
->
fetch
(
'
mynotify
_w3g_ajax'
)]],
'json'
)
->
code
(
200
)
->
send
();
exit
;
}
}
// 设置信息已读(在右上角提示去掉),
$this
->
setTitle
(
'系统消息'
);
$dao
->
setMessageIsRead
(
t
(
$POST
[
'id'
]),
$this
->
mid
,
1
);
$this
->
setKeywords
(
'系统消息'
);
$this
->
setTitle
(
'我的私信'
);
$this
->
display
(
'mynotify'
);
$userInfo
=
model
(
'User'
)
->
getUserInfo
(
$this
->
mid
);
$this
->
setKeywords
(
$userInfo
[
'uname'
]
.
'的私信'
);
$this
->
display
();
}
}
/**
/**
* 系统通知
* 系统通知
* @return void
* @return void
*/
*/
public
function
notify
()
{
public
function
notify
()
{
//$list = model('Notify')->getMessageList($this->mid); //2012/12/27
//$list = model('Notify')->getMessageList($this->mid); //2012/12/27
$map
[
'uid'
]
=
$this
->
mid
;
$map
[
'uid'
]
=
$this
->
mid
;
...
@@ -74,7 +96,7 @@ class MessageAction extends Action
...
@@ -74,7 +96,7 @@ class MessageAction extends Action
/**
/**
* 开课提醒
* 开课提醒
* @return void
* @return void
*/
*/
public
function
liveNotify
()
{
public
function
liveNotify
()
{
$map
[
'uid'
]
=
$this
->
mid
;
$map
[
'uid'
]
=
$this
->
mid
;
$map
[
'node'
]
=
'live_notify'
;
$map
[
'node'
]
=
'live_notify'
;
...
@@ -96,7 +118,7 @@ class MessageAction extends Action
...
@@ -96,7 +118,7 @@ class MessageAction extends Action
* 获取指定应用指定用户下的消息列表
* 获取指定应用指定用户下的消息列表
* @return void
* @return void
*/
*/
public
function
notifyDetail
()
{
public
function
notifyDetail
()
{
$appname
=
t
(
$_REQUEST
[
'appname'
]);
$appname
=
t
(
$_REQUEST
[
'appname'
]);
//设置为已读
//设置为已读
//model('Notify')->setRead($this->mid,$appname);
//model('Notify')->setRead($this->mid,$appname);
...
@@ -121,13 +143,13 @@ class MessageAction extends Action
...
@@ -121,13 +143,13 @@ class MessageAction extends Action
/**
/**
* 私信详情
* 私信详情
* @return void
* @return void
*/
*/
public
function
detail
()
public
function
detail
()
{
{
$message
=
model
(
'Message'
)
->
isMember
(
t
(
$_GET
[
'id'
]),
$this
->
mid
,
true
);
$message
=
model
(
'Message'
)
->
isMember
(
t
(
$_GET
[
'id'
]),
$this
->
mid
,
true
);
// 验证数据
// 验证数据
if
(
empty
(
$message
))
{
if
(
empty
(
$message
))
{
$this
->
error
(
'私信不存在'
);
$this
->
error
(
'私信不存在'
);
}
}
$message
[
'member'
]
=
model
(
'Message'
)
->
getMessageMembers
(
t
(
$_GET
[
'id'
]),
'member_uid'
);
$message
[
'member'
]
=
model
(
'Message'
)
->
getMessageMembers
(
t
(
$_GET
[
'id'
]),
'member_uid'
);
...
@@ -139,7 +161,7 @@ class MessageAction extends Action
...
@@ -139,7 +161,7 @@ class MessageAction extends Action
// 设置信息已读(私信列表页去掉new标识)
// 设置信息已读(私信列表页去掉new标识)
model
(
'Message'
)
->
setMessageIsRead
(
t
(
$_GET
[
'id'
]),
$this
->
mid
,
0
);
model
(
'Message'
)
->
setMessageIsRead
(
t
(
$_GET
[
'id'
]),
$this
->
mid
,
0
);
$message
[
'since_id'
]
=
model
(
'Message'
)
->
getSinceMessageId
(
$message
[
'list_id'
],
$message
[
'message_num'
]);
$message
[
'since_id'
]
=
model
(
'Message'
)
->
getSinceMessageId
(
$message
[
'list_id'
],
$message
[
'message_num'
]);
$this
->
assign
(
'message'
,
$message
);
$this
->
assign
(
'message'
,
$message
);
$this
->
assign
(
'type'
,
intval
(
$_GET
[
'type'
]));
$this
->
assign
(
'type'
,
intval
(
$_GET
[
'type'
]));
...
@@ -180,7 +202,7 @@ class MessageAction extends Action
...
@@ -180,7 +202,7 @@ class MessageAction extends Action
// 是否能够编辑用户
// 是否能够编辑用户
$editable
=
intval
(
$_REQUEST
[
'editable'
])
==
0
?
0
:
1
;
$editable
=
intval
(
$_REQUEST
[
'editable'
])
==
0
?
0
:
1
;
$this
->
assign
(
'editable'
,
$editable
);
$this
->
assign
(
'editable'
,
$editable
);
$this
->
display
();
$this
->
display
();
}
}
...
@@ -238,7 +260,7 @@ class MessageAction extends Action
...
@@ -238,7 +260,7 @@ class MessageAction extends Action
if
(
$school
)
{
if
(
$school
)
{
$_POST
[
'content'
]
=
"您好,您绑定的机构已经被管理员"
.
$dotype
;
$_POST
[
'content'
]
=
"您好,您绑定的机构已经被管理员"
.
$dotype
;
}
}
$_POST
[
'body'
]
=
$_POST
[
'content'
];
$_POST
[
'body'
]
=
$_POST
[
'content'
];
$_POST
[
'uid'
]
=
$_POST
[
'to'
];
$_POST
[
'uid'
]
=
$_POST
[
'to'
];
...
@@ -394,15 +416,15 @@ class MessageAction extends Action
...
@@ -394,15 +416,15 @@ class MessageAction extends Action
* 删除用户指定私信会话
* 删除用户指定私信会话
* @return integer 1=成功 0=失败
* @return integer 1=成功 0=失败
*/
*/
public
function
doDeleteSession
()
{
public
function
doDeleteSession
()
{
$res
=
model
(
'Message'
)
->
deleteSessionById
(
$this
->
mid
,
t
(
$_POST
[
'ids'
]));
$res
=
model
(
'Message'
)
->
deleteSessionById
(
$this
->
mid
,
t
(
$_POST
[
'ids'
]));
if
(
$res
)
echo
1
;
if
(
$res
)
echo
1
;
else
echo
0
;
else
echo
0
;
}
}
public
function
doSendFeedMail
(){
public
function
doSendFeedMail
(){
//手动执行邮件任务
//手动执行邮件任务
model
(
'Message'
)
->
doSendFeedMail
();
model
(
'Message'
)
->
doSendFeedMail
();
}
}
}
}
\ No newline at end of file
apps/basic/Lib/Action/PassportAction.class.php
View file @
0df4d2a0
...
@@ -48,7 +48,14 @@ class PassportAction extends CommonAction
...
@@ -48,7 +48,14 @@ class PassportAction extends CommonAction
public
function
wxLogin
(
$openid
)
public
function
wxLogin
(
$openid
)
{
{
$uid
=
M
(
'user_openid'
)
->
where
([
'open_id'
=>
$openid
,
'type'
=>
1
])
->
getField
(
'uid'
);
if
(
!
$uid
)
{
return
;
}
$this
->
passport
->
wxLogin
(
$uid
);
if
(
model
(
'Passport'
)
->
isLogged
())
{
U
(
'classroom/Index/index'
,
''
,
true
);
//dengjb 个人中心
}
}
}
/**
/**
...
@@ -86,7 +93,7 @@ class PassportAction extends CommonAction
...
@@ -86,7 +93,7 @@ class PassportAction extends CommonAction
// 微信登录
// 微信登录
$openid
=
''
;
$openid
=
''
;
/**
$ua
=
$_SERVER
[
'HTTP_USER_AGENT'
];
$ua
=
$_SERVER
[
'HTTP_USER_AGENT'
];
if
(
strpos
(
$ua
,
'MicroMessenger'
)
==
false
&&
strpos
(
$ua
,
'Windows Phone'
)
==
false
)
{
if
(
strpos
(
$ua
,
'MicroMessenger'
)
==
false
&&
strpos
(
$ua
,
'Windows Phone'
)
==
false
)
{
...
@@ -108,7 +115,7 @@ class PassportAction extends CommonAction
...
@@ -108,7 +115,7 @@ class PassportAction extends CommonAction
$this
->
wxLogin
(
$openid
);
$this
->
wxLogin
(
$openid
);
}
}
}
}
**/
$this
->
assign
(
'openid'
,
$openid
);
$this
->
assign
(
'openid'
,
$openid
);
// $this->assign('login_bg', $login_bg);
// $this->assign('login_bg', $login_bg);
$this
->
assign
(
'this_mhm_id'
,
$this_mhm_id
);
$this
->
assign
(
'this_mhm_id'
,
$this_mhm_id
);
...
@@ -162,6 +169,15 @@ class PassportAction extends CommonAction
...
@@ -162,6 +169,15 @@ class PassportAction extends CommonAction
$status
=
1
;
$status
=
1
;
$info
=
$this
->
passport
->
getSuccess
();
$info
=
$this
->
passport
->
getSuccess
();
//$data = ($GLOBALS['ts']['site']['home_url'])?$GLOBALS['ts']['site']['home_url']:0;
//$data = ($GLOBALS['ts']['site']['home_url'])?$GLOBALS['ts']['site']['home_url']:0;
if
(
$openid
)
{
$open
=
[
'type'
=>
1
,
'uid'
=>
$result
[
'uid'
]];
if
(
M
(
'user_openid'
)
->
where
(
$open
)
->
find
())
{
M
(
'user_openid'
)
->
where
(
$open
)
->
delete
();
}
$open
[
'open_id'
]
=
$openid
;
M
(
'user_openid'
)
->
add
(
$open
);
}
$data
=
U
(
'classroom/Index/index'
);
$data
=
U
(
'classroom/Index/index'
);
}
}
...
...
apps/basic/Tpl/default/Message/mynotify_w3g.html
View file @
0df4d2a0
<include
file=
"__THEME__/public_header_w3g"
/>
<include
file=
"__THEME__/public_header_w3g"
/>
<script
src=
"__THEMEW3G__/js/flexible.js"
></script>
<script
src=
"__THEMEW3G__/js/flexible.js"
></script>
<link
rel=
"stylesheet"
href=
"__APP__/css/index_w3g.css"
>
<link
rel=
"stylesheet"
href=
"__APP__/css/index_w3g.css"
>
<style
type=
"text/css"
>
.navbar
.tab-item.is-selected
::after
{
background
:
none
;
}
.navbar
.tab-item.is-selected
{
color
:
#333
;
}
</style>
<div
class=
"bar-nav"
>
<div
class=
"bar-nav"
>
<a
href=
"{:U('home/User/index')}"
class=
"bar-btn eduline-v4 v4-iconfont-houtui"
></a>
<a
href=
"{:U('home/User/index')}"
class=
"bar-btn eduline-v4 v4-iconfont-houtui"
></a>
<div
class=
"bar-title"
>
我的消息
</div>
<div
class=
"bar-title"
>
我的消息
</div>
...
@@ -48,7 +52,7 @@ $(function(){
...
@@ -48,7 +52,7 @@ $(function(){
var
scrollTop
=
$
(
this
).
scrollTop
();
var
scrollTop
=
$
(
this
).
scrollTop
();
var
scrollHeight
=
$
(
document
).
height
();
var
scrollHeight
=
$
(
document
).
height
();
var
windowHeight
=
$
(
this
).
height
();
var
windowHeight
=
$
(
this
).
height
();
if
(
scrollHeight
-
(
scrollTop
+
windowHeight
)
<
60
){
if
(
scrollHeight
-
(
scrollTop
+
windowHeight
)
<
60
){
is_loading
=
true
;
is_loading
=
true
;
if
(
!
p
||
p
>=
parseInt
(
"{$list['totalPages']}"
)){
if
(
!
p
||
p
>=
parseInt
(
"{$list['totalPages']}"
)){
...
@@ -75,4 +79,4 @@ $(function(){
...
@@ -75,4 +79,4 @@ $(function(){
}
}
});
});
});
});
</script>
</script>
\ No newline at end of file
apps/classroom/Lib/Action/PayAction.class.php
View file @
0df4d2a0
...
@@ -902,6 +902,8 @@ class PayAction extends CommonAction
...
@@ -902,6 +902,8 @@ class PayAction extends CommonAction
$url
=
U
(
"home/User/credit"
);
$url
=
U
(
"home/User/credit"
);
}
elseif
(
$status_info
[
'type'
]
==
2
){
}
elseif
(
$status_info
[
'type'
]
==
2
){
$url
=
U
(
"home/User/account"
);
$url
=
U
(
"home/User/account"
);
}
elseif
(
$status_info
[
'type'
]
==
1
){
$url
=
U
(
"home/Home/exams"
);
}
else
{
}
else
{
$url
=
U
(
"home/User/recharge"
);
$url
=
U
(
"home/User/recharge"
);
}
}
...
...
apps/classroom/Tpl/default/Index/theme_x7_w3g.html
View file @
0df4d2a0
...
@@ -100,7 +100,10 @@
...
@@ -100,7 +100,10 @@
<if
condition=
"$vo['price'] eq 0 or $vo['is_buy'] eq 1"
>
<if
condition=
"$vo['price'] eq 0 or $vo['is_buy'] eq 1"
>
<div
@
click=
"onStart({$vo['exams_paper_id']})"
class=
"home_button_green layout_center"
>
开始做题
</div>
<div
@
click=
"onStart({$vo['exams_paper_id']})"
class=
"home_button_green layout_center"
>
开始做题
</div>
<else
/>
<else
/>
<!--
<div @click="onPay({$vo['exams_paper_id']})" class="home_button_orange layout_center">¥{$vo['price']}</div>
<div @click="onPay({$vo['exams_paper_id']})" class="home_button_orange layout_center">¥{$vo['price']}</div>
-->
<div
@
click=
"onStart({$vo['exams_paper_id']})"
class=
"home_button_orange layout_center"
>
预览
</div>
</if>
</if>
</div>
</div>
<div
class=
"layout_h_b"
style=
"margin-top: 0.5rem;"
>
<div
class=
"layout_h_b"
style=
"margin-top: 0.5rem;"
>
...
@@ -180,7 +183,7 @@
...
@@ -180,7 +183,7 @@
onChange
:
function
(
tab
)
{
onChange
:
function
(
tab
)
{
console
.
log
(
tab
)
console
.
log
(
tab
)
switch
(
tab
){
switch
(
tab
){
case
0
:
case
0
:
window
.
location
.
href
=
"{:U('classroom/Index/index')}"
window
.
location
.
href
=
"{:U('classroom/Index/index')}"
break
;
break
;
case
1
:
case
1
:
...
@@ -200,12 +203,11 @@
...
@@ -200,12 +203,11 @@
}
}
},
},
onDownload
:
function
(
isBuy
,
price
,
path
)
{
onDownload
:
function
(
isBuy
,
price
,
path
)
{
if
(
(
isBuy
||
price
==
0
)
&&
path
)
{
if
(
path
)
{
window
.
location
.
href
=
path
;
window
.
location
.
href
=
path
;
}
}
},
},
onPay
:
function
(
id
)
{
onPay
:
function
(
id
)
{
console
.
log
(
"Id = "
+
id
)
if
(
MID
<=
0
)
{
if
(
MID
<=
0
)
{
ui
.
confirm
(
'请先登录'
,
{
ui
.
confirm
(
'请先登录'
,
{
yes
:
function
()
{
yes
:
function
()
{
...
...
apps/exams/Lib/Action/AdminPaperAction.class.php
View file @
0df4d2a0
...
@@ -178,7 +178,16 @@ class AdminPaperAction extends AdministratorAction
...
@@ -178,7 +178,16 @@ class AdminPaperAction extends AdministratorAction
if
(
!
empty
(
$attache_ids
))
{
if
(
!
empty
(
$attache_ids
))
{
$attache_id
=
array_pop
(
array_filter
(
$attache_ids
));
$attache_id
=
array_pop
(
array_filter
(
$attache_ids
));
}
}
$attache2_id
=
''
;
$attache2_ids
=
explode
(
'|'
,
$_POST
[
'attachment2_ids'
]);
if
(
!
empty
(
$attache2_ids
))
{
$attache2_id
=
array_pop
(
array_filter
(
$attache2_ids
));
}
$data
[
'attachment'
]
=
$attache_id
;
$data
[
'attachment'
]
=
$attache_id
;
$data
[
'attachment2'
]
=
$attache2_id
;
$data
[
'reply_time'
]
=
intval
(
$_POST
[
'reply_time'
]);
$data
[
'reply_time'
]
=
intval
(
$_POST
[
'reply_time'
]);
$data
[
'exams_module_id'
]
=
intval
(
$_POST
[
'exams_module_id'
]);
$data
[
'exams_module_id'
]
=
intval
(
$_POST
[
'exams_module_id'
]);
$data
[
'exams_paper_title'
]
=
t
(
$_POST
[
'exams_paper_title'
]);
$data
[
'exams_paper_title'
]
=
t
(
$_POST
[
'exams_paper_title'
]);
...
@@ -203,7 +212,7 @@ class AdminPaperAction extends AdministratorAction
...
@@ -203,7 +212,7 @@ class AdminPaperAction extends AdministratorAction
}
}
exit
;
exit
;
}
}
$this
->
pageKeyList
=
[
'exams_subject_id'
,
'exams_module_id'
,
'level'
,
'exams_paper_title'
,
'reply_time'
,
'exams_limit'
,
'best'
,
'is_rand'
,
'start_time'
,
'end_time'
,
'assembly_type'
,
'is_screen'
,
'attachment'
,
'price'
,
'show_user_group'
,
'sort'
,
'description'
];
$this
->
pageKeyList
=
[
'exams_subject_id'
,
'exams_module_id'
,
'level'
,
'exams_paper_title'
,
'reply_time'
,
'exams_limit'
,
'best'
,
'is_rand'
,
'start_time'
,
'end_time'
,
'assembly_type'
,
'is_screen'
,
'attachment
2'
,
'attachment
'
,
'price'
,
'show_user_group'
,
'sort'
,
'description'
];
$this
->
notEmpty
=
[
'exams_paper_id'
,
'exams_subject_id'
,
'exams_module_id'
,
'level'
,
'exams_paper_title'
,
'reply_time'
];
$this
->
notEmpty
=
[
'exams_paper_id'
,
'exams_subject_id'
,
'exams_module_id'
,
'level'
,
'exams_paper_title'
,
'reply_time'
];
ob_start
();
ob_start
();
echo
W
(
'CategoryLevel'
,
array
(
'table'
=>
'exams_subject'
,
'id'
=>
'exams_subject_id'
));
echo
W
(
'CategoryLevel'
,
array
(
'table'
=>
'exams_subject'
,
'id'
=>
'exams_subject_id'
));
...
@@ -302,6 +311,12 @@ class AdminPaperAction extends AdministratorAction
...
@@ -302,6 +311,12 @@ class AdminPaperAction extends AdministratorAction
$attache_id
=
array_pop
(
array_filter
(
$attache_ids
));
$attache_id
=
array_pop
(
array_filter
(
$attache_ids
));
}
}
$attache2_id
=
''
;
$attache2_ids
=
explode
(
'|'
,
$_POST
[
'attachment2_ids'
]);
if
(
!
empty
(
$attache2_ids
))
{
$attache2_id
=
array_pop
(
array_filter
(
$attache2_ids
));
}
$data
[
'exams_subject_id'
]
=
end
(
$subjectArr
);
$data
[
'exams_subject_id'
]
=
end
(
$subjectArr
);
$data
[
'description'
]
=
t
(
$_POST
[
'description'
]);
$data
[
'description'
]
=
t
(
$_POST
[
'description'
]);
$data
[
'level'
]
=
intval
(
$_POST
[
'level'
]);
$data
[
'level'
]
=
intval
(
$_POST
[
'level'
]);
...
@@ -322,6 +337,7 @@ class AdminPaperAction extends AdministratorAction
...
@@ -322,6 +337,7 @@ class AdminPaperAction extends AdministratorAction
$data
[
'best'
]
=
isset
(
$_POST
[
'best'
])
?
intval
(
$_POST
[
'best'
])
:
0
;
$data
[
'best'
]
=
isset
(
$_POST
[
'best'
])
?
intval
(
$_POST
[
'best'
])
:
0
;
$data
[
'price'
]
=
t
(
$_POST
[
'price'
]);
$data
[
'price'
]
=
t
(
$_POST
[
'price'
]);
$data
[
'attachment'
]
=
$attache_id
;
$data
[
'attachment'
]
=
$attache_id
;
$data
[
'attachment2'
]
=
$attache2_id
;
if
(
M
(
'exams_paper'
)
->
where
([
'exams_paper_id'
=>
$paper_id
])
->
save
(
$data
))
{
if
(
M
(
'exams_paper'
)
->
where
([
'exams_paper_id'
=>
$paper_id
])
->
save
(
$data
))
{
$this
->
success
(
'编辑成功'
);
$this
->
success
(
'编辑成功'
);
...
@@ -337,7 +353,7 @@ class AdminPaperAction extends AdministratorAction
...
@@ -337,7 +353,7 @@ class AdminPaperAction extends AdministratorAction
$this
->
error
(
"未找到编辑的试卷"
);
$this
->
error
(
"未找到编辑的试卷"
);
}
}
$this
->
pageTab
[]
=
array
(
'title'
=>
'编辑'
,
'tabHash'
=>
'edit'
,
'url'
=>
U
(
'exams/AdminPaper/edit'
,
[
'paper_id'
=>
$paper_id
]));
$this
->
pageTab
[]
=
array
(
'title'
=>
'编辑'
,
'tabHash'
=>
'edit'
,
'url'
=>
U
(
'exams/AdminPaper/edit'
,
[
'paper_id'
=>
$paper_id
]));
$this
->
pageKeyList
=
[
'exams_paper_id'
,
'exams_subject_id'
,
'exams_module_id'
,
'level'
,
'exams_paper_title'
,
'reply_time'
,
'exams_limit'
,
'best'
,
'is_rand'
,
'start_time'
,
'end_time'
,
'assembly_type'
,
'is_screen'
,
'attachment'
,
'price'
,
'show_user_group'
,
'sort'
,
'description'
];
$this
->
pageKeyList
=
[
'exams_paper_id'
,
'exams_subject_id'
,
'exams_module_id'
,
'level'
,
'exams_paper_title'
,
'reply_time'
,
'exams_limit'
,
'best'
,
'is_rand'
,
'start_time'
,
'end_time'
,
'assembly_type'
,
'is_screen'
,
'attachment
2'
,
'attachment
'
,
'price'
,
'show_user_group'
,
'sort'
,
'description'
];
$this
->
notEmpty
=
[
'exams_paper_id'
,
'exams_subject_id'
,
'exams_module_id'
,
'level'
,
'exams_paper_title'
,
'reply_time'
];
$this
->
notEmpty
=
[
'exams_paper_id'
,
'exams_subject_id'
,
'exams_module_id'
,
'level'
,
'exams_paper_title'
,
'reply_time'
];
ob_start
();
ob_start
();
echo
W
(
'CategoryLevel'
,
array
(
'table'
=>
'exams_subject'
,
'id'
=>
'exams_subject_id'
,
'default'
=>
$paper
[
'paper_subject_fullpath'
]));
echo
W
(
'CategoryLevel'
,
array
(
'table'
=>
'exams_subject'
,
'id'
=>
'exams_subject_id'
,
'default'
=>
$paper
[
'paper_subject_fullpath'
]));
...
...
apps/exams/Lib/Action/IndexAction.class.php
View file @
0df4d2a0
...
@@ -337,6 +337,12 @@ class IndexAction extends Action
...
@@ -337,6 +337,12 @@ class IndexAction extends Action
// 是否收藏
// 是否收藏
$paper
[
'iscollect'
]
=
D
(
'ZyCollection'
,
'classroom'
)
->
isCollect
(
$paper_id
,
'exams_paper'
,
intval
(
$this
->
mid
));
$paper
[
'iscollect'
]
=
D
(
'ZyCollection'
,
'classroom'
)
->
isCollect
(
$paper_id
,
'exams_paper'
,
intval
(
$this
->
mid
));
$limit
=
0
;
if
(
!
$paper
[
'is_buy'
])
{
$limit
=
3
;
}
$this
->
assign
(
'limit'
,
$limit
);
$this
->
assign
(
'paper'
,
$paper
);
$this
->
assign
(
'paper'
,
$paper
);
// 是否练习模式
// 是否练习模式
$this
->
assign
(
'isPractice'
,
(
$_GET
[
'joinType'
]
==
1
)
?
1
:
2
);
$this
->
assign
(
'isPractice'
,
(
$_GET
[
'joinType'
]
==
1
)
?
1
:
2
);
...
...
apps/exams/Lib/Model/ExamsPaperModel.class.php
View file @
0df4d2a0
...
@@ -81,7 +81,7 @@ class ExamsPaperModel extends Model
...
@@ -81,7 +81,7 @@ class ExamsPaperModel extends Model
$data
[
$key
][
'exams_module_title'
]
=
$this
->
getModuleTitleAttr
(
$v
[
'exams_module_id'
]);
$data
[
$key
][
'exams_module_title'
]
=
$this
->
getModuleTitleAttr
(
$v
[
'exams_module_id'
]);
$data
[
$key
][
'level_title'
]
=
$this
->
getLevelTitle
(
$v
[
'level'
]);
$data
[
$key
][
'level_title'
]
=
$this
->
getLevelTitle
(
$v
[
'level'
]);
$data
[
$key
][
'is_buy'
]
=
$this
->
isBuy
(
$v
[
'exams_paper_id'
],
$this
->
mid
);
$data
[
$key
][
'is_buy'
]
=
$this
->
isBuy
(
$v
[
'exams_paper_id'
],
$this
->
mid
);
$data
[
$key
][
'attach'
]
=
''
;
$data
[
$key
][
'attach'
]
=
$this
->
getAttachPathByAttachId
(
$v
[
'attachment2'
])
;
if
(
$data
[
$key
][
'is_buy'
]
||
$v
[
'price'
]
==
0
)
{
if
(
$data
[
$key
][
'is_buy'
]
||
$v
[
'price'
]
==
0
)
{
$data
[
$key
][
'attach'
]
=
$this
->
getAttachPathByAttachId
(
$v
[
'attachment'
]);
$data
[
$key
][
'attach'
]
=
$this
->
getAttachPathByAttachId
(
$v
[
'attachment'
]);
}
}
...
@@ -163,7 +163,6 @@ class ExamsPaperModel extends Model
...
@@ -163,7 +163,6 @@ class ExamsPaperModel extends Model
* @return [type] [description]
* @return [type] [description]
*/
*/
public
function
getPaperById
(
$paper_id
=
0
,
$is_need
=
0
)
//,$challenge_again = 0
public
function
getPaperById
(
$paper_id
=
0
,
$is_need
=
0
)
//,$challenge_again = 0
{
{
$map
[
'exams_paper_id'
]
=
$paper_id
;
$map
[
'exams_paper_id'
]
=
$paper_id
;
// $challenge_again && $map['is_del'] = 0;
// $challenge_again && $map['is_del'] = 0;
...
...
apps/exams/Tpl/default/Index/examsroom_w3g.html
View file @
0df4d2a0
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
.static-exam
dl
dt
{
background
:
#fff
;
border-bottom
:
0rem
;
padding
:
0
.8rem
;
}
.static-exam
dl
dt
{
background
:
#fff
;
border-bottom
:
0rem
;
padding
:
0
.8rem
;
}
.static-exam
dl
dt
h5
{
width
:
100%
;
height
:
2rem
;
margin-top
:
0.4rem
;
display
:
flex
;
align-items
:
center
;
}
.static-exam
dl
dt
h5
{
width
:
100%
;
height
:
2rem
;
margin-top
:
0.4rem
;
display
:
flex
;
align-items
:
center
;
}
.static-exam
dl
dt
h5
strong
{
font-size
:
12px
;
margin-left
:
12px
;
font-weight
:
600
;
background
:
none
;
color
:
#333
;
}
.static-exam
dl
dt
h5
strong
{
font-size
:
12px
;
margin-left
:
12px
;
font-weight
:
600
;
background
:
none
;
color
:
#333
;
}
.static-exam
dl
dt
h3
{
font-size
:
16px
;
color
:
#333
;
line-height
:
30px
;
padding-bottom
:
0
}
.static-exam
dl
dt
h3
{
font-size
:
16px
;
color
:
#333
;
line-height
:
30px
;
padding-bottom
:
0
}
.static-exam
dl
dd
p
em
{
width
:
30px
;
height
:
30px
;
border-radius
:
50%
;
border
:
1px
solid
#A3E460
;
line-height
:
30px
;
color
:
#65C000
;
font-size
:
14px
;
background
:
none
;
}
.static-exam
dl
dd
p
em
{
width
:
30px
;
height
:
30px
;
border-radius
:
50%
;
border
:
1px
solid
#A3E460
;
line-height
:
30px
;
color
:
#65C000
;
font-size
:
14px
;
background
:
none
;
}
.static-exam
dl
dd
.on
em
{
background
:
#A3E460
;
color
:
#fff
;
}
.static-exam
dl
dd
.on
em
{
background
:
#A3E460
;
color
:
#fff
;
}
.static-exam
dl
dd
{
padding-top
:
0
;
overflow
:
hidden
;
}
.static-exam
dl
dd
{
padding-top
:
0
;
overflow
:
hidden
;
}
...
@@ -282,6 +282,10 @@
...
@@ -282,6 +282,10 @@
var
isCollect
=
"{$paper['iscollect']}"
>
0
?
1
:
0
;
var
isCollect
=
"{$paper['iscollect']}"
>
0
?
1
:
0
;
var
limit
=
parseInt
(
"{$limit}"
);
var
id
=
"{$paper.exams_paper_id}"
;
var
payUrl
=
"{:U('exams/index/getPayUrl')}"
;
function
changeCollect
()
{
function
changeCollect
()
{
if
(
isCollect
)
{
if
(
isCollect
)
{
isCollect
=
0
;
isCollect
=
0
;
...
@@ -333,4 +337,7 @@
...
@@ -333,4 +337,7 @@
iscollect
(
isCollect
);
iscollect
(
isCollect
);
});
});
</script>
</script>
apps/exams/_static/js/public_exam_3g.js
View file @
0df4d2a0
...
@@ -51,11 +51,50 @@ $(function() {
...
@@ -51,11 +51,50 @@ $(function() {
});
});
// 下一题
// 下一题
$
(
".next_question,.go_question"
).
click
(
function
()
{
$
(
".next_question,.go_question"
).
click
(
function
()
{
if
(
$
(
this
).
hasClass
(
"go_question"
))
{
if
(
$
(
this
).
hasClass
(
"go_question"
))
{
var
question_num
=
parseInt
(
$
(
this
).
data
(
"question_num"
));
var
question_num
=
parseInt
(
$
(
this
).
data
(
"question_num"
));
}
else
{
}
else
{
var
question_num
=
parseInt
(
$
(
this
).
data
(
"question_num"
))
+
1
;
var
question_num
=
parseInt
(
$
(
this
).
data
(
"question_num"
))
+
1
;
}
}
if
(
limit
>
0
&&
question_num
>=
limit
)
{
let
page
=
$
(
"#ex"
+
question_num
+
' .next'
);
page
.
unbind
(
'click'
);
page
.
attr
({
'style'
:
'background:rgba(245,166,35,1);'
});
page
.
text
(
'去支付'
);
page
.
bind
(
"click"
,
function
()
{
if
(
MID
<=
0
)
{
ui
.
confirm
(
'请先登录'
,
{
yes
:
function
()
{
window
.
location
.
href
=
"{:U('basic/Passport/login')}"
;
}
})
return
}
$
.
ajax
({
type
:
"POST"
,
url
:
payUrl
,
data
:
{
paper_id
:
id
,
},
dataType
:
"json"
,
success
:
function
(
res
)
{
var
res
=
getResponseData
(
res
)
if
(
res
.
status
==
1
)
{
window
.
location
.
href
=
res
.
data
}
else
{
ui
.
error
(
res
.
message
)
}
}
})
});
}
console
.
log
(
limit
,
question_num
);
$
(
".answer-card"
).
hide
();
$
(
".answer-card"
).
hide
();
if
(
$
(
"#ex"
+
question_num
).
length
>
0
)
{
if
(
$
(
"#ex"
+
question_num
).
length
>
0
)
{
$
(
"#ex"
+
question_num
).
show
().
siblings
().
hide
();
$
(
"#ex"
+
question_num
).
show
().
siblings
().
hide
();
...
@@ -239,4 +278,4 @@ $(function() {
...
@@ -239,4 +278,4 @@ $(function() {
t
=
startTime
();
t
=
startTime
();
}
}
});
});
})
})
\ No newline at end of file
apps/mall/Tpl/default/Goods/index_w3g.html
View file @
0df4d2a0
...
@@ -69,7 +69,7 @@
...
@@ -69,7 +69,7 @@
</div>
</div>
<div
class=
"layout_h_b"
style=
"margin-top: 0.5rem;"
>
<div
class=
"layout_h_b"
style=
"margin-top: 0.5rem;"
>
<span
class=
"text_14_600 color_FF3B3B"
>
¥{{item.price}}
</span>
<span
class=
"text_14_600 color_FF3B3B"
>
¥{{item.price}}
</span>
<van-image
src=
"__THEME__/img/down_load_icon.png"
width=
"13"
height=
"16"
></van-image>
<van-image
@
click=
"onDownload(item)"
src=
"__THEME__/img/down_load_icon.png"
width=
"13"
height=
"16"
></van-image>
</div>
</div>
<div
class=
"home_divider divider"
></div>
<div
class=
"home_divider divider"
></div>
</div>
</div>
...
@@ -238,7 +238,6 @@
...
@@ -238,7 +238,6 @@
}
}
},
},
onPay
:
function
(
id
)
{
onPay
:
function
(
id
)
{
console
.
log
(
"Id = "
+
id
)
if
(
MID
<=
0
)
{
if
(
MID
<=
0
)
{
ui
.
confirm
(
'请先登录'
,
{
ui
.
confirm
(
'请先登录'
,
{
yes
:
function
()
{
yes
:
function
()
{
...
@@ -318,7 +317,8 @@
...
@@ -318,7 +317,8 @@
id
:
r
.
exams_paper_id
,
id
:
r
.
exams_paper_id
,
title
:
r
.
exams_paper_title
,
title
:
r
.
exams_paper_title
,
price
:
r
.
price
,
price
:
r
.
price
,
is_buy
:
r
.
is_buy
is_buy
:
r
.
is_buy
,
attach
:
r
.
attach
}
}
})
})
opt
.
page
=
result
.
nowPage
opt
.
page
=
result
.
nowPage
...
@@ -354,6 +354,11 @@
...
@@ -354,6 +354,11 @@
})
})
}
}
},
},
onDownload
:
function
(
item
)
{
if
(
item
.
attach
)
{
window
.
location
.
href
=
item
.
attach
;
}
}
}
}
})
})
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment