Browse Source

电商后台静态页面及交互

pull/7/head
Jason 3 years ago
parent
commit
7867dfdfff
  1. 36
      control/tpl.php
  2. 71
      view/css/admin_style.css
  3. 22
      view/css/common.css
  4. BIN
      view/font/icomoon.eot
  5. 4
      view/font/icomoon.svg
  6. BIN
      view/font/icomoon.ttf
  7. BIN
      view/font/icomoon.woff
  8. 7
      view/js/clipboard.min.js
  9. 68
      view/js/demo3.json
  10. 8
      view/templates/include/admin_leftmenu.html
  11. 306
      view/templates/tpl/deliver_remind.html
  12. 78
      view/templates/tpl/home.html

36
control/tpl.php

@ -12,5 +12,41 @@ class tpl extends publicBase {
* @return void
*/
public function home() {
$this->view['menu_page'] = 'home';
}
/**
* 发货提醒
*/
public function deliver_remind() {
$this->view['menu_page'] = 'deliver_remind';
}
public function ajax_get_order_list() {
$data = array();
$page = $this->get('page')+0;
$limit = $this->get('limit')+0;
for($i=0;$i < 10;$i++){
$vals = array(
"goods_name" => "万方查重毕业论文检测大学生文章专科本科系万方查重毕业论文检测大学生文章专科本科系万方查重毕业论文检测大学生文章专科本科系",
"tid" => "43565765786867898".$i,
"count_down" => "倒计时:10:09:23",
'sale_date' => date('Y-m-d H:i:s', time()+($i*8)),
'remained_time' => date('Y-m-d H:i:s', time()+($i*88)),
"income" => "999.09",
"status" => "1"
);
if($i % 2 == 0) {
$vals['count_down'] = date('Y-m-d H:i:s', time()+$i);
$vals['status'] = 0;
}
$data[] = $vals;
}
$reture_data['data'] = $data;
$reture_data['total'] = 300;
$this->ajax_json(true, '', $reture_data);
}
}

71
view/css/admin_style.css

@ -392,4 +392,75 @@ body{
padding-right: 0px !important;
min-width: 207px !important;
}
}
.admin-index-top-item-header{
width: 100%;
height: 46px;
line-height: 46px;
padding-left: 12px;
padding-right: 12px;
color: rgba(0, 0, 0, 0.65);
font-size: 16px;
font-family: PingFangSC-Regular;
text-align: left;
white-space: nowrap;
box-sizing: border-box;
}
.admin-index-top-item-header-line{
width: 100%;
height: 1px;
background-color: rgba(232, 232, 232, 1);
}
.admin-index-top-item-header-left{
display: block;
float: left;
height: 100%;
width: auto;
}
.admin-index-top-item-header-left li{
display: inline-block;
float: left;
font-size: 16px;
font-family: PingFangSC-Regular;
color: rgba(0,0,0,0.65);
margin-right: 64px;
cursor: pointer;
}
.admin-index-top-item-header-left li.active{
font-family: PingFangSC-Medium !important;
color: #1890FF !important;
position: relative;
}
.admin-index-top-item-header-left li.active::after{
content: '';
width: 100%;
height: 2px;
border-radius: 1px;
background: #1890FF;
display: block;
}
.admin-index-top-item-header-right{
display: block;
float: right;
height: 100%;
width: auto;
}
.admin-index-top-item-header-right li{
display: inline-block;
float: left;
margin-left: 24px;
line-height: 55px;
font-size: 14px;
font-family: PingFangSC-Regular;
color: #595959;
cursor: pointer;
}
.admin-index-top-item-header-right li.active{
color: #1890FF !important;
}
#admin-map-container{
width: 100%;
box-sizing: border-box;
height: 325px;
overflow: hidden;
}

22
view/css/common.css

