1
0
mirror of https://gitee.com/koogua/course-tencent-cloud.git synced 2025-06-21 19:22:45 +08:00
2020-07-24 20:27:14 +08:00

107 lines
2.5 KiB
JavaScript

layui.use(['jquery', 'layer', 'helper'], function () {
var $ = layui.jquery;
var layer = layui.layer;
var helper = layui.helper;
/**
* 查看咨询
*/
$('.btn-show-consult').on('click', function () {
var url = $(this).data('url');
layer.open({
type: 2,
title: '咨询详情',
content: [url, 'no'],
area: ['720px', '480px']
});
});
/**
* 编辑咨询
*/
$('.btn-edit-consult').on('click', function () {
var url = $(this).data('url');
layer.open({
type: 2,
title: '编辑咨询',
content: [url, 'no'],
area: ['720px', '400px'],
cancel: function () {
parent.location.reload();
}
});
});
/**
* 发布评价
*/
$('.btn-add-review').on('click', function () {
var url = $(this).data('url');
layer.open({
type: 2,
title: '发布评价',
content: [url, 'no'],
area: ['640px', '400px'],
cancel: function () {
parent.location.reload();
}
});
});
/**
* 修改评价
*/
$('.btn-edit-review').on('click', function () {
var url = $(this).data('url');
layer.open({
type: 2,
title: '修改评价',
content: [url, 'no'],
area: ['640px', '400px'],
cancel: function () {
parent.location.reload();
}
});
});
/**
* 订单详情
*/
$('.btn-order-info').on('click', function () {
var url = $(this).data('url');
layer.open({
type: 2,
title: '订单详情',
content: [url, 'no'],
area: '800px',
offset: '200px'
});
});
/**
* 退款详情
*/
$('.btn-refund-info').on('click', function () {
var url = $(this).data('url');
layer.open({
type: 2,
title: '退款详情',
content: [url, 'no'],
area: '800px',
offset: '200px'
});
});
if ($('#tab-courses').length > 0) {
var $tabCourses = $('#tab-courses');
helper.ajaxLoadHtml($tabCourses.data('url'), $tabCourses.attr('id'));
}
if ($('#tab-users').length > 0) {
var $tabUsers = $('#tab-users');
helper.ajaxLoadHtml($tabUsers.data('url'), $tabUsers.attr('id'));
}
});