更新
This commit is contained in:
-1
File diff suppressed because one or more lines are too long
-1
File diff suppressed because one or more lines are too long
-1
File diff suppressed because one or more lines are too long
-1
@@ -1 +0,0 @@
|
||||
[{"title":"\u5929\u5f52","src":"https:\/\/cdn.sm.cn\/static\/24\/09\/11\/55ad0a8ab22785405a42c403a58d6548.jpg","ranking":"1","hot_score":"879197","desc":"\u6797\u5929\u5c06\u5455\u5fc3\u6ca5\u8840\u8bbe\u8ba1\u7684\u4e13\u5229\u9001\u7ed9\u672a\u5a5a\u59bb\uff0c\u8ba9\u5979\u83b7\u5f97\u5929\u5f52\u96c6\u56e2\u8868\u5f70\uff0c\u8c01\u6599\u5728\u8868\u5f70\u5927\u4f1a\u73b0\u573a\uff0c\u6797\u5929\u624d\u53d1\u73b0\u672a\u5a5a\u59bb\u65e9\u5df2\u80cc..."},{"title":"\u4e11\u5973\u540e\u5988\u9006\u88ad\u653b\u7565","src":"https:\/\/cdn.sm.cn\/static\/24\/09\/12\/aa4d32420394fa1da70a2fe978f41711.jpg","ranking":"2","hot_score":"817977","desc":"\u56fd\u9645\u9876\u7ea7\u533b\u751f\u7adf\u610f\u5916\u7a7f\u8d8a\u5230\u4e86\u53e4\u4ee3\uff0c\u8fd8\u9644\u8eab\u4e8e\u4e00\u4e2a\u6076\u6bd2\u540e\u5988\u7684\u8eab\u4e0a\u3002\u7136\u800c\uff0c\u5979\u5e76\u672a\u88ab\u8fd9\u8270\u96be\u7684\u5904\u5883\u6240\u675f\u7f1a\u3002\u6000\u63e3\u7740..."},{"title":"\u603b\u88c1\u6709\u75be\u95ea\u5a5a\u6765\u88ad","src":"https:\/\/cdn.sm.cn\/static\/24\/09\/13\/2c3b07fbf350a1bd6306fd7940a048b9.jpg","ranking":"3","hot_score":"777389","desc":"\u6797\u6c0f\u96c6\u56e2\u5343\u91d1\u6e29\u4ee5\u68e0\u4e3a\u9003\u907f\u50ac\u5a5a\u70e6\u607c\uff0c\u4e0e\u968f\u5373\u6311\u9009\u7684\u201c\u5e78\u8fd0\u8def\u4eba\u201d\u8c22\u6f9c\u5ddd\u5149\u901f\u9886\u8bc1\u3002\u5728\u5979\u773c\u91cc\uff0c\u8c22\u6f9c\u5ddd\u6734\u5b9e\u65e0\u534e\uff0c..."},{"title":"\u5f00\u5c40\u5973\u5e1d\u76ef\u4e0a\u4e86\u6211\u7684\u5f69\u793c","src":"https:\/\/cdn.sm.cn\/static\/24\/09\/11\/4bd40d80475a5d78d5ed4ea4ebba181c.png","ranking":"4","hot_score":"465844","desc":"\u5546\u4e1a\u65b0\u79c0\u8bb8\u5b89\u751f\u7a7f\u8d8a\u5230\u6843\u56ed\u53bf\u4e94\u5e74\uff0c\u628a\u6cbb\u4e0b\u6253\u9020\u6210\u4e16\u5916\u6843\u6e90\u5374\u62d2\u4e0d\u7f34\u7eb3\u671d\u5ef7\u8d4b\u7a0e\uff0c\u5f15\u6765\u5973\u5e1d\u5fae\u670d\u79c1\u8bbf\u3001\u8ba8\u8981\u7a0e\u94f6\u3002..."},{"title":"\u7b2c\u4e8c\u5341\u6761\u4e4b\u65e0\u7f6a\u91ca\u653e","src":"https:\/\/cdn.sm.cn\/static\/24\/09\/13\/e2c2864cc28d0a1322069d0be7de4cad.png","ranking":"5","hot_score":"283131","desc":"\u674e\u81ea\u5fe0\u5728\u53d6\u94b1\u65f6\uff0c\u88ab\u94f6\u884c\u8981\u6c42\u8bc1\u660e\u5b58\u6298\u4e3b\u4eba\u674e\u7267\u662f\u4ed6\u7684\u513f\u5b50\u3002\u7136\u800c\uff0c\u674e\u81ea\u5fe0\u7684\u513f\u5b50\u674e\u7267\u6b63\u5728\u533b\u9662icu\u5185\u7b49\u8fd9\u7b14\u94b1..."},{"title":"\u5356\u83dc\u5927\u5988\u7adf\u662f\u7687\u5ac2","src":"https:\/\/cdn.sm.cn\/static\/24\/09\/12\/bcb68e1bb4b67669bd4eb5d5638101ed.JPG","ranking":"6","hot_score":"265517","desc":"\u4e8c\u5341\u5e74\u524d\u519c\u5987\u5218\u6842\u82b1\u6551\u4e86\u4e94\u7687\u5b50\u65f6\u5f04\u4e22\u513f\u5b50\u5fd7\u6d32\u3002\u4e8c\u5341\u5e74\u540e\u4e94\u7687\u5b50\u767b\u57fa\uff0c\u627e\u5230\u88ab\u674e\u5bb6\u548c\u53bf\u8859\u6b3a\u8d1f\u7684\u6842\u82b1\u6bcd\u5973\u5e76\u4f38\u5f20..."},{"title":"\u7a7f\u8d8a\u738b\u5983\u9006\u88ad\u653b\u7565","src":"https:\/\/cdn.sm.cn\/static\/24\/09\/13\/dd98ccaf913dd48e5c874aff67558c2c.png","ranking":"7","hot_score":"243591","desc":"\u51cc\u610f\u7136\u539f\u672c\u662f21\u4e16\u7eaa\u4e00\u540d\u65b0\u65f6\u4ee3\u597d\u9752\u5e74\uff0c\u8ffd\u7535\u89c6\u5267\u7684\u8fc7\u7a0b\u4e2d\u5374\u9634\u5dee\u9633\u9519\u7a7f\u8d8a\u5230\u4e86\u53e4\u4ee3\uff0c\u6210\u4e3a\u4e00\u4e2a\u4e0e\u5979\u540c\u540d\u540c\u59d3\u5374..."},{"title":"\u6211\u5728\u51b7\u5bab\u5fd9\u79cd\u7530","src":"https:\/\/cdn.sm.cn\/static\/24\/09\/14\/26c0659a20662de597f260f734a16cd7.jpg","ranking":"8","hot_score":"208754","desc":"\u9646\u4e91\u841d\u4e00\u89c9\u9192\u6765\u53d1\u73b0\u81ea\u5df1\u7adf\u7136\u6210\u4e3a\u4e86\u4e00\u4e2a\u4e0d\u53d7\u5ba0\u7684\u51b7\u5bab\u7687\u540e\uff01\u5728\u4e00\u6b21\u5076\u7136\u4e2d\uff0c\u9646\u4e91\u841d\u8bef\u5c06\u81ea\u5df1\u7684\u4e08\u592b\u5bc2\u65e0\u7edd\u8bef\u8ba4\u6210..."},{"title":"\u5996\u5983\u5728\u4e0a","src":"https:\/\/cdn.sm.cn\/static\/24\/09\/12\/ec4392b821085414acba8faf77171d8a.JPG","ranking":"9","hot_score":"189314","desc":"\u5e84\u7483\uff08\u5e84\u624d\u4eba\uff09\u610f\u5916\u88ab\u5ba0\u5e78\u8bde\u4e0b\u9f99\u5b50\uff0c\u906d\u5230\u4e3d\u8d35\u5983\u7684\u8bb0\u6068\uff0c\u4f19\u540c\u5bb9\u5ad4\u4e00\u8d77\u5bb3\u6b7b\u4e86\u5e84\u7483\u7684\u5b69\u5b50\uff0c\u800c\u7687\u5e1d\u5374\u56e0\u4e3d\u8d35\u5987\u6709..."},{"title":"\u604b\u7231\u8111\u540e\u5bab\u6c42\u751f\u6307\u5357","src":"https:\/\/cdn.sm.cn\/static\/24\/09\/14\/3ba5238a63cb2814393429dac73c03c3.png","ranking":"10","hot_score":"124726","desc":"\u82cf\u6f47\u6f47\uff08\u7a0b\u6f47\u6f47\uff09\u610f\u5916\u7a7f\u8d8a\u6210\u4e3a\u7535\u89c6\u5267\u4e2d\u7684\u201c\u6076\u6bd2\u5973\u914d\u201d\u5982\u5983\uff0c\u719f\u77e5\u5267\u60c5\u8d70\u5411\u7684\u82cf\u6f47\u6f47\u77e5\u9053\uff0c\u5982\u679c\u4e0d\u6539\u53d8\u73b0\u72b6\uff0c\u5979..."}]
|
||||
-1
File diff suppressed because one or more lines are too long
@@ -1,4 +0,0 @@
|
||||
<?php
|
||||
//000000086400
|
||||
exit();?>
|
||||
s:234:"<?xml version="1.0" encoding="UTF-8"?><urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><url><loc>http://www.abcffff.com</loc><lastmod>2024-09-14</lastmod><changefreq>daily</changefreq><priority>1.0</priority></url></urlset>";
|
||||
@@ -1,5 +0,0 @@
|
||||
[2024-09-14T16:27:17+08:00][error] [8]未定义变量: newList
|
||||
[2024-09-14T16:27:18+08:00][error] [8]未定义变量: newList
|
||||
[2024-09-14T16:27:19+08:00][error] [8]未定义变量: newList
|
||||
[2024-09-14T16:27:19+08:00][error] [8]未定义变量: newList
|
||||
[2024-09-14T16:27:20+08:00][error] [8]未定义变量: newList
|
||||
@@ -1,387 +0,0 @@
|
||||
<?php /*a:5:{s:72:"C:\Users\liu67\Desktop\test\xinyue-search\app\index\view\news\index.html";i:1726302709;s:75:"C:\Users\liu67\Desktop\test\xinyue-search\app\index\view\common\header.html";i:1726022411;s:73:"C:\Users\liu67\Desktop\test\xinyue-search\app\index\view\common\head.html";i:1726108056;s:73:"C:\Users\liu67\Desktop\test\xinyue-search\app\index\view\common\foot.html";i:1726106690;s:75:"C:\Users\liu67\Desktop\test\xinyue-search\app\index\view\common\footer.html";i:1726301832;}*/ ?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<?php if(!(empty($config['app_icon']) || (($config['app_icon'] instanceof \think\Collection || $config['app_icon'] instanceof \think\Paginator ) && $config['app_icon']->isEmpty()))): ?>
|
||||
<link rel="icon" href="<?php echo htmlentities($config['app_icon']); ?>" />
|
||||
<?php endif; ?>
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta name="viewport" content="width=device-width,user-scalable=no,maximum-scale=1.0">
|
||||
<title><?php if(isset($detail) && $detail['title']): ?><?php echo htmlentities($detail['title']); ?> - <?php echo htmlentities($config['app_name']); else: ?><?php echo htmlentities($config['app_name']); if(!(empty($config['app_title']) || (($config['app_title'] instanceof \think\Collection || $config['app_title'] instanceof \think\Paginator ) && $config['app_title']->isEmpty()))): ?> - <?php echo htmlentities($config['app_title']); ?><?php endif; ?><?php endif; ?></title>
|
||||
<meta name="keywords" content="<?php if(!(empty($detail) || (($detail instanceof \think\Collection || $detail instanceof \think\Paginator ) && $detail->isEmpty()))): ?><?php echo htmlentities($detail['title']); ?>,<?php endif; ?><?php echo htmlentities($config['app_keywords']); ?>" />
|
||||
<meta name="description" content="<?php if(!(empty($detail) || (($detail instanceof \think\Collection || $detail instanceof \think\Paginator ) && $detail->isEmpty()))): ?><?php echo htmlentities($detail['title']); ?> - <?php endif; ?><?php echo htmlentities($config['app_description']); ?>" />
|
||||
<link rel="stylesheet" href="/static/index/css/index.min.css">
|
||||
<link rel="stylesheet" href="/static/index/css/app.css">
|
||||
<link rel="stylesheet" href="/static/index/css/m.css">
|
||||
|
||||
<?php echo $config['seo_statistics']; ?>
|
||||
|
||||
<style>
|
||||
:root {
|
||||
--theme-color: <?php echo htmlentities((isset($config['home_color']) && ($config['home_color'] !== '')?$config['home_color']:'#3e3e3e')); ?>;
|
||||
--theme-theme: <?php echo htmlentities((isset($config['home_theme']) && ($config['home_theme'] !== '')?$config['home_theme']:'#133ab3')); ?>;
|
||||
--theme-background: <?php echo htmlentities((isset($config['home_background']) && ($config['home_background'] !== '')?$config['home_background']:'#fafafa')); ?>;
|
||||
--theme-other_background: <?php echo htmlentities((isset($config['other_background']) && ($config['other_background'] !== '')?$config['other_background']:'#ffffff')); ?>;
|
||||
}
|
||||
<?php echo htmlentities($config['home_css']); ?>
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="headBg" style="background-image: url(<?php echo htmlentities($config['home_bg']); ?>);"></div>
|
||||
<div id="app" v-cloak>
|
||||
<div class="headerBox">
|
||||
<div class="bg" <?php if(!(empty($fixed) || (($fixed instanceof \think\Collection || $fixed instanceof \think\Paginator ) && $fixed->isEmpty()))): ?>:style="{ opacity: elementOpacity }"<?php endif; ?>></div>
|
||||
<div class="box">
|
||||
<a href="/" class="logoBox" <?php if(!(empty($fixed) || (($fixed instanceof \think\Collection || $fixed instanceof \think\Paginator ) && $fixed->isEmpty()))): ?>:style="{ opacity: elementOpacity }"<?php endif; ?>>
|
||||
<?php if(!(empty($config['logo']) || (($config['logo'] instanceof \think\Collection || $config['logo'] instanceof \think\Paginator ) && $config['logo']->isEmpty()))): ?>
|
||||
<img class="logo" src="<?php echo htmlentities($config['logo']); ?>"></img>
|
||||
<?php endif; if($config['app_name'] && $config['app_name_hide']!=1): ?>
|
||||
<div class="title"><?php echo htmlentities($config['app_name']); ?></div>
|
||||
<?php endif; ?>
|
||||
</a>
|
||||
<div class="search" <?php if(!(empty($fixed) || (($fixed instanceof \think\Collection || $fixed instanceof \think\Paginator ) && $fixed->isEmpty()))): ?>:style="{ opacity: elementOpacity }"<?php endif; ?>>
|
||||
<input type="text" v-model="keyword" placeholder="输入关键字进行搜索" @keyup.enter="searchBtn" confirm-type="search" @confirm="searchBtn">
|
||||
<div class="btn" @click="searchBtn">
|
||||
<i class="iconfont icon-sousuo"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="navs">
|
||||
<?php if(!(empty($config['qcode']) || (($config['qcode'] instanceof \think\Collection || $config['qcode'] instanceof \think\Paginator ) && $config['qcode']->isEmpty()))): ?>
|
||||
<div class="item" @click="qcodeVisible = true">加入群聊</div>
|
||||
<?php endif; if(empty($config['app_demand']) || (($config['app_demand'] instanceof \think\Collection || $config['app_demand'] instanceof \think\Paginator ) && $config['app_demand']->isEmpty())): ?>
|
||||
<div class="item" @click="layerVisible = true">提交需求</div>
|
||||
<?php endif; ?>
|
||||
<div class="btns" v-html="`<?php echo htmlentities($config['app_links']); ?>`"></div>
|
||||
|
||||
<div class="iconfont icon-caidan" @click="drawer = true"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="headerKox"></div>
|
||||
|
||||
|
||||
<el-dialog
|
||||
v-model="qcodeVisible"
|
||||
width="300"
|
||||
>
|
||||
<img src="<?php echo htmlentities($config['qcode']); ?>" style="width: 100%" />
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog
|
||||
v-model="layerVisible"
|
||||
width="300"
|
||||
>
|
||||
<div class="layerBox">
|
||||
<div class="vname">提交需求</div>
|
||||
<el-input
|
||||
v-model="content"
|
||||
placeholder="请输入你想看的资源信息~"
|
||||
type="textarea"
|
||||
resize='none'
|
||||
></el-input>
|
||||
<div class="vbtn" @click="saveBtn">提交</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
v-model="drawer"
|
||||
width="300"
|
||||
center
|
||||
>
|
||||
<div class="drawer">
|
||||
<?php if(!(empty($config['qcode']) || (($config['qcode'] instanceof \think\Collection || $config['qcode'] instanceof \think\Paginator ) && $config['qcode']->isEmpty()))): ?>
|
||||
<div class="item" @click="qcodeVisible = true">加入群聊</div>
|
||||
<?php endif; if(empty($config['app_demand']) || (($config['app_demand'] instanceof \think\Collection || $config['app_demand'] instanceof \think\Paginator ) && $config['app_demand']->isEmpty())): ?>
|
||||
<div class="item" @click="layerVisible = true">提交需求</div>
|
||||
<?php endif; ?>
|
||||
<div class="btns" v-html="`<?php echo htmlentities($config['app_links']); ?>`"></div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<div class="homeBox searchBox">
|
||||
<div class="box">
|
||||
<div class="logoBox">
|
||||
<?php if(!(empty($config['logo']) || (($config['logo'] instanceof \think\Collection || $config['logo'] instanceof \think\Paginator ) && $config['logo']->isEmpty()))): ?>
|
||||
<img class="logo" src="<?php echo htmlentities($config['logo']); ?>"></img>
|
||||
<?php endif; if($config['app_name'] && $config['app_name_hide']!=1): ?>
|
||||
<span class="title"><?php echo htmlentities($config['app_name']); ?></span>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php if(!(empty($config['app_subname']) || (($config['app_subname'] instanceof \think\Collection || $config['app_subname'] instanceof \think\Paginator ) && $config['app_subname']->isEmpty()))): ?>
|
||||
<div class="subTitle"><?php echo htmlentities($config['app_subname']); ?></div>
|
||||
<?php endif; ?>
|
||||
<div class="search">
|
||||
<input type="text" v-model="keyword" placeholder="输入关键字进行搜索" @keyup.enter="searchBtn" confirm-type="search" @confirm="searchBtn">
|
||||
<div class="btn" @click="searchBtn">
|
||||
<i class="iconfont icon-sousuo"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="home <?php if($config['ranking_type'] != 1): ?>homeNO<?php endif; ?>">
|
||||
<div class="block">
|
||||
<div class="nav">
|
||||
<?php if(!(empty($config['home_new_img']) || (($config['home_new_img'] instanceof \think\Collection || $config['home_new_img'] instanceof \think\Paginator ) && $config['home_new_img']->isEmpty()))): ?>
|
||||
<img src="<?php echo htmlentities($config['home_new_img']); ?>"></img>
|
||||
<?php endif; ?>
|
||||
最新更新
|
||||
</div>
|
||||
<div class="content">
|
||||
<?php if($config['ranking_type'] == 1): ?>
|
||||
<div class="list">
|
||||
<a :href="'/s/'+vo.title+'.html'" target="_blank" class="item" v-for="(vo,i) in newList" :key="i">
|
||||
<div class="img">
|
||||
<img :src="vo.src" />
|
||||
<span>Loading...</span>
|
||||
</div>
|
||||
<p>{{vo.title}}</p>
|
||||
</a>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<div class="list">
|
||||
<a :href="'/s/'+vo.title+'.html'" target="_blank" class="item" v-for="(vo,i) in newList" :key="i">
|
||||
<p>
|
||||
<span>{{i+1}}</span>
|
||||
{{vo.title}}
|
||||
</p>
|
||||
</a>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="block" v-for="(item,index) in rankList" :key="index">
|
||||
<div class="nav">
|
||||
<img :src="item.image" v-if="item.image">
|
||||
{{item.name}}
|
||||
</div>
|
||||
<div class="content">
|
||||
<?php if($config['ranking_type'] == 1): ?>
|
||||
<div class="list">
|
||||
<a :href="'/s/'+vo.title+'.html'" target="_blank" class="item" v-for="(vo,i) in item.list" :key="i">
|
||||
<div class="img">
|
||||
<img :src="vo.src" />
|
||||
<span>Loading...</span>
|
||||
</div>
|
||||
<p>{{vo.title}}</p>
|
||||
</a>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<div class="list">
|
||||
<a :href="'/s/'+vo.title+'.html'" target="_blank" class="item" v-for="(vo,i) in item.list" :key="i">
|
||||
<p>
|
||||
<span>{{i+1}}</span>
|
||||
{{vo.title}}
|
||||
</p>
|
||||
</a>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footerBox">
|
||||
<div class="box">
|
||||
<p><?php echo $config['footer_dec']; ?></p>
|
||||
<p>
|
||||
<?php echo $config['footer_copyright']; ?>
|
||||
<a href="/sitemap.xml" target="_blank">网站地图</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="/static/index/js/vue.global.min.js"></script>
|
||||
<script src="/static/index/js/index.full.min.js"></script>
|
||||
<script src="/static/index/js/axios.min.js"></script>
|
||||
<script>
|
||||
const { createApp, ref, onMounted, onUnmounted } = Vue;
|
||||
const { ElButton, ElMessage } = ElementPlus;
|
||||
const app = createApp({
|
||||
setup() {
|
||||
// 定义响应式数据
|
||||
const elementOpacity = ref(0);
|
||||
const scrollThreshold = ref(150); // 动态设置的滚动阈值
|
||||
const keyword = ref('<?php echo isset($keyword) ? htmlentities($keyword) : ''; ?>');
|
||||
const qcodeVisible = ref(false);
|
||||
const layerVisible = ref(false);
|
||||
const content = ref('');
|
||||
const load = ref(false)
|
||||
const drawer = ref(false)
|
||||
const rankList = ref([]);
|
||||
const rankDj = ref([]);
|
||||
const is_m = ref(0);
|
||||
const newList = ref([]);
|
||||
|
||||
|
||||
// 公共消息方法
|
||||
const showMessage = (message, type = 'info') => {
|
||||
ElMessage({
|
||||
message,
|
||||
type,
|
||||
plain: true,
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
// 滚动监听方法
|
||||
const handleScroll = () => {
|
||||
const scrollTop = window.scrollY || document.documentElement.scrollTop;
|
||||
elementOpacity.value = scrollTop >= scrollThreshold.value
|
||||
? Math.min((scrollTop - scrollThreshold.value) / 100, 1)
|
||||
: Math.max(1 - (scrollThreshold.value - scrollTop) / 100, 0);
|
||||
|
||||
const boxElement = document.querySelector('.listBox .screen .fixed .box');
|
||||
if (boxElement.style.display === 'block' && is_m.value) {
|
||||
boxElement.style.display = 'none'; // 隐藏元素
|
||||
}
|
||||
};
|
||||
|
||||
// 搜索按钮点击事件
|
||||
const searchBtn = () => {
|
||||
if (!keyword.value) {
|
||||
return showMessage('请输入你要搜索的内容~', 'error');
|
||||
}
|
||||
const currentUrl = window.location.href;
|
||||
const targetUrl = `/s/${keyword.value}.html`;
|
||||
if (currentUrl.includes('/s/') || currentUrl.includes('/d/')) {
|
||||
window.location.href = targetUrl;
|
||||
} else {
|
||||
window.open(targetUrl, '_blank');
|
||||
}
|
||||
};
|
||||
|
||||
// 保存按钮点击事件
|
||||
const saveBtn = async () => {
|
||||
if (!content.value) {
|
||||
return showMessage('请输入你想看的资源信息~', 'error');
|
||||
}
|
||||
if (load.value) return;
|
||||
|
||||
load.value = true;
|
||||
try {
|
||||
const response = await axios.post('/api/tool/feedback', { content: content.value });
|
||||
showMessage(response.data.message, response.data.code === 200 ? 'success' : 'error');
|
||||
if (response.data.code === 200) {
|
||||
layerVisible.value = false;
|
||||
content.value = '';
|
||||
}
|
||||
} finally {
|
||||
load.value = false;
|
||||
}
|
||||
};
|
||||
|
||||
const setnum = (num) => (num / 10000).toFixed(2) + 'W';
|
||||
|
||||
const goLink = (event,id) => {
|
||||
event.preventDefault();
|
||||
window.location.href = `/d/${id}.html`;
|
||||
}
|
||||
|
||||
const changeBtn = (e) => {
|
||||
const category_id = `<?php echo htmlentities($category_id); ?>`;
|
||||
if(category_id){
|
||||
window.location.href = `/s/${keyword.value}-${e}-${category_id}.html`;
|
||||
}else{
|
||||
window.location.href = `/s/${keyword.value}-${e}.html`;
|
||||
}
|
||||
};
|
||||
|
||||
const copyText = async(event,title,url,code) => {
|
||||
event.preventDefault();
|
||||
var text = '标题:'+title+'\n链接:'+url
|
||||
if (code) text += `\n提取码:${code}`;
|
||||
text += `\n由【${'<?php echo htmlentities($config['app_name']); ?>'}${window.location.hostname}】供网盘分享链接`;
|
||||
|
||||
|
||||
try {
|
||||
// 优先使用 navigator.clipboard
|
||||
await navigator.clipboard.writeText(text);
|
||||
showMessage('复制成功', 'success');
|
||||
} catch (err) {
|
||||
// 如果 navigator.clipboard 失败,使用 document.execCommand 作为回退
|
||||
const textArea = document.createElement('textarea');
|
||||
textArea.value = text;
|
||||
textArea.style.position = 'fixed'; // 避免滚动
|
||||
textArea.style.opacity = 0;
|
||||
document.body.appendChild(textArea);
|
||||
textArea.focus();
|
||||
textArea.select();
|
||||
|
||||
try {
|
||||
const successful = document.execCommand('copy');
|
||||
if (successful) {
|
||||
showMessage('复制成功', 'success');
|
||||
} else {
|
||||
throw new Error('复制失败');
|
||||
}
|
||||
} catch (err) {
|
||||
showMessage('复制失败,请手动复制', 'error');
|
||||
}
|
||||
|
||||
document.body.removeChild(textArea);
|
||||
}
|
||||
}
|
||||
|
||||
const selectBtn = () => {
|
||||
const boxElement = document.querySelector('.listBox .screen .fixed .box');
|
||||
// 切换 display 属性,显示或隐藏
|
||||
if (boxElement.style.display === 'none' || boxElement.style.display === '') {
|
||||
boxElement.style.display = 'block'; // 显示
|
||||
} else {
|
||||
boxElement.style.display = 'none'; // 隐藏
|
||||
}
|
||||
}
|
||||
|
||||
const handleDeviceType = () => {
|
||||
const isMobile = window.matchMedia('(max-width: 768px)').matches;
|
||||
if (isMobile) {
|
||||
// 手机端的逻辑
|
||||
is_m.value = 1
|
||||
} else {
|
||||
// 电脑端的逻辑
|
||||
is_m.value = 0
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// 组件挂载时添加滚动监听
|
||||
onMounted(() => {
|
||||
handleDeviceType();
|
||||
|
||||
window.addEventListener('scroll', handleScroll);
|
||||
window.addEventListener('resize', handleDeviceType);
|
||||
});
|
||||
|
||||
// 组件卸载时移除滚动监听
|
||||
onUnmounted(() => {
|
||||
window.removeEventListener('scroll', handleScroll);
|
||||
window.removeEventListener('resize', handleDeviceType);
|
||||
});
|
||||
|
||||
// 返回数据和方法
|
||||
return { elementOpacity, scrollThreshold, keyword, searchBtn, rankList,newList, setnum, qcodeVisible, layerVisible, content, saveBtn, rankDj,goLink,changeBtn,copyText,drawer,selectBtn,is_m };
|
||||
}
|
||||
})
|
||||
.use(ElementPlus) // 使用 Element Plus
|
||||
.mount('#app'); // 挂载 Vue 实例
|
||||
</script>
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
app.newList = JSON.parse('<?php echo json_encode($newList, JSON_UNESCAPED_UNICODE); ?>');
|
||||
let num = '<?php echo htmlentities($config['ranking_m_num']); ?>';
|
||||
if(app.is_m){
|
||||
app.newList = app.newList.slice(0, num);
|
||||
}
|
||||
app.rankList = JSON.parse('<?php echo json_encode($rankList, JSON_UNESCAPED_UNICODE); ?>');
|
||||
for (const item of app.rankList) {
|
||||
axios.get('/api/tool/ranking',{
|
||||
params: {
|
||||
channel: item.name,
|
||||
is_m: app.is_m
|
||||
}
|
||||
})
|
||||
.then(function (res) {
|
||||
item.list = res.data.data
|
||||
})
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,392 +0,0 @@
|
||||
<?php /*a:5:{s:71:"C:\Users\liu67\Desktop\test\xinyue-search\app\index\view\news\list.html";i:1726109170;s:75:"C:\Users\liu67\Desktop\test\xinyue-search\app\index\view\common\header.html";i:1726022411;s:73:"C:\Users\liu67\Desktop\test\xinyue-search\app\index\view\common\head.html";i:1726108056;s:73:"C:\Users\liu67\Desktop\test\xinyue-search\app\index\view\common\foot.html";i:1726106690;s:75:"C:\Users\liu67\Desktop\test\xinyue-search\app\index\view\common\footer.html";i:1726122055;}*/ ?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<?php if(!(empty($config['app_icon']) || (($config['app_icon'] instanceof \think\Collection || $config['app_icon'] instanceof \think\Paginator ) && $config['app_icon']->isEmpty()))): ?>
|
||||
<link rel="icon" href="<?php echo htmlentities($config['app_icon']); ?>" />
|
||||
<?php endif; ?>
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta name="viewport" content="width=device-width,user-scalable=no,maximum-scale=1.0">
|
||||
<title><?php if(isset($detail) && $detail['title']): ?><?php echo htmlentities($detail['title']); ?> - <?php echo htmlentities($config['app_name']); else: ?><?php echo htmlentities($config['app_name']); if(!(empty($config['app_title']) || (($config['app_title'] instanceof \think\Collection || $config['app_title'] instanceof \think\Paginator ) && $config['app_title']->isEmpty()))): ?> - <?php echo htmlentities($config['app_title']); ?><?php endif; ?><?php endif; ?></title>
|
||||
<meta name="keywords" content="<?php if(!(empty($detail) || (($detail instanceof \think\Collection || $detail instanceof \think\Paginator ) && $detail->isEmpty()))): ?><?php echo htmlentities($detail['title']); ?>,<?php endif; ?><?php echo htmlentities($config['app_keywords']); ?>" />
|
||||
<meta name="description" content="<?php if(!(empty($detail) || (($detail instanceof \think\Collection || $detail instanceof \think\Paginator ) && $detail->isEmpty()))): ?><?php echo htmlentities($detail['title']); ?> - <?php endif; ?><?php echo htmlentities($config['app_description']); ?>" />
|
||||
<link rel="stylesheet" href="/static/index/css/index.min.css">
|
||||
<link rel="stylesheet" href="/static/index/css/app.css">
|
||||
<link rel="stylesheet" href="/static/index/css/m.css">
|
||||
|
||||
<?php echo $config['seo_statistics']; ?>
|
||||
|
||||
<style>
|
||||
:root {
|
||||
--theme-color: <?php echo htmlentities((isset($config['home_color']) && ($config['home_color'] !== '')?$config['home_color']:'#3e3e3e')); ?>;
|
||||
--theme-theme: <?php echo htmlentities((isset($config['home_theme']) && ($config['home_theme'] !== '')?$config['home_theme']:'#133ab3')); ?>;
|
||||
--theme-background: <?php echo htmlentities((isset($config['home_background']) && ($config['home_background'] !== '')?$config['home_background']:'#fafafa')); ?>;
|
||||
--theme-other_background: <?php echo htmlentities((isset($config['other_background']) && ($config['other_background'] !== '')?$config['other_background']:'#ffffff')); ?>;
|
||||
}
|
||||
<?php echo htmlentities($config['home_css']); ?>
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="headBg" style="background-image: url(<?php echo htmlentities($config['home_bg']); ?>);"></div>
|
||||
<div id="app" v-cloak>
|
||||
<div class="headerBox">
|
||||
<div class="bg" <?php if(!(empty($fixed) || (($fixed instanceof \think\Collection || $fixed instanceof \think\Paginator ) && $fixed->isEmpty()))): ?>:style="{ opacity: elementOpacity }"<?php endif; ?>></div>
|
||||
<div class="box">
|
||||
<a href="/" class="logoBox" <?php if(!(empty($fixed) || (($fixed instanceof \think\Collection || $fixed instanceof \think\Paginator ) && $fixed->isEmpty()))): ?>:style="{ opacity: elementOpacity }"<?php endif; ?>>
|
||||
<?php if(!(empty($config['logo']) || (($config['logo'] instanceof \think\Collection || $config['logo'] instanceof \think\Paginator ) && $config['logo']->isEmpty()))): ?>
|
||||
<img class="logo" src="<?php echo htmlentities($config['logo']); ?>"></img>
|
||||
<?php endif; if($config['app_name'] && $config['app_name_hide']!=1): ?>
|
||||
<div class="title"><?php echo htmlentities($config['app_name']); ?></div>
|
||||
<?php endif; ?>
|
||||
</a>
|
||||
<div class="search" <?php if(!(empty($fixed) || (($fixed instanceof \think\Collection || $fixed instanceof \think\Paginator ) && $fixed->isEmpty()))): ?>:style="{ opacity: elementOpacity }"<?php endif; ?>>
|
||||
<input type="text" v-model="keyword" placeholder="输入关键字进行搜索" @keyup.enter="searchBtn" confirm-type="search" @confirm="searchBtn">
|
||||
<div class="btn" @click="searchBtn">
|
||||
<i class="iconfont icon-sousuo"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="navs">
|
||||
<?php if(!(empty($config['qcode']) || (($config['qcode'] instanceof \think\Collection || $config['qcode'] instanceof \think\Paginator ) && $config['qcode']->isEmpty()))): ?>
|
||||
<div class="item" @click="qcodeVisible = true">加入群聊</div>
|
||||
<?php endif; if(empty($config['app_demand']) || (($config['app_demand'] instanceof \think\Collection || $config['app_demand'] instanceof \think\Paginator ) && $config['app_demand']->isEmpty())): ?>
|
||||
<div class="item" @click="layerVisible = true">提交需求</div>
|
||||
<?php endif; ?>
|
||||
<div class="btns" v-html="`<?php echo htmlentities($config['app_links']); ?>`"></div>
|
||||
|
||||
<div class="iconfont icon-caidan" @click="drawer = true"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="headerKox"></div>
|
||||
|
||||
|
||||
<el-dialog
|
||||
v-model="qcodeVisible"
|
||||
width="300"
|
||||
>
|
||||
<img src="<?php echo htmlentities($config['qcode']); ?>" style="width: 100%" />
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog
|
||||
v-model="layerVisible"
|
||||
width="300"
|
||||
>
|
||||
<div class="layerBox">
|
||||
<div class="vname">提交需求</div>
|
||||
<el-input
|
||||
v-model="content"
|
||||
placeholder="请输入你想看的资源信息~"
|
||||
type="textarea"
|
||||
resize='none'
|
||||
></el-input>
|
||||
<div class="vbtn" @click="saveBtn">提交</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<el-dialog
|
||||
v-model="drawer"
|
||||
width="300"
|
||||
center
|
||||
>
|
||||
<div class="drawer">
|
||||
<?php if(!(empty($config['qcode']) || (($config['qcode'] instanceof \think\Collection || $config['qcode'] instanceof \think\Paginator ) && $config['qcode']->isEmpty()))): ?>
|
||||
<div class="item" @click="qcodeVisible = true">加入群聊</div>
|
||||
<?php endif; if(empty($config['app_demand']) || (($config['app_demand'] instanceof \think\Collection || $config['app_demand'] instanceof \think\Paginator ) && $config['app_demand']->isEmpty())): ?>
|
||||
<div class="item" @click="layerVisible = true">提交需求</div>
|
||||
<?php endif; ?>
|
||||
<div class="btns" v-html="`<?php echo htmlentities($config['app_links']); ?>`"></div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<div class="searchBox searchList">
|
||||
<div class="search">
|
||||
<div class="select" @click="selectBtn">
|
||||
<?php if($category_id == ''): ?>全部<?php endif; foreach($category as $key=>$vo): if($category_id == $vo['id']): ?><?php echo htmlentities($vo['name']); ?><?php endif; ?>
|
||||
<?php endforeach; ?>
|
||||
<i class="iconfont icon-xiala" style="font-size: 3vw"></i>
|
||||
</div>
|
||||
<input type="text" v-model="keyword" placeholder="输入关键字进行搜索" @keyup.enter="searchBtn" confirm-type="search" @confirm="searchBtn">
|
||||
<div class="btn" @click="searchBtn">
|
||||
<i class="iconfont icon-sousuo"></i>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="listBox">
|
||||
<div class="screen">
|
||||
<div class="fixed">
|
||||
<h3>筛选</h3>
|
||||
<div class="box">
|
||||
<a href="/s/<?php echo htmlentities($keyword); ?>.html" class="<?php if($category_id == ''): ?>active<?php endif; ?>">全部</a>
|
||||
<?php foreach($category as $key=>$vo): ?>
|
||||
<a href="/s/<?php echo htmlentities($keyword); ?>-1-<?php echo htmlentities($vo['id']); ?>.html" class="<?php if($category_id == $vo['id']): ?>active<?php endif; ?>"><?php echo htmlentities($vo['name']); ?></a>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="left">
|
||||
<h3>为您找到【<span><?php echo htmlentities($keyword); ?></span>】相关资源<span> <?php echo htmlentities($list['total_result']); ?> </span>条</h3>
|
||||
<div class="box">
|
||||
<?php if($list['total_result']>0): ?>
|
||||
<div class="list">
|
||||
<?php foreach($list['items'] as $key=>$vo): ?>
|
||||
<a class="item" target="_blank" href="<?php echo htmlentities($vo['url']); ?>">
|
||||
<div class="title">
|
||||
<?php echo $vo['name']; ?>
|
||||
</div>
|
||||
<div class="type time"><?php echo htmlentities($vo['times']); ?></div>
|
||||
<div class="type">
|
||||
<?php if($vo['is_type']==1): ?>
|
||||
<span>来源:阿里云盘</span>
|
||||
<?php elseif($vo['is_type']==2): ?>
|
||||
<span>来源:百度网盘</span>
|
||||
<?php elseif($vo['is_type']==3): ?>
|
||||
<span>来源:UC网盘</span>
|
||||
<?php elseif($vo['is_type']==4): ?>
|
||||
<span>来源:迅雷网盘</span>
|
||||
<?php else: ?>
|
||||
<span>来源:夸克网盘</span>
|
||||
<?php endif; if(!(empty($vo['code']) || (($vo['code'] instanceof \think\Collection || $vo['code'] instanceof \think\Paginator ) && $vo['code']->isEmpty()))): ?>
|
||||
<span>提取码:<span><?php echo htmlentities($vo['code']); ?></span></span>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div class="btns">
|
||||
<div class="btn" @click.stop="copyText($event,'<?php echo htmlentities($vo['title']); ?>','<?php echo htmlentities($vo['url']); ?>','<?php echo htmlentities($vo['code']); ?>')"><i class="iconfont icon-fenxiang1"></i>复制分享</div>
|
||||
<div class="btn" @click.stop="goLink($event,'<?php echo htmlentities($vo['id']); ?>')"><i class="iconfont icon-fangwen"></i>查看详情</div>
|
||||
<div class="btn">
|
||||
<img src="/static/index/images/<?php echo htmlentities($vo['is_type']); ?>.png" class="icon" />
|
||||
立即访问
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<div class="page">
|
||||
<?php if(!(empty($list['total_result']) || (($list['total_result'] instanceof \think\Collection || $list['total_result'] instanceof \think\Paginator ) && $list['total_result']->isEmpty()))): ?>
|
||||
<el-pagination background layout="prev, pager, next" :pager-count="3" :default-current-page="<?php echo htmlentities($page_no); ?>" :default-page-size="<?php echo htmlentities($page_size); ?>" :total="<?php echo htmlentities($list['total_result']); ?>" @change="changeBtn"></el-pagination>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<?php else: ?>
|
||||
<el-empty style="margin-top: 10%;" :image-size="200" image="<?php echo isset($config['search_bg']) ? htmlentities($config['search_bg']) : ''; ?>" description="<?php echo htmlentities((isset($config['search_tips']) && ($config['search_tips'] !== '')?$config['search_tips']:'未找到,可换个关键词尝试哦~')); ?>"></el-empty>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="right">
|
||||
<block v-for="(item,index) in rankList" :key="index">
|
||||
<div class="nav">
|
||||
<img :src="item.image" v-if="item.image">
|
||||
{{item.name}}
|
||||
</div>
|
||||
<div class="box" v-if="item.list && item.list.length>0">
|
||||
<div class="list">
|
||||
<a :href="'/s/'+vo.title+'.html'" v-for="(vo,i) in item.list" :key="i" class="item" v-show="i<5">
|
||||
<p>
|
||||
<span>{{i+1}}</span>
|
||||
{{vo.title}}
|
||||
</p>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</block>
|
||||
</div>
|
||||
</div>
|
||||
<div class="footerBox">
|
||||
<div class="box">
|
||||
<p><?php echo $config['footer_dec']; ?></p>
|
||||
<p>
|
||||
<?php echo $config['footer_copyright']; ?>
|
||||
<a href="/sitemap.xml" target="_blank">网站地图</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="/static/index/js/vue.global.min.js"></script>
|
||||
<script src="/static/index/js/index.full.min.js"></script>
|
||||
<script src="/static/index/js/axios.min.js"></script>
|
||||
<script>
|
||||
const { createApp, ref, onMounted, onUnmounted } = Vue;
|
||||
const { ElButton, ElMessage } = ElementPlus;
|
||||
const app = createApp({
|
||||
setup() {
|
||||
// 定义响应式数据
|
||||
const elementOpacity = ref(0);
|
||||
const scrollThreshold = ref(150); // 动态设置的滚动阈值
|
||||
const keyword = ref('<?php echo isset($keyword) ? htmlentities($keyword) : ''; ?>');
|
||||
const qcodeVisible = ref(false);
|
||||
const layerVisible = ref(false);
|
||||
const content = ref('');
|
||||
const load = ref(false)
|
||||
const drawer = ref(false)
|
||||
const rankList = ref([]);
|
||||
const rankDj = ref([]);
|
||||
const is_m = ref(0);
|
||||
|
||||
|
||||
// 公共消息方法
|
||||
const showMessage = (message, type = 'info') => {
|
||||
ElMessage({
|
||||
message,
|
||||
type,
|
||||
plain: true,
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
// 滚动监听方法
|
||||
const handleScroll = () => {
|
||||
const scrollTop = window.scrollY || document.documentElement.scrollTop;
|
||||
elementOpacity.value = scrollTop >= scrollThreshold.value
|
||||
? Math.min((scrollTop - scrollThreshold.value) / 100, 1)
|
||||
: Math.max(1 - (scrollThreshold.value - scrollTop) / 100, 0);
|
||||
|
||||
const boxElement = document.querySelector('.listBox .screen .fixed .box');
|
||||
if (boxElement.style.display === 'block' && is_m.value) {
|
||||
boxElement.style.display = 'none'; // 隐藏元素
|
||||
}
|
||||
};
|
||||
|
||||
// 搜索按钮点击事件
|
||||
const searchBtn = () => {
|
||||
if (!keyword.value) {
|
||||
return showMessage('请输入你要搜索的内容~', 'error');
|
||||
}
|
||||
const currentUrl = window.location.href;
|
||||
const targetUrl = `/s/${keyword.value}.html`;
|
||||
if (currentUrl.includes('/s/') || currentUrl.includes('/d/')) {
|
||||
window.location.href = targetUrl;
|
||||
} else {
|
||||
window.open(targetUrl, '_blank');
|
||||
}
|
||||
};
|
||||
|
||||
// 保存按钮点击事件
|
||||
const saveBtn = async () => {
|
||||
if (!content.value) {
|
||||
return showMessage('请输入你想看的资源信息~', 'error');
|
||||
}
|
||||
if (load.value) return;
|
||||
|
||||
load.value = true;
|
||||
try {
|
||||
const response = await axios.post('/api/tool/feedback', { content: content.value });
|
||||
showMessage(response.data.message, response.data.code === 200 ? 'success' : 'error');
|
||||
if (response.data.code === 200) {
|
||||
layerVisible.value = false;
|
||||
content.value = '';
|
||||
}
|
||||
} finally {
|
||||
load.value = false;
|
||||
}
|
||||
};
|
||||
|
||||
const setnum = (num) => (num / 10000).toFixed(2) + 'W';
|
||||
|
||||
const goLink = (event,id) => {
|
||||
event.preventDefault();
|
||||
window.location.href = `/d/${id}.html`;
|
||||
}
|
||||
|
||||
const changeBtn = (e) => {
|
||||
const category_id = `<?php echo htmlentities($category_id); ?>`;
|
||||
if(category_id){
|
||||
window.location.href = `/s/${keyword.value}-${e}-${category_id}.html`;
|
||||
}else{
|
||||
window.location.href = `/s/${keyword.value}-${e}.html`;
|
||||
}
|
||||
};
|
||||
|
||||
const copyText = async(event,title,url,code) => {
|
||||
event.preventDefault();
|
||||
var text = '标题:'+title+'\n链接:'+url
|
||||
if (code) text += `\n提取码:${code}`;
|
||||
text += `\n由【${'<?php echo htmlentities($config['app_name']); ?>'}${window.location.hostname}】供网盘分享链接`;
|
||||
|
||||
|
||||
try {
|
||||
// 优先使用 navigator.clipboard
|
||||
await navigator.clipboard.writeText(text);
|
||||
showMessage('复制成功', 'success');
|
||||
} catch (err) {
|
||||
// 如果 navigator.clipboard 失败,使用 document.execCommand 作为回退
|
||||
const textArea = document.createElement('textarea');
|
||||
textArea.value = text;
|
||||
textArea.style.position = 'fixed'; // 避免滚动
|
||||
textArea.style.opacity = 0;
|
||||
document.body.appendChild(textArea);
|
||||
textArea.focus();
|
||||
textArea.select();
|
||||
|
||||
try {
|
||||
const successful = document.execCommand('copy');
|
||||
if (successful) {
|
||||
showMessage('复制成功', 'success');
|
||||
} else {
|
||||
throw new Error('复制失败');
|
||||
}
|
||||
} catch (err) {
|
||||
showMessage('复制失败,请手动复制', 'error');
|
||||
}
|
||||
|
||||
document.body.removeChild(textArea);
|
||||
}
|
||||
}
|
||||
|
||||
const selectBtn = () => {
|
||||
const boxElement = document.querySelector('.listBox .screen .fixed .box');
|
||||
// 切换 display 属性,显示或隐藏
|
||||
if (boxElement.style.display === 'none' || boxElement.style.display === '') {
|
||||
boxElement.style.display = 'block'; // 显示
|
||||
} else {
|
||||
boxElement.style.display = 'none'; // 隐藏
|
||||
}
|
||||
}
|
||||
|
||||
const handleDeviceType = () => {
|
||||
const isMobile = window.matchMedia('(max-width: 768px)').matches;
|
||||
if (isMobile) {
|
||||
// 手机端的逻辑
|
||||
is_m.value = 1
|
||||
} else {
|
||||
// 电脑端的逻辑
|
||||
is_m.value = 0
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// 组件挂载时添加滚动监听
|
||||
onMounted(() => {
|
||||
handleDeviceType();
|
||||
|
||||
window.addEventListener('scroll', handleScroll);
|
||||
window.addEventListener('resize', handleDeviceType);
|
||||
});
|
||||
|
||||
// 组件卸载时移除滚动监听
|
||||
onUnmounted(() => {
|
||||
window.removeEventListener('scroll', handleScroll);
|
||||
window.removeEventListener('resize', handleDeviceType);
|
||||
});
|
||||
|
||||
// 返回数据和方法
|
||||
return { elementOpacity, scrollThreshold, keyword, searchBtn, rankList, setnum, qcodeVisible, layerVisible, content, saveBtn, rankDj,goLink,changeBtn,copyText,drawer,selectBtn,is_m };
|
||||
}
|
||||
})
|
||||
.use(ElementPlus) // 使用 Element Plus
|
||||
.mount('#app'); // 挂载 Vue 实例
|
||||
</script>
|
||||
<script type="text/javascript" charset="utf-8">
|
||||
// if(!app.is_m){
|
||||
app.rankList = JSON.parse('<?php echo json_encode($rankList, JSON_UNESCAPED_UNICODE); ?>');
|
||||
for (const item of app.rankList) {
|
||||
axios.get('/api/tool/ranking',{
|
||||
params: {
|
||||
channel: item.name,
|
||||
is_m: app.is_m
|
||||
}
|
||||
})
|
||||
.then(function (res) {
|
||||
item.list = res.data.data
|
||||
})
|
||||
}
|
||||
// }
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,264 +0,0 @@
|
||||
<?php /*a:1:{s:75:"C:\Users\liu67\Desktop\test\xinyue-search\app\qfadmin\view\admin\login.html";i:1712232785;}*/ ?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>后台管理系统</title>
|
||||
<meta charset="UTF-8">
|
||||
<!-- import CSS -->
|
||||
<link rel="stylesheet" href="/static/admin/css/element.css">
|
||||
<link rel="stylesheet" href="/static/admin/css/YAdmin.css">
|
||||
<style>
|
||||
.login-container {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-around;
|
||||
min-width: 1280px;
|
||||
min-height: 800px;
|
||||
background: url(/static/admin/images/login_bg.jpg) no-repeat;
|
||||
background-size: 100% 100%;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
.login-container:before{
|
||||
content: " ";
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
background: url(/static/admin/images/login_bg_bottom.png) no-repeat;
|
||||
background-size: 100% 100%;
|
||||
height: 170px;
|
||||
}
|
||||
.login-box img{
|
||||
width: 720px;
|
||||
}
|
||||
.login-border {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
position: relative;
|
||||
top: -30px;
|
||||
right: 100px;
|
||||
}
|
||||
.login-main{
|
||||
background-color: #ffffff;
|
||||
padding: 35px 45px 15px 45px;
|
||||
border-radius: 6px;
|
||||
}
|
||||
.login-main .vadmin{
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
color: #6881ec;
|
||||
line-height: 20px;
|
||||
padding-bottom: 6px;
|
||||
}
|
||||
.login-logo {
|
||||
margin: 0 0 20px;
|
||||
}
|
||||
.login-logo p {
|
||||
color: #ffffff;
|
||||
font-size: 25px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.login-submit {
|
||||
margin-top: 10px;
|
||||
width: 100%;
|
||||
}
|
||||
.login-form {
|
||||
margin: 10px 0;
|
||||
}
|
||||
.login-form .el-form-item__content {
|
||||
width: 270px;
|
||||
}
|
||||
.login-form .el-form-item {
|
||||
margin-bottom: 26px;
|
||||
}
|
||||
.login-form .el-input input {
|
||||
text-indent: 5px;
|
||||
border-color: #DCDCDC;
|
||||
border-radius: 3px;
|
||||
border: none;
|
||||
border-bottom: 1px solid #eee;
|
||||
}
|
||||
.login-form .el-input .el-input__prefix i {
|
||||
padding: 0 5px;
|
||||
font-size: 16px !important;
|
||||
}
|
||||
.login-code {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-around;
|
||||
margin-left: 10px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.login-code-img {
|
||||
margin-top: 1px;
|
||||
width: 100px;
|
||||
height: 38px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="app" v-cloak>
|
||||
<div id="app" v-cloak>
|
||||
<div class="login-container">
|
||||
<div class="login-box">
|
||||
<img src="/static/admin/images/login_bg_box.png">
|
||||
</div>
|
||||
<div class="login-border">
|
||||
<div class="login-logo">
|
||||
<p>后台登录</p>
|
||||
</div>
|
||||
<div class="login-main">
|
||||
<p class="vadmin">管理员登录</p>
|
||||
<el-form class="login-form" status-icon :rules="loginRules" ref="loginForm" :model="loginForm"
|
||||
label-width="0" size="default">
|
||||
<el-form-item prop="admin_account">
|
||||
<el-input @keyup.enter.native="handleLogin()" v-model="loginForm.admin_account"
|
||||
auto-complete="off" placeholder="请输入账号">
|
||||
<i slot="prefix" class="el-icon-user"></i>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="admin_password">
|
||||
<el-input @keyup.enter.native="handleLogin()" v-model="loginForm.admin_password" show-password
|
||||
auto-complete="off" placeholder="请输入密码">
|
||||
<i slot="prefix" class="el-icon-key"></i>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="codeUrl" prop="admin_code">
|
||||
<el-row :span="34">
|
||||
<el-col :span="14">
|
||||
<el-input @keyup.enter.native="handleLogin()" v-model="loginForm.admin_code"
|
||||
auto-complete="off" placeholder="请输入验证码">
|
||||
<i slot="prefix" class="el-icon-mobile"></i>
|
||||
</el-input>
|
||||
</el-col>
|
||||
<el-col :span="10">
|
||||
<div class="login-code">
|
||||
<img :src="codeUrl" class="login-code-img" @click="getCaptcha" alt="" />
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" :loading="loading" @click.native.prevent="handleLogin"
|
||||
class="login-submit">登 录
|
||||
</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<script src="/static/admin/js/vue-2.6.10.min.js"></script>
|
||||
<script src="/static/admin/js/axios.min.js"></script>
|
||||
<script src="/static/admin/js/element.js"></script>
|
||||
<script src="/static/admin/js/YAdmin.js"></script>
|
||||
<script>
|
||||
new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
codeUrl: '',
|
||||
codeToken: '',
|
||||
loading: false,
|
||||
loginForm: {
|
||||
admin_account: '',
|
||||
admin_password: '',
|
||||
admin_code: '',
|
||||
},
|
||||
loginRules: {
|
||||
admin_account: [
|
||||
{ required: true, message: '请输入账号', trigger: 'blur' }
|
||||
],
|
||||
admin_password: [
|
||||
{ required: true, message: '请输入密码', trigger: 'blur' },
|
||||
{ min: 6, message: '密码长度最少为6位', trigger: 'blur' }
|
||||
],
|
||||
admin_code: [
|
||||
{ required: true, message: '请输入验证码', trigger: 'blur' },
|
||||
{ min: 4, max: 4, message: '验证码长度为4位', trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getCaptcha();
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* @description 正式登录
|
||||
*/
|
||||
handleLogin() {
|
||||
var that = this;
|
||||
this.$refs.loginForm.validate(valid => {
|
||||
if (valid) {
|
||||
this.loading = true
|
||||
this.loginForm.token = this.codeToken
|
||||
axios.post('/admin/admin/login', Object.assign({}, PostBase, this.loginForm))
|
||||
.then(function (response) {
|
||||
if (response.data.code == CODE_SUCCESS) {
|
||||
that.$message({
|
||||
message: '登录成功,正在跳转中',
|
||||
type: 'success'
|
||||
});
|
||||
setTimeout(function () {
|
||||
location.replace('/qfadmin');
|
||||
}, 1000)
|
||||
} else {
|
||||
that.$message.error(response.data.message);
|
||||
that.loading = false
|
||||
that.getCaptcha();
|
||||
}
|
||||
})
|
||||
.catch(function (error) {
|
||||
that.$message.error('登录失败,服务器内部错误');
|
||||
that.loading = false
|
||||
});
|
||||
}
|
||||
})
|
||||
},
|
||||
onSubmit() {
|
||||
var that = this;
|
||||
axios.post('/admin/admin/login', Object.assign({}, PostBase, this.form))
|
||||
.then(function (response) {
|
||||
if (response.data.code == CODE_SUCCESS) {
|
||||
that.$message({
|
||||
message: '登录成功,正在跳转中',
|
||||
type: 'success'
|
||||
});
|
||||
setTimeout(function () {
|
||||
location.replace('<?php echo htmlentities($callback); ?>');
|
||||
}, 1000)
|
||||
} else {
|
||||
that.$message.error(response.data.message);
|
||||
}
|
||||
})
|
||||
.catch(function (error) {
|
||||
that.$message.error('登录失败,服务器内部错误');
|
||||
});
|
||||
},
|
||||
getCaptcha() {
|
||||
var that = this;
|
||||
axios.post('/admin/system/getCaptcha', Object.assign({}, PostBase))
|
||||
.then(function (res) {
|
||||
that.codeUrl = res.data.data.img
|
||||
that.codeToken = res.data.data.token
|
||||
})
|
||||
.catch(function (error) {
|
||||
that.$message.error('获取失败');
|
||||
});
|
||||
},
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
</html>
|
||||
@@ -1,589 +0,0 @@
|
||||
<?php /*a:5:{s:79:"C:\Users\liu67\Desktop\test\xinyue-search\app\qfadmin\view\source\category.html";i:1726194335;s:77:"C:\Users\liu67\Desktop\test\xinyue-search\app\qfadmin\view\common\header.html";i:1712232785;s:75:"C:\Users\liu67\Desktop\test\xinyue-search\app\qfadmin\view\common\menu.html";i:1712232786;s:77:"C:\Users\liu67\Desktop\test\xinyue-search\app\qfadmin\view\common\footer.html";i:1712232785;s:78:"C:\Users\liu67\Desktop\test\xinyue-search\app\qfadmin\view\component\view.html";i:1712232786;}*/ ?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>资源分类</title>
|
||||
<meta charset="UTF-8">
|
||||
<!-- import CSS -->
|
||||
<link rel="stylesheet" href="/static/admin/css/element.css">
|
||||
<link rel="stylesheet" href="/static/admin/css/YAdmin.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="app" v-cloak>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<el-col style="width: auto;">
|
||||
<el-menu class="el-menu-vertical" text-color="#333333" :default-active="'<?php if($node['node_pid']): ?><?php echo htmlentities($node['node_pid']); else: ?><?php echo htmlentities($node['node_id']); ?><?php endif; ?>'" unique-opened
|
||||
style="border:none;" mode="horizontal" active-text-color="#333333">
|
||||
<?php if(is_array($menuList) || $menuList instanceof \think\Collection || $menuList instanceof \think\Paginator): $i = 0; $__LIST__ = $menuList;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$item): $mod = ($i % 2 );++$i;if(count($item['subList'])>0): if(count($item['subList'][0]['subList'])>0): ?>
|
||||
<el-menu-item index="<?php echo htmlentities($item['node_id']); ?>"
|
||||
onclick="location.href='/<?php echo htmlentities($item['subList'][0]['subList'][0]['node_module']); ?>/<?php echo htmlentities($item['subList'][0]['subList'][0]['node_controller']); ?>/<?php echo htmlentities($item['subList'][0]['subList'][0]['node_action']); ?>';"
|
||||
<?php if($menu==$item['node_id']): ?>class="is-active" <?php endif; ?>>
|
||||
<i class="<?php echo htmlentities($item['node_icon']); ?>"></i> <?php echo htmlentities($item['node_title']); ?>
|
||||
</el-menu-item>
|
||||
<?php else: ?>
|
||||
<el-menu-item index="<?php echo htmlentities($item['node_id']); ?>"
|
||||
onclick="location.href='/<?php echo htmlentities($item['subList'][0]['node_module']); ?>/<?php echo htmlentities($item['subList'][0]['node_controller']); ?>/<?php echo htmlentities($item['subList'][0]['node_action']); ?>';" <?php if($menu==$item['node_id']): ?>class="is-active" <?php endif; ?>>
|
||||
<i class="<?php echo htmlentities($item['node_icon']); ?>"></i> <?php echo htmlentities($item['node_title']); ?>
|
||||
</el-menu-item>
|
||||
<?php endif; else: if(count($item['subList'])>0 || $item['node_controller']=='index'): ?>
|
||||
<el-menu-item index="<?php echo htmlentities($item['node_id']); ?>"
|
||||
onclick="location.href='/<?php echo htmlentities($item['node_module']); ?>/<?php echo htmlentities($item['node_controller']); ?>/<?php echo htmlentities($item['node_action']); ?>';" <?php if($menu==$item['node_id']): ?>class="is-active" <?php endif; ?>>
|
||||
<i class="<?php echo htmlentities($item['node_icon']); ?>"></i> <?php echo htmlentities($item['node_title']); ?>
|
||||
</el-menu-item>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; endif; else: echo "" ;endif; ?>
|
||||
</el-menu>
|
||||
</el-col>
|
||||
|
||||
<el-col style="width: 240px;float: right;">
|
||||
<span class="topArea">
|
||||
<el-link :underline="false" class="el-icon-full-screen menuicon" onclick="requestFullScreen()"></el-link>
|
||||
<!-- <el-link :underline="false" class="el-icon-brush menuicon"></el-link> -->
|
||||
<el-dropdown>
|
||||
<el-link :underline="false"> <?php echo htmlentities($adminInfo['admin_name']); ?><i class="el-icon-arrow-down"></i></el-link>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item onclick="location.href='/qfadmin/admin/updatemyinfo';">修改资料
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item onclick="location.href='/qfadmin/admin/motifypassword';">修改密码
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item onclick="location.href='/qfadmin/system/clean';">清除缓存
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item onclick="logout()">退出登录</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</span>
|
||||
</el-col>
|
||||
</el-header>
|
||||
<el-container class="body">
|
||||
<?php if($menuLists): ?>
|
||||
<el-aside width="160px">
|
||||
<a class="titlehome" href="/qfadmin" style="display: block;height: 62px;line-height: 62px;text-align: center;"><img src="/static/admin/images/logo.png" width="40px" style="vertical-align: middle;" /></a>
|
||||
<el-menu class="el-menu-vertical-demo" text-color="#333333" default-active="'<?php echo htmlentities($node['node_pid']); ?>-<?php echo htmlentities($node['node_id']); ?>'" :collapse="false" :default-openeds="['<?php echo htmlentities($node['node_pid']); ?>']">
|
||||
<?php if(is_array($menuLists) || $menuLists instanceof \think\Collection || $menuLists instanceof \think\Paginator): $i = 0; $__LIST__ = $menuLists;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$item): $mod = ($i % 2 );++$i;if(count($item['subList'])>0): ?>
|
||||
<el-submenu index="<?php echo htmlentities($item['node_id']); ?>">
|
||||
<template slot="title">
|
||||
<i <?php if($item['node_icon']): ?>class="<?php echo htmlentities($item['node_icon']); ?>"<?php else: ?>class="el-icon-menu"<?php endif; ?>></i> <?php echo htmlentities($item['node_title']); ?>
|
||||
</template>
|
||||
<?php if(is_array($item['subList']) || $item['subList'] instanceof \think\Collection || $item['subList'] instanceof \think\Paginator): $i = 0; $__LIST__ = $item['subList'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$subItem): $mod = ($i % 2 );++$i;?>
|
||||
<el-menu-item onclick="location.href='/<?php echo htmlentities($subItem['node_module']); ?>/<?php echo htmlentities($subItem['node_controller']); ?>/<?php echo htmlentities($subItem['node_action']); ?>';"
|
||||
index="<?php echo htmlentities($item['node_id']); ?>-<?php echo htmlentities($subItem['node_id']); ?>" <?php if($subItem['node_controller']==strtolower($controller) && $subItem['node_action']==strtolower($action)): ?>class="is-active" <?php endif; ?>><?php echo htmlentities($subItem['node_title']); ?></el-menu-item>
|
||||
<?php endforeach; endif; else: echo "" ;endif; ?>
|
||||
</el-submenu>
|
||||
<?php else: if($item['node_controller']=='' && $item['node_action']==''): ?>
|
||||
<el-menu-item index="<?php echo htmlentities($item['node_id']); ?>" onclick="testalert('暂无该功能')">
|
||||
<i <?php if($item['node_icon']): ?>class="<?php echo htmlentities($item['node_icon']); ?>" <?php else: ?>class="el-icon-menu" <?php endif; ?>></i>
|
||||
<?php echo htmlentities($item['node_title']); ?>
|
||||
</el-menu-item>
|
||||
<?php else: ?>
|
||||
<el-menu-item index="<?php echo htmlentities($item['node_id']); ?>"
|
||||
onclick="location.href='/<?php echo htmlentities($item['node_module']); ?>/<?php echo htmlentities($item['node_controller']); ?>/<?php echo htmlentities($item['node_action']); ?>';" <?php if($item['node_controller']==strtolower($controller) && $item['node_action']==strtolower($action)): ?>class="is-active" <?php endif; ?>>
|
||||
<i <?php if($item['node_icon']): ?>class="<?php echo htmlentities($item['node_icon']); ?>" <?php else: ?>class="el-icon-menu" <?php endif; ?>></i>
|
||||
<?php echo htmlentities($item['node_title']); ?>
|
||||
</el-menu-item>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; endif; else: echo "" ;endif; ?>
|
||||
<div style="height: 120px;"></div>
|
||||
</el-menu>
|
||||
<div class="version">资源管理系统<br> Version 1.0.0</div>
|
||||
</el-aside>
|
||||
<?php else: ?>
|
||||
<div style="position: absolute;top: -72px;left: 0;width: 160px;background-color: #ffffff;box-shadow: 0 0 12px 0 rgb(47 75 168 / 6%);border-radius: 12px;">
|
||||
<a class="title" href="/admin" style="display: block;height: 62px;line-height: 62px;text-align: center;"><img
|
||||
src="/static/admin/images/logo.png" width="40px" style="vertical-align: middle;" /></a>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<el-main>
|
||||
<el-form :inline="true">
|
||||
<el-form-item>
|
||||
<el-button icon="el-icon-plus" size="small" @click="clickAdd" plain>添加</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button icon="el-icon-warning-outline" size="small" @click="dayShow=true" plain>如何每日更新?</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button icon="el-icon-warning-outline" size="small" @click="allShow=true" plain>如何全部转存?</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table :data="dataList" @selection-change="changeSelection" v-loading="loading">
|
||||
<el-table-column type="selection" width="50">
|
||||
</el-table-column>
|
||||
<el-table-column prop="source_category_id" label="ID" width="60">
|
||||
</el-table-column>
|
||||
<el-table-column label="分类名称">
|
||||
<template slot-scope="scope">
|
||||
<img :src="scope.row.image" style="width: 30px;height:30px;vertical-align: middle;" v-if="scope.row.image" />
|
||||
<span style="vertical-align: middle;margin-left: 5px">{{scope.row.name}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否每日更新" width="150" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-switch v-model="scope.row.is_update==1?true:false"
|
||||
@change="clickStatus(scope.row)">
|
||||
</el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否前台展示" width="150" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-switch v-model="scope.row.status==1?false:true"
|
||||
@change="clickStatus(scope.row)">
|
||||
</el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="sort" label="排序" width="150" align="center">
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="200">
|
||||
<template slot-scope="scope">
|
||||
<el-link type="primary" @click="s2Btn(scope.row)" :underline="false">一键转存</el-link>
|
||||
<el-link type="primary" @click="clickEdit(scope.row)" :underline="false">编辑</el-link>
|
||||
<el-link type="danger" @click="clickDelete(scope.row)" :underline="false">删除</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
|
||||
<!-- 添加框 -->
|
||||
<el-dialog title="添加资源分类名称" :visible.sync="dialogFormAdd" width="500px" :modal-append-to-body='false' append-to-body :close-on-click-modal='false'>
|
||||
<el-form :model="formAdd" :rules="rules" ref="formAdd">
|
||||
|
||||
<el-form-item prop="name" label="分类名称" :label-width="formLabelWidth">
|
||||
<el-input size="medium" autocomplete="off" v-model="formAdd.name"></el-input>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item prop="image" label="图标" :label-width="formLabelWidth">
|
||||
<Single v-model="formAdd.image"></Single>
|
||||
</el-form-item>
|
||||
<el-form-item prop="sort" label="排序" :label-width="formLabelWidth">
|
||||
<el-input-number v-model="formAdd.sort" :min="0" :max="999" size="medium" style="width: 120px;"
|
||||
controls-position="right" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="postAdd()">确认添加</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 修改框 -->
|
||||
<el-dialog title="修改资源分类信息" :visible.sync="dialogFormEdit" width="500px" :modal-append-to-body='false' append-to-body :close-on-click-modal='false'>
|
||||
<el-form :model="formEdit" :rules="rules" ref="formEdit">
|
||||
<el-form-item prop="name" label="分类名称" :label-width="formLabelWidth">
|
||||
<el-input size="medium" autocomplete="off" v-model="formEdit.name" disabled ></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="image" label="图标" :label-width="formLabelWidth">
|
||||
<Single v-model="formEdit.image"></Single>
|
||||
</el-form-item>
|
||||
<el-form-item prop="sort" label="排序" :label-width="formLabelWidth">
|
||||
<el-input-number v-model="formEdit.sort" :min="0" :max="999" size="medium" style="width: 120px;"
|
||||
controls-position="right" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="postEdit()">确认修改</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 每日更新 -->
|
||||
<el-dialog title="每日更新" :visible.sync="dayShow" width="500px" :modal-append-to-body='false' append-to-body :close-on-click-modal='false'>
|
||||
<div style="margin-bottom: 20px;font-size:14px;color:#666;line-height: 2">
|
||||
<p>自动更新:<font color=orangered>转存当日及昨天的资源数据;</font></p>
|
||||
<font color=orangered>将此接口添加到计划任务中,计划任务每日执行一次即可;</font>
|
||||
<p>接口地址:{{domain}}/api/source/day</p>
|
||||
<p>Tips:添加计划任务后方可生效;名称重复的资源会跳过转存;</p>
|
||||
<p>宝塔任务类型:访问URL-GET</p>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 全部更新 -->
|
||||
<el-dialog title="全部转存" :visible.sync="allShow" width="500px" :modal-append-to-body='false' append-to-body :close-on-click-modal='false'>
|
||||
<div style="margin-bottom: 20px;font-size:14px;color:#666;line-height: 2">
|
||||
<p>全部转存:<font color=orangered>一键转存心悦搜索所有资源到自己的网盘及系统中</font></p>
|
||||
<font color=orangered>全部转存速度比较慢,提交后请耐心等待;名称重复的资源会跳过转存;</font>
|
||||
<p>全部转存需要按类别转存:见下方列表一键转存按钮</p>
|
||||
<p>Tips:心悦搜索:https://pan.xinyuedh.com;</p>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
</el-main>
|
||||
</el-container>
|
||||
</el-container>
|
||||
<Uploads ref="upload"></Uploads>
|
||||
<Goodslists ref="goodslist"></Goodslists>
|
||||
</div>
|
||||
</body>
|
||||
<template id="Upload">
|
||||
<el-dialog title="图片库" :visible.sync="visible" :modal-append-to-body='false' append-to-body :close-on-click-modal="false"
|
||||
width="725px">
|
||||
<div class="upload-boxs">
|
||||
<el-upload class="upload-right" action="/admin/attach/uploadImage" :on-success="handleUploadSuccess"
|
||||
:file-list="fileList" :show-file-list="false" :before-upload="beforeUpload" :data="postData"
|
||||
v-loading.fullscreen.lock="fullscreenLoading">
|
||||
<el-button size="small" type="primary" icon="el-icon-upload">上传图片</el-button>
|
||||
</el-upload>
|
||||
</div>
|
||||
<ul class="storage-list">
|
||||
<li :class="item.select?'active':''" v-for="(item, index) in dataList.data" :key="index" @click="select(index)">
|
||||
<el-image fit="contain" :src="item.attach_path"></el-image>
|
||||
<p>{{item.attach_name}}</p>
|
||||
</li>
|
||||
</ul>
|
||||
<p v-if="dataList.data&&dataList.data.length==0" style="text-align: center;">暂无资源</p>
|
||||
<el-pagination @current-change="changeCurrentPage" layout="prev, pager, next" :current-page="dataList.current_page"
|
||||
:page-count="dataList.last_page" hide-on-single-page background>
|
||||
</el-pagination>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<div style="float: left; font-size: 13px;">
|
||||
<span v-if="multiple">
|
||||
当前已选 <span style="color: #F56C6C;">{{selectList.length+selected_num}}</span> 个,最多允许选择 <span
|
||||
style="color: #F56C6C;">{{total_num}}</span> 个资源
|
||||
</span>
|
||||
<span v-else>当前已选 <span style="color: #F56C6C;">{{selectList.length}}</span> 个资源</span>
|
||||
</div>
|
||||
<el-button @click="visible = false" size="small">取消</el-button>
|
||||
<el-button type="primary" @click="save" size="small">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
|
||||
<template id="Single">
|
||||
<div class="slectimg" v-if="multiple">
|
||||
<block v-if="value.length>0">
|
||||
<draggable v-model="value" chosenClass="chosen" forceFallback="true" animation="600" @start="onStart"
|
||||
@end="onEnd">
|
||||
<transition-group>
|
||||
<div class="imgs" v-for="(v, s) in value" :key="s" style="cursor: all-scroll;">
|
||||
<el-image fit="contain" :src="v" :preview-src-list="value" :z-index="s"></el-image>
|
||||
<!-- <el-image fit="contain" :src="v" ></el-image> -->
|
||||
<i class="close el-icon-error" @click="deles(s)"></i>
|
||||
</div>
|
||||
</transition-group>
|
||||
</draggable>
|
||||
</block>
|
||||
<div class="noimg" @click="selectimg()">
|
||||
<i class="el-icon-plus"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="slectimg" v-else>
|
||||
<div class="imgs" v-if="value.length>0">
|
||||
<el-image fit="contain" :src="value" :preview-src-list="[value]"></el-image>
|
||||
<i class="close el-icon-error" @click="deles()"></i>
|
||||
</div>
|
||||
<div class="noimg" v-else @click="selectimg()">
|
||||
<i class="el-icon-plus"></i>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template id="Ueditor">
|
||||
<Ueditors v-model="value" ref="Ueditor" :config="config"></Ueditors>
|
||||
</template>
|
||||
|
||||
|
||||
<template id="skuforms">
|
||||
<div>
|
||||
<div style="padding-bottom: 10px;">
|
||||
<el-input style="width: 120px;" v-if="inputVisible" v-model="inputValue" ref="saveTagInput" size="small"
|
||||
@keyup.enter.native="handleInputConfirm" placeholder="回车确定">
|
||||
</el-input>
|
||||
<el-button v-else class="button-new-tag" size="small" @click="showInput" style="width: 120px;">+添加规格组</el-button>
|
||||
</div>
|
||||
<sku-form :source-attribute="sourceAttribute" :attribute.sync="attribute" :structure="structure" :sku.sync="sku"
|
||||
ref="skuForm"></sku-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
<template id="Goodslist">
|
||||
<el-dialog title="商品库" :before-close="handleClose" :visible.sync="visible" :modal-append-to-body='false' append-to-body
|
||||
:close-on-click-modal="false" width="900px">
|
||||
|
||||
<el-form :inline="true">
|
||||
<div style="float:right">
|
||||
<el-form-item style="width:100px; margin-bottom: 0;">
|
||||
<el-cascader v-model="search.classify" placeholder="商品分类" :options="categoryList" :props="cascaderProps"
|
||||
style="width: 100%;" filterable clearable size="small" :show-all-levels="false">
|
||||
</el-cascader>
|
||||
</el-form-item>
|
||||
<el-form-item style="margin-bottom: 0;">
|
||||
<el-input placeholder="输入商品名称搜索" size="small" v-model="search.keyword" @keyup.enter.native="getList_search"
|
||||
clearable @clear="getList_search"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item style="margin-bottom: 0;">
|
||||
<el-button type="primary" icon="el-icon-search" size="small" @click="getList_search" plain>搜索
|
||||
</el-button>
|
||||
<el-button icon="el-icon-refresh-left" size="small" @click="getList_search(0)" plain>重置</el-button>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form>
|
||||
|
||||
<el-table :data="dataList.data" ref="multipleTable" @selection-change="changeSelection" row-key="goods_id" reserve-selection="true" style="min-height: 425px;" v-loading="loading">
|
||||
<el-table-column align="center" type="selection" reserve-selection="true" width="55"></el-table-column>
|
||||
|
||||
<el-table-column label="商品" prop="goods_id" min-width="380">
|
||||
<template slot-scope="scope">
|
||||
<el-image class="goods-image" style="width: 50px;height: 50px;" :src="scope.row.picture[0]" :preview-src-list="[scope.row.picture[0]]"
|
||||
fit="contain" lazy></el-image>
|
||||
|
||||
<div class="goods-info cs-ml">
|
||||
<p class="action" style="overflow:hidden;text-overflow:ellipsis;display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 2;">
|
||||
<span :title="scope.row.goods_name" class="link">{{scope.row.goods_name}}</span>
|
||||
</p>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="本店价" prop="goods_price">
|
||||
<template slot-scope="scope">
|
||||
<div class="action">
|
||||
<span class="goods-shop-price">{{scope.row.goods_price}}</span>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="库存" prop="stock_total">
|
||||
<template slot-scope="scope">
|
||||
<div class="action">
|
||||
<span>{{scope.row.stock_total}}</span>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<p style="padding-bottom: 10px;">
|
||||
<el-pagination hide-on-single-page="true" layout="prev, pager, next" background :current-page="form.page" @current-change="changeCurrentPage" :page-size="5" :total="dataList.total">
|
||||
</el-pagination>
|
||||
</p>
|
||||
<p>
|
||||
<el-button @click="cancels" size="small">取消</el-button>
|
||||
<el-button type="primary" @click="save" size="small">确定</el-button>
|
||||
</p>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script src="/static/admin/js/vue-2.6.10.min.js"></script>
|
||||
<script src="/static/admin/js/axios.min.js"></script>
|
||||
<script src="/static/admin/js/element.js"></script>
|
||||
<script src="/static/admin/js/YAdmin.js"></script>
|
||||
<script src="/static/admin/js/SkuForm.umd.js"></script>
|
||||
<script src="/static/admin/UEditor/vue-ueditor-wrap.min.js"></script>
|
||||
<script src="/static/admin/UEditor/ueditor.config.js"></script>
|
||||
<script src="/static/admin/UEditor/ueditor.all.js"></script>
|
||||
<script src="/static/admin/js/component.js"></script>
|
||||
<script src="/static/admin/js/Sortable.min.js"></script>
|
||||
<script src="/static/admin/js/vuedraggable.umd.min.js"></script>
|
||||
|
||||
<script>
|
||||
var app = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
this.getList();
|
||||
return {
|
||||
formLabelWidth: '80px',
|
||||
dialogFormAdd: false,
|
||||
dialogFormEdit: false,
|
||||
loading: true,
|
||||
dataList: [],
|
||||
selectList: [],
|
||||
formAdd: {
|
||||
image: '',
|
||||
sort: 0
|
||||
},
|
||||
formEdit: {
|
||||
},
|
||||
rules: {
|
||||
name: [ { required: true, message: '请输入分类名称', trigger: 'blur' }],
|
||||
},
|
||||
|
||||
allShow: false,
|
||||
dayShow: false,
|
||||
domain: window.location.protocol+'//'+window.location.host
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
changeSelection(list) {
|
||||
var that = this;
|
||||
that.selectList = [];
|
||||
for (var index in list) {
|
||||
that.selectList.push(list[index].source_category_id);
|
||||
}
|
||||
},
|
||||
postEdit() {
|
||||
var that = this;
|
||||
that.$refs["formEdit"].validate((valid) => {
|
||||
if (valid) {
|
||||
axios.post('/admin/source_category/update', Object.assign({}, PostBase, that.formEdit))
|
||||
.then(function (response) {
|
||||
that.getList();
|
||||
if (response.data.code == CODE_SUCCESS) {
|
||||
that.$message({
|
||||
message: response.data.message,
|
||||
type: 'success'
|
||||
});
|
||||
that.dialogFormEdit = false;
|
||||
} else {
|
||||
that.$message.error(response.data.message);
|
||||
}
|
||||
})
|
||||
.catch(function (error) {
|
||||
that.$message.error('服务器内部错误');
|
||||
console.log(error);
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
postAdd() {
|
||||
var that = this;
|
||||
that.$refs['formAdd'].validate((valid) => {
|
||||
if (valid) {
|
||||
axios.post('/admin/source_category/add', Object.assign({}, PostBase, that.formAdd))
|
||||
.then(function (response) {
|
||||
that.getList();
|
||||
if (response.data.code == CODE_SUCCESS) {
|
||||
that.$message({
|
||||
message: response.data.message,
|
||||
type: 'success'
|
||||
});
|
||||
that.dialogFormAdd = false;
|
||||
} else {
|
||||
that.$message.error(response.data.message);
|
||||
}
|
||||
})
|
||||
.catch(function (error) {
|
||||
that.$message.error('服务器内部错误');
|
||||
console.log(error);
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
clickAdd() {
|
||||
var that = this;
|
||||
that.formAdd = { sort: 0,image: '' };
|
||||
that.dialogFormAdd = true;
|
||||
},
|
||||
clickDelete(row) {
|
||||
var that = this;
|
||||
this.$confirm('即将删除这个分类, 是否确认?', '删除提醒', {
|
||||
confirmButtonText: '删除',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
axios.post('/admin/source_category/delete', Object.assign({}, PostBase, {
|
||||
source_category_id: row.source_category_id
|
||||
}))
|
||||
.then(function (response) {
|
||||
that.getList();
|
||||
if (response.data.code == CODE_SUCCESS) {
|
||||
that.$message({
|
||||
message: response.data.message,
|
||||
type: 'success'
|
||||
});
|
||||
} else {
|
||||
that.$message.error(response.data.message);
|
||||
}
|
||||
})
|
||||
.catch(function (error) {
|
||||
that.$message.error('服务器内部错误');
|
||||
console.log(error);
|
||||
});
|
||||
}).catch(() => {
|
||||
});
|
||||
},
|
||||
clickStatus(row) {
|
||||
var that = this;
|
||||
axios.post(row.status ? '/admin/source_category/enable' : '/admin/source_category/disable', Object.assign({}, PostBase, {
|
||||
source_category_id: row.source_category_id
|
||||
}))
|
||||
.then(function (response) {
|
||||
that.getList();
|
||||
if (response.data.code == CODE_SUCCESS) {
|
||||
that.$message({
|
||||
message: response.data.message,
|
||||
type: 'success'
|
||||
});
|
||||
} else {
|
||||
that.$message.error(response.data.message);
|
||||
}
|
||||
})
|
||||
.catch(function (error) {
|
||||
that.$message.error('服务器内部错误');
|
||||
console.log(error);
|
||||
});
|
||||
},
|
||||
clickEdit(row) {
|
||||
var that = this;
|
||||
that.formEdit = row;
|
||||
axios.post('/admin/source_category/detail', Object.assign({}, PostBase, {
|
||||
source_category_id: row.source_category_id
|
||||
}))
|
||||
.then(function (response) {
|
||||
if (response.data.code == CODE_SUCCESS) {
|
||||
that.formEdit = response.data.data;
|
||||
that.formEdit.image = that.formEdit.image||''
|
||||
that.dialogFormEdit = true;
|
||||
} else {
|
||||
that.$message.error(response.data.message);
|
||||
}
|
||||
})
|
||||
.catch(function (error) {
|
||||
that.$message.error('服务器内部错误');
|
||||
console.log(error);
|
||||
});
|
||||
|
||||
},
|
||||
getList() {
|
||||
var that = this;
|
||||
that.loading = true;
|
||||
axios.post('/admin/source_category/getList', Object.assign({}, PostBase))
|
||||
.then(function (response) {
|
||||
that.loading = false;
|
||||
if (response.data.code == CODE_SUCCESS) {
|
||||
that.dataList = response.data.data;
|
||||
} else {
|
||||
that.$message.error(response.data.message);
|
||||
}
|
||||
})
|
||||
.catch(function (error) {
|
||||
that.loading = false;
|
||||
that.$message.error('服务器内部错误');
|
||||
console.log(error);
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
s2Btn(row){
|
||||
let that = this
|
||||
if(row.source_category_id!=1) return that.$message.error('当前版本仅支持短剧');
|
||||
this.$confirm('全部转存速度比较慢,提交后请耐心等待,该操作不可暂停, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
axios.post('/admin/source/transferAll', Object.assign({}, PostBase,{
|
||||
source_category_id: row.source_category_id
|
||||
}))
|
||||
.then(function (res) {
|
||||
if (res.data.code == 200) {
|
||||
} else {
|
||||
that.$message.error(res.data.message);
|
||||
}
|
||||
})
|
||||
.catch(function (error) {
|
||||
});
|
||||
that.$message({
|
||||
message: "已提交任务,稍后查看结果",
|
||||
type: 'success'
|
||||
});
|
||||
}).catch(() => {});
|
||||
|
||||
},
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
</html>
|
||||
@@ -1,293 +0,0 @@
|
||||
<?php /*a:5:{s:75:"C:\Users\liu67\Desktop\test\xinyue-search\app\qfadmin\view\index\index.html";i:1712232787;s:77:"C:\Users\liu67\Desktop\test\xinyue-search\app\qfadmin\view\common\header.html";i:1712232785;s:75:"C:\Users\liu67\Desktop\test\xinyue-search\app\qfadmin\view\common\menu.html";i:1712232786;s:77:"C:\Users\liu67\Desktop\test\xinyue-search\app\qfadmin\view\common\footer.html";i:1712232785;s:78:"C:\Users\liu67\Desktop\test\xinyue-search\app\qfadmin\view\component\view.html";i:1712232786;}*/ ?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>后台管理系统</title>
|
||||
<meta charset="UTF-8">
|
||||
<!-- import CSS -->
|
||||
<link rel="stylesheet" href="/static/admin/css/element.css">
|
||||
<link rel="stylesheet" href="/static/admin/css/YAdmin.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="app" v-cloak>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<el-col style="width: auto;">
|
||||
<el-menu class="el-menu-vertical" text-color="#333333" :default-active="'<?php if($node['node_pid']): ?><?php echo htmlentities($node['node_pid']); else: ?><?php echo htmlentities($node['node_id']); ?><?php endif; ?>'" unique-opened
|
||||
style="border:none;" mode="horizontal" active-text-color="#333333">
|
||||
<?php if(is_array($menuList) || $menuList instanceof \think\Collection || $menuList instanceof \think\Paginator): $i = 0; $__LIST__ = $menuList;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$item): $mod = ($i % 2 );++$i;if(count($item['subList'])>0): if(count($item['subList'][0]['subList'])>0): ?>
|
||||
<el-menu-item index="<?php echo htmlentities($item['node_id']); ?>"
|
||||
onclick="location.href='/<?php echo htmlentities($item['subList'][0]['subList'][0]['node_module']); ?>/<?php echo htmlentities($item['subList'][0]['subList'][0]['node_controller']); ?>/<?php echo htmlentities($item['subList'][0]['subList'][0]['node_action']); ?>';"
|
||||
<?php if($menu==$item['node_id']): ?>class="is-active" <?php endif; ?>>
|
||||
<i class="<?php echo htmlentities($item['node_icon']); ?>"></i> <?php echo htmlentities($item['node_title']); ?>
|
||||
</el-menu-item>
|
||||
<?php else: ?>
|
||||
<el-menu-item index="<?php echo htmlentities($item['node_id']); ?>"
|
||||
onclick="location.href='/<?php echo htmlentities($item['subList'][0]['node_module']); ?>/<?php echo htmlentities($item['subList'][0]['node_controller']); ?>/<?php echo htmlentities($item['subList'][0]['node_action']); ?>';" <?php if($menu==$item['node_id']): ?>class="is-active" <?php endif; ?>>
|
||||
<i class="<?php echo htmlentities($item['node_icon']); ?>"></i> <?php echo htmlentities($item['node_title']); ?>
|
||||
</el-menu-item>
|
||||
<?php endif; else: if(count($item['subList'])>0 || $item['node_controller']=='index'): ?>
|
||||
<el-menu-item index="<?php echo htmlentities($item['node_id']); ?>"
|
||||
onclick="location.href='/<?php echo htmlentities($item['node_module']); ?>/<?php echo htmlentities($item['node_controller']); ?>/<?php echo htmlentities($item['node_action']); ?>';" <?php if($menu==$item['node_id']): ?>class="is-active" <?php endif; ?>>
|
||||
<i class="<?php echo htmlentities($item['node_icon']); ?>"></i> <?php echo htmlentities($item['node_title']); ?>
|
||||
</el-menu-item>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; endif; else: echo "" ;endif; ?>
|
||||
</el-menu>
|
||||
</el-col>
|
||||
|
||||
<el-col style="width: 240px;float: right;">
|
||||
<span class="topArea">
|
||||
<el-link :underline="false" class="el-icon-full-screen menuicon" onclick="requestFullScreen()"></el-link>
|
||||
<!-- <el-link :underline="false" class="el-icon-brush menuicon"></el-link> -->
|
||||
<el-dropdown>
|
||||
<el-link :underline="false"> <?php echo htmlentities($adminInfo['admin_name']); ?><i class="el-icon-arrow-down"></i></el-link>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item onclick="location.href='/qfadmin/admin/updatemyinfo';">修改资料
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item onclick="location.href='/qfadmin/admin/motifypassword';">修改密码
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item onclick="location.href='/qfadmin/system/clean';">清除缓存
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item onclick="logout()">退出登录</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</span>
|
||||
</el-col>
|
||||
</el-header>
|
||||
<el-container class="body">
|
||||
<?php if($menuLists): ?>
|
||||
<el-aside width="160px">
|
||||
<a class="titlehome" href="/qfadmin" style="display: block;height: 62px;line-height: 62px;text-align: center;"><img src="/static/admin/images/logo.png" width="40px" style="vertical-align: middle;" /></a>
|
||||
<el-menu class="el-menu-vertical-demo" text-color="#333333" default-active="'<?php echo htmlentities($node['node_pid']); ?>-<?php echo htmlentities($node['node_id']); ?>'" :collapse="false" :default-openeds="['<?php echo htmlentities($node['node_pid']); ?>']">
|
||||
<?php if(is_array($menuLists) || $menuLists instanceof \think\Collection || $menuLists instanceof \think\Paginator): $i = 0; $__LIST__ = $menuLists;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$item): $mod = ($i % 2 );++$i;if(count($item['subList'])>0): ?>
|
||||
<el-submenu index="<?php echo htmlentities($item['node_id']); ?>">
|
||||
<template slot="title">
|
||||
<i <?php if($item['node_icon']): ?>class="<?php echo htmlentities($item['node_icon']); ?>"<?php else: ?>class="el-icon-menu"<?php endif; ?>></i> <?php echo htmlentities($item['node_title']); ?>
|
||||
</template>
|
||||
<?php if(is_array($item['subList']) || $item['subList'] instanceof \think\Collection || $item['subList'] instanceof \think\Paginator): $i = 0; $__LIST__ = $item['subList'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$subItem): $mod = ($i % 2 );++$i;?>
|
||||
<el-menu-item onclick="location.href='/<?php echo htmlentities($subItem['node_module']); ?>/<?php echo htmlentities($subItem['node_controller']); ?>/<?php echo htmlentities($subItem['node_action']); ?>';"
|
||||
index="<?php echo htmlentities($item['node_id']); ?>-<?php echo htmlentities($subItem['node_id']); ?>" <?php if($subItem['node_controller']==strtolower($controller) && $subItem['node_action']==strtolower($action)): ?>class="is-active" <?php endif; ?>><?php echo htmlentities($subItem['node_title']); ?></el-menu-item>
|
||||
<?php endforeach; endif; else: echo "" ;endif; ?>
|
||||
</el-submenu>
|
||||
<?php else: if($item['node_controller']=='' && $item['node_action']==''): ?>
|
||||
<el-menu-item index="<?php echo htmlentities($item['node_id']); ?>" onclick="testalert('暂无该功能')">
|
||||
<i <?php if($item['node_icon']): ?>class="<?php echo htmlentities($item['node_icon']); ?>" <?php else: ?>class="el-icon-menu" <?php endif; ?>></i>
|
||||
<?php echo htmlentities($item['node_title']); ?>
|
||||
</el-menu-item>
|
||||
<?php else: ?>
|
||||
<el-menu-item index="<?php echo htmlentities($item['node_id']); ?>"
|
||||
onclick="location.href='/<?php echo htmlentities($item['node_module']); ?>/<?php echo htmlentities($item['node_controller']); ?>/<?php echo htmlentities($item['node_action']); ?>';" <?php if($item['node_controller']==strtolower($controller) && $item['node_action']==strtolower($action)): ?>class="is-active" <?php endif; ?>>
|
||||
<i <?php if($item['node_icon']): ?>class="<?php echo htmlentities($item['node_icon']); ?>" <?php else: ?>class="el-icon-menu" <?php endif; ?>></i>
|
||||
<?php echo htmlentities($item['node_title']); ?>
|
||||
</el-menu-item>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; endif; else: echo "" ;endif; ?>
|
||||
<div style="height: 120px;"></div>
|
||||
</el-menu>
|
||||
<div class="version">资源管理系统<br> Version 1.0.0</div>
|
||||
</el-aside>
|
||||
<?php else: ?>
|
||||
<div style="position: absolute;top: -72px;left: 0;width: 160px;background-color: #ffffff;box-shadow: 0 0 12px 0 rgb(47 75 168 / 6%);border-radius: 12px;">
|
||||
<a class="title" href="/admin" style="display: block;height: 62px;line-height: 62px;text-align: center;"><img
|
||||
src="/static/admin/images/logo.png" width="40px" style="vertical-align: middle;" /></a>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<el-main>
|
||||
<div class="homecontainer" style="height: 100%;display: flex;align-items: center;justify-content: center;">
|
||||
<div>
|
||||
<img src="/static/admin/images/logo@2x.png" alt="">
|
||||
<p style="color: #999999;">@资源管理系统</p>
|
||||
</div>
|
||||
</div>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</el-container>
|
||||
<Uploads ref="upload"></Uploads>
|
||||
<Goodslists ref="goodslist"></Goodslists>
|
||||
</div>
|
||||
</body>
|
||||
<template id="Upload">
|
||||
<el-dialog title="图片库" :visible.sync="visible" :modal-append-to-body='false' append-to-body :close-on-click-modal="false"
|
||||
width="725px">
|
||||
<div class="upload-boxs">
|
||||
<el-upload class="upload-right" action="/admin/attach/uploadImage" :on-success="handleUploadSuccess"
|
||||
:file-list="fileList" :show-file-list="false" :before-upload="beforeUpload" :data="postData"
|
||||
v-loading.fullscreen.lock="fullscreenLoading">
|
||||
<el-button size="small" type="primary" icon="el-icon-upload">上传图片</el-button>
|
||||
</el-upload>
|
||||
</div>
|
||||
<ul class="storage-list">
|
||||
<li :class="item.select?'active':''" v-for="(item, index) in dataList.data" :key="index" @click="select(index)">
|
||||
<el-image fit="contain" :src="item.attach_path"></el-image>
|
||||
<p>{{item.attach_name}}</p>
|
||||
</li>
|
||||
</ul>
|
||||
<p v-if="dataList.data&&dataList.data.length==0" style="text-align: center;">暂无资源</p>
|
||||
<el-pagination @current-change="changeCurrentPage" layout="prev, pager, next" :current-page="dataList.current_page"
|
||||
:page-count="dataList.last_page" hide-on-single-page background>
|
||||
</el-pagination>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<div style="float: left; font-size: 13px;">
|
||||
<span v-if="multiple">
|
||||
当前已选 <span style="color: #F56C6C;">{{selectList.length+selected_num}}</span> 个,最多允许选择 <span
|
||||
style="color: #F56C6C;">{{total_num}}</span> 个资源
|
||||
</span>
|
||||
<span v-else>当前已选 <span style="color: #F56C6C;">{{selectList.length}}</span> 个资源</span>
|
||||
</div>
|
||||
<el-button @click="visible = false" size="small">取消</el-button>
|
||||
<el-button type="primary" @click="save" size="small">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
|
||||
<template id="Single">
|
||||
<div class="slectimg" v-if="multiple">
|
||||
<block v-if="value.length>0">
|
||||
<draggable v-model="value" chosenClass="chosen" forceFallback="true" animation="600" @start="onStart"
|
||||
@end="onEnd">
|
||||
<transition-group>
|
||||
<div class="imgs" v-for="(v, s) in value" :key="s" style="cursor: all-scroll;">
|
||||
<el-image fit="contain" :src="v" :preview-src-list="value" :z-index="s"></el-image>
|
||||
<!-- <el-image fit="contain" :src="v" ></el-image> -->
|
||||
<i class="close el-icon-error" @click="deles(s)"></i>
|
||||
</div>
|
||||
</transition-group>
|
||||
</draggable>
|
||||
</block>
|
||||
<div class="noimg" @click="selectimg()">
|
||||
<i class="el-icon-plus"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="slectimg" v-else>
|
||||
<div class="imgs" v-if="value.length>0">
|
||||
<el-image fit="contain" :src="value" :preview-src-list="[value]"></el-image>
|
||||
<i class="close el-icon-error" @click="deles()"></i>
|
||||
</div>
|
||||
<div class="noimg" v-else @click="selectimg()">
|
||||
<i class="el-icon-plus"></i>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template id="Ueditor">
|
||||
<Ueditors v-model="value" ref="Ueditor" :config="config"></Ueditors>
|
||||
</template>
|
||||
|
||||
|
||||
<template id="skuforms">
|
||||
<div>
|
||||
<div style="padding-bottom: 10px;">
|
||||
<el-input style="width: 120px;" v-if="inputVisible" v-model="inputValue" ref="saveTagInput" size="small"
|
||||
@keyup.enter.native="handleInputConfirm" placeholder="回车确定">
|
||||
</el-input>
|
||||
<el-button v-else class="button-new-tag" size="small" @click="showInput" style="width: 120px;">+添加规格组</el-button>
|
||||
</div>
|
||||
<sku-form :source-attribute="sourceAttribute" :attribute.sync="attribute" :structure="structure" :sku.sync="sku"
|
||||
ref="skuForm"></sku-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
<template id="Goodslist">
|
||||
<el-dialog title="商品库" :before-close="handleClose" :visible.sync="visible" :modal-append-to-body='false' append-to-body
|
||||
:close-on-click-modal="false" width="900px">
|
||||
|
||||
<el-form :inline="true">
|
||||
<div style="float:right">
|
||||
<el-form-item style="width:100px; margin-bottom: 0;">
|
||||
<el-cascader v-model="search.classify" placeholder="商品分类" :options="categoryList" :props="cascaderProps"
|
||||
style="width: 100%;" filterable clearable size="small" :show-all-levels="false">
|
||||
</el-cascader>
|
||||
</el-form-item>
|
||||
<el-form-item style="margin-bottom: 0;">
|
||||
<el-input placeholder="输入商品名称搜索" size="small" v-model="search.keyword" @keyup.enter.native="getList_search"
|
||||
clearable @clear="getList_search"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item style="margin-bottom: 0;">
|
||||
<el-button type="primary" icon="el-icon-search" size="small" @click="getList_search" plain>搜索
|
||||
</el-button>
|
||||
<el-button icon="el-icon-refresh-left" size="small" @click="getList_search(0)" plain>重置</el-button>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form>
|
||||
|
||||
<el-table :data="dataList.data" ref="multipleTable" @selection-change="changeSelection" row-key="goods_id" reserve-selection="true" style="min-height: 425px;" v-loading="loading">
|
||||
<el-table-column align="center" type="selection" reserve-selection="true" width="55"></el-table-column>
|
||||
|
||||
<el-table-column label="商品" prop="goods_id" min-width="380">
|
||||
<template slot-scope="scope">
|
||||
<el-image class="goods-image" style="width: 50px;height: 50px;" :src="scope.row.picture[0]" :preview-src-list="[scope.row.picture[0]]"
|
||||
fit="contain" lazy></el-image>
|
||||
|
||||
<div class="goods-info cs-ml">
|
||||
<p class="action" style="overflow:hidden;text-overflow:ellipsis;display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 2;">
|
||||
<span :title="scope.row.goods_name" class="link">{{scope.row.goods_name}}</span>
|
||||
</p>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="本店价" prop="goods_price">
|
||||
<template slot-scope="scope">
|
||||
<div class="action">
|
||||
<span class="goods-shop-price">{{scope.row.goods_price}}</span>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="库存" prop="stock_total">
|
||||
<template slot-scope="scope">
|
||||
<div class="action">
|
||||
<span>{{scope.row.stock_total}}</span>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<p style="padding-bottom: 10px;">
|
||||
<el-pagination hide-on-single-page="true" layout="prev, pager, next" background :current-page="form.page" @current-change="changeCurrentPage" :page-size="5" :total="dataList.total">
|
||||
</el-pagination>
|
||||
</p>
|
||||
<p>
|
||||
<el-button @click="cancels" size="small">取消</el-button>
|
||||
<el-button type="primary" @click="save" size="small">确定</el-button>
|
||||
</p>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script src="/static/admin/js/vue-2.6.10.min.js"></script>
|
||||
<script src="/static/admin/js/axios.min.js"></script>
|
||||
<script src="/static/admin/js/element.js"></script>
|
||||
<script src="/static/admin/js/YAdmin.js"></script>
|
||||
<script src="/static/admin/js/SkuForm.umd.js"></script>
|
||||
<script src="/static/admin/UEditor/vue-ueditor-wrap.min.js"></script>
|
||||
<script src="/static/admin/UEditor/ueditor.config.js"></script>
|
||||
<script src="/static/admin/UEditor/ueditor.all.js"></script>
|
||||
<script src="/static/admin/js/component.js"></script>
|
||||
<script src="/static/admin/js/Sortable.min.js"></script>
|
||||
<script src="/static/admin/js/vuedraggable.umd.min.js"></script>
|
||||
|
||||
<script>
|
||||
var app = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
data: {}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
</html>
|
||||
@@ -1,733 +0,0 @@
|
||||
<?php /*a:5:{s:74:"C:\Users\liu67\Desktop\test\xinyue-search\app\qfadmin\view\conf\index.html";i:1725324955;s:77:"C:\Users\liu67\Desktop\test\xinyue-search\app\qfadmin\view\common\header.html";i:1712232785;s:75:"C:\Users\liu67\Desktop\test\xinyue-search\app\qfadmin\view\common\menu.html";i:1712232786;s:77:"C:\Users\liu67\Desktop\test\xinyue-search\app\qfadmin\view\common\footer.html";i:1712232785;s:78:"C:\Users\liu67\Desktop\test\xinyue-search\app\qfadmin\view\component\view.html";i:1712232786;}*/ ?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title><?php echo htmlentities($node['node_title']); ?></title>
|
||||
<meta charset="UTF-8">
|
||||
<!-- import CSS -->
|
||||
<link rel="stylesheet" href="/static/admin/css/element.css">
|
||||
<link rel="stylesheet" href="/static/admin/css/YAdmin.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="app" v-cloak>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<el-col style="width: auto;">
|
||||
<el-menu class="el-menu-vertical" text-color="#333333" :default-active="'<?php if($node['node_pid']): ?><?php echo htmlentities($node['node_pid']); else: ?><?php echo htmlentities($node['node_id']); ?><?php endif; ?>'" unique-opened
|
||||
style="border:none;" mode="horizontal" active-text-color="#333333">
|
||||
<?php if(is_array($menuList) || $menuList instanceof \think\Collection || $menuList instanceof \think\Paginator): $i = 0; $__LIST__ = $menuList;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$item): $mod = ($i % 2 );++$i;if(count($item['subList'])>0): if(count($item['subList'][0]['subList'])>0): ?>
|
||||
<el-menu-item index="<?php echo htmlentities($item['node_id']); ?>"
|
||||
onclick="location.href='/<?php echo htmlentities($item['subList'][0]['subList'][0]['node_module']); ?>/<?php echo htmlentities($item['subList'][0]['subList'][0]['node_controller']); ?>/<?php echo htmlentities($item['subList'][0]['subList'][0]['node_action']); ?>';"
|
||||
<?php if($menu==$item['node_id']): ?>class="is-active" <?php endif; ?>>
|
||||
<i class="<?php echo htmlentities($item['node_icon']); ?>"></i> <?php echo htmlentities($item['node_title']); ?>
|
||||
</el-menu-item>
|
||||
<?php else: ?>
|
||||
<el-menu-item index="<?php echo htmlentities($item['node_id']); ?>"
|
||||
onclick="location.href='/<?php echo htmlentities($item['subList'][0]['node_module']); ?>/<?php echo htmlentities($item['subList'][0]['node_controller']); ?>/<?php echo htmlentities($item['subList'][0]['node_action']); ?>';" <?php if($menu==$item['node_id']): ?>class="is-active" <?php endif; ?>>
|
||||
<i class="<?php echo htmlentities($item['node_icon']); ?>"></i> <?php echo htmlentities($item['node_title']); ?>
|
||||
</el-menu-item>
|
||||
<?php endif; else: if(count($item['subList'])>0 || $item['node_controller']=='index'): ?>
|
||||
<el-menu-item index="<?php echo htmlentities($item['node_id']); ?>"
|
||||
onclick="location.href='/<?php echo htmlentities($item['node_module']); ?>/<?php echo htmlentities($item['node_controller']); ?>/<?php echo htmlentities($item['node_action']); ?>';" <?php if($menu==$item['node_id']): ?>class="is-active" <?php endif; ?>>
|
||||
<i class="<?php echo htmlentities($item['node_icon']); ?>"></i> <?php echo htmlentities($item['node_title']); ?>
|
||||
</el-menu-item>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; endif; else: echo "" ;endif; ?>
|
||||
</el-menu>
|
||||
</el-col>
|
||||
|
||||
<el-col style="width: 240px;float: right;">
|
||||
<span class="topArea">
|
||||
<el-link :underline="false" class="el-icon-full-screen menuicon" onclick="requestFullScreen()"></el-link>
|
||||
<!-- <el-link :underline="false" class="el-icon-brush menuicon"></el-link> -->
|
||||
<el-dropdown>
|
||||
<el-link :underline="false"> <?php echo htmlentities($adminInfo['admin_name']); ?><i class="el-icon-arrow-down"></i></el-link>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item onclick="location.href='/qfadmin/admin/updatemyinfo';">修改资料
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item onclick="location.href='/qfadmin/admin/motifypassword';">修改密码
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item onclick="location.href='/qfadmin/system/clean';">清除缓存
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item onclick="logout()">退出登录</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</span>
|
||||
</el-col>
|
||||
</el-header>
|
||||
<el-container class="body">
|
||||
<?php if($menuLists): ?>
|
||||
<el-aside width="160px">
|
||||
<a class="titlehome" href="/qfadmin" style="display: block;height: 62px;line-height: 62px;text-align: center;"><img src="/static/admin/images/logo.png" width="40px" style="vertical-align: middle;" /></a>
|
||||
<el-menu class="el-menu-vertical-demo" text-color="#333333" default-active="'<?php echo htmlentities($node['node_pid']); ?>-<?php echo htmlentities($node['node_id']); ?>'" :collapse="false" :default-openeds="['<?php echo htmlentities($node['node_pid']); ?>']">
|
||||
<?php if(is_array($menuLists) || $menuLists instanceof \think\Collection || $menuLists instanceof \think\Paginator): $i = 0; $__LIST__ = $menuLists;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$item): $mod = ($i % 2 );++$i;if(count($item['subList'])>0): ?>
|
||||
<el-submenu index="<?php echo htmlentities($item['node_id']); ?>">
|
||||
<template slot="title">
|
||||
<i <?php if($item['node_icon']): ?>class="<?php echo htmlentities($item['node_icon']); ?>"<?php else: ?>class="el-icon-menu"<?php endif; ?>></i> <?php echo htmlentities($item['node_title']); ?>
|
||||
</template>
|
||||
<?php if(is_array($item['subList']) || $item['subList'] instanceof \think\Collection || $item['subList'] instanceof \think\Paginator): $i = 0; $__LIST__ = $item['subList'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$subItem): $mod = ($i % 2 );++$i;?>
|
||||
<el-menu-item onclick="location.href='/<?php echo htmlentities($subItem['node_module']); ?>/<?php echo htmlentities($subItem['node_controller']); ?>/<?php echo htmlentities($subItem['node_action']); ?>';"
|
||||
index="<?php echo htmlentities($item['node_id']); ?>-<?php echo htmlentities($subItem['node_id']); ?>" <?php if($subItem['node_controller']==strtolower($controller) && $subItem['node_action']==strtolower($action)): ?>class="is-active" <?php endif; ?>><?php echo htmlentities($subItem['node_title']); ?></el-menu-item>
|
||||
<?php endforeach; endif; else: echo "" ;endif; ?>
|
||||
</el-submenu>
|
||||
<?php else: if($item['node_controller']=='' && $item['node_action']==''): ?>
|
||||
<el-menu-item index="<?php echo htmlentities($item['node_id']); ?>" onclick="testalert('暂无该功能')">
|
||||
<i <?php if($item['node_icon']): ?>class="<?php echo htmlentities($item['node_icon']); ?>" <?php else: ?>class="el-icon-menu" <?php endif; ?>></i>
|
||||
<?php echo htmlentities($item['node_title']); ?>
|
||||
</el-menu-item>
|
||||
<?php else: ?>
|
||||
<el-menu-item index="<?php echo htmlentities($item['node_id']); ?>"
|
||||
onclick="location.href='/<?php echo htmlentities($item['node_module']); ?>/<?php echo htmlentities($item['node_controller']); ?>/<?php echo htmlentities($item['node_action']); ?>';" <?php if($item['node_controller']==strtolower($controller) && $item['node_action']==strtolower($action)): ?>class="is-active" <?php endif; ?>>
|
||||
<i <?php if($item['node_icon']): ?>class="<?php echo htmlentities($item['node_icon']); ?>" <?php else: ?>class="el-icon-menu" <?php endif; ?>></i>
|
||||
<?php echo htmlentities($item['node_title']); ?>
|
||||
</el-menu-item>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; endif; else: echo "" ;endif; ?>
|
||||
<div style="height: 120px;"></div>
|
||||
</el-menu>
|
||||
<div class="version">资源管理系统<br> Version 1.0.0</div>
|
||||
</el-aside>
|
||||
<?php else: ?>
|
||||
<div style="position: absolute;top: -72px;left: 0;width: 160px;background-color: #ffffff;box-shadow: 0 0 12px 0 rgb(47 75 168 / 6%);border-radius: 12px;">
|
||||
<a class="title" href="/admin" style="display: block;height: 62px;line-height: 62px;text-align: center;"><img
|
||||
src="/static/admin/images/logo.png" width="40px" style="vertical-align: middle;" /></a>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<el-main>
|
||||
|
||||
<el-form :inline="true">
|
||||
<el-form-item>
|
||||
<el-button icon="el-icon-plus" size="small" @click="clickAdd" plain>添加</el-button>
|
||||
</el-form-item>
|
||||
<div style="float:right">
|
||||
<el-form-item style="width:120px;">
|
||||
<el-select placeholder="筛选类别" size="small" v-model="search.filter">
|
||||
<el-option value="conf_id" label="参数ID">
|
||||
</el-option>
|
||||
<el-option value="conf_title" label="参数名称">
|
||||
</el-option>
|
||||
<el-option value="conf_key" label="参数字段">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-input placeholder="输入关键词搜索" size="small" v-model="search.keyword"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="small" @click="getList_search" plain>搜索</el-button>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form>
|
||||
<el-table :data="dataList.data" @selection-change="changeSelection" v-loading="loading">
|
||||
<el-table-column prop="conf_id" label="ID" width="60">
|
||||
</el-table-column>
|
||||
<el-table-column prop="conf_type" label="所属分类" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-tag size="small" type="success" v-if="scope.row.conf_type==1">搜索设置</el-tag>
|
||||
<el-tag size="small" type="warning" v-else-if="scope.row.conf_type==2">上传配置</el-tag>
|
||||
<el-tag size="small" type="info" v-else-if="scope.row.conf_type==3">前端模版</el-tag>
|
||||
<el-tag size="small" type="danger" v-else-if="scope.row.conf_type==4">其他配置</el-tag>
|
||||
<el-tag size="small" type="success" v-else-if="scope.row.conf_type==5">微信支付配置</el-tag>
|
||||
<el-tag size="small" type="warning" v-else-if="scope.row.conf_type==6">支付宝支付配置</el-tag>
|
||||
<el-tag size="small" type="success" v-else-if="scope.row.conf_type==7">微信小程序配置</el-tag>
|
||||
<el-tag size="small" type="danger" v-else-if="scope.row.conf_type==8">微信公众号配置</el-tag>
|
||||
<el-tag size="small" type="danger" v-else-if="scope.row.conf_type==9">SEO设置</el-tag>
|
||||
<el-tag size="small" type="danger" v-else-if="scope.row.conf_type==10">交易设置</el-tag>
|
||||
<el-tag size="small" type="danger" v-else-if="scope.row.conf_type==11">售后设置</el-tag>
|
||||
<el-tag size="small" v-else>基础设置</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="conf_title" label="参数名称">
|
||||
</el-table-column>
|
||||
<el-table-column prop="conf_desc" label="参数描述">
|
||||
</el-table-column>
|
||||
<el-table-column prop="conf_key" label="参数字段">
|
||||
<template slot-scope="scope">
|
||||
<el-tooltip class="item" effect="dark" :content="scope.row.conf_title" placement="top">
|
||||
<el-link>{{scope.row.conf_key}}</el-link>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="conf_sort" label="排序" width="90">
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="180">
|
||||
<template slot-scope="scope">
|
||||
<el-link type="primary" @click="clickEdit(scope.row)" :underline="false">编辑</el-link>
|
||||
<el-link type="danger" @click="clickDelete(scope.row)" :underline="false" v-if="scope.row.conf_system==0">删除</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
|
||||
<div class="page">
|
||||
<el-pagination @size-change="handleSizeChange" :page-sizes="[10, 20, 50, 100,200,500]" :page-size="10"
|
||||
layout="total, sizes, prev, pager, next, jumper" background @current-change="changeCurrentPage"
|
||||
:current-page="dataList.current_page" :page-count="dataList.last_page" :total="dataList.total">
|
||||
</el-pagination>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<!-- 添加框 -->
|
||||
<el-dialog title="添加配置" :visible.sync="dialogFormAdd" width="800px" :modal-append-to-body='false' append-to-body :close-on-click-modal='false'>
|
||||
<el-form :model="formAdd" status-icon :rules="rules" ref="formAdd">
|
||||
<el-form-item label="所属分类" :label-width="formLabelWidth" prop="conf_type">
|
||||
<el-select v-model="formAdd.conf_type" placeholder="请选择所属分类" size="medium">
|
||||
<el-option label="基础设置" value="0"></el-option>
|
||||
<el-option label="SEO设置" value="9"></el-option>
|
||||
<el-option label="搜索设置" value="1"></el-option>
|
||||
<el-option label="上传配置" value="2"></el-option>
|
||||
<el-option label="前端模版" value="3"></el-option>
|
||||
<el-option label="其他配置" value="4"></el-option>
|
||||
<el-option label="微信支付配置" value="5"></el-option>
|
||||
<el-option label="支付宝支付配置" value="6"></el-option>
|
||||
<el-option label="微信小程序配置" value="7"></el-option>
|
||||
<el-option label="微信公众号配置" value="8"></el-option>
|
||||
<el-option label="交易设置" value="10"></el-option>
|
||||
<el-option label="售后设置" value="11"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="参数名称" :label-width="formLabelWidth" prop="conf_title">
|
||||
<el-input size="medium" autocomplete="off" v-model="formAdd.conf_title"></el-input>
|
||||
<span style="color: #999;">参数名称,如:网站LOGO</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="参数字段" :label-width="formLabelWidth" prop="conf_key">
|
||||
<el-input size="medium" autocomplete="off" v-model="formAdd.conf_key"></el-input>
|
||||
<span style="color: #999;">参数字段,如:logo</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="参数描述" :label-width="formLabelWidth">
|
||||
<el-input size="medium" autocomplete="off" v-model="formAdd.conf_desc"></el-input>
|
||||
<span style="color: #999;">参数描述,如:建议尺寸: 300*300</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="字段类型" :label-width="formLabelWidth">
|
||||
<el-radio-group v-model="formAdd.conf_spec" size="small">
|
||||
<el-radio-button label="0">文本框</el-radio-button>
|
||||
<el-radio-button label="1">多行文本框</el-radio-button>
|
||||
<el-radio-button label="2">单选框</el-radio-button>
|
||||
<el-radio-button label="3">多选框</el-radio-button>
|
||||
<el-radio-button label="4">单图</el-radio-button>
|
||||
<el-radio-button label="5">多图</el-radio-button>
|
||||
<el-radio-button label="6">富文本</el-radio-button>
|
||||
</el-radio-group>
|
||||
<el-input v-if="formAdd.conf_spec==2 || formAdd.conf_spec==3" type="textarea" v-model="formAdd.conf_content"
|
||||
:rows="4" placeholder="参数方式例如: 开启=>1 关闭=>0" style="margin-top: 10px;"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="显示隐藏" :label-width="formLabelWidth">
|
||||
<el-switch size="medium" v-model="formAdd.conf_status"></el-switch>
|
||||
</el-form-item>
|
||||
<el-form-item label="排序" :label-width="formLabelWidth">
|
||||
<el-input-number v-model="formAdd.conf_sort" :min="0" :max="999" size="medium" style="width: 120px;" controls-position="right" />
|
||||
</el-form-item>
|
||||
<el-form-item label="系统参数" :label-width="formLabelWidth">
|
||||
<el-switch size="medium" v-model="formAdd.conf_system"></el-switch>
|
||||
<div style="color: #999;">开启后,添加的参数将无法删除</div>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="postAdd">确认添加</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 修改框 -->
|
||||
<el-dialog title="修改配置" :visible.sync="dialogFormEdit" width="800px" :modal-append-to-body='false' append-to-body :close-on-click-modal='false'>
|
||||
<el-form :model="formEdit" status-icon :rules="rules" ref="formEdit">
|
||||
<el-form-item label="所属分类" :label-width="formLabelWidth" prop="conf_type">
|
||||
<el-select v-model="formEdit.conf_type" placeholder="请选择所属分类" size="medium">
|
||||
<el-option label="基础设置" value="0"></el-option>
|
||||
<el-option label="SEO设置" value="9"></el-option>
|
||||
<el-option label="搜索设置" value="1"></el-option>
|
||||
<el-option label="上传配置" value="2"></el-option>
|
||||
<el-option label="前端模版" value="3"></el-option>
|
||||
<el-option label="其他配置" value="4"></el-option>
|
||||
<el-option label="微信支付配置" value="5"></el-option>
|
||||
<el-option label="支付宝支付配置" value="6"></el-option>
|
||||
<el-option label="微信小程序配置" value="7"></el-option>
|
||||
<el-option label="微信公众号配置" value="8"></el-option>
|
||||
<el-option label="交易设置" value="10"></el-option>
|
||||
<el-option label="售后设置" value="11"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="参数名称" :label-width="formLabelWidth" prop="conf_title">
|
||||
<el-input size="medium" autocomplete="off" v-model="formEdit.conf_title"></el-input>
|
||||
<span style="color: #999;">参数名称,如:网站LOGO</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="参数字段" :label-width="formLabelWidth" prop="conf_key">
|
||||
<el-input size="medium" autocomplete="off" v-model="formEdit.conf_key"></el-input>
|
||||
<span style="color: #6881ec;">参数字段,切勿随意修改</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="参数描述" :label-width="formLabelWidth">
|
||||
<el-input size="medium" autocomplete="off" v-model="formEdit.conf_desc"></el-input>
|
||||
<span style="color: #999;">参数描述,如:建议尺寸: 300*300</span>
|
||||
</el-form-item>
|
||||
<el-form-item label="字段类型" :label-width="formLabelWidth">
|
||||
<el-radio-group v-model="formEdit.conf_spec" size="small">
|
||||
<el-radio-button label="0">文本框</el-radio-button>
|
||||
<el-radio-button label="1">多行文本框</el-radio-button>
|
||||
<el-radio-button label="2">单选框</el-radio-button>
|
||||
<el-radio-button label="3">多选框</el-radio-button>
|
||||
<el-radio-button label="4">单图</el-radio-button>
|
||||
<el-radio-button label="5">多图</el-radio-button>
|
||||
<el-radio-button label="6">富文本</el-radio-button>
|
||||
<el-radio-button label="7">颜色选择</el-radio-button>
|
||||
</el-radio-group>
|
||||
<el-input v-if="formEdit.conf_spec==2 || formEdit.conf_spec==3" type="textarea" v-model="formEdit.conf_content" :rows="4" placeholder="参数方式例如: 开启=>1 关闭=>0" style="margin-top: 10px;"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="显示隐藏" :label-width="formLabelWidth">
|
||||
<el-switch size="medium" v-model="formEdit.conf_status"></el-switch>
|
||||
</el-form-item>
|
||||
<el-form-item label="排序" :label-width="formLabelWidth">
|
||||
<el-input-number v-model="formEdit.conf_sort" :min="0" :max="999" size="medium" style="width: 120px;"
|
||||
controls-position="right" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="postEdit">确认修改</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
</el-main>
|
||||
</el-container>
|
||||
</el-container>
|
||||
<Uploads ref="upload"></Uploads>
|
||||
<Goodslists ref="goodslist"></Goodslists>
|
||||
</div>
|
||||
</body>
|
||||
<template id="Upload">
|
||||
<el-dialog title="图片库" :visible.sync="visible" :modal-append-to-body='false' append-to-body :close-on-click-modal="false"
|
||||
width="725px">
|
||||
<div class="upload-boxs">
|
||||
<el-upload class="upload-right" action="/admin/attach/uploadImage" :on-success="handleUploadSuccess"
|
||||
:file-list="fileList" :show-file-list="false" :before-upload="beforeUpload" :data="postData"
|
||||
v-loading.fullscreen.lock="fullscreenLoading">
|
||||
<el-button size="small" type="primary" icon="el-icon-upload">上传图片</el-button>
|
||||
</el-upload>
|
||||
</div>
|
||||
<ul class="storage-list">
|
||||
<li :class="item.select?'active':''" v-for="(item, index) in dataList.data" :key="index" @click="select(index)">
|
||||
<el-image fit="contain" :src="item.attach_path"></el-image>
|
||||
<p>{{item.attach_name}}</p>
|
||||
</li>
|
||||
</ul>
|
||||
<p v-if="dataList.data&&dataList.data.length==0" style="text-align: center;">暂无资源</p>
|
||||
<el-pagination @current-change="changeCurrentPage" layout="prev, pager, next" :current-page="dataList.current_page"
|
||||
:page-count="dataList.last_page" hide-on-single-page background>
|
||||
</el-pagination>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<div style="float: left; font-size: 13px;">
|
||||
<span v-if="multiple">
|
||||
当前已选 <span style="color: #F56C6C;">{{selectList.length+selected_num}}</span> 个,最多允许选择 <span
|
||||
style="color: #F56C6C;">{{total_num}}</span> 个资源
|
||||
</span>
|
||||
<span v-else>当前已选 <span style="color: #F56C6C;">{{selectList.length}}</span> 个资源</span>
|
||||
</div>
|
||||
<el-button @click="visible = false" size="small">取消</el-button>
|
||||
<el-button type="primary" @click="save" size="small">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
|
||||
<template id="Single">
|
||||
<div class="slectimg" v-if="multiple">
|
||||
<block v-if="value.length>0">
|
||||
<draggable v-model="value" chosenClass="chosen" forceFallback="true" animation="600" @start="onStart"
|
||||
@end="onEnd">
|
||||
<transition-group>
|
||||
<div class="imgs" v-for="(v, s) in value" :key="s" style="cursor: all-scroll;">
|
||||
<el-image fit="contain" :src="v" :preview-src-list="value" :z-index="s"></el-image>
|
||||
<!-- <el-image fit="contain" :src="v" ></el-image> -->
|
||||
<i class="close el-icon-error" @click="deles(s)"></i>
|
||||
</div>
|
||||
</transition-group>
|
||||
</draggable>
|
||||
</block>
|
||||
<div class="noimg" @click="selectimg()">
|
||||
<i class="el-icon-plus"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="slectimg" v-else>
|
||||
<div class="imgs" v-if="value.length>0">
|
||||
<el-image fit="contain" :src="value" :preview-src-list="[value]"></el-image>
|
||||
<i class="close el-icon-error" @click="deles()"></i>
|
||||
</div>
|
||||
<div class="noimg" v-else @click="selectimg()">
|
||||
<i class="el-icon-plus"></i>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template id="Ueditor">
|
||||
<Ueditors v-model="value" ref="Ueditor" :config="config"></Ueditors>
|
||||
</template>
|
||||
|
||||
|
||||
<template id="skuforms">
|
||||
<div>
|
||||
<div style="padding-bottom: 10px;">
|
||||
<el-input style="width: 120px;" v-if="inputVisible" v-model="inputValue" ref="saveTagInput" size="small"
|
||||
@keyup.enter.native="handleInputConfirm" placeholder="回车确定">
|
||||
</el-input>
|
||||
<el-button v-else class="button-new-tag" size="small" @click="showInput" style="width: 120px;">+添加规格组</el-button>
|
||||
</div>
|
||||
<sku-form :source-attribute="sourceAttribute" :attribute.sync="attribute" :structure="structure" :sku.sync="sku"
|
||||
ref="skuForm"></sku-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
<template id="Goodslist">
|
||||
<el-dialog title="商品库" :before-close="handleClose" :visible.sync="visible" :modal-append-to-body='false' append-to-body
|
||||
:close-on-click-modal="false" width="900px">
|
||||
|
||||
<el-form :inline="true">
|
||||
<div style="float:right">
|
||||
<el-form-item style="width:100px; margin-bottom: 0;">
|
||||
<el-cascader v-model="search.classify" placeholder="商品分类" :options="categoryList" :props="cascaderProps"
|
||||
style="width: 100%;" filterable clearable size="small" :show-all-levels="false">
|
||||
</el-cascader>
|
||||
</el-form-item>
|
||||
<el-form-item style="margin-bottom: 0;">
|
||||
<el-input placeholder="输入商品名称搜索" size="small" v-model="search.keyword" @keyup.enter.native="getList_search"
|
||||
clearable @clear="getList_search"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item style="margin-bottom: 0;">
|
||||
<el-button type="primary" icon="el-icon-search" size="small" @click="getList_search" plain>搜索
|
||||
</el-button>
|
||||
<el-button icon="el-icon-refresh-left" size="small" @click="getList_search(0)" plain>重置</el-button>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form>
|
||||
|
||||
<el-table :data="dataList.data" ref="multipleTable" @selection-change="changeSelection" row-key="goods_id" reserve-selection="true" style="min-height: 425px;" v-loading="loading">
|
||||
<el-table-column align="center" type="selection" reserve-selection="true" width="55"></el-table-column>
|
||||
|
||||
<el-table-column label="商品" prop="goods_id" min-width="380">
|
||||
<template slot-scope="scope">
|
||||
<el-image class="goods-image" style="width: 50px;height: 50px;" :src="scope.row.picture[0]" :preview-src-list="[scope.row.picture[0]]"
|
||||
fit="contain" lazy></el-image>
|
||||
|
||||
<div class="goods-info cs-ml">
|
||||
<p class="action" style="overflow:hidden;text-overflow:ellipsis;display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 2;">
|
||||
<span :title="scope.row.goods_name" class="link">{{scope.row.goods_name}}</span>
|
||||
</p>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="本店价" prop="goods_price">
|
||||
<template slot-scope="scope">
|
||||
<div class="action">
|
||||
<span class="goods-shop-price">{{scope.row.goods_price}}</span>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="库存" prop="stock_total">
|
||||
<template slot-scope="scope">
|
||||
<div class="action">
|
||||
<span>{{scope.row.stock_total}}</span>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<p style="padding-bottom: 10px;">
|
||||
<el-pagination hide-on-single-page="true" layout="prev, pager, next" background :current-page="form.page" @current-change="changeCurrentPage" :page-size="5" :total="dataList.total">
|
||||
</el-pagination>
|
||||
</p>
|
||||
<p>
|
||||
<el-button @click="cancels" size="small">取消</el-button>
|
||||
<el-button type="primary" @click="save" size="small">确定</el-button>
|
||||
</p>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script src="/static/admin/js/vue-2.6.10.min.js"></script>
|
||||
<script src="/static/admin/js/axios.min.js"></script>
|
||||
<script src="/static/admin/js/element.js"></script>
|
||||
<script src="/static/admin/js/YAdmin.js"></script>
|
||||
<script src="/static/admin/js/SkuForm.umd.js"></script>
|
||||
<script src="/static/admin/UEditor/vue-ueditor-wrap.min.js"></script>
|
||||
<script src="/static/admin/UEditor/ueditor.config.js"></script>
|
||||
<script src="/static/admin/UEditor/ueditor.all.js"></script>
|
||||
<script src="/static/admin/js/component.js"></script>
|
||||
<script src="/static/admin/js/Sortable.min.js"></script>
|
||||
<script src="/static/admin/js/vuedraggable.umd.min.js"></script>
|
||||
|
||||
<script>
|
||||
var app = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
this.getList();
|
||||
return {
|
||||
search: {
|
||||
keyword: "",
|
||||
filter: "conf_id"
|
||||
},
|
||||
formLabelWidth: '80px',
|
||||
dialogFormAdd: false,
|
||||
dialogFormEdit: false,
|
||||
loading: true,
|
||||
dataList: [],
|
||||
selectList: [],
|
||||
form: {
|
||||
page: 1,
|
||||
per_page: 10
|
||||
},
|
||||
formAdd: {
|
||||
conf_status: true,
|
||||
conf_spec: 0,
|
||||
conf_sort: 0,
|
||||
},
|
||||
formEdit: {},
|
||||
rules: {
|
||||
conf_title: [
|
||||
{ required: true, message: '参数名称必须填写', trigger: 'blur' },
|
||||
],
|
||||
conf_key: [
|
||||
{ required: true, message: '参数字段必须填写', trigger: 'blur' },
|
||||
],
|
||||
conf_type: [
|
||||
{ required: true, message: '所属分类必须填写', trigger: 'blur' },
|
||||
],
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getList_search() {
|
||||
this.form.page = 1;
|
||||
this.getList();
|
||||
},
|
||||
handleSizeChange(per_page) {
|
||||
this.form.per_page = per_page;
|
||||
this.getList();
|
||||
},
|
||||
postMultDelete() {
|
||||
var that = this;
|
||||
if (that.selectList.length == 0) {
|
||||
that.$message.error('未选择任何配置!');
|
||||
return;
|
||||
}
|
||||
this.$confirm('即将删除选中的配置, 是否确认?', '批量删除', {
|
||||
confirmButtonText: '删除',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
axios.post('/admin/conf/delete', Object.assign({}, PostBase, {
|
||||
conf_id: that.selectList.join(",")
|
||||
}))
|
||||
.then(function (response) {
|
||||
that.getList();
|
||||
if (response.data.code == CODE_SUCCESS) {
|
||||
that.$message({
|
||||
message: response.data.message,
|
||||
type: 'success'
|
||||
});
|
||||
} else {
|
||||
that.$message.error(response.data.message);
|
||||
}
|
||||
})
|
||||
.catch(function (error) {
|
||||
that.$message.error('服务器内部错误');
|
||||
console.log(error);
|
||||
});
|
||||
}).catch(() => {
|
||||
});
|
||||
},
|
||||
changeSelection(list) {
|
||||
var that = this;
|
||||
that.selectList = [];
|
||||
for (var index in list) {
|
||||
that.selectList.push(list[index].conf_id);
|
||||
}
|
||||
},
|
||||
postEdit() {
|
||||
var that = this;
|
||||
that.$refs['formEdit'].validate((valid) => {
|
||||
if (!valid) {
|
||||
that.$message.error('仔细检查检查,是不是有个地方写得不对?');
|
||||
return;
|
||||
}
|
||||
axios.post('/admin/conf/update', Object.assign({}, PostBase, that.formEdit))
|
||||
.then(function (response) {
|
||||
that.getList();
|
||||
if (response.data.code == CODE_SUCCESS) {
|
||||
that.$message({
|
||||
message: response.data.message,
|
||||
type: 'success'
|
||||
});
|
||||
that.dialogFormEdit = false;
|
||||
} else {
|
||||
that.$message.error(response.data.message);
|
||||
}
|
||||
})
|
||||
.catch(function (error) {
|
||||
that.$message.error('服务器内部错误');
|
||||
console.log(error);
|
||||
});
|
||||
});
|
||||
},
|
||||
postAdd() {
|
||||
var that = this;
|
||||
that.$refs['formAdd'].validate((valid) => {
|
||||
if (!valid) {
|
||||
that.$message.error('仔细检查检查,是不是有个地方写得不对?');
|
||||
return;
|
||||
}
|
||||
axios.post('/admin/conf/add', Object.assign({}, PostBase, that.formAdd))
|
||||
.then(function (response) {
|
||||
that.getList();
|
||||
if (response.data.code == CODE_SUCCESS) {
|
||||
that.$message({
|
||||
message: response.data.message,
|
||||
type: 'success'
|
||||
});
|
||||
that.dialogFormAdd = false;
|
||||
} else {
|
||||
that.$message.error(response.data.message);
|
||||
}
|
||||
})
|
||||
.catch(function (error) {
|
||||
that.$message.error('服务器内部错误');
|
||||
console.log(error);
|
||||
});
|
||||
});
|
||||
},
|
||||
clickAdd() {
|
||||
var that = this;
|
||||
that.formAdd = {
|
||||
conf_status: true,
|
||||
conf_spec: 0,
|
||||
conf_sort: 0,
|
||||
};
|
||||
axios.post('/admin/conf/getList', Object.assign({}, PostBase))
|
||||
.then(function (response) {
|
||||
that.groupList = response.data.data;
|
||||
if (response.data.code == CODE_SUCCESS) {
|
||||
that.dialogFormAdd = true;
|
||||
} else {
|
||||
that.$message.error(response.data.message);
|
||||
}
|
||||
})
|
||||
.catch(function (error) {
|
||||
that.$message.error('服务器内部错误');
|
||||
console.log(error);
|
||||
});
|
||||
},
|
||||
clickDelete(row) {
|
||||
var that = this;
|
||||
this.$confirm('即将删除这个配置, 是否确认?', '删除提醒', {
|
||||
confirmButtonText: '删除',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
axios.post('/admin/conf/delete', Object.assign({}, PostBase, {
|
||||
conf_id: row.conf_id
|
||||
}))
|
||||
.then(function (response) {
|
||||
that.getList();
|
||||
if (response.data.code == CODE_SUCCESS) {
|
||||
that.$message({
|
||||
message: response.data.message,
|
||||
type: 'success'
|
||||
});
|
||||
} else {
|
||||
that.$message.error(response.data.message);
|
||||
}
|
||||
})
|
||||
.catch(function (error) {
|
||||
that.$message.error('服务器内部错误');
|
||||
console.log(error);
|
||||
});
|
||||
}).catch(() => {
|
||||
});
|
||||
},
|
||||
clickStatus(row) {
|
||||
var that = this;
|
||||
axios.post(row.conf_status ? '/admin/conf/enable' : '/admin/conf/disable', Object.assign({}, PostBase, {
|
||||
conf_id: row.conf_id
|
||||
}))
|
||||
.then(function (response) {
|
||||
that.getList();
|
||||
if (response.data.code == CODE_SUCCESS) {
|
||||
that.$message({
|
||||
message: response.data.message,
|
||||
type: 'success'
|
||||
});
|
||||
} else {
|
||||
that.$message.error(response.data.message);
|
||||
}
|
||||
})
|
||||
.catch(function (error) {
|
||||
that.$message.error('服务器内部错误');
|
||||
console.log(error);
|
||||
});
|
||||
},
|
||||
clickEdit(row) {
|
||||
var that = this;
|
||||
that.formEdit = row;
|
||||
axios.post('/admin/conf/getList', Object.assign({}, PostBase))
|
||||
.then(function (response) {
|
||||
if (response.data.code == CODE_SUCCESS) {
|
||||
that.groupList = response.data.data;
|
||||
axios.post('/admin/conf/detail', Object.assign({}, PostBase, {
|
||||
conf_id: row.conf_id
|
||||
}))
|
||||
.then(function (response) {
|
||||
if (response.data.code == CODE_SUCCESS) {
|
||||
response.data.data.conf_status = response.data.data.conf_status?true:false;
|
||||
response.data.data.conf_type = response.data.data.conf_type.toString();
|
||||
that.formEdit = response.data.data;
|
||||
that.dialogFormEdit = true;
|
||||
} else {
|
||||
that.$message.error(response.data.message);
|
||||
}
|
||||
})
|
||||
.catch(function (error) {
|
||||
that.$message.error('服务器内部错误');
|
||||
console.log(error);
|
||||
});
|
||||
} else {
|
||||
that.$message.error(response.data.message);
|
||||
}
|
||||
})
|
||||
.catch(function (error) {
|
||||
that.$message.error('服务器内部错误');
|
||||
console.log(error);
|
||||
});
|
||||
|
||||
},
|
||||
changeCurrentPage(page) {
|
||||
this.form.page = page;
|
||||
this.getList();
|
||||
},
|
||||
getList() {
|
||||
var that = this;
|
||||
that.loading = true;
|
||||
axios.post('/admin/conf/getList', Object.assign({}, PostBase, that.form, that.search))
|
||||
.then(function (response) {
|
||||
that.loading = false;
|
||||
if (response.data.code == CODE_SUCCESS) {
|
||||
that.dataList = response.data.data;
|
||||
} else {
|
||||
that.$message.error(response.data.message);
|
||||
}
|
||||
})
|
||||
.catch(function (error) {
|
||||
that.loading = false;
|
||||
that.$message.error('服务器内部错误');
|
||||
console.log(error);
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
</html>
|
||||
@@ -1,459 +0,0 @@
|
||||
<?php /*a:5:{s:73:"C:\Users\liu67\Desktop\test\xinyue-search\app\qfadmin\view\conf\base.html";i:1725325454;s:77:"C:\Users\liu67\Desktop\test\xinyue-search\app\qfadmin\view\common\header.html";i:1712232785;s:75:"C:\Users\liu67\Desktop\test\xinyue-search\app\qfadmin\view\common\menu.html";i:1712232786;s:77:"C:\Users\liu67\Desktop\test\xinyue-search\app\qfadmin\view\common\footer.html";i:1712232785;s:78:"C:\Users\liu67\Desktop\test\xinyue-search\app\qfadmin\view\component\view.html";i:1712232786;}*/ ?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title><?php echo htmlentities($node['node_title']); ?></title>
|
||||
<meta charset="UTF-8">
|
||||
<!-- import CSS -->
|
||||
<link rel="stylesheet" href="/static/admin/css/element.css">
|
||||
<link rel="stylesheet" href="/static/admin/css/YAdmin.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="app" v-cloak>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<el-col style="width: auto;">
|
||||
<el-menu class="el-menu-vertical" text-color="#333333" :default-active="'<?php if($node['node_pid']): ?><?php echo htmlentities($node['node_pid']); else: ?><?php echo htmlentities($node['node_id']); ?><?php endif; ?>'" unique-opened
|
||||
style="border:none;" mode="horizontal" active-text-color="#333333">
|
||||
<?php if(is_array($menuList) || $menuList instanceof \think\Collection || $menuList instanceof \think\Paginator): $i = 0; $__LIST__ = $menuList;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$item): $mod = ($i % 2 );++$i;if(count($item['subList'])>0): if(count($item['subList'][0]['subList'])>0): ?>
|
||||
<el-menu-item index="<?php echo htmlentities($item['node_id']); ?>"
|
||||
onclick="location.href='/<?php echo htmlentities($item['subList'][0]['subList'][0]['node_module']); ?>/<?php echo htmlentities($item['subList'][0]['subList'][0]['node_controller']); ?>/<?php echo htmlentities($item['subList'][0]['subList'][0]['node_action']); ?>';"
|
||||
<?php if($menu==$item['node_id']): ?>class="is-active" <?php endif; ?>>
|
||||
<i class="<?php echo htmlentities($item['node_icon']); ?>"></i> <?php echo htmlentities($item['node_title']); ?>
|
||||
</el-menu-item>
|
||||
<?php else: ?>
|
||||
<el-menu-item index="<?php echo htmlentities($item['node_id']); ?>"
|
||||
onclick="location.href='/<?php echo htmlentities($item['subList'][0]['node_module']); ?>/<?php echo htmlentities($item['subList'][0]['node_controller']); ?>/<?php echo htmlentities($item['subList'][0]['node_action']); ?>';" <?php if($menu==$item['node_id']): ?>class="is-active" <?php endif; ?>>
|
||||
<i class="<?php echo htmlentities($item['node_icon']); ?>"></i> <?php echo htmlentities($item['node_title']); ?>
|
||||
</el-menu-item>
|
||||
<?php endif; else: if(count($item['subList'])>0 || $item['node_controller']=='index'): ?>
|
||||
<el-menu-item index="<?php echo htmlentities($item['node_id']); ?>"
|
||||
onclick="location.href='/<?php echo htmlentities($item['node_module']); ?>/<?php echo htmlentities($item['node_controller']); ?>/<?php echo htmlentities($item['node_action']); ?>';" <?php if($menu==$item['node_id']): ?>class="is-active" <?php endif; ?>>
|
||||
<i class="<?php echo htmlentities($item['node_icon']); ?>"></i> <?php echo htmlentities($item['node_title']); ?>
|
||||
</el-menu-item>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; endif; else: echo "" ;endif; ?>
|
||||
</el-menu>
|
||||
</el-col>
|
||||
|
||||
<el-col style="width: 240px;float: right;">
|
||||
<span class="topArea">
|
||||
<el-link :underline="false" class="el-icon-full-screen menuicon" onclick="requestFullScreen()"></el-link>
|
||||
<!-- <el-link :underline="false" class="el-icon-brush menuicon"></el-link> -->
|
||||
<el-dropdown>
|
||||
<el-link :underline="false"> <?php echo htmlentities($adminInfo['admin_name']); ?><i class="el-icon-arrow-down"></i></el-link>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item onclick="location.href='/qfadmin/admin/updatemyinfo';">修改资料
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item onclick="location.href='/qfadmin/admin/motifypassword';">修改密码
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item onclick="location.href='/qfadmin/system/clean';">清除缓存
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item onclick="logout()">退出登录</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</span>
|
||||
</el-col>
|
||||
</el-header>
|
||||
<el-container class="body">
|
||||
<?php if($menuLists): ?>
|
||||
<el-aside width="160px">
|
||||
<a class="titlehome" href="/qfadmin" style="display: block;height: 62px;line-height: 62px;text-align: center;"><img src="/static/admin/images/logo.png" width="40px" style="vertical-align: middle;" /></a>
|
||||
<el-menu class="el-menu-vertical-demo" text-color="#333333" default-active="'<?php echo htmlentities($node['node_pid']); ?>-<?php echo htmlentities($node['node_id']); ?>'" :collapse="false" :default-openeds="['<?php echo htmlentities($node['node_pid']); ?>']">
|
||||
<?php if(is_array($menuLists) || $menuLists instanceof \think\Collection || $menuLists instanceof \think\Paginator): $i = 0; $__LIST__ = $menuLists;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$item): $mod = ($i % 2 );++$i;if(count($item['subList'])>0): ?>
|
||||
<el-submenu index="<?php echo htmlentities($item['node_id']); ?>">
|
||||
<template slot="title">
|
||||
<i <?php if($item['node_icon']): ?>class="<?php echo htmlentities($item['node_icon']); ?>"<?php else: ?>class="el-icon-menu"<?php endif; ?>></i> <?php echo htmlentities($item['node_title']); ?>
|
||||
</template>
|
||||
<?php if(is_array($item['subList']) || $item['subList'] instanceof \think\Collection || $item['subList'] instanceof \think\Paginator): $i = 0; $__LIST__ = $item['subList'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$subItem): $mod = ($i % 2 );++$i;?>
|
||||
<el-menu-item onclick="location.href='/<?php echo htmlentities($subItem['node_module']); ?>/<?php echo htmlentities($subItem['node_controller']); ?>/<?php echo htmlentities($subItem['node_action']); ?>';"
|
||||
index="<?php echo htmlentities($item['node_id']); ?>-<?php echo htmlentities($subItem['node_id']); ?>" <?php if($subItem['node_controller']==strtolower($controller) && $subItem['node_action']==strtolower($action)): ?>class="is-active" <?php endif; ?>><?php echo htmlentities($subItem['node_title']); ?></el-menu-item>
|
||||
<?php endforeach; endif; else: echo "" ;endif; ?>
|
||||
</el-submenu>
|
||||
<?php else: if($item['node_controller']=='' && $item['node_action']==''): ?>
|
||||
<el-menu-item index="<?php echo htmlentities($item['node_id']); ?>" onclick="testalert('暂无该功能')">
|
||||
<i <?php if($item['node_icon']): ?>class="<?php echo htmlentities($item['node_icon']); ?>" <?php else: ?>class="el-icon-menu" <?php endif; ?>></i>
|
||||
<?php echo htmlentities($item['node_title']); ?>
|
||||
</el-menu-item>
|
||||
<?php else: ?>
|
||||
<el-menu-item index="<?php echo htmlentities($item['node_id']); ?>"
|
||||
onclick="location.href='/<?php echo htmlentities($item['node_module']); ?>/<?php echo htmlentities($item['node_controller']); ?>/<?php echo htmlentities($item['node_action']); ?>';" <?php if($item['node_controller']==strtolower($controller) && $item['node_action']==strtolower($action)): ?>class="is-active" <?php endif; ?>>
|
||||
<i <?php if($item['node_icon']): ?>class="<?php echo htmlentities($item['node_icon']); ?>" <?php else: ?>class="el-icon-menu" <?php endif; ?>></i>
|
||||
<?php echo htmlentities($item['node_title']); ?>
|
||||
</el-menu-item>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; endif; else: echo "" ;endif; ?>
|
||||
<div style="height: 120px;"></div>
|
||||
</el-menu>
|
||||
<div class="version">资源管理系统<br> Version 1.0.0</div>
|
||||
</el-aside>
|
||||
<?php else: ?>
|
||||
<div style="position: absolute;top: -72px;left: 0;width: 160px;background-color: #ffffff;box-shadow: 0 0 12px 0 rgb(47 75 168 / 6%);border-radius: 12px;">
|
||||
<a class="title" href="/admin" style="display: block;height: 62px;line-height: 62px;text-align: center;"><img
|
||||
src="/static/admin/images/logo.png" width="40px" style="vertical-align: middle;" /></a>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<el-main>
|
||||
<el-card class="box-card" shadow="never">
|
||||
<el-tabs v-model="activeName">
|
||||
<el-tab-pane :label="item.name" :name="item.val" v-for="(item, index) in tabname" :key="index" v-if="item.show">
|
||||
<div class="base_form" style="padding-right: 220px;">
|
||||
<el-form ref="form" label-width="220px">
|
||||
<block v-for="(items, indexs) in form" :key="indexs">
|
||||
<el-form-item :label="items.conf_title?items.conf_title:items.conf_key" v-if="items.conf_type==item.val">
|
||||
<block v-if="items.conf_spec==1">
|
||||
<el-input type="textarea" :rows="4" v-model="items.conf_value"></el-input>
|
||||
</block>
|
||||
<block v-else-if="items.conf_spec==2">
|
||||
<el-radio v-model="items.conf_value" v-for="(val, key) in items.conf_content" :key="key" :label="val.value">{{val.name}}</el-radio>
|
||||
</block>
|
||||
<block v-else-if="items.conf_spec==3">
|
||||
<el-checkbox-group v-model="items.conf_value">
|
||||
<el-checkbox v-for="(val, key) in items.conf_content" :key="key" :label="val.value">{{val.name}}</el-checkbox>
|
||||
</el-checkbox-group>
|
||||
</block>
|
||||
<block v-else-if="items.conf_spec==4">
|
||||
<Single v-model="items.conf_value"/>
|
||||
</block>
|
||||
<block v-else-if="items.conf_spec==5">
|
||||
<Single v-model="items.conf_value" multiple="true" :selected_num="items.conf_value.length"/>
|
||||
</block>
|
||||
<block v-else-if="items.conf_spec==6">
|
||||
<Ueditor v-model="items.conf_value"></Ueditor>
|
||||
</block>
|
||||
<block v-else-if="items.conf_spec==7">
|
||||
<el-color-picker v-model="items.conf_value"></el-color-picker>
|
||||
</block>
|
||||
<block v-else>
|
||||
<el-input v-model="items.conf_value"></el-input>
|
||||
</block>
|
||||
<span class="f_tips">{{items.conf_desc}}<span v-if="items.conf_spec==5"> 最多上传10张</span></span>
|
||||
</el-form-item>
|
||||
</block>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="onSubmit(item.val)">保存配置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
|
||||
</el-card>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</el-container>
|
||||
<Uploads ref="upload"></Uploads>
|
||||
<Goodslists ref="goodslist"></Goodslists>
|
||||
</div>
|
||||
</body>
|
||||
<template id="Upload">
|
||||
<el-dialog title="图片库" :visible.sync="visible" :modal-append-to-body='false' append-to-body :close-on-click-modal="false"
|
||||
width="725px">
|
||||
<div class="upload-boxs">
|
||||
<el-upload class="upload-right" action="/admin/attach/uploadImage" :on-success="handleUploadSuccess"
|
||||
:file-list="fileList" :show-file-list="false" :before-upload="beforeUpload" :data="postData"
|
||||
v-loading.fullscreen.lock="fullscreenLoading">
|
||||
<el-button size="small" type="primary" icon="el-icon-upload">上传图片</el-button>
|
||||
</el-upload>
|
||||
</div>
|
||||
<ul class="storage-list">
|
||||
<li :class="item.select?'active':''" v-for="(item, index) in dataList.data" :key="index" @click="select(index)">
|
||||
<el-image fit="contain" :src="item.attach_path"></el-image>
|
||||
<p>{{item.attach_name}}</p>
|
||||
</li>
|
||||
</ul>
|
||||
<p v-if="dataList.data&&dataList.data.length==0" style="text-align: center;">暂无资源</p>
|
||||
<el-pagination @current-change="changeCurrentPage" layout="prev, pager, next" :current-page="dataList.current_page"
|
||||
:page-count="dataList.last_page" hide-on-single-page background>
|
||||
</el-pagination>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<div style="float: left; font-size: 13px;">
|
||||
<span v-if="multiple">
|
||||
当前已选 <span style="color: #F56C6C;">{{selectList.length+selected_num}}</span> 个,最多允许选择 <span
|
||||
style="color: #F56C6C;">{{total_num}}</span> 个资源
|
||||
</span>
|
||||
<span v-else>当前已选 <span style="color: #F56C6C;">{{selectList.length}}</span> 个资源</span>
|
||||
</div>
|
||||
<el-button @click="visible = false" size="small">取消</el-button>
|
||||
<el-button type="primary" @click="save" size="small">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
|
||||
<template id="Single">
|
||||
<div class="slectimg" v-if="multiple">
|
||||
<block v-if="value.length>0">
|
||||
<draggable v-model="value" chosenClass="chosen" forceFallback="true" animation="600" @start="onStart"
|
||||
@end="onEnd">
|
||||
<transition-group>
|
||||
<div class="imgs" v-for="(v, s) in value" :key="s" style="cursor: all-scroll;">
|
||||
<el-image fit="contain" :src="v" :preview-src-list="value" :z-index="s"></el-image>
|
||||
<!-- <el-image fit="contain" :src="v" ></el-image> -->
|
||||
<i class="close el-icon-error" @click="deles(s)"></i>
|
||||
</div>
|
||||
</transition-group>
|
||||
</draggable>
|
||||
</block>
|
||||
<div class="noimg" @click="selectimg()">
|
||||
<i class="el-icon-plus"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="slectimg" v-else>
|
||||
<div class="imgs" v-if="value.length>0">
|
||||
<el-image fit="contain" :src="value" :preview-src-list="[value]"></el-image>
|
||||
<i class="close el-icon-error" @click="deles()"></i>
|
||||
</div>
|
||||
<div class="noimg" v-else @click="selectimg()">
|
||||
<i class="el-icon-plus"></i>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template id="Ueditor">
|
||||
<Ueditors v-model="value" ref="Ueditor" :config="config"></Ueditors>
|
||||
</template>
|
||||
|
||||
|
||||
<template id="skuforms">
|
||||
<div>
|
||||
<div style="padding-bottom: 10px;">
|
||||
<el-input style="width: 120px;" v-if="inputVisible" v-model="inputValue" ref="saveTagInput" size="small"
|
||||
@keyup.enter.native="handleInputConfirm" placeholder="回车确定">
|
||||
</el-input>
|
||||
<el-button v-else class="button-new-tag" size="small" @click="showInput" style="width: 120px;">+添加规格组</el-button>
|
||||
</div>
|
||||
<sku-form :source-attribute="sourceAttribute" :attribute.sync="attribute" :structure="structure" :sku.sync="sku"
|
||||
ref="skuForm"></sku-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
<template id="Goodslist">
|
||||
<el-dialog title="商品库" :before-close="handleClose" :visible.sync="visible" :modal-append-to-body='false' append-to-body
|
||||
:close-on-click-modal="false" width="900px">
|
||||
|
||||
<el-form :inline="true">
|
||||
<div style="float:right">
|
||||
<el-form-item style="width:100px; margin-bottom: 0;">
|
||||
<el-cascader v-model="search.classify" placeholder="商品分类" :options="categoryList" :props="cascaderProps"
|
||||
style="width: 100%;" filterable clearable size="small" :show-all-levels="false">
|
||||
</el-cascader>
|
||||
</el-form-item>
|
||||
<el-form-item style="margin-bottom: 0;">
|
||||
<el-input placeholder="输入商品名称搜索" size="small" v-model="search.keyword" @keyup.enter.native="getList_search"
|
||||
clearable @clear="getList_search"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item style="margin-bottom: 0;">
|
||||
<el-button type="primary" icon="el-icon-search" size="small" @click="getList_search" plain>搜索
|
||||
</el-button>
|
||||
<el-button icon="el-icon-refresh-left" size="small" @click="getList_search(0)" plain>重置</el-button>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form>
|
||||
|
||||
<el-table :data="dataList.data" ref="multipleTable" @selection-change="changeSelection" row-key="goods_id" reserve-selection="true" style="min-height: 425px;" v-loading="loading">
|
||||
<el-table-column align="center" type="selection" reserve-selection="true" width="55"></el-table-column>
|
||||
|
||||
<el-table-column label="商品" prop="goods_id" min-width="380">
|
||||
<template slot-scope="scope">
|
||||
<el-image class="goods-image" style="width: 50px;height: 50px;" :src="scope.row.picture[0]" :preview-src-list="[scope.row.picture[0]]"
|
||||
fit="contain" lazy></el-image>
|
||||
|
||||
<div class="goods-info cs-ml">
|
||||
<p class="action" style="overflow:hidden;text-overflow:ellipsis;display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 2;">
|
||||
<span :title="scope.row.goods_name" class="link">{{scope.row.goods_name}}</span>
|
||||
</p>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="本店价" prop="goods_price">
|
||||
<template slot-scope="scope">
|
||||
<div class="action">
|
||||
<span class="goods-shop-price">{{scope.row.goods_price}}</span>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="库存" prop="stock_total">
|
||||
<template slot-scope="scope">
|
||||
<div class="action">
|
||||
<span>{{scope.row.stock_total}}</span>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<p style="padding-bottom: 10px;">
|
||||
<el-pagination hide-on-single-page="true" layout="prev, pager, next" background :current-page="form.page" @current-change="changeCurrentPage" :page-size="5" :total="dataList.total">
|
||||
</el-pagination>
|
||||
</p>
|
||||
<p>
|
||||
<el-button @click="cancels" size="small">取消</el-button>
|
||||
<el-button type="primary" @click="save" size="small">确定</el-button>
|
||||
</p>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script src="/static/admin/js/vue-2.6.10.min.js"></script>
|
||||
<script src="/static/admin/js/axios.min.js"></script>
|
||||
<script src="/static/admin/js/element.js"></script>
|
||||
<script src="/static/admin/js/YAdmin.js"></script>
|
||||
<script src="/static/admin/js/SkuForm.umd.js"></script>
|
||||
<script src="/static/admin/UEditor/vue-ueditor-wrap.min.js"></script>
|
||||
<script src="/static/admin/UEditor/ueditor.config.js"></script>
|
||||
<script src="/static/admin/UEditor/ueditor.all.js"></script>
|
||||
<script src="/static/admin/js/component.js"></script>
|
||||
<script src="/static/admin/js/Sortable.min.js"></script>
|
||||
<script src="/static/admin/js/vuedraggable.umd.min.js"></script>
|
||||
|
||||
<script>
|
||||
var app = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
this.getData();
|
||||
return {
|
||||
form: [],
|
||||
activeName: "0",
|
||||
tabname: [
|
||||
{
|
||||
name: '基础设置',
|
||||
val: '0',
|
||||
show: false,
|
||||
},
|
||||
{
|
||||
name: 'SEO设置',
|
||||
val: '9',
|
||||
show: false,
|
||||
},
|
||||
{
|
||||
name: '前端模版',
|
||||
val: '3',
|
||||
show: false,
|
||||
},
|
||||
{
|
||||
name: '搜索设置',
|
||||
val: '1',
|
||||
show: false,
|
||||
},
|
||||
{
|
||||
name: '微信设置',
|
||||
val: '8',
|
||||
show: false,
|
||||
},
|
||||
{
|
||||
name: '交易设置',
|
||||
val: '10',
|
||||
show: false,
|
||||
},
|
||||
{
|
||||
name: '售后设置',
|
||||
val: '11',
|
||||
show: false,
|
||||
},
|
||||
{
|
||||
name: '上传配置',
|
||||
val: '2',
|
||||
show: false,
|
||||
},
|
||||
{
|
||||
name: '其他配置',
|
||||
val: '4',
|
||||
show: false,
|
||||
},
|
||||
],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getData() {
|
||||
var that = this;
|
||||
axios.post('/admin/conf/getBaseConfig', Object.assign({}, PostBase))
|
||||
.then(function (res) {
|
||||
if (res.data.code == 200) {
|
||||
for (let item of res.data.data) {
|
||||
if (item.conf_spec == 2) {
|
||||
for (let i = 0; i < item.conf_content.length; i++) {
|
||||
let d = item.conf_content[i].split("=>");
|
||||
item.conf_content[i] = {
|
||||
name: d[0].toString(),
|
||||
value: d[1].toString()
|
||||
}
|
||||
}
|
||||
}else if(item.conf_spec==3){
|
||||
for (let i = 0; i < item.conf_content.length; i++) {
|
||||
let d = item.conf_content[i].split("=>");
|
||||
item.conf_content[i] = {
|
||||
name: d[0].toString(),
|
||||
value: d[1].toString()
|
||||
}
|
||||
}
|
||||
if(item.conf_value){
|
||||
item.conf_value = item.conf_value.split(",");
|
||||
}else{
|
||||
item.conf_value = []
|
||||
}
|
||||
}else if (item.conf_spec == 5) {
|
||||
if(item.conf_value){
|
||||
item.conf_value = item.conf_value.split(",");
|
||||
for (let i = 0; i < item.conf_value.length; i++) {
|
||||
if (!item.conf_value[i]) {
|
||||
item.conf_value.splice(i, 1);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
item.conf_value = []
|
||||
}
|
||||
}
|
||||
for (let i = 0; i < that.tabname.length; i++) {
|
||||
if(that.tabname[i].val == item.conf_type){
|
||||
that.tabname[i].show = true
|
||||
}
|
||||
}
|
||||
}
|
||||
that.form = res.data.data;
|
||||
} else {
|
||||
that.$message.error(res.data.message);
|
||||
}
|
||||
})
|
||||
.catch(function (error) {
|
||||
that.$message.error('服务器内部错误');
|
||||
console.log(error);
|
||||
});
|
||||
},
|
||||
onSubmit(index) {
|
||||
var that = this;
|
||||
var postData = {};
|
||||
for (var i = 0; i < that.form.length; i++) {
|
||||
if(that.form[i].conf_type == index){
|
||||
postData[that.form[i].conf_key] = that.form[i].conf_value;
|
||||
}
|
||||
}
|
||||
axios.post('/admin/conf/updateBaseConfig', Object.assign({}, PostBase, postData))
|
||||
.then(function (res) {
|
||||
if (res.data.code == 200) {
|
||||
that.$message({
|
||||
message: res.data.message,
|
||||
type: 'success'
|
||||
});
|
||||
} else {
|
||||
that.$message.error(res.data.message);
|
||||
}
|
||||
})
|
||||
.catch(function (error) {
|
||||
that.$message.error('服务器内部错误');
|
||||
console.log(error);
|
||||
});
|
||||
},
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
</html>
|
||||
@@ -1,741 +0,0 @@
|
||||
<?php /*a:5:{s:76:"C:\Users\liu67\Desktop\test\xinyue-search\app\qfadmin\view\source\index.html";i:1726297279;s:77:"C:\Users\liu67\Desktop\test\xinyue-search\app\qfadmin\view\common\header.html";i:1712232785;s:75:"C:\Users\liu67\Desktop\test\xinyue-search\app\qfadmin\view\common\menu.html";i:1712232786;s:77:"C:\Users\liu67\Desktop\test\xinyue-search\app\qfadmin\view\common\footer.html";i:1712232785;s:78:"C:\Users\liu67\Desktop\test\xinyue-search\app\qfadmin\view\component\view.html";i:1712232786;}*/ ?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title><?php echo htmlentities($node['node_title']); ?></title>
|
||||
<meta charset="UTF-8">
|
||||
<!-- import CSS -->
|
||||
<link rel="stylesheet" href="/static/admin/css/element.css">
|
||||
<link rel="stylesheet" href="/static/admin/css/YAdmin.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="app" v-cloak>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<el-col style="width: auto;">
|
||||
<el-menu class="el-menu-vertical" text-color="#333333" :default-active="'<?php if($node['node_pid']): ?><?php echo htmlentities($node['node_pid']); else: ?><?php echo htmlentities($node['node_id']); ?><?php endif; ?>'" unique-opened
|
||||
style="border:none;" mode="horizontal" active-text-color="#333333">
|
||||
<?php if(is_array($menuList) || $menuList instanceof \think\Collection || $menuList instanceof \think\Paginator): $i = 0; $__LIST__ = $menuList;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$item): $mod = ($i % 2 );++$i;if(count($item['subList'])>0): if(count($item['subList'][0]['subList'])>0): ?>
|
||||
<el-menu-item index="<?php echo htmlentities($item['node_id']); ?>"
|
||||
onclick="location.href='/<?php echo htmlentities($item['subList'][0]['subList'][0]['node_module']); ?>/<?php echo htmlentities($item['subList'][0]['subList'][0]['node_controller']); ?>/<?php echo htmlentities($item['subList'][0]['subList'][0]['node_action']); ?>';"
|
||||
<?php if($menu==$item['node_id']): ?>class="is-active" <?php endif; ?>>
|
||||
<i class="<?php echo htmlentities($item['node_icon']); ?>"></i> <?php echo htmlentities($item['node_title']); ?>
|
||||
</el-menu-item>
|
||||
<?php else: ?>
|
||||
<el-menu-item index="<?php echo htmlentities($item['node_id']); ?>"
|
||||
onclick="location.href='/<?php echo htmlentities($item['subList'][0]['node_module']); ?>/<?php echo htmlentities($item['subList'][0]['node_controller']); ?>/<?php echo htmlentities($item['subList'][0]['node_action']); ?>';" <?php if($menu==$item['node_id']): ?>class="is-active" <?php endif; ?>>
|
||||
<i class="<?php echo htmlentities($item['node_icon']); ?>"></i> <?php echo htmlentities($item['node_title']); ?>
|
||||
</el-menu-item>
|
||||
<?php endif; else: if(count($item['subList'])>0 || $item['node_controller']=='index'): ?>
|
||||
<el-menu-item index="<?php echo htmlentities($item['node_id']); ?>"
|
||||
onclick="location.href='/<?php echo htmlentities($item['node_module']); ?>/<?php echo htmlentities($item['node_controller']); ?>/<?php echo htmlentities($item['node_action']); ?>';" <?php if($menu==$item['node_id']): ?>class="is-active" <?php endif; ?>>
|
||||
<i class="<?php echo htmlentities($item['node_icon']); ?>"></i> <?php echo htmlentities($item['node_title']); ?>
|
||||
</el-menu-item>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; endif; else: echo "" ;endif; ?>
|
||||
</el-menu>
|
||||
</el-col>
|
||||
|
||||
<el-col style="width: 240px;float: right;">
|
||||
<span class="topArea">
|
||||
<el-link :underline="false" class="el-icon-full-screen menuicon" onclick="requestFullScreen()"></el-link>
|
||||
<!-- <el-link :underline="false" class="el-icon-brush menuicon"></el-link> -->
|
||||
<el-dropdown>
|
||||
<el-link :underline="false"> <?php echo htmlentities($adminInfo['admin_name']); ?><i class="el-icon-arrow-down"></i></el-link>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item onclick="location.href='/qfadmin/admin/updatemyinfo';">修改资料
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item onclick="location.href='/qfadmin/admin/motifypassword';">修改密码
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item onclick="location.href='/qfadmin/system/clean';">清除缓存
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item onclick="logout()">退出登录</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</span>
|
||||
</el-col>
|
||||
</el-header>
|
||||
<el-container class="body">
|
||||
<?php if($menuLists): ?>
|
||||
<el-aside width="160px">
|
||||
<a class="titlehome" href="/qfadmin" style="display: block;height: 62px;line-height: 62px;text-align: center;"><img src="/static/admin/images/logo.png" width="40px" style="vertical-align: middle;" /></a>
|
||||
<el-menu class="el-menu-vertical-demo" text-color="#333333" default-active="'<?php echo htmlentities($node['node_pid']); ?>-<?php echo htmlentities($node['node_id']); ?>'" :collapse="false" :default-openeds="['<?php echo htmlentities($node['node_pid']); ?>']">
|
||||
<?php if(is_array($menuLists) || $menuLists instanceof \think\Collection || $menuLists instanceof \think\Paginator): $i = 0; $__LIST__ = $menuLists;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$item): $mod = ($i % 2 );++$i;if(count($item['subList'])>0): ?>
|
||||
<el-submenu index="<?php echo htmlentities($item['node_id']); ?>">
|
||||
<template slot="title">
|
||||
<i <?php if($item['node_icon']): ?>class="<?php echo htmlentities($item['node_icon']); ?>"<?php else: ?>class="el-icon-menu"<?php endif; ?>></i> <?php echo htmlentities($item['node_title']); ?>
|
||||
</template>
|
||||
<?php if(is_array($item['subList']) || $item['subList'] instanceof \think\Collection || $item['subList'] instanceof \think\Paginator): $i = 0; $__LIST__ = $item['subList'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$subItem): $mod = ($i % 2 );++$i;?>
|
||||
<el-menu-item onclick="location.href='/<?php echo htmlentities($subItem['node_module']); ?>/<?php echo htmlentities($subItem['node_controller']); ?>/<?php echo htmlentities($subItem['node_action']); ?>';"
|
||||
index="<?php echo htmlentities($item['node_id']); ?>-<?php echo htmlentities($subItem['node_id']); ?>" <?php if($subItem['node_controller']==strtolower($controller) && $subItem['node_action']==strtolower($action)): ?>class="is-active" <?php endif; ?>><?php echo htmlentities($subItem['node_title']); ?></el-menu-item>
|
||||
<?php endforeach; endif; else: echo "" ;endif; ?>
|
||||
</el-submenu>
|
||||
<?php else: if($item['node_controller']=='' && $item['node_action']==''): ?>
|
||||
<el-menu-item index="<?php echo htmlentities($item['node_id']); ?>" onclick="testalert('暂无该功能')">
|
||||
<i <?php if($item['node_icon']): ?>class="<?php echo htmlentities($item['node_icon']); ?>" <?php else: ?>class="el-icon-menu" <?php endif; ?>></i>
|
||||
<?php echo htmlentities($item['node_title']); ?>
|
||||
</el-menu-item>
|
||||
<?php else: ?>
|
||||
<el-menu-item index="<?php echo htmlentities($item['node_id']); ?>"
|
||||
onclick="location.href='/<?php echo htmlentities($item['node_module']); ?>/<?php echo htmlentities($item['node_controller']); ?>/<?php echo htmlentities($item['node_action']); ?>';" <?php if($item['node_controller']==strtolower($controller) && $item['node_action']==strtolower($action)): ?>class="is-active" <?php endif; ?>>
|
||||
<i <?php if($item['node_icon']): ?>class="<?php echo htmlentities($item['node_icon']); ?>" <?php else: ?>class="el-icon-menu" <?php endif; ?>></i>
|
||||
<?php echo htmlentities($item['node_title']); ?>
|
||||
</el-menu-item>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; endif; else: echo "" ;endif; ?>
|
||||
<div style="height: 120px;"></div>
|
||||
</el-menu>
|
||||
<div class="version">资源管理系统<br> Version 1.0.0</div>
|
||||
</el-aside>
|
||||
<?php else: ?>
|
||||
<div style="position: absolute;top: -72px;left: 0;width: 160px;background-color: #ffffff;box-shadow: 0 0 12px 0 rgb(47 75 168 / 6%);border-radius: 12px;">
|
||||
<a class="title" href="/admin" style="display: block;height: 62px;line-height: 62px;text-align: center;"><img
|
||||
src="/static/admin/images/logo.png" width="40px" style="vertical-align: middle;" /></a>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<el-main>
|
||||
|
||||
<el-form :inline="true" @submit.native.prevent>
|
||||
<el-form-item>
|
||||
<el-button icon="el-icon-plus" size="small" @click="clickAdd" plain>添加资源</el-button>
|
||||
<el-button icon="el-icon-document-copy" size="small" @click="getExport" plain>导出资源</el-button>
|
||||
<el-button icon="el-icon-plus" size="small" @click="ImportShow" plain>夸克导入专用</el-button>
|
||||
<el-button icon="el-icon-plus" size="small" @click="ImportBatch" plain>批量导入</el-button>
|
||||
</el-form-item>
|
||||
<div style="float:right">
|
||||
<el-form-item style="width:120px;">
|
||||
<el-select size="small" v-model="search.source_category_id" placeholder="筛选分类">
|
||||
<el-option v-for="item in category" :key="item.source_category_id" :label="item.name" :value="item.source_category_id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-input placeholder="输入关键词搜索" size="small" v-model="search.keyword" @keyup.enter.native="getList_search"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="small" @click="getList_search" plain>搜索
|
||||
</el-button>
|
||||
<el-button icon="el-icon-refresh-left" size="small" @click="getList_search(0)" plain>重置</el-button>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form>
|
||||
<el-table :data="dataList.data" v-loading="loading">
|
||||
<el-table-column prop="source_id" label="ID" width="80">
|
||||
</el-table-column>
|
||||
<el-table-column prop="title" label="资源名称">
|
||||
</el-table-column>
|
||||
<el-table-column prop="source_category_id_name" label="资源分类">
|
||||
</el-table-column>
|
||||
<el-table-column prop="url" label="资源地址" align="center">
|
||||
</el-table-column>
|
||||
<el-table-column prop="create_time" label="入库时间" align="center" width="200">
|
||||
</el-table-column>
|
||||
<el-table-column prop="update_time" label="更新时间" align="center" width="200">
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="180" align="center">
|
||||
<template slot-scope="scope">
|
||||
<div class="order-text">
|
||||
<p>
|
||||
<el-link type="success" @click="clickEdit(scope.row)" :underline="false">编辑</el-link>
|
||||
</p>
|
||||
<p>
|
||||
<el-link type="danger" @click="clickDelete(scope.row)" :underline="false">删除</el-link>
|
||||
</p>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
|
||||
|
||||
<div class="page">
|
||||
<el-pagination @size-change="handleSizeChange" :page-sizes="[10, 20, 50, 100,200,500]" :page-size="10"
|
||||
layout="total, sizes, prev, pager, next, jumper" background @current-change="changeCurrentPage"
|
||||
:current-page="dataList.current_page" :page-count="dataList.last_page" :total="dataList.total">
|
||||
</el-pagination>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- 添加框 -->
|
||||
<el-dialog title="添加资源" :visible.sync="dialogFormAdd" :modal-append-to-body='false' append-to-body
|
||||
:close-on-click-modal='false' width="680px">
|
||||
<el-form :model="formAdd" :rules="rules" ref="formAdd">
|
||||
<el-form-item prop="source_category_id" label="资源分类" :label-width="formLabelWidth">
|
||||
<el-select size="medium" v-model="formAdd.source_category_id" placeholder="请选择分类">
|
||||
<el-option v-for="item in category" :key="item.source_category_id" :label="item.name" :value="item.source_category_id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="title" label="资源名称" :label-width="formLabelWidth">
|
||||
<el-input size="medium" autocomplete="off" placeholder="请输入资源名称" v-model="formAdd.title"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="url" label="资源地址" :label-width="formLabelWidth">
|
||||
<el-input size="medium" autocomplete="off" placeholder="请输入资源地址" v-model="formAdd.url"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="关键词搜索" :label-width="formLabelWidth">
|
||||
<el-input type="textarea" :rows="5" size="medium" autocomplete="off" placeholder="一行一个名称" v-model="formAdd.description"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="资源介绍" :label-width="formLabelWidth">
|
||||
<el-input type="textarea" :rows="5" size="medium" autocomplete="off" placeholder="" v-model="formAdd.vod_content"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="postAdd()">确认添加</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 修改框 -->
|
||||
<el-dialog title="修改资源" :visible.sync="dialogFormEdit" :modal-append-to-body='false' append-to-body
|
||||
:close-on-click-modal='false' width="680px">
|
||||
<el-form :model="formEdit" :rules="rules" ref="formEdit">
|
||||
<el-form-item prop="source_category_id" label="资源分类" :label-width="formLabelWidth">
|
||||
<el-select size="medium" v-model="formEdit.source_category_id" placeholder="请选择分类" clearable>
|
||||
<el-option v-for="item in category" :key="item.source_category_id" :label="item.name"
|
||||
:value="item.source_category_id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item prop="title" label="资源名称" :label-width="formLabelWidth">
|
||||
<el-input size="medium" autocomplete="off" placeholder="请输入资源名称" v-model="formEdit.title"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="url" label="资源地址" :label-width="formLabelWidth">
|
||||
<el-input size="medium" autocomplete="off" placeholder="请输入资源地址" v-model="formEdit.url"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="关键词搜索" :label-width="formLabelWidth">
|
||||
<el-input type="textarea" :rows="5" size="medium" autocomplete="off" placeholder="一行一个名称" v-model="formEdit.description"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="资源介绍" :label-width="formLabelWidth">
|
||||
<el-input type="textarea" :rows="5" size="medium" autocomplete="off" placeholder="" v-model="formEdit.vod_content"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="postEdit()">确认修改</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 夸克导入数据 -->
|
||||
<el-dialog title="导入资源" :visible.sync="dialogImport" :modal-append-to-body='false' append-to-body
|
||||
:close-on-click-modal='false' width="600px">
|
||||
<el-form :model="Importform">
|
||||
<el-form-item prop="source_category_id" label="资源分类" label-width="90px">
|
||||
<el-select size="medium" v-model="Importform.source_category_id" placeholder="请选择分类" clearable>
|
||||
<el-option v-for="item in category" :key="item.source_category_id" :label="item.name"
|
||||
:value="item.source_category_id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="" label-width="90px">
|
||||
<el-upload class="upload-demo" :data="Importform" name="file"
|
||||
ref="ImportUpload"
|
||||
drag
|
||||
:auto-upload="false"
|
||||
limit="1"
|
||||
:on-exceed="handleExceed"
|
||||
:on-success="handleAvatarSuccess"
|
||||
action="/admin/source/imports"
|
||||
accept=".csv, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.ms-excel">
|
||||
<i class="el-icon-upload"></i>
|
||||
<div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
|
||||
</el-upload>
|
||||
<span style="color: #999;">请导入夸克官方导出的csv文件</span>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="ImportPost()">提交</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 批量导入数据 -->
|
||||
<el-dialog title="导入资源" :visible.sync="dialogBatch" :modal-append-to-body='false' append-to-body
|
||||
:close-on-click-modal='false' width="790px">
|
||||
<el-form :model="Batchform">
|
||||
<el-form-item prop="type" label="选择方式" label-width="70px">
|
||||
<el-radio-group v-model="Batchform.type">
|
||||
<el-radio-button :label="1">直接导入</el-radio-button>
|
||||
<el-radio-button :label="2">转存分享导入</el-radio-button>
|
||||
</el-radio-group>
|
||||
<p style="color: #999;" v-if='Batchform.type==1'>直接导入:链接校验有效后直接入库;Tips:该功能不会检测是否重复;</p>
|
||||
<p style="color: #999;" v-else-if='Batchform.type==2'>将资源转存到自己网盘后分享入库(<font color=orangered>此功能仅支持夸克</font>)Tips:该功能不会检测是否重复;</p>
|
||||
<span style="color: #999;" v-if='Batchform.type==1'>支持<font color=orangered>夸克、阿里、UC</font>的网盘资源(一次最多可以上传500条资源)</span>
|
||||
<span style="color: #999;" v-else-if='Batchform.type==2'>目前仅支持<font color=orangered>夸克</font>的网盘资源(一次最多可以上传500条资源)</span>
|
||||
</el-form-item>
|
||||
<el-form-item prop="source_category_id" label="资源分类" label-width="70px" v-if="Batchform.type">
|
||||
<el-select size="medium" v-model="Batchform.source_category_id" placeholder="请选择分类" clearable>
|
||||
<el-option v-for="item in category" :key="item.source_category_id" :label="item.name"
|
||||
:value="item.source_category_id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item prop="urls" label="资源分类" label-width="70px" v-if="Batchform.type">
|
||||
<el-input
|
||||
type="textarea"
|
||||
placeholder="资源示例:
|
||||
一条资源一行
|
||||
https://pan.quark.cn/s/xxxxxxxx
|
||||
https://www.alipan.com/s/xxxxxxxxx
|
||||
https://drive.uc.cn/s/xxxxxxxxxxx"
|
||||
v-model="Batchform.urls"
|
||||
rows="20"
|
||||
show-word-limit
|
||||
>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="BatchPost()">提交</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
</el-main>
|
||||
</el-container>
|
||||
</el-container>
|
||||
<Uploads ref="upload"></Uploads>
|
||||
<Goodslists ref="goodslist"></Goodslists>
|
||||
</div>
|
||||
</body>
|
||||
<template id="Upload">
|
||||
<el-dialog title="图片库" :visible.sync="visible" :modal-append-to-body='false' append-to-body :close-on-click-modal="false"
|
||||
width="725px">
|
||||
<div class="upload-boxs">
|
||||
<el-upload class="upload-right" action="/admin/attach/uploadImage" :on-success="handleUploadSuccess"
|
||||
:file-list="fileList" :show-file-list="false" :before-upload="beforeUpload" :data="postData"
|
||||
v-loading.fullscreen.lock="fullscreenLoading">
|
||||
<el-button size="small" type="primary" icon="el-icon-upload">上传图片</el-button>
|
||||
</el-upload>
|
||||
</div>
|
||||
<ul class="storage-list">
|
||||
<li :class="item.select?'active':''" v-for="(item, index) in dataList.data" :key="index" @click="select(index)">
|
||||
<el-image fit="contain" :src="item.attach_path"></el-image>
|
||||
<p>{{item.attach_name}}</p>
|
||||
</li>
|
||||
</ul>
|
||||
<p v-if="dataList.data&&dataList.data.length==0" style="text-align: center;">暂无资源</p>
|
||||
<el-pagination @current-change="changeCurrentPage" layout="prev, pager, next" :current-page="dataList.current_page"
|
||||
:page-count="dataList.last_page" hide-on-single-page background>
|
||||
</el-pagination>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<div style="float: left; font-size: 13px;">
|
||||
<span v-if="multiple">
|
||||
当前已选 <span style="color: #F56C6C;">{{selectList.length+selected_num}}</span> 个,最多允许选择 <span
|
||||
style="color: #F56C6C;">{{total_num}}</span> 个资源
|
||||
</span>
|
||||
<span v-else>当前已选 <span style="color: #F56C6C;">{{selectList.length}}</span> 个资源</span>
|
||||
</div>
|
||||
<el-button @click="visible = false" size="small">取消</el-button>
|
||||
<el-button type="primary" @click="save" size="small">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
|
||||
<template id="Single">
|
||||
<div class="slectimg" v-if="multiple">
|
||||
<block v-if="value.length>0">
|
||||
<draggable v-model="value" chosenClass="chosen" forceFallback="true" animation="600" @start="onStart"
|
||||
@end="onEnd">
|
||||
<transition-group>
|
||||
<div class="imgs" v-for="(v, s) in value" :key="s" style="cursor: all-scroll;">
|
||||
<el-image fit="contain" :src="v" :preview-src-list="value" :z-index="s"></el-image>
|
||||
<!-- <el-image fit="contain" :src="v" ></el-image> -->
|
||||
<i class="close el-icon-error" @click="deles(s)"></i>
|
||||
</div>
|
||||
</transition-group>
|
||||
</draggable>
|
||||
</block>
|
||||
<div class="noimg" @click="selectimg()">
|
||||
<i class="el-icon-plus"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="slectimg" v-else>
|
||||
<div class="imgs" v-if="value.length>0">
|
||||
<el-image fit="contain" :src="value" :preview-src-list="[value]"></el-image>
|
||||
<i class="close el-icon-error" @click="deles()"></i>
|
||||
</div>
|
||||
<div class="noimg" v-else @click="selectimg()">
|
||||
<i class="el-icon-plus"></i>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template id="Ueditor">
|
||||
<Ueditors v-model="value" ref="Ueditor" :config="config"></Ueditors>
|
||||
</template>
|
||||
|
||||
|
||||
<template id="skuforms">
|
||||
<div>
|
||||
<div style="padding-bottom: 10px;">
|
||||
<el-input style="width: 120px;" v-if="inputVisible" v-model="inputValue" ref="saveTagInput" size="small"
|
||||
@keyup.enter.native="handleInputConfirm" placeholder="回车确定">
|
||||
</el-input>
|
||||
<el-button v-else class="button-new-tag" size="small" @click="showInput" style="width: 120px;">+添加规格组</el-button>
|
||||
</div>
|
||||
<sku-form :source-attribute="sourceAttribute" :attribute.sync="attribute" :structure="structure" :sku.sync="sku"
|
||||
ref="skuForm"></sku-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
<template id="Goodslist">
|
||||
<el-dialog title="商品库" :before-close="handleClose" :visible.sync="visible" :modal-append-to-body='false' append-to-body
|
||||
:close-on-click-modal="false" width="900px">
|
||||
|
||||
<el-form :inline="true">
|
||||
<div style="float:right">
|
||||
<el-form-item style="width:100px; margin-bottom: 0;">
|
||||
<el-cascader v-model="search.classify" placeholder="商品分类" :options="categoryList" :props="cascaderProps"
|
||||
style="width: 100%;" filterable clearable size="small" :show-all-levels="false">
|
||||
</el-cascader>
|
||||
</el-form-item>
|
||||
<el-form-item style="margin-bottom: 0;">
|
||||
<el-input placeholder="输入商品名称搜索" size="small" v-model="search.keyword" @keyup.enter.native="getList_search"
|
||||
clearable @clear="getList_search"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item style="margin-bottom: 0;">
|
||||
<el-button type="primary" icon="el-icon-search" size="small" @click="getList_search" plain>搜索
|
||||
</el-button>
|
||||
<el-button icon="el-icon-refresh-left" size="small" @click="getList_search(0)" plain>重置</el-button>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form>
|
||||
|
||||
<el-table :data="dataList.data" ref="multipleTable" @selection-change="changeSelection" row-key="goods_id" reserve-selection="true" style="min-height: 425px;" v-loading="loading">
|
||||
<el-table-column align="center" type="selection" reserve-selection="true" width="55"></el-table-column>
|
||||
|
||||
<el-table-column label="商品" prop="goods_id" min-width="380">
|
||||
<template slot-scope="scope">
|
||||
<el-image class="goods-image" style="width: 50px;height: 50px;" :src="scope.row.picture[0]" :preview-src-list="[scope.row.picture[0]]"
|
||||
fit="contain" lazy></el-image>
|
||||
|
||||
<div class="goods-info cs-ml">
|
||||
<p class="action" style="overflow:hidden;text-overflow:ellipsis;display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 2;">
|
||||
<span :title="scope.row.goods_name" class="link">{{scope.row.goods_name}}</span>
|
||||
</p>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="本店价" prop="goods_price">
|
||||
<template slot-scope="scope">
|
||||
<div class="action">
|
||||
<span class="goods-shop-price">{{scope.row.goods_price}}</span>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="库存" prop="stock_total">
|
||||
<template slot-scope="scope">
|
||||
<div class="action">
|
||||
<span>{{scope.row.stock_total}}</span>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<p style="padding-bottom: 10px;">
|
||||
<el-pagination hide-on-single-page="true" layout="prev, pager, next" background :current-page="form.page" @current-change="changeCurrentPage" :page-size="5" :total="dataList.total">
|
||||
</el-pagination>
|
||||
</p>
|
||||
<p>
|
||||
<el-button @click="cancels" size="small">取消</el-button>
|
||||
<el-button type="primary" @click="save" size="small">确定</el-button>
|
||||
</p>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script src="/static/admin/js/vue-2.6.10.min.js"></script>
|
||||
<script src="/static/admin/js/axios.min.js"></script>
|
||||
<script src="/static/admin/js/element.js"></script>
|
||||
<script src="/static/admin/js/YAdmin.js"></script>
|
||||
<script src="/static/admin/js/SkuForm.umd.js"></script>
|
||||
<script src="/static/admin/UEditor/vue-ueditor-wrap.min.js"></script>
|
||||
<script src="/static/admin/UEditor/ueditor.config.js"></script>
|
||||
<script src="/static/admin/UEditor/ueditor.all.js"></script>
|
||||
<script src="/static/admin/js/component.js"></script>
|
||||
<script src="/static/admin/js/Sortable.min.js"></script>
|
||||
<script src="/static/admin/js/vuedraggable.umd.min.js"></script>
|
||||
|
||||
<script>
|
||||
var app = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
return {
|
||||
search: {
|
||||
keyword: "",
|
||||
filter: "title",
|
||||
source_category_id: ''
|
||||
},
|
||||
formLabelWidth: '120px',
|
||||
dialogFormAdd: false,
|
||||
dialogFormEdit: false,
|
||||
loading: true,
|
||||
dataList: [],
|
||||
form: {
|
||||
page: 1,
|
||||
per_page: 10,
|
||||
order: 'create_time desc'
|
||||
},
|
||||
formAdd: {
|
||||
},
|
||||
formEdit: {
|
||||
},
|
||||
rules: {
|
||||
title: [{ required: true, message: '请输入资源名称', trigger: 'blur' }],
|
||||
url: [{ required: true, message: '请输入资源地址', trigger: 'blur' }],
|
||||
},
|
||||
dialogImport: false,
|
||||
Importform: {
|
||||
|
||||
},
|
||||
|
||||
category: [],
|
||||
|
||||
dialogBatch: false,
|
||||
Batchform: {},
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getcategory();
|
||||
},
|
||||
methods: {
|
||||
getList_search(val) {
|
||||
if (val == 0) {
|
||||
this.search = {
|
||||
keyword: "",
|
||||
filter: "title",
|
||||
source_category_id: ''
|
||||
}
|
||||
}
|
||||
this.form.page = 1;
|
||||
this.getList();
|
||||
},
|
||||
handleSizeChange(per_page) {
|
||||
this.form.per_page = per_page;
|
||||
this.getList();
|
||||
},
|
||||
postEdit() {
|
||||
var that = this;
|
||||
that.$refs["formEdit"].validate((valid) => {
|
||||
if (valid) {
|
||||
axios.post('/admin/source/update', Object.assign({}, PostBase, that.formEdit))
|
||||
.then(function (response) {
|
||||
that.getList();
|
||||
if (response.data.code == CODE_SUCCESS) {
|
||||
that.$message({
|
||||
message: response.data.message,
|
||||
type: 'success'
|
||||
});
|
||||
that.dialogFormEdit = false;
|
||||
} else {
|
||||
that.$message.error(response.data.message);
|
||||
}
|
||||
})
|
||||
.catch(function (error) {
|
||||
that.$message.error('服务器内部错误');
|
||||
console.log(error);
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
postAdd() {
|
||||
var that = this;
|
||||
that.$refs['formAdd'].validate((valid) => {
|
||||
if (valid) {
|
||||
axios.post('/admin/source/add', Object.assign({}, PostBase, that.formAdd))
|
||||
.then(function (response) {
|
||||
that.getList();
|
||||
if (response.data.code == CODE_SUCCESS) {
|
||||
that.$message({
|
||||
message: response.data.message,
|
||||
type: 'success'
|
||||
});
|
||||
that.dialogFormAdd = false;
|
||||
} else {
|
||||
that.$message.error(response.data.message);
|
||||
}
|
||||
})
|
||||
.catch(function (error) {
|
||||
that.$message.error('服务器内部错误');
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
clickAdd() {
|
||||
var that = this;
|
||||
that.formAdd = { status: 1, share_image: '' };
|
||||
that.dialogFormAdd = true;
|
||||
},
|
||||
clickDelete(row) {
|
||||
var that = this;
|
||||
this.$confirm('删除后,资源将无法查看,是否继续删除?', '删除提醒', {
|
||||
confirmButtonText: '删除',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
axios.post('/admin/source/delete', Object.assign({}, PostBase, {
|
||||
source_id: row.source_id
|
||||
}))
|
||||
.then(function (response) {
|
||||
that.getList();
|
||||
if (response.data.code == CODE_SUCCESS) {
|
||||
that.$message({
|
||||
message: response.data.message,
|
||||
type: 'success'
|
||||
});
|
||||
} else {
|
||||
that.$message.error(response.data.message);
|
||||
}
|
||||
})
|
||||
.catch(function (error) {
|
||||
that.$message.error('服务器内部错误');
|
||||
});
|
||||
}).catch(() => {
|
||||
});
|
||||
},
|
||||
clickEdit(row) {
|
||||
var that = this;
|
||||
that.formEdit = row;
|
||||
axios.post('/admin/source/detail', Object.assign({}, PostBase, {
|
||||
source_id: row.source_id
|
||||
}))
|
||||
.then(function (response) {
|
||||
if (response.data.code == CODE_SUCCESS) {
|
||||
response.data.data.source_category_id = response.data.data.source_category_id || undefined
|
||||
that.formEdit = response.data.data;
|
||||
that.dialogFormEdit = true;
|
||||
} else {
|
||||
that.$message.error(response.data.message);
|
||||
}
|
||||
})
|
||||
.catch(function (error) {
|
||||
that.$message.error('服务器内部错误');
|
||||
});
|
||||
},
|
||||
changeCurrentPage(page) {
|
||||
this.form.page = page;
|
||||
this.getList();
|
||||
},
|
||||
getcategory(){
|
||||
var that = this;
|
||||
axios.post('/admin/source_category/getList', Object.assign({}, PostBase))
|
||||
.then(function (response) {
|
||||
that.loading = false;
|
||||
if (response.data.code == CODE_SUCCESS) {
|
||||
that.category = response.data.data;
|
||||
that.getList();
|
||||
} else {
|
||||
that.$message.error(response.data.message);
|
||||
}
|
||||
})
|
||||
.catch(function (error) {
|
||||
that.loading = false;
|
||||
that.$message.error('服务器内部错误');
|
||||
console.log(error);
|
||||
});
|
||||
},
|
||||
getList() {
|
||||
var that = this;
|
||||
that.loading = true;
|
||||
axios.post('/admin/source/getList', Object.assign({}, PostBase, that.form, that.search))
|
||||
.then(function (response) {
|
||||
that.loading = false;
|
||||
if (response.data.code == CODE_SUCCESS) {
|
||||
that.dataList = response.data.data;
|
||||
that.setcategory()
|
||||
} else {
|
||||
that.$message.error(response.data.message);
|
||||
}
|
||||
})
|
||||
.catch(function (error) {
|
||||
that.loading = false;
|
||||
that.$message.error('服务器内部错误');
|
||||
});
|
||||
},
|
||||
setcategory(){
|
||||
for (let item of this.dataList.data) {
|
||||
for (let items of this.category) {
|
||||
if(item.source_category_id == items.source_category_id){
|
||||
item.source_category_id_name = items.name
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
//导入数据
|
||||
ImportShow() {
|
||||
this.Importform = {
|
||||
}
|
||||
this.dialogImport = true
|
||||
},
|
||||
handleExceed(files, fileList) {
|
||||
this.$message.warning(`只能选择一个文件`);
|
||||
},
|
||||
handleAvatarSuccess(res, file) {
|
||||
if (res.code == 200) {
|
||||
this.getList();
|
||||
this.$message({
|
||||
message: res.message,
|
||||
type: 'success'
|
||||
});
|
||||
this.dialogImport = false;
|
||||
} else {
|
||||
this.$message.error(res.message);
|
||||
}
|
||||
this.$refs.ImportUpload.clearFiles();
|
||||
},
|
||||
ImportPost(){
|
||||
this.Importform = Object.assign(this.Importform, PostBase)
|
||||
this.$nextTick(() => {
|
||||
this.$refs.ImportUpload.submit();
|
||||
})
|
||||
},
|
||||
|
||||
//批量导入数据
|
||||
ImportBatch() {
|
||||
this.Batchform = {}
|
||||
this.dialogBatch = true
|
||||
},
|
||||
BatchPost(){
|
||||
var that = this;
|
||||
if(!that.Batchform.type) return that.$message.error('请选择导入方式');
|
||||
if(!that.Batchform.urls) return that.$message.error('请输入资源地址');
|
||||
axios.post('/admin/source/transfer', Object.assign({}, PostBase, that.Batchform))
|
||||
.then(function (res) {
|
||||
})
|
||||
.catch(function (error) {
|
||||
that.$message.error('服务器内部错误');
|
||||
});
|
||||
that.$message({
|
||||
message: "已提交任务,稍后查看结果",
|
||||
type: 'success'
|
||||
});
|
||||
},
|
||||
|
||||
|
||||
//数据导出
|
||||
getExport(){
|
||||
var that = this;
|
||||
var filters = Object.assign({}, PostBase, that.search);
|
||||
var url = '/admin/source/excel?';
|
||||
for (let key in filters) {
|
||||
url += key + "=" + filters[key] + "&";
|
||||
}
|
||||
window.open(url);
|
||||
that.$message.success('数据导出成功');
|
||||
},
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
</html>
|
||||
@@ -1,727 +0,0 @@
|
||||
<?php /*a:5:{s:74:"C:\Users\liu67\Desktop\test\xinyue-search\app\qfadmin\view\node\index.html";i:1712232787;s:77:"C:\Users\liu67\Desktop\test\xinyue-search\app\qfadmin\view\common\header.html";i:1712232785;s:75:"C:\Users\liu67\Desktop\test\xinyue-search\app\qfadmin\view\common\menu.html";i:1712232786;s:77:"C:\Users\liu67\Desktop\test\xinyue-search\app\qfadmin\view\common\footer.html";i:1712232785;s:78:"C:\Users\liu67\Desktop\test\xinyue-search\app\qfadmin\view\component\view.html";i:1712232786;}*/ ?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title><?php echo htmlentities($node['node_title']); ?></title>
|
||||
<meta charset="UTF-8">
|
||||
<!-- import CSS -->
|
||||
<link rel="stylesheet" href="/static/admin/css/element.css">
|
||||
<link rel="stylesheet" href="/static/admin/css/YAdmin.css">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="app" v-cloak>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<el-col style="width: auto;">
|
||||
<el-menu class="el-menu-vertical" text-color="#333333" :default-active="'<?php if($node['node_pid']): ?><?php echo htmlentities($node['node_pid']); else: ?><?php echo htmlentities($node['node_id']); ?><?php endif; ?>'" unique-opened
|
||||
style="border:none;" mode="horizontal" active-text-color="#333333">
|
||||
<?php if(is_array($menuList) || $menuList instanceof \think\Collection || $menuList instanceof \think\Paginator): $i = 0; $__LIST__ = $menuList;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$item): $mod = ($i % 2 );++$i;if(count($item['subList'])>0): if(count($item['subList'][0]['subList'])>0): ?>
|
||||
<el-menu-item index="<?php echo htmlentities($item['node_id']); ?>"
|
||||
onclick="location.href='/<?php echo htmlentities($item['subList'][0]['subList'][0]['node_module']); ?>/<?php echo htmlentities($item['subList'][0]['subList'][0]['node_controller']); ?>/<?php echo htmlentities($item['subList'][0]['subList'][0]['node_action']); ?>';"
|
||||
<?php if($menu==$item['node_id']): ?>class="is-active" <?php endif; ?>>
|
||||
<i class="<?php echo htmlentities($item['node_icon']); ?>"></i> <?php echo htmlentities($item['node_title']); ?>
|
||||
</el-menu-item>
|
||||
<?php else: ?>
|
||||
<el-menu-item index="<?php echo htmlentities($item['node_id']); ?>"
|
||||
onclick="location.href='/<?php echo htmlentities($item['subList'][0]['node_module']); ?>/<?php echo htmlentities($item['subList'][0]['node_controller']); ?>/<?php echo htmlentities($item['subList'][0]['node_action']); ?>';" <?php if($menu==$item['node_id']): ?>class="is-active" <?php endif; ?>>
|
||||
<i class="<?php echo htmlentities($item['node_icon']); ?>"></i> <?php echo htmlentities($item['node_title']); ?>
|
||||
</el-menu-item>
|
||||
<?php endif; else: if(count($item['subList'])>0 || $item['node_controller']=='index'): ?>
|
||||
<el-menu-item index="<?php echo htmlentities($item['node_id']); ?>"
|
||||
onclick="location.href='/<?php echo htmlentities($item['node_module']); ?>/<?php echo htmlentities($item['node_controller']); ?>/<?php echo htmlentities($item['node_action']); ?>';" <?php if($menu==$item['node_id']): ?>class="is-active" <?php endif; ?>>
|
||||
<i class="<?php echo htmlentities($item['node_icon']); ?>"></i> <?php echo htmlentities($item['node_title']); ?>
|
||||
</el-menu-item>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; endif; else: echo "" ;endif; ?>
|
||||
</el-menu>
|
||||
</el-col>
|
||||
|
||||
<el-col style="width: 240px;float: right;">
|
||||
<span class="topArea">
|
||||
<el-link :underline="false" class="el-icon-full-screen menuicon" onclick="requestFullScreen()"></el-link>
|
||||
<!-- <el-link :underline="false" class="el-icon-brush menuicon"></el-link> -->
|
||||
<el-dropdown>
|
||||
<el-link :underline="false"> <?php echo htmlentities($adminInfo['admin_name']); ?><i class="el-icon-arrow-down"></i></el-link>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item onclick="location.href='/qfadmin/admin/updatemyinfo';">修改资料
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item onclick="location.href='/qfadmin/admin/motifypassword';">修改密码
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item onclick="location.href='/qfadmin/system/clean';">清除缓存
|
||||
</el-dropdown-item>
|
||||
<el-dropdown-item onclick="logout()">退出登录</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</span>
|
||||
</el-col>
|
||||
</el-header>
|
||||
<el-container class="body">
|
||||
<?php if($menuLists): ?>
|
||||
<el-aside width="160px">
|
||||
<a class="titlehome" href="/qfadmin" style="display: block;height: 62px;line-height: 62px;text-align: center;"><img src="/static/admin/images/logo.png" width="40px" style="vertical-align: middle;" /></a>
|
||||
<el-menu class="el-menu-vertical-demo" text-color="#333333" default-active="'<?php echo htmlentities($node['node_pid']); ?>-<?php echo htmlentities($node['node_id']); ?>'" :collapse="false" :default-openeds="['<?php echo htmlentities($node['node_pid']); ?>']">
|
||||
<?php if(is_array($menuLists) || $menuLists instanceof \think\Collection || $menuLists instanceof \think\Paginator): $i = 0; $__LIST__ = $menuLists;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$item): $mod = ($i % 2 );++$i;if(count($item['subList'])>0): ?>
|
||||
<el-submenu index="<?php echo htmlentities($item['node_id']); ?>">
|
||||
<template slot="title">
|
||||
<i <?php if($item['node_icon']): ?>class="<?php echo htmlentities($item['node_icon']); ?>"<?php else: ?>class="el-icon-menu"<?php endif; ?>></i> <?php echo htmlentities($item['node_title']); ?>
|
||||
</template>
|
||||
<?php if(is_array($item['subList']) || $item['subList'] instanceof \think\Collection || $item['subList'] instanceof \think\Paginator): $i = 0; $__LIST__ = $item['subList'];if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$subItem): $mod = ($i % 2 );++$i;?>
|
||||
<el-menu-item onclick="location.href='/<?php echo htmlentities($subItem['node_module']); ?>/<?php echo htmlentities($subItem['node_controller']); ?>/<?php echo htmlentities($subItem['node_action']); ?>';"
|
||||
index="<?php echo htmlentities($item['node_id']); ?>-<?php echo htmlentities($subItem['node_id']); ?>" <?php if($subItem['node_controller']==strtolower($controller) && $subItem['node_action']==strtolower($action)): ?>class="is-active" <?php endif; ?>><?php echo htmlentities($subItem['node_title']); ?></el-menu-item>
|
||||
<?php endforeach; endif; else: echo "" ;endif; ?>
|
||||
</el-submenu>
|
||||
<?php else: if($item['node_controller']=='' && $item['node_action']==''): ?>
|
||||
<el-menu-item index="<?php echo htmlentities($item['node_id']); ?>" onclick="testalert('暂无该功能')">
|
||||
<i <?php if($item['node_icon']): ?>class="<?php echo htmlentities($item['node_icon']); ?>" <?php else: ?>class="el-icon-menu" <?php endif; ?>></i>
|
||||
<?php echo htmlentities($item['node_title']); ?>
|
||||
</el-menu-item>
|
||||
<?php else: ?>
|
||||
<el-menu-item index="<?php echo htmlentities($item['node_id']); ?>"
|
||||
onclick="location.href='/<?php echo htmlentities($item['node_module']); ?>/<?php echo htmlentities($item['node_controller']); ?>/<?php echo htmlentities($item['node_action']); ?>';" <?php if($item['node_controller']==strtolower($controller) && $item['node_action']==strtolower($action)): ?>class="is-active" <?php endif; ?>>
|
||||
<i <?php if($item['node_icon']): ?>class="<?php echo htmlentities($item['node_icon']); ?>" <?php else: ?>class="el-icon-menu" <?php endif; ?>></i>
|
||||
<?php echo htmlentities($item['node_title']); ?>
|
||||
</el-menu-item>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php endforeach; endif; else: echo "" ;endif; ?>
|
||||
<div style="height: 120px;"></div>
|
||||
</el-menu>
|
||||
<div class="version">资源管理系统<br> Version 1.0.0</div>
|
||||
</el-aside>
|
||||
<?php else: ?>
|
||||
<div style="position: absolute;top: -72px;left: 0;width: 160px;background-color: #ffffff;box-shadow: 0 0 12px 0 rgb(47 75 168 / 6%);border-radius: 12px;">
|
||||
<a class="title" href="/admin" style="display: block;height: 62px;line-height: 62px;text-align: center;"><img
|
||||
src="/static/admin/images/logo.png" width="40px" style="vertical-align: middle;" /></a>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
||||
<el-main>
|
||||
|
||||
<el-form :inline="true">
|
||||
<el-form-item>
|
||||
<el-button icon="el-icon-plus" size="small" @click="clickAdd" plain>添加</el-button>
|
||||
</el-form-item>
|
||||
<div style="float:right">
|
||||
<el-form-item style="width:120px;">
|
||||
<el-select placeholder="显示状态" size="small" v-model="search.node_show">
|
||||
<el-option value="" label="全部状态">
|
||||
</el-option>
|
||||
<el-option v-for="show in showList" :value="show.show_id" :label="show.show_title">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item style="width:120px;">
|
||||
<el-select placeholder="筛选类别" size="small" v-model="search.filter">
|
||||
<el-option value="node_id" label="节点ID">
|
||||
</el-option>
|
||||
<el-option value="node_title" label="节点名称">
|
||||
</el-option>
|
||||
<el-option value="node_desc" label="节点描述">
|
||||
</el-option>
|
||||
<el-option value="node_module" label="模块">
|
||||
</el-option>
|
||||
<el-option value="node_controller" label="控制器">
|
||||
</el-option>
|
||||
<el-option value="node_action" label="方法">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-input placeholder="输入关键词搜索" size="small" v-model="search.keyword"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="small" @click="getList_search" plain>搜索</el-button>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form>
|
||||
<el-table :data="dataList" default-expand-all @selection-change="changeSelection" v-loading="loading" row-key="node_id" :tree-props="{children: 'sub', hasChildren: 'hasChildren'}">
|
||||
<el-table-column prop="node_id" label="ID" width="120">
|
||||
</el-table-column>
|
||||
<el-table-column prop="node_title" label="节点名称">
|
||||
<template slot-scope="scope">
|
||||
<i :class="scope.row.node_icon" style="font-size: 16px;"></i> {{scope.row.node_title}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="节点地址">
|
||||
<template slot-scope="scope">
|
||||
{{scope.row.node_module+"/"+scope.row.node_controller+"/"+scope.row.node_action}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="node_order" label="排序" width="">
|
||||
</el-table-column>
|
||||
<el-table-column label="隐藏" width="80">
|
||||
<template slot-scope="scope">
|
||||
<el-switch v-model="scope.row.node_show==0?true:false" active-color="#ff4949"
|
||||
@change="clickShow(scope.row)">
|
||||
</el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="180">
|
||||
<template slot-scope="scope">
|
||||
<el-link type="primary" @click="clickEdit(scope.row)" :underline="false">编辑</el-link>
|
||||
<el-link type="danger" @click="clickDelete(scope.row)" :underline="false">删除</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- 添加框 -->
|
||||
<el-dialog title="添加节点" :visible.sync="dialogFormAdd" :modal-append-to-body='false' append-to-body :close-on-click-modal='false'>
|
||||
<el-form :model="formAdd" status-icon :rules="rules" ref="formAdd">
|
||||
<el-form-item label="节点名称" :label-width="formLabelWidth" prop="node_title">
|
||||
<el-input size="medium" autocomplete="off" v-model="formAdd.node_title"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="节点描述" :label-width="formLabelWidth">
|
||||
<el-input size="medium" autocomplete="off" v-model="formAdd.node_desc"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="节点图标" :label-width="formLabelWidth">
|
||||
<el-input size="medium" autocomplete="off" v-model="formAdd.node_icon"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属模块" :label-width="formLabelWidth" prop="node_module">
|
||||
<el-input size="medium" autocomplete="off" v-model="formAdd.node_module"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="控制器" :label-width="formLabelWidth" prop="node_controller">
|
||||
<el-input size="medium" autocomplete="off" v-model="formAdd.node_controller"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="方法" :label-width="formLabelWidth" prop="node_action">
|
||||
<el-input size="medium" autocomplete="off" v-model="formAdd.node_action"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否显示" :label-width="formLabelWidth">
|
||||
<el-select placeholder="请选择是否显示到菜单" size="small" v-model="formAdd.node_show">
|
||||
<el-option v-for="show in showList" :value="show.show_id" :label="show.show_title">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="父级菜单" :label-width="formLabelWidth">
|
||||
<el-select placeholder="请选择菜单" size="small" v-model="formAdd.node_pid">
|
||||
<el-option v-for="parent in parentList" :value="parent.node_id" :label="parent.node_title">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="父级菜单" :label-width="formLabelWidth">
|
||||
<el-cascader :options="parentList" v-model="formAdd.node_pid" :props="props" :show-all-levels="false">
|
||||
</el-cascader>
|
||||
</el-form-item>
|
||||
<el-form-item label="显示顺序" :label-width="formLabelWidth" prop="node_order">
|
||||
<el-input size="medium" autocomplete="off" v-model="formAdd.node_order"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="postAdd">确认添加</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 修改框 -->
|
||||
<el-dialog title="修改节点" :visible.sync="dialogFormEdit" :modal-append-to-body='false' append-to-body :close-on-click-modal='false'>
|
||||
<el-form :model="formEdit" status-icon :rules="rules" ref="formEdit">
|
||||
<el-form-item label="节点名称" :label-width="formLabelWidth" prop="node_title">
|
||||
<el-input size="medium" autocomplete="off" v-model="formEdit.node_title"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="节点描述" :label-width="formLabelWidth">
|
||||
<el-input size="medium" autocomplete="off" v-model="formEdit.node_desc"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="节点图标" :label-width="formLabelWidth">
|
||||
<el-input size="medium" autocomplete="off" v-model="formEdit.node_icon"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="所属模块" :label-width="formLabelWidth" prop="node_module">
|
||||
<el-input size="medium" autocomplete="off" v-model="formEdit.node_module"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="控制器" :label-width="formLabelWidth" prop="node_controller">
|
||||
<el-input size="medium" autocomplete="off" v-model="formEdit.node_controller"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="方法" :label-width="formLabelWidth" prop="node_action">
|
||||
<el-input size="medium" autocomplete="off" v-model="formEdit.node_action"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否显示" :label-width="formLabelWidth">
|
||||
<el-select placeholder="请选择是否显示到菜单" size="small" v-model="formEdit.node_show">
|
||||
<el-option v-for="show in showList" :value="show.show_id" :label="show.show_title">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="父级菜单" :label-width="formLabelWidth">
|
||||
<el-cascader :options="parentList" v-model="formEdit.node_pid" :props="props" :show-all-levels="false"></el-cascader>
|
||||
</el-form-item>
|
||||
<el-form-item label="显示顺序" :label-width="formLabelWidth" prop="node_order">
|
||||
<el-input size="medium" autocomplete="off" v-model="formEdit.node_order"></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="postEdit">确认修改</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
</el-main>
|
||||
</el-container>
|
||||
</el-container>
|
||||
<Uploads ref="upload"></Uploads>
|
||||
<Goodslists ref="goodslist"></Goodslists>
|
||||
</div>
|
||||
</body>
|
||||
<template id="Upload">
|
||||
<el-dialog title="图片库" :visible.sync="visible" :modal-append-to-body='false' append-to-body :close-on-click-modal="false"
|
||||
width="725px">
|
||||
<div class="upload-boxs">
|
||||
<el-upload class="upload-right" action="/admin/attach/uploadImage" :on-success="handleUploadSuccess"
|
||||
:file-list="fileList" :show-file-list="false" :before-upload="beforeUpload" :data="postData"
|
||||
v-loading.fullscreen.lock="fullscreenLoading">
|
||||
<el-button size="small" type="primary" icon="el-icon-upload">上传图片</el-button>
|
||||
</el-upload>
|
||||
</div>
|
||||
<ul class="storage-list">
|
||||
<li :class="item.select?'active':''" v-for="(item, index) in dataList.data" :key="index" @click="select(index)">
|
||||
<el-image fit="contain" :src="item.attach_path"></el-image>
|
||||
<p>{{item.attach_name}}</p>
|
||||
</li>
|
||||
</ul>
|
||||
<p v-if="dataList.data&&dataList.data.length==0" style="text-align: center;">暂无资源</p>
|
||||
<el-pagination @current-change="changeCurrentPage" layout="prev, pager, next" :current-page="dataList.current_page"
|
||||
:page-count="dataList.last_page" hide-on-single-page background>
|
||||
</el-pagination>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<div style="float: left; font-size: 13px;">
|
||||
<span v-if="multiple">
|
||||
当前已选 <span style="color: #F56C6C;">{{selectList.length+selected_num}}</span> 个,最多允许选择 <span
|
||||
style="color: #F56C6C;">{{total_num}}</span> 个资源
|
||||
</span>
|
||||
<span v-else>当前已选 <span style="color: #F56C6C;">{{selectList.length}}</span> 个资源</span>
|
||||
</div>
|
||||
<el-button @click="visible = false" size="small">取消</el-button>
|
||||
<el-button type="primary" @click="save" size="small">确定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
|
||||
<template id="Single">
|
||||
<div class="slectimg" v-if="multiple">
|
||||
<block v-if="value.length>0">
|
||||
<draggable v-model="value" chosenClass="chosen" forceFallback="true" animation="600" @start="onStart"
|
||||
@end="onEnd">
|
||||
<transition-group>
|
||||
<div class="imgs" v-for="(v, s) in value" :key="s" style="cursor: all-scroll;">
|
||||
<el-image fit="contain" :src="v" :preview-src-list="value" :z-index="s"></el-image>
|
||||
<!-- <el-image fit="contain" :src="v" ></el-image> -->
|
||||
<i class="close el-icon-error" @click="deles(s)"></i>
|
||||
</div>
|
||||
</transition-group>
|
||||
</draggable>
|
||||
</block>
|
||||
<div class="noimg" @click="selectimg()">
|
||||
<i class="el-icon-plus"></i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="slectimg" v-else>
|
||||
<div class="imgs" v-if="value.length>0">
|
||||
<el-image fit="contain" :src="value" :preview-src-list="[value]"></el-image>
|
||||
<i class="close el-icon-error" @click="deles()"></i>
|
||||
</div>
|
||||
<div class="noimg" v-else @click="selectimg()">
|
||||
<i class="el-icon-plus"></i>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<template id="Ueditor">
|
||||
<Ueditors v-model="value" ref="Ueditor" :config="config"></Ueditors>
|
||||
</template>
|
||||
|
||||
|
||||
<template id="skuforms">
|
||||
<div>
|
||||
<div style="padding-bottom: 10px;">
|
||||
<el-input style="width: 120px;" v-if="inputVisible" v-model="inputValue" ref="saveTagInput" size="small"
|
||||
@keyup.enter.native="handleInputConfirm" placeholder="回车确定">
|
||||
</el-input>
|
||||
<el-button v-else class="button-new-tag" size="small" @click="showInput" style="width: 120px;">+添加规格组</el-button>
|
||||
</div>
|
||||
<sku-form :source-attribute="sourceAttribute" :attribute.sync="attribute" :structure="structure" :sku.sync="sku"
|
||||
ref="skuForm"></sku-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
<template id="Goodslist">
|
||||
<el-dialog title="商品库" :before-close="handleClose" :visible.sync="visible" :modal-append-to-body='false' append-to-body
|
||||
:close-on-click-modal="false" width="900px">
|
||||
|
||||
<el-form :inline="true">
|
||||
<div style="float:right">
|
||||
<el-form-item style="width:100px; margin-bottom: 0;">
|
||||
<el-cascader v-model="search.classify" placeholder="商品分类" :options="categoryList" :props="cascaderProps"
|
||||
style="width: 100%;" filterable clearable size="small" :show-all-levels="false">
|
||||
</el-cascader>
|
||||
</el-form-item>
|
||||
<el-form-item style="margin-bottom: 0;">
|
||||
<el-input placeholder="输入商品名称搜索" size="small" v-model="search.keyword" @keyup.enter.native="getList_search"
|
||||
clearable @clear="getList_search"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item style="margin-bottom: 0;">
|
||||
<el-button type="primary" icon="el-icon-search" size="small" @click="getList_search" plain>搜索
|
||||
</el-button>
|
||||
<el-button icon="el-icon-refresh-left" size="small" @click="getList_search(0)" plain>重置</el-button>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form>
|
||||
|
||||
<el-table :data="dataList.data" ref="multipleTable" @selection-change="changeSelection" row-key="goods_id" reserve-selection="true" style="min-height: 425px;" v-loading="loading">
|
||||
<el-table-column align="center" type="selection" reserve-selection="true" width="55"></el-table-column>
|
||||
|
||||
<el-table-column label="商品" prop="goods_id" min-width="380">
|
||||
<template slot-scope="scope">
|
||||
<el-image class="goods-image" style="width: 50px;height: 50px;" :src="scope.row.picture[0]" :preview-src-list="[scope.row.picture[0]]"
|
||||
fit="contain" lazy></el-image>
|
||||
|
||||
<div class="goods-info cs-ml">
|
||||
<p class="action" style="overflow:hidden;text-overflow:ellipsis;display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp: 2;">
|
||||
<span :title="scope.row.goods_name" class="link">{{scope.row.goods_name}}</span>
|
||||
</p>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="本店价" prop="goods_price">
|
||||
<template slot-scope="scope">
|
||||
<div class="action">
|
||||
<span class="goods-shop-price">{{scope.row.goods_price}}</span>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="库存" prop="stock_total">
|
||||
<template slot-scope="scope">
|
||||
<div class="action">
|
||||
<span>{{scope.row.stock_total}}</span>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<p style="padding-bottom: 10px;">
|
||||
<el-pagination hide-on-single-page="true" layout="prev, pager, next" background :current-page="form.page" @current-change="changeCurrentPage" :page-size="5" :total="dataList.total">
|
||||
</el-pagination>
|
||||
</p>
|
||||
<p>
|
||||
<el-button @click="cancels" size="small">取消</el-button>
|
||||
<el-button type="primary" @click="save" size="small">确定</el-button>
|
||||
</p>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script src="/static/admin/js/vue-2.6.10.min.js"></script>
|
||||
<script src="/static/admin/js/axios.min.js"></script>
|
||||
<script src="/static/admin/js/element.js"></script>
|
||||
<script src="/static/admin/js/YAdmin.js"></script>
|
||||
<script src="/static/admin/js/SkuForm.umd.js"></script>
|
||||
<script src="/static/admin/UEditor/vue-ueditor-wrap.min.js"></script>
|
||||
<script src="/static/admin/UEditor/ueditor.config.js"></script>
|
||||
<script src="/static/admin/UEditor/ueditor.all.js"></script>
|
||||
<script src="/static/admin/js/component.js"></script>
|
||||
<script src="/static/admin/js/Sortable.min.js"></script>
|
||||
<script src="/static/admin/js/vuedraggable.umd.min.js"></script>
|
||||
|
||||
<script>
|
||||
var app = new Vue({
|
||||
el: '#app',
|
||||
data() {
|
||||
this.getList();
|
||||
return {
|
||||
search: {
|
||||
node_show: "",
|
||||
keyword: "",
|
||||
filter: "node_id"
|
||||
},
|
||||
formLabelWidth: '80px',
|
||||
dialogFormAdd: false,
|
||||
dialogFormEdit: false,
|
||||
loading: true,
|
||||
dataList: [],
|
||||
parentList: [],
|
||||
props: {
|
||||
checkStrictly: true,
|
||||
emitPath: false,
|
||||
value: 'node_id',
|
||||
label: 'node_title',
|
||||
children: 'sub',
|
||||
},
|
||||
showList: [
|
||||
{
|
||||
show_id: 0,
|
||||
show_title: "隐藏"
|
||||
},
|
||||
{
|
||||
show_id: 1,
|
||||
show_title: "显示"
|
||||
}
|
||||
],
|
||||
selectList: [],
|
||||
formAdd: {
|
||||
node_readonly: 0,
|
||||
node_pid: 0,
|
||||
node_order: 1,
|
||||
node_show: 1,
|
||||
},
|
||||
formEdit: {
|
||||
node_readonly: 0,
|
||||
node_pid: 0,
|
||||
},
|
||||
rules: {
|
||||
node_title: [
|
||||
{ required: true, message: '节点名称必须填写', trigger: 'blur' },
|
||||
],
|
||||
node_controller: [
|
||||
// { required: true, pattern: /^[a-z]+$/, message: '控制器为有效小写字母', trigger: 'blur' },
|
||||
],
|
||||
node_module: [
|
||||
{ required: true, pattern: /^[a-z]+$/, message: '模块名为有效小写字母', trigger: 'blur' },
|
||||
],
|
||||
node_action: [
|
||||
{ required: true, pattern: /^[a-z]+$/, message: '方法名为有效小写字母', trigger: 'blur' },
|
||||
],
|
||||
node_order: [
|
||||
{ required: true, pattern: /^\d$/, message: '顺序为有效自然数', trigger: 'blur' },
|
||||
],
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
getList_search() {
|
||||
this.form.page = 1;
|
||||
this.getList();
|
||||
},
|
||||
postMultDelete() {
|
||||
var that = this;
|
||||
if (that.selectList.length == 0) {
|
||||
that.$message.error('未选择任何节点!');
|
||||
return;
|
||||
}
|
||||
this.$confirm('即将删除选中的节点, 是否确认?', '批量删除', {
|
||||
confirmButtonText: '删除',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
axios.post('/admin/node/delete', Object.assign({}, PostBase, {
|
||||
node_id: that.selectList.join(",")
|
||||
}))
|
||||
.then(function (response) {
|
||||
that.getList();
|
||||
if (response.data.code == CODE_SUCCESS) {
|
||||
that.$message({
|
||||
message: response.data.message,
|
||||
type: 'success'
|
||||
});
|
||||
} else {
|
||||
that.$message.error(response.data.message);
|
||||
}
|
||||
})
|
||||
.catch(function (error) {
|
||||
that.$message.error('服务器内部错误');
|
||||
console.log(error);
|
||||
});
|
||||
}).catch(() => {
|
||||
});
|
||||
},
|
||||
changeSelection(list) {
|
||||
var that = this;
|
||||
that.selectList = [];
|
||||
for (var index in list) {
|
||||
that.selectList.push(list[index].node_id);
|
||||
}
|
||||
},
|
||||
postEdit() {
|
||||
var that = this;
|
||||
axios.post('/admin/node/update', Object.assign({}, PostBase, that.formEdit))
|
||||
.then(function (response) {
|
||||
that.getList();
|
||||
if (response.data.code == CODE_SUCCESS) {
|
||||
that.$message({
|
||||
message: response.data.message,
|
||||
type: 'success'
|
||||
});
|
||||
that.dialogFormEdit = false;
|
||||
} else {
|
||||
that.$message.error(response.data.message);
|
||||
}
|
||||
})
|
||||
.catch(function (error) {
|
||||
that.$message.error('服务器内部错误');
|
||||
console.log(error);
|
||||
});
|
||||
},
|
||||
postAdd() {
|
||||
var that = this;
|
||||
axios.post('/admin/node/add', Object.assign({}, PostBase, that.formAdd))
|
||||
.then(function (response) {
|
||||
that.getList();
|
||||
if (response.data.code == CODE_SUCCESS) {
|
||||
that.$message({
|
||||
message: response.data.message,
|
||||
type: 'success'
|
||||
});
|
||||
that.dialogFormAdd = false;
|
||||
} else {
|
||||
that.$message.error(response.data.message);
|
||||
}
|
||||
})
|
||||
.catch(function (error) {
|
||||
that.$message.error('服务器内部错误');
|
||||
console.log(error);
|
||||
});
|
||||
},
|
||||
clickAdd() {
|
||||
var that = this;
|
||||
that.formAdd = {
|
||||
node_readonly: 0,
|
||||
node_pid: 0,
|
||||
node_order: 1,
|
||||
node_show: 1,
|
||||
};
|
||||
axios.post('/admin/node/getList', Object.assign({}, PostBase))
|
||||
.then(function (response) {
|
||||
that.groupList = response.data.data;
|
||||
if (response.data.code == CODE_SUCCESS) {
|
||||
that.dialogFormAdd = true;
|
||||
} else {
|
||||
that.$message.error(response.data.message);
|
||||
}
|
||||
})
|
||||
.catch(function (error) {
|
||||
that.$message.error('服务器内部错误');
|
||||
console.log(error);
|
||||
});
|
||||
},
|
||||
clickDelete(row) {
|
||||
var that = this;
|
||||
this.$confirm('即将删除这个节点, 是否确认?', '删除提醒', {
|
||||
confirmButtonText: '删除',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
axios.post('/admin/node/delete', Object.assign({}, PostBase, {
|
||||
node_id: row.node_id
|
||||
}))
|
||||
.then(function (response) {
|
||||
that.getList();
|
||||
if (response.data.code == CODE_SUCCESS) {
|
||||
that.$message({
|
||||
message: response.data.message,
|
||||
type: 'success'
|
||||
});
|
||||
} else {
|
||||
that.$message.error(response.data.message);
|
||||
}
|
||||
})
|
||||
.catch(function (error) {
|
||||
that.$message.error('服务器内部错误');
|
||||
console.log(error);
|
||||
});
|
||||
}).catch(() => {
|
||||
});
|
||||
},
|
||||
clickShow(row) {
|
||||
var that = this;
|
||||
axios.post(row.node_show ? '/admin/node/hide_menu' : '/admin/node/show_menu', Object.assign({}, PostBase, {
|
||||
node_id: row.node_id
|
||||
}))
|
||||
.then(function (response) {
|
||||
that.getList();
|
||||
if (response.data.code == CODE_SUCCESS) {
|
||||
that.$message({
|
||||
message: response.data.message,
|
||||
type: 'success'
|
||||
});
|
||||
} else {
|
||||
that.$message.error(response.data.message);
|
||||
}
|
||||
})
|
||||
.catch(function (error) {
|
||||
that.$message.error('服务器内部错误');
|
||||
console.log(error);
|
||||
});
|
||||
},
|
||||
clickEdit(row) {
|
||||
var that = this;
|
||||
that.formEdit = row;
|
||||
axios.post('/admin/node/getList', Object.assign({}, PostBase))
|
||||
.then(function (response) {
|
||||
if (response.data.code == CODE_SUCCESS) {
|
||||
that.groupList = response.data.data;
|
||||
axios.post('/admin/node/detail', Object.assign({}, PostBase, {
|
||||
node_id: row.node_id
|
||||
}))
|
||||
.then(function (response) {
|
||||
if (response.data.code == CODE_SUCCESS) {
|
||||
response.data.data.node_pid = response.data.data.node_pid==0?'0':response.data.data.node_pid
|
||||
that.formEdit = response.data.data;
|
||||
that.dialogFormEdit = true;
|
||||
} else {
|
||||
that.$message.error(response.data.message);
|
||||
}
|
||||
})
|
||||
.catch(function (error) {
|
||||
that.$message.error('服务器内部错误');
|
||||
console.log(error);
|
||||
});
|
||||
} else {
|
||||
that.$message.error(response.data.message);
|
||||
}
|
||||
})
|
||||
.catch(function (error) {
|
||||
that.$message.error('服务器内部错误');
|
||||
console.log(error);
|
||||
});
|
||||
|
||||
},
|
||||
changeCurrentPage(page) {
|
||||
this.form.page = page;
|
||||
this.getList();
|
||||
},
|
||||
getList() {
|
||||
var that = this;
|
||||
that.loading = true;
|
||||
axios.post('/admin/node/getList', Object.assign({}, PostBase, that.form, that.search))
|
||||
.then(function (res) {
|
||||
that.loading = false;
|
||||
if (res.data.code == 200) {
|
||||
that.dataList = JSON.parse(JSON.stringify(res.data.data.data));
|
||||
that.parentList = [];
|
||||
that.parentList.push({
|
||||
node_id: "0",
|
||||
node_title: "顶级菜单",
|
||||
sub: [],
|
||||
});
|
||||
for (var i in res.data.data.data) {
|
||||
res.data.data.data[i].node_id = res.data.data.data[i].node_id
|
||||
that.parentList.push(res.data.data.data[i]);
|
||||
}
|
||||
for (let item of that.parentList) {
|
||||
if(item.sub.length>0){
|
||||
for (let items of item.sub) {
|
||||
items.sub = undefined
|
||||
}
|
||||
}else{
|
||||
item.sub = undefined
|
||||
}
|
||||
}
|
||||
} else {
|
||||
that.$message.error(res.data.message);
|
||||
}
|
||||
})
|
||||
.catch(function (error) {
|
||||
that.loading = false;
|
||||
that.$message.error('服务器内部错误');
|
||||
console.log(error);
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user