@ -1,10 +1,10 @@
@font-face {
font-family: 'icomoon';
src: url('/font/icomoon.eot?myxkk3');
src: url('/font/icomoon.eot?myxkk3#iefix') format('embedded-opentype'),
url('/font/icomoon.ttf?myxkk3') format('truetype'),
url('/font/icomoon.woff?myxkk3') format('woff'),
url('/font/icomoon.svg?myxkk3#icomoon') format('svg');
src: url('/font/icomoon.eot?j9lv8n');
src: url('/font/icomoon.eot?j9lv8n#iefix') format('embedded-opentype'),
url('/font/icomoon.ttf?j9lv8n') format('truetype'),
url('/font/icomoon.woff?j9lv8n') format('woff'),
url('/font/icomoon.svg?j9lv8n#icomoon') format('svg');
font-weight: normal;
font-style: normal;
font-display: block;
@ -34,7 +34,7 @@
color: #1890ff;
}
.icon--8:before {
content: "\e90e";
content: "\e912";
color: #fff;
}
.icon-1-2:before {
@ -69,6 +69,14 @@
content: "\e911";
color: #fff;
}
.icon-uniE90E:before {
content: "\e90e";
color: #1890ff;
}
.icon--3:before {
content: "\e913";
color: #f21019;
}
.icon-uniE9001:before {
content: "\e907";
color: #c4c7cc;
@ -96,4 +104,4 @@
.icon-uniE900:before {
content: "\e901";
color: #c4c7cc;
}
}

BIN
view/font/icomoon.eot

Binary file not shown.

4
view/font/icomoon.svg

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 41 KiB

BIN
view/font/icomoon.ttf

Binary file not shown.

BIN
view/font/icomoon.woff

Binary file not shown.

7
view/js/clipboard.min.js

File diff suppressed because one or more lines are too long

68
view/js/demo3.json

@ -0,0 +1,68 @@
{
"status": 200
,"info": "请求成功哈哈"
,"total": 10
,"data": {
"item": [{
"goods_name": "万方查重毕业论文检测大学生文章专科本科系万方查重毕业论文检测大学生文章专科本科系万方查重毕业论文检测大学生文章专科本科系"
,"tid": "435657657868678989"
,"count_down": "倒计时:10:09:23"
,"income": "999.09"
,"status": "1"
}, {
"goods_name": "万方查重毕业论文检测大学生文章专科本科系万方查重毕业论文检测大学生文章专科本科系万方查重毕业论文检测大学生文章专科本科系"
,"tid": "435657657868678989"
,"count_down": "倒计时:10:09:23"
,"income": "999.09"
,"status": "0"
}, {
"goods_name": "万方查重毕业论文检测大学生文章专科本科系万方查重毕业论文检测大学生文章专科本科系万方查重毕业论文检测大学生文章专科本科系"
,"tid": "435657657868678989"
,"count_down": "2022-10-31 23:12:00"
,"income": "999.09"
,"status": "1"
}, {
"goods_name": "万方查重毕业论文检测大学生文章专科本科系万方查重毕业论文检测大学生文章专科本科系万方查重毕业论文检测大学生文章专科本科系"
,"tid": "435657657868678989"
,"count_down": "倒计时:10:09:23"
,"income": "999.09"
,"status": "1"
}, {
"goods_name": "万方查重毕业论文检测大学生文章专科本科系万方查重毕业论文检测大学生文章专科本科系万方查重毕业论文检测大学生文章专科本科系"
,"tid": "435657657868678989"
,"count_down": "倒计时:10:09:23"
,"income": "999.09"
,"status": "1"
}, {
"goods_name": "万方查重毕业论文检测大学生文章专科本科系万方查重毕业论文检测大学生文章专科本科系万方查重毕业论文检测大学生文章专科本科系"
,"tid": "435657657868678989"
,"count_down": "2022-10-31 23:12:00"
,"income": "999.09"
,"status": "0"
}, {
"goods_name": "万方查重毕业论文检测大学生文章专科本科系万方查重毕业论文检测大学生文章专科本科系万方查重毕业论文检测大学生文章专科本科系"
,"tid": "435657657868678989"
,"count_down": "2022-10-31 23:12:00"
,"income": "999.09"
,"status": "0"
}, {
"goods_name": "万方查重毕业论文检测大学生文章专科本科系万方查重毕业论文检测大学生文章专科本科系万方查重毕业论文检测大学生文章专科本科系"
,"tid": "435657657868678989"
,"count_down": "倒计时:10:09:23"
,"income": "999.09"
,"status": "0"
}, {
"goods_name": "万方查重毕业论文检测大学生文章专科本科系万方查重毕业论文检测大学生文章专科本科系万方查重毕业论文检测大学生文章专科本科系"
,"tid": "435657657868678989"
,"count_down": "倒计时:10:09:23"
,"income": "999.09"
,"status": "1"
}, {
"goods_name": "万方查重毕业论文检测大学生文章专科本科系万方查重毕业论文检测大学生文章专科本科系万方查重毕业论文检测大学生文章专科本科系"
,"tid": "435657657868678989"
,"count_down": "倒计时:10:09:23"
,"income": "999.09"
,"status": "1"
}]
}
}

8
view/templates/include/admin_leftmenu.html

@ -6,8 +6,8 @@
<span>首页</span>
</a>
<dl class="layui-nav-child admin-layui-nav-child">
<dd class="layui-this">
<a href="javascript:;" class="admin-layui-nav-item-a admin-layui-nav-item-a-child">
<dd class="{if $menu_page == 'home' || !$menu_page}layui-this{/if}">
<a href="{if $menu_page != 'home' || !$menu_page}/tpl{else}javascript:;{/if}" class="admin-layui-nav-item-a admin-layui-nav-item-a-child">
<span class="icon-2 admin-no-select menu-left-icon-img menu-left-icon-img-15"></span>
<span class="icon-3 admin-select menu-left-icon-img menu-left-icon-img-15"></span>
首页
@ -25,8 +25,8 @@
<span>常用功能</span>
</a>
<dl class="layui-nav-child admin-layui-nav-child">
<dd>
<a href="javascript:;" class="admin-layui-nav-item-a admin-layui-nav-item-a-child">
<dd class="{if $menu_page == 'deliver_remind'}layui-this{/if}">
<a href="{if $menu_page != 'deliver_remind'}/tpl/deliver_remind{else}javascript:;{/if}" class="admin-layui-nav-item-a admin-layui-nav-item-a-child">
<span class="icon-uniE90A admin-no-select menu-left-icon-img menu-left-icon-img-15"></span>
<span class="icon-1 admin-select menu-left-icon-img menu-left-icon-img-15"></span>
发货提醒

306
view/templates/tpl/deliver_remind.html

@ -0,0 +1,306 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link href="/images/pdd_icon.png" rel="icon">
<title>首页</title>
<link rel="stylesheet" href="/css/layui.css"/>
<link rel="stylesheet" href="/css/admin_style.css"/>
<link rel="stylesheet" href="/css/common.css"/>
<script type="text/javascript" src="/js/jquery-1.8.1.min.js"></script>
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
{literal}
<style>
.admin-container-outer .layui-table{
width: 100% !important;
}
.deliver_remind_table .layui-table-main tr,.deliver_remind_table .layui-table th{
height: 53px !important;
}
.deliver_remind_table .layui-table-main tr{
font-size: 14px;
font-family: PingFangSC-Regular;
color: rgba(0,0,0,0.65);
}
.deliver_remind_table .layui-table tbody tr:hover{
background-color: #FAFAFA;
}
.deliver-remind-body-right{
padding: 0px 11px 11px 11px;
background-color: #FFFFFF;
}
.deliver_remind_table .layui-table-view{
margin-top:0px !important;
}
.deliver_remind_table .layui-table-header{
border-radius: 4px 4px 0px 0px !important;
}
.deliver_remind_table .layui-table-header th{
border: none !important;
font-size: 14px !important;
font-family: PingFangSC-Medium;
color: rgba(0,0,0) !important;
}
.deliver_remind_table .layui-table-view{
border-radius: 4px 4px 0px 0px !important;
border-top: none !important;
border-left: none !important;
border-right: none !important;
}
.admin-table-list-header{
width: 100%;
height: 52px;
overflow: hidden;
box-sizing: border-box;
padding-left: 19px;
padding-right: 10px;
}
.admin-table-list-header div{
display: inline-block;
height: 100%;
line-height: 52px;
}
.admin-table-body{
border-radius: 8px 8px 0px 0px;
}
.admin-table-list-header div:first-child span{
font-size: 12px;
font-family: PingFangSC-Regular;
color: rgba(0,0,0, 0.65);
}
.admin-table-list-header div:nth-child(2) span{
font-size: 16px;
font-family: PingFangSC-Medium;
color: rgba(0,0,0);
}
.admin-table-list-header div:nth-child(3){
width: auto;
height: 32px;
padding: 0px 13px;
background: #1890FF;
border-radius: 2px;
line-height: 32px;
float: right;
margin-top:10px;
cursor: pointer;
}
.admin-table-list-header div:nth-child(3) span{
font-size: 14px;
font-family: PingFangSC-Regular;
color: #FFFFFF;
}
.admin-table-td-outter{
display: inline-block;
width: 100%;
height: 100%;
box-sizing: border-box;
position: absolute;
left: 0px;
top: 0px;
line-height: 53px;
padding-left: 15px;
cursor: pointer;
}
.deliver_remind_table .layui-table-cell{
position: relative !important;
}
div[lay-id=deliver_remind_list] .layui-table-main tr td:nth-child(2) .layui-table-cell{
padding: 0px !important;
height: 53px !important;
}
.deliver_remind_list_table_class .layui-table-main tr:hover > td:nth-child(-n+2){
color:#1890FF !important;
}
.count_down_wait{
color: #F21019;
position: relative;
cursor: pointer;
}
.count-down-class .layui-layer-content{
width: 123px !important;
height: 34px !important;
font-size: 12px !important;
font-family: PingFangSC-Regular !important;
color: rgba(0,0,0,0.33) !important;
line-height: 17px !important;
text-align: center !important;
}
.remained_status{
font-size: 14px;
font-family: PingFangSC-Regular;
color: #FC5057;
width: 100%;
height: 100%;
display: inline-block;
cursor: pointer;
}
.remained_status_wait{
color: rgba(89, 89, 89, 1);
}
.admin-table-td-outter-font{
display: none;
}
.deliver_remind_list_table_class .layui-table-main tr:hover .admin-table-td-outter-font{
display: inline;
}
</style>
{/literal}
</head>
<body>
<div class="layui-layout layui-layout-admin admin-container-outer deliver_remind_table">
{include file="include/admin_header.html"}
{include file="include/admin_leftmenu.html"}
<div class="layui-body admin-layui-body layui-anim layui-anim-fadein">
<div class="layui-row">
<div class="layui-col-md12 deliver-remind-body-right admin-table-body">
<div class="admin-table-list-header">
<div><span>发货提醒/</span></div>
<div><span>发货列表</span></div>
<div><span>导出列表</span></div>
</div>
<table class="layui-hide" id="deliver_remind_list" lay-filter="deliver-remind-table"></table>
</div>
</div>
</div>
</div>
<script src="/js/layui.js"></script>
<script src="/js/clipboard.min.js"></script>
{literal}
<script>
layui.use(['element', 'layer', 'util', 'table'], function(){
var element = layui.element
,layer = layui.layer
,util = layui.util
,table = layui.table
,$ = layui.$;
util.event('lay-header-event', {
menuLeft: function(othis){
layer.msg('展开左侧菜单的操作', {icon: 0});
}
,menuRight: function(){
layer.open({
type: 1
,title: '更多'
,content: '<div style="padding: 15px;">处理右侧面板的操作</div>'
,area: ['260px', '100%']
,offset: 'rt'
,anim: 5
,shadeClose: true
,scrollbar: false
});
}
});
var showTips = null;
table.render({
elem: '#deliver_remind_list'
,url:'/tpl/ajax_get_order_list'
,toolbar: false
,title: '用户数据表'
,totalRow: false
,className:'deliver_remind_list_table_class'
,cols: [[
{field:'goods_name', title:'商品名称'}
,{field:'tid', title:'订单号'
,templet: function(d){
return '<span data-clipboard-text="'+d.tid+'" title="点击复制" class="admin-table-td-outter admin-table-td-outter-'+d.tid+'">'+ d.tid +'&nbsp;<span class="icon-uniE90E admin-table-td-outter-font admin-table-td-outter-font-'+d.tid+'"></span></span>';
}}
,{field:'count_down', title:'销售时间/倒计时'
,templet: function(d){
if(d.count_down.indexOf('倒计时') > -1) return '<label id="count_down_wait_'+d.tid+'" content="'+d.sale_date+'" class="count_down_wait">'+d.count_down+'</label>';
return '<span>'+d.count_down+'</span>';
}}
,{field:'income', title:'收入'}
,{field:'status', title:'顾客催发'
,templet: function(d){
if(d.status == 1) return '<span class="remained_status" content="'+d.remained_time+'" id="remind_time_'+d.tid+'"><span class="icon--3"></span>&nbsp;已催</span>';
return '<span class="icon--"></span>&nbsp;<span class="remained_status_wait">未催</span>';
}}
]]
,page: true
,response: {
statusCode: 200 //重新规定成功的状态码为 200,table 组件默认为 0
}
,parseData: function(res){ //将原始数据解析成 table 组件所规定的数据
return {
"code": 200, //解析接口状态
"msg": res.info, //解析提示文本
"count": res.data.total, //解析数据长度
"data": res.data.data //解析数据列表
};
},
done: function(res, curr, count){
var data = res.data;
for(var i=0; i<data.length; i++){
var tid = data[i].tid;
var clipboard = new ClipboardJS('.admin-table-td-outter-'+tid);
clipboard.on('success', function(e) {
layer.msg('复制成功', {time:1500});
clipboard.destroy();
e.clearSelection();
});
if(data[i].count_down.indexOf('倒计时') > -1){
$('#count_down_wait_'+data[i].tid).hover(function(){
var hid = $(this).attr('id');
var hcontent = $(this).attr('content');
showTips = layer.tips('销售时间<br>'+hcontent, '#'+hid, {
area: ['131px', '42px'],
tips:[3,'#FAF8EB'],//显示方向以及背景颜色(1.上 2右 3下 4左)
time:3000,//4秒后销毁
skin:'count-down-class'
});
},function(){
layer.close(showTips);
});
}
if(data[i].status == 1){
$('#remind_time_'+data[i].tid).hover(function(){
var hcontent = $(this).attr('content');
var hid = $(this).attr('id');
showTips = layer.tips('催促时间<br>'+hcontent, '#'+hid, {
area: ['131px', '42px'],
tips:[3,'#FAF8EB'],//显示方向以及背景颜色(1.上 2右 3下 4左)
time:3000,//4秒后销毁
skin:'count-down-class'
});
},function(){
layer.close(showTips);
});
}
}
}
});
table.on('tool(deliver-remind-table)', function(obj){
// if(obj.event == 'copyTid'){
// $(".admin-table-td-outter").attr("data-clipboard-text",obj.data.tid);
// var clipboard = new ClipboardJS('.admin-table-td-outter');
// clipboard.on('success', function(e) {
// layer.msg('复制成功');
// clipboard.destroy();
// e.clearSelection();
// });
// }
// console.log(obj.event)
});
});
</script>
{/literal}
</body>
</html>

78
view/templates/tpl/home.html

@ -16,77 +16,6 @@
<![endif]-->
{literal}
<style>
.admin-index-top-item-header{
width: 100%;
height: 46px;
line-height: 46px;
padding-left: 12px;
padding-right: 12px;
color: rgba(0, 0, 0, 0.65);
font-size: 16px;
font-family: PingFangSC-Regular;
text-align: left;
white-space: nowrap;
box-sizing: border-box;
}
.admin-index-top-item-header-line{
width: 100%;
height: 1px;
background-color: rgba(232, 232, 232, 1);
}
.admin-index-top-item-header-left{
display: block;
float: left;
height: 100%;
width: auto;
}
.admin-index-top-item-header-left li{
display: inline-block;
float: left;
font-size: 16px;
font-family: PingFangSC-Regular;
color: rgba(0,0,0,0.65);
margin-right: 64px;
cursor: pointer;
}
.admin-index-top-item-header-left li.active{
font-family: PingFangSC-Medium !important;
color: #1890FF !important;
position: relative;
}
.admin-index-top-item-header-left li.active::after{
content: '';
width: 100%;
height: 2px;
border-radius: 1px;
background: #1890FF;
display: block;
}
.admin-index-top-item-header-right{
display: block;
float: right;
height: 100%;
width: auto;
}
.admin-index-top-item-header-right li{
display: inline-block;
float: left;
margin-left: 24px;
line-height: 55px;
font-size: 14px;
font-family: PingFangSC-Regular;
color: #595959;
cursor: pointer;
}
.admin-index-top-item-header-right li.active{
color: #1890FF !important;
}
#admin-map-container{
width: 100%;
box-sizing: border-box;
height: 325px;
overflow: hidden;
}
</style>
{/literal}
</head>
@ -253,13 +182,6 @@ layui.use(['element', 'layer', 'util'], function(){
});
});
// width: 70px;
// height: 22px;
// font-size: 14px;
// font-family: PingFangSC-Medium, PingFang SC;
// font-weight: 500;
// line-height: 22px;
var myChart = echarts.init(document.getElementById('admin-map-container'));
var monthList = ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'];
var option = {

Loading…
Cancel
Save