初始化代码
102
uniapp/uni-admin/src/App.vue
Normal file
@@ -0,0 +1,102 @@
|
||||
<!--
|
||||
* @Description: App
|
||||
* @Author: xiao li
|
||||
* @Date: 2021-07-03 11:41:05
|
||||
* @LastEditTime: 2022-08-24 11:05:34
|
||||
* @LastEditors: xiao li
|
||||
-->
|
||||
|
||||
<template>
|
||||
<div id="app">
|
||||
<router-view />
|
||||
<prompt></prompt>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import axios from 'axios'
|
||||
import { mapState, mapMutations } from 'vuex'
|
||||
import prompt from './components/prompt.vue'
|
||||
export default {
|
||||
name: 'App',
|
||||
components: {
|
||||
prompt
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
status: '',
|
||||
isFirst: false,
|
||||
name: 'App',
|
||||
timer: null,
|
||||
previous: null,
|
||||
token: ''
|
||||
}
|
||||
},
|
||||
// 监听器
|
||||
watch: {
|
||||
async $route (to, from) {
|
||||
}
|
||||
},
|
||||
created () {
|
||||
},
|
||||
mounted () {
|
||||
let that = this
|
||||
window.onresize = () => {
|
||||
that.fnThrottle(() => {
|
||||
let clientWidth = document.documentElement.clientWidth
|
||||
if (clientWidth < 1200) {
|
||||
that.$store.commit('handleAdSwitch', false)
|
||||
}
|
||||
}, 300)()
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
routesItem: state => state.routes
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
...mapMutations([]),
|
||||
fnThrottle (fn, delay, atleast) {
|
||||
let that = this
|
||||
return function () {
|
||||
let now = +new Date()
|
||||
if (!that.previous) that.previous = now
|
||||
if (atleast && now - that.previous > atleast) {
|
||||
fn()
|
||||
that.previous = now
|
||||
clearTimeout(that.timer)
|
||||
} else {
|
||||
clearTimeout(that.timer)
|
||||
that.timer = setTimeout(function () {
|
||||
fn()
|
||||
that.previous = null
|
||||
}, delay)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang='scss'>
|
||||
@import url('./style/reset.css');
|
||||
@import url('./style/icon.css');
|
||||
@import url('./style/base.css');
|
||||
@import url('./style/diy.css');
|
||||
@import url('./style/common.css');
|
||||
|
||||
.el-select__tags {
|
||||
.el-tag--info:nth-child(1) {
|
||||
max-width: 70%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.el-select__tags-text {
|
||||
max-width: 90%;
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
3
uniapp/uni-admin/src/Bus.js
Normal file
@@ -0,0 +1,3 @@
|
||||
import Vue from 'vue'
|
||||
const Bus = new Vue()
|
||||
export default Bus
|
||||
206
uniapp/uni-admin/src/api/index.js
Normal file
@@ -0,0 +1,206 @@
|
||||
import Vue from '@/main.js'
|
||||
import axios from 'axios'
|
||||
// import qs from 'qs'
|
||||
import router from '../router'
|
||||
// api 模块化
|
||||
import apis from './modules'
|
||||
let developmentURL = `https://https://stms.lyraiov.com`
|
||||
axios.defaults.timeout = 300000
|
||||
axios.defaults.baseURL = process.env.NODE_ENV === 'development' ? developmentURL : getProCurrentHref()
|
||||
// axios.defaults.baseURL = process.env.NODE_ENV === 'development' ? '/userApi/' : getProCurrentHref()
|
||||
axios.interceptors.request.use(config => {
|
||||
if (sessionStorage.getItem('minitk')) {
|
||||
config.headers['token'] = sessionStorage.getItem('minitk')
|
||||
// 'Content-Type': 'application/x-www-form-urlencoded' // application/json
|
||||
}
|
||||
return config
|
||||
}, error => {
|
||||
return Promise.reject(error)
|
||||
})
|
||||
axios.interceptors.response.use(res => {
|
||||
// console.log(res, '====interceptors')
|
||||
if (res.data.code === 401) { // token验证不合法或者没有
|
||||
Vue.$message.error(res.data.error)
|
||||
sessionStorage.removeItem('minitk') // 删除token
|
||||
sessionStorage.removeItem('ms_username') // 删除用户名
|
||||
router.push('/login')
|
||||
} else if (res.data.code === 402) {
|
||||
Vue.$message.error(res.data.error)
|
||||
} else if (res.data.code === 400) {
|
||||
Vue.$message.error(res.data.error)
|
||||
}
|
||||
return res
|
||||
}, err => {
|
||||
Vue.$message.error(err.message + ',请稍后再试')
|
||||
return Promise.reject(err.response)
|
||||
})
|
||||
|
||||
/**
|
||||
* 封装get方法
|
||||
* @param url
|
||||
* @param data
|
||||
* @returns {Promise}
|
||||
*/
|
||||
|
||||
export function get (url, params = {}, type = 'application/json') {
|
||||
// let headers = url.includes('qq/ws/geocoder/v1') ? {
|
||||
// 'Content-Type': 'application/json; charset=utf-8',
|
||||
// 'Access-Control-Allow-Origin': '*'
|
||||
// } : {
|
||||
// 'Content-Type': type
|
||||
// }
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
axios.get(url, {
|
||||
params,
|
||||
headers: {
|
||||
'Content-Type': type
|
||||
}
|
||||
})
|
||||
.then(response => {
|
||||
resolve(response.data)
|
||||
})
|
||||
.catch(err => {
|
||||
reject(err)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 封装post请求
|
||||
* @param url
|
||||
* @param data
|
||||
* @returns {Promise}
|
||||
*/
|
||||
|
||||
export function post (url, data = {}, type = 'application/json') {
|
||||
return new Promise((resolve, reject) => {
|
||||
axios.post(url, data, {
|
||||
headers: {
|
||||
'Content-Type': type
|
||||
}
|
||||
}).then(response => {
|
||||
resolve(response.data)
|
||||
}, err => {
|
||||
console.log(err)
|
||||
reject(err)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 封装patch请求
|
||||
* @param url
|
||||
* @param data
|
||||
* @returns {Promise}
|
||||
*/
|
||||
|
||||
export function patch (url, data = {}, type = 'application/json') {
|
||||
return new Promise((resolve, reject) => {
|
||||
axios.patch(url, data)
|
||||
.then(response => {
|
||||
resolve(response.data)
|
||||
}, err => {
|
||||
reject(err)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 封装put请求
|
||||
* @param url
|
||||
* @param data
|
||||
* @returns {Promise}
|
||||
*/
|
||||
|
||||
export function put (url, data = {}, type = 'application/json') {
|
||||
return new Promise((resolve, reject) => {
|
||||
axios.put(url, data)
|
||||
.then(response => {
|
||||
resolve(response.data)
|
||||
}, err => {
|
||||
reject(err)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 封装del请求
|
||||
* @param url
|
||||
* @param data
|
||||
* @returns {Promise}
|
||||
*/
|
||||
|
||||
export function del (url, params = {}, type = 'application/json') {
|
||||
return new Promise((resolve, reject) => {
|
||||
console.log(params)
|
||||
axios.delete(url, {
|
||||
params: params,
|
||||
headers: {
|
||||
'Content-Type': type
|
||||
}
|
||||
})
|
||||
.then(response => {
|
||||
resolve(response.data)
|
||||
})
|
||||
.catch(err => {
|
||||
reject(err)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 封装post上传图片、视频、音频、文件的接口
|
||||
* @param url
|
||||
* @param data
|
||||
* @returns {Promise}
|
||||
*/
|
||||
|
||||
export function postUpload (url, data = {}, progressCallback) {
|
||||
return new Promise((resolve, reject) => {
|
||||
axios.post(url, data, {
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
onUploadProgress: progressCallback
|
||||
}) // qs.stringify(data)
|
||||
.then(response => {
|
||||
resolve(response.data)
|
||||
}, err => {
|
||||
console.log(err)
|
||||
reject(err)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* @method 获取七牛token
|
||||
* @param url
|
||||
* @param data
|
||||
* @returns {Promise}
|
||||
*/
|
||||
export function getQiniuToken (url, data = {}) {
|
||||
return new Promise((resolve, reject) => {
|
||||
axios.get(url, data)
|
||||
.then(response => {
|
||||
resolve(response.data)
|
||||
}, err => {
|
||||
reject(err)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取数据的接口
|
||||
*/
|
||||
export const api = {
|
||||
...apis
|
||||
}
|
||||
|
||||
function getProCurrentHref () {
|
||||
let _href = window.location.href
|
||||
let index = _href.indexOf('#')
|
||||
let newHref = _href.slice(0, index)
|
||||
newHref = window.lbConfig.isWe7 ? newHref + '&s=' : window.location.origin
|
||||
return newHref
|
||||
}
|
||||
52
uniapp/uni-admin/src/api/modules/account.js
Normal file
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* @Descripttion: 权限管理
|
||||
* @Author: xiao li
|
||||
* @Date: 2020-07-06 12:17:06
|
||||
* @LastEditors: xiao li
|
||||
* @LastEditTime: 2022-06-30 11:24:21
|
||||
*/
|
||||
import {
|
||||
get, post
|
||||
} from '../index'
|
||||
export default {
|
||||
// 角色列表
|
||||
roleList (querys) {
|
||||
return get('/farm/admin/AdminUser/roleList', querys)
|
||||
},
|
||||
// 角色下拉
|
||||
roleSelect (querys) {
|
||||
return get('/farm/admin/AdminUser/roleSelect', querys)
|
||||
},
|
||||
// 角色详情
|
||||
roleInfo (querys) {
|
||||
return get('/farm/admin/AdminUser/roleInfo', querys)
|
||||
},
|
||||
// 新增角色
|
||||
roleAdd (querys) {
|
||||
return post('/farm/admin/AdminUser/roleAdd', querys)
|
||||
},
|
||||
// 编辑角色
|
||||
roleUpdate (querys) {
|
||||
return post('/farm/admin/AdminUser/roleUpdate', querys)
|
||||
},
|
||||
// 账号列表
|
||||
adminList (querys) {
|
||||
return get('/farm/admin/AdminUser/adminList', querys)
|
||||
},
|
||||
// 账号详情
|
||||
adminInfo (querys) {
|
||||
return get('/farm/admin/AdminUser/adminInfo', querys)
|
||||
},
|
||||
// 新增账号
|
||||
adminAdd (querys) {
|
||||
return post('/farm/admin/AdminUser/adminAdd', querys)
|
||||
},
|
||||
// 编辑账号
|
||||
adminUpdate (querys) {
|
||||
return post('/farm/admin/AdminUser/adminUpdate', querys)
|
||||
},
|
||||
// 账号所匹配的角色的节点详情
|
||||
adminNodeInfo (querys) {
|
||||
return get('/farm/admin/AdminUser/adminNodeInfo', querys)
|
||||
}
|
||||
}
|
||||
83
uniapp/uni-admin/src/api/modules/base.js
Normal file
@@ -0,0 +1,83 @@
|
||||
/*
|
||||
* @Descripttion:
|
||||
* @Author: xiao li
|
||||
* @Date: 2020-07-06 12:17:06
|
||||
* @LastEditors: xiao li
|
||||
* @LastEditTime: 2022-07-19 20:17:04
|
||||
*/
|
||||
import {
|
||||
get,
|
||||
post
|
||||
} from '../index'
|
||||
export default {
|
||||
// 登录
|
||||
login (querys) {
|
||||
return post('/farm/admin/admin/login', querys)
|
||||
},
|
||||
// 清除缓存
|
||||
clearCache () {
|
||||
return get('/admin/admin/config/clear')
|
||||
},
|
||||
// 修改自己的密码
|
||||
updatePasswd (querys) {
|
||||
return post('/farm/admin/AdminSetting/updatePass', querys)
|
||||
},
|
||||
// 基本信息
|
||||
returnAdmin () {
|
||||
return get('/card/Admin/returnAdmin')
|
||||
},
|
||||
// 获取可选商品列表
|
||||
goodsSelect (querys) {
|
||||
return post('/publics/someThing/goodsSelect', querys)
|
||||
},
|
||||
// 获取商品规格列表
|
||||
goodsSpeList (querys) {
|
||||
return post('/publics/someThing/goodsSpeList', querys)
|
||||
},
|
||||
// 图片中转,用于canvas画图下载
|
||||
handleImgSrc (querys) {
|
||||
return new Promise(resolve => {
|
||||
let { url, flag } = getProCurrentHref()
|
||||
let $url = flag ? `${url}/card/getImage?path=${querys}` : `${url}/card/getImage&path=${querys}`
|
||||
return resolve($url)
|
||||
})
|
||||
},
|
||||
// 获取定地
|
||||
getLocation (querys) {
|
||||
let { lat, lng } = querys
|
||||
let location = `${lat},${lng}`
|
||||
location = '39.9843041172624,116.30564949558106'
|
||||
querys = {
|
||||
location,
|
||||
key: '4IJBZ-DLACP-3QBDS-LI4FT-U2MZZ-5KFFA',
|
||||
get_poi: 1
|
||||
}
|
||||
// return get(`/api/ws/geocoder/v1/`, querys)
|
||||
// var ajax = new XMLHttpRequest();
|
||||
// // get url 是不需要改变
|
||||
// ajax.open("get", url);
|
||||
// // 需要设置请求报文
|
||||
// // ajax.setRequestHeader('Content-Type', 'application/json; charset=utf-8');
|
||||
// ajax.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded;charset=UTF-8');
|
||||
// ajax.setRequestHeader('Access-Control-Allow-Origin', '*');
|
||||
|
||||
// ajax.send();
|
||||
// // 注册事件
|
||||
// ajax.onreadystatechange = function () {
|
||||
// // 在事件中 获取数据 并修改界面显示
|
||||
// if (ajax.readyState == 4 && ajax.status == 200) {
|
||||
// console.log(JSON.parse(ajax.responseText),"======JSON.parse(ajax.responseText)")
|
||||
// // 将 数据 让 外面可以使用
|
||||
// callback && callback(JSON.parse(ajax.responseText));
|
||||
// }
|
||||
// };
|
||||
}
|
||||
}
|
||||
function getProCurrentHref () {
|
||||
let _href = window.location.href
|
||||
let index = _href.indexOf('#')
|
||||
let newHref = _href.slice(0, index)
|
||||
let flag = !window.lbConfig.isWe7
|
||||
newHref = window.lbConfig.isWe7 ? newHref + '&s=' : window.location.origin
|
||||
return {url: newHref, flag}
|
||||
}
|
||||
121
uniapp/uni-admin/src/api/modules/claim.js
Normal file
@@ -0,0 +1,121 @@
|
||||
/*
|
||||
* @Descripttion: 认养管理
|
||||
* @Author: xiao li
|
||||
* @Date: 2020-07-06 12:17:06
|
||||
* @LastEditors: xiao li
|
||||
* @LastEditTime: 2022-07-13 12:58:39
|
||||
*/
|
||||
import {
|
||||
get,
|
||||
post
|
||||
} from '../index'
|
||||
export default {
|
||||
// 分类列表
|
||||
claimCateList (querys) {
|
||||
return get('/farm/admin/AdminClaim/claimCateList', querys)
|
||||
},
|
||||
// 土地/认养分类下拉 type 1土地;2认养
|
||||
landAndClaimCate (querys) {
|
||||
return get('farm/admin/AdminClaim/landAndClaimCate', querys)
|
||||
},
|
||||
// 分类详情
|
||||
claimCateInfo (querys) {
|
||||
return get('/farm/admin/AdminClaim/claimCateInfo', querys)
|
||||
},
|
||||
// 新增分类
|
||||
claimCateAdd (querys) {
|
||||
return post('/farm/admin/AdminClaim/claimCateAdd', querys)
|
||||
},
|
||||
// 编辑分类
|
||||
claimCateUpdate (querys) {
|
||||
return post('/farm/admin/AdminClaim/claimCateUpdate', querys)
|
||||
},
|
||||
// 认养列表
|
||||
claimList (querys) {
|
||||
return get('farm/admin/AdminClaim/claimList', querys)
|
||||
},
|
||||
// 认养详情
|
||||
claimInfo (querys) {
|
||||
return get('farm/admin/AdminClaim/claimInfo', querys)
|
||||
},
|
||||
// 新增认养
|
||||
claimAdd (querys) {
|
||||
return post('farm/admin/AdminClaim/claimAdd', querys)
|
||||
},
|
||||
// 编辑认养
|
||||
claimUpdate (querys) {
|
||||
return post('farm/admin/AdminClaim/claimUpdate', querys)
|
||||
},
|
||||
// 上下架/删除认养
|
||||
claimStatusUpdate (querys) {
|
||||
return post('farm/admin/AdminClaim/claimStatusUpdate', querys)
|
||||
},
|
||||
// 养殖列表
|
||||
breedList (querys) {
|
||||
return get('/farm/admin/AdminBreed/breedList', querys)
|
||||
},
|
||||
// 养殖详情
|
||||
breedInfo (querys) {
|
||||
return get('/farm/admin/AdminBreed/breedInfo', querys)
|
||||
},
|
||||
// 新增养殖
|
||||
breedAdd (querys) {
|
||||
return post('/farm/admin/AdminBreed/breedAdd', querys)
|
||||
},
|
||||
// 编辑养殖
|
||||
breedUpdate (querys) {
|
||||
return post('/farm/admin/AdminBreed/breedUpdate', querys)
|
||||
},
|
||||
// 拼团列表
|
||||
collageList (querys) {
|
||||
return get('/farm/admin/AdminClaim/collageList', querys)
|
||||
},
|
||||
// 拼团详情
|
||||
collageInfo (querys) {
|
||||
return get('/farm/admin/AdminClaim/collageInfo', querys)
|
||||
},
|
||||
// 新增拼团
|
||||
collageAdd (querys) {
|
||||
return post('/farm/admin/AdminClaim/collageAdd', querys)
|
||||
},
|
||||
// 编辑拼团
|
||||
collageUpdate (querys) {
|
||||
return post('/farm/admin/AdminClaim/collageUpdate', querys)
|
||||
},
|
||||
// 订单管理
|
||||
orderList (querys) {
|
||||
return get('/farm/admin/AdminClaim/orderList', querys)
|
||||
},
|
||||
// 订单详情
|
||||
orderInfo (querys) {
|
||||
return get('/farm/admin/AdminClaim/orderInfo', querys)
|
||||
},
|
||||
// 订单关联配送订单
|
||||
userSendOrderList (querys) {
|
||||
return get('/farm/admin/AdminClaim/userSendOrderList', querys)
|
||||
},
|
||||
// 配送订单列表
|
||||
sendOrderList (querys) {
|
||||
return get('/farm/admin/AdminClaim/sendOrderList', querys)
|
||||
},
|
||||
// 配送订单详情
|
||||
sendOrderInfo (querys) {
|
||||
return get('/farm/admin/AdminClaim/sendOrderInfo', querys)
|
||||
},
|
||||
// 配送订单收货
|
||||
sendOrderReceiving (querys) {
|
||||
return post('/farm/admin/AdminClaim/sendOrderReceiving', querys)
|
||||
},
|
||||
// 配送订单发货
|
||||
sendOrderSend (querys) {
|
||||
return post('/farm/admin/AdminClaim/sendOrderSend', querys)
|
||||
},
|
||||
// 评价管理
|
||||
evaluateList (querys) {
|
||||
return get('/farm/admin/AdminUser/evaluateList', querys)
|
||||
},
|
||||
// 编辑评价
|
||||
evaluateUpdate (querys) {
|
||||
return post('/farm/admin/AdminUser/evaluateUpdate', querys)
|
||||
}
|
||||
}
|
||||
45
uniapp/uni-admin/src/api/modules/custom.js
Normal file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* @Description: 会员管理
|
||||
* @Author: xiao li
|
||||
* @Date: 2022-06-30 10:06:40
|
||||
* @LastEditTime: 2022-07-20 17:09:46
|
||||
* @LastEditors: xiao li
|
||||
*/
|
||||
|
||||
import {
|
||||
get, post
|
||||
} from '../index'
|
||||
export default {
|
||||
// 会员列表
|
||||
userList (querys) {
|
||||
return get('/farm/admin/AdminUser/userList', querys)
|
||||
},
|
||||
// 编辑会员
|
||||
userUpdate (querys) {
|
||||
return post('/farm/admin/AdminUser/userUpdate', querys)
|
||||
},
|
||||
// 编辑会员积分
|
||||
userIntegralUpdate (querys) {
|
||||
return post('/farm/admin/AdminUser/userIntegralUpdate', querys)
|
||||
},
|
||||
// 会员等级列表
|
||||
memberList (querys) {
|
||||
return get('/shop/admin/AdminMember/memberList', querys)
|
||||
},
|
||||
// 会员等级下拉
|
||||
memberSelect (querys) {
|
||||
return get('/shop/admin/AdminMember/memberSelect', querys)
|
||||
},
|
||||
// 会员等级详情
|
||||
memberInfo (querys) {
|
||||
return get('/shop/admin/AdminMember/memberInfo', querys)
|
||||
},
|
||||
// 新增会员等级
|
||||
memberAdd (querys) {
|
||||
return post('/shop/admin/AdminMember/memberAdd', querys)
|
||||
},
|
||||
// 编辑会员等级
|
||||
memberUpdate (querys) {
|
||||
return post('/shop/admin/AdminMember/memberUpdate', querys)
|
||||
}
|
||||
}
|
||||
42
uniapp/uni-admin/src/api/modules/distribution.js
Normal file
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* @Description: 营销管理
|
||||
* @Author: xiao li
|
||||
* @Date: 2021-07-06 18:32:16
|
||||
* @LastEditTime: 2022-07-29 15:38:48
|
||||
* @LastEditors: xiao li
|
||||
*/
|
||||
|
||||
import {
|
||||
get,
|
||||
post
|
||||
} from '../index'
|
||||
export default {
|
||||
// 审核列表
|
||||
resellerList (querys) {
|
||||
return get('/farm/admin/AdminReseller/resellerList', querys)
|
||||
},
|
||||
// 分销商详情
|
||||
resellerInfo (querys) {
|
||||
return get('/farm/admin/AdminReseller/resellerInfo', querys)
|
||||
},
|
||||
// 审核分销商
|
||||
resellerUpdate (querys) {
|
||||
return post('/farm/admin/AdminReseller/resellerUpdate', querys)
|
||||
},
|
||||
// 分销关系列表
|
||||
userRelationshipList (querys) {
|
||||
return get('/farm/admin/AdminReseller/userRelationshipList', querys)
|
||||
},
|
||||
// 分销关系查找
|
||||
userRelationshipListFind (querys) {
|
||||
return get('/farm/admin/AdminReseller/userRelationshipListFind', querys)
|
||||
},
|
||||
// 收益信息
|
||||
userProfitList (querys) {
|
||||
return get('/farm/admin/AdminReseller/userProfitList', querys)
|
||||
},
|
||||
// 佣金信息
|
||||
cashList (querys) {
|
||||
return get('/farm/admin/AdminReseller/cashList', querys)
|
||||
}
|
||||
}
|
||||
46
uniapp/uni-admin/src/api/modules/farmer.js
Normal file
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* @Description: 农场主审核
|
||||
* @Author: xiao li
|
||||
* @Date: 2021-07-06 18:30:52
|
||||
* @LastEditTime: 2022-07-19 14:56:49
|
||||
* @LastEditors: xiao li
|
||||
*/
|
||||
|
||||
import {
|
||||
get,
|
||||
post
|
||||
} from '../index'
|
||||
export default {
|
||||
// 平台统计详情
|
||||
statisticsCash (querys) {
|
||||
return get('/farm/admin/AdminFarmer/statisticsCash', querys)
|
||||
},
|
||||
// 用户统计详情
|
||||
statisticsUser (querys) {
|
||||
return get('/farm/admin/AdminFarmer/statisticsUser', querys)
|
||||
},
|
||||
// 农场主列表
|
||||
farmerList (querys) {
|
||||
return get('/farm/admin/AdminFarmer/farmerList', querys)
|
||||
},
|
||||
// 农场主下拉
|
||||
farmerSelectList (querys) {
|
||||
return get('/farm/admin/AdminFarmer/farmerSelectList', querys)
|
||||
},
|
||||
// 店主下拉
|
||||
storeSelect (querys) {
|
||||
return get('/farm/admin/AdminFarmer/storeSelect', querys)
|
||||
},
|
||||
// 农场主详情
|
||||
farmerInfo (querys) {
|
||||
return get('/farm/admin/AdminFarmer/farmerInfo', querys)
|
||||
},
|
||||
// 新增农场主/店主
|
||||
farmerAdd (querys) {
|
||||
return post('/farm/admin/AdminFarmer/farmerAdd', querys)
|
||||
},
|
||||
// 农场主审核(status2通过,3拒绝,sh_text)
|
||||
farmerUpdate (querys) {
|
||||
return post('/farm/admin/AdminFarmer/farmerUpdate', querys)
|
||||
}
|
||||
}
|
||||
34
uniapp/uni-admin/src/api/modules/finance.js
Normal file
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
* @Description: 财务管理
|
||||
* @Author: xiao li
|
||||
* @Date: 2021-11-12 16:30:33
|
||||
* @LastEditTime: 2022-02-17 16:48:31
|
||||
* @LastEditors: xiao li
|
||||
*/
|
||||
|
||||
import {
|
||||
get,
|
||||
post
|
||||
} from '../index'
|
||||
export default {
|
||||
// 财务管理
|
||||
fincanceWaterList (querys) {
|
||||
return get('/farm/admin/AdminFarmer/fincanceWaterList', querys)
|
||||
},
|
||||
// 财务管理详情
|
||||
fincanceWaterInfo (querys) {
|
||||
return get('/farm/admin/AdminFarmer/fincanceWaterInfo', querys)
|
||||
},
|
||||
// 提现申请
|
||||
walletList (querys) {
|
||||
return get('/farm/admin/AdminFarmer/walletList', querys)
|
||||
},
|
||||
// 同意打款(id,status=2,online 1:线上,0线下)
|
||||
walletPass (querys) {
|
||||
return post('/farm/admin/AdminFarmer/walletPass', querys)
|
||||
},
|
||||
// 拒绝打款(id,status=3)
|
||||
walletNoPass (querys) {
|
||||
return post('/farm/admin/AdminFarmer/walletNoPass', querys)
|
||||
}
|
||||
}
|
||||
53
uniapp/uni-admin/src/api/modules/hardware.js
Normal file
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
* @Description: 硬件设备
|
||||
* @Author: xiao li
|
||||
* @Date: 2022-04-11 14:32:24
|
||||
* @LastEditTime: 2022-07-04 18:53:59
|
||||
* @LastEditors: xiao li
|
||||
*/
|
||||
import {
|
||||
get,
|
||||
post
|
||||
} from '../index'
|
||||
export default {
|
||||
// 仪器列表
|
||||
machineList (querys) {
|
||||
return get('/farm/admin/AdminFarmer/machineList', querys)
|
||||
},
|
||||
// 仪器下拉
|
||||
machineSelect (querys) {
|
||||
return get('farm/admin/AdminFarmer/machineSelect', querys)
|
||||
},
|
||||
// 仪器信息
|
||||
machineInfo (querys) {
|
||||
return get('/farm/admin/AdminFarmer/machineInfo', querys)
|
||||
},
|
||||
// 新增仪器
|
||||
machineAdd (querys) {
|
||||
return post('/farm/admin/AdminFarmer/machineAdd', querys)
|
||||
},
|
||||
// 编辑仪器
|
||||
machineUpdate (querys) {
|
||||
return post('/farm/admin/AdminFarmer/machineUpdate', querys)
|
||||
},
|
||||
// 监控列表
|
||||
monitorList (querys) {
|
||||
return get('/farm/admin/AdminFarmer/monitorList', querys)
|
||||
},
|
||||
// 监控下拉
|
||||
monitorSelect (querys) {
|
||||
return get('farm/admin/AdminFarmer/monitorSelect', querys)
|
||||
},
|
||||
// 监控信息
|
||||
monitorInfo (querys) {
|
||||
return get('/farm/admin/AdminFarmer/monitorInfo', querys)
|
||||
},
|
||||
// 新增监控
|
||||
monitorAdd (querys) {
|
||||
return post('/farm/admin/AdminFarmer/monitorAdd', querys)
|
||||
},
|
||||
// 编辑监控
|
||||
monitorUpdate (querys) {
|
||||
return post('/farm/admin/AdminFarmer/monitorUpdate', querys)
|
||||
}
|
||||
}
|
||||
28
uniapp/uni-admin/src/api/modules/index.js
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* @Descripttion: api
|
||||
* @Author: xiao li
|
||||
* @Date: 2020-07-06 12:17:06
|
||||
* @LastEditors: xiao li
|
||||
* @LastEditTime: 2022-07-29 11:03:28
|
||||
*/
|
||||
import base from './base'
|
||||
import upload from './upload'
|
||||
import farmer from './farmer'
|
||||
import land from './land'
|
||||
import claim from './claim'
|
||||
import shop from './shop'
|
||||
import finance from './finance'
|
||||
import distribution from './distribution'
|
||||
import market from './market'
|
||||
import stored from './stored'
|
||||
import media from './media'
|
||||
import hardware from './hardware'
|
||||
import custom from './custom'
|
||||
import account from './account'
|
||||
import system from './system'
|
||||
let modules = {
|
||||
base, upload, farmer, land, claim, shop, finance, distribution, market, stored, media, hardware, account, custom, system
|
||||
}
|
||||
export default {
|
||||
...modules
|
||||
}
|
||||
88
uniapp/uni-admin/src/api/modules/land.js
Normal file
@@ -0,0 +1,88 @@
|
||||
/*
|
||||
* @Descripttion: 土地管理
|
||||
* @Author: xiao li
|
||||
* @Date: 2020-07-06 12:17:06
|
||||
* @LastEditors: xiao li
|
||||
* @LastEditTime: 2022-07-12 17:19:43
|
||||
*/
|
||||
import {
|
||||
get, post
|
||||
} from '../index'
|
||||
export default {
|
||||
// 土地列表
|
||||
landList (querys) {
|
||||
return get('farm/admin/AdminLand/landList', querys)
|
||||
},
|
||||
// 土地详情
|
||||
landInfo (querys) {
|
||||
return get('farm/admin/AdminLand/landInfo', querys)
|
||||
},
|
||||
// 新增土地
|
||||
landAdd (querys) {
|
||||
return post('farm/admin/AdminLand/landAdd', querys)
|
||||
},
|
||||
// 编辑土地
|
||||
landUpdate (querys) {
|
||||
return post('farm/admin/AdminLand/landUpdate', querys)
|
||||
},
|
||||
// 上下架/删除土地
|
||||
landStatusUpdate (querys) {
|
||||
return post('farm/admin/AdminLand/landStatusUpdate', querys)
|
||||
},
|
||||
// 地块列表
|
||||
massifList (querys) {
|
||||
return get('farm/admin/AdminMassif/massifList', querys)
|
||||
},
|
||||
// 地块下拉
|
||||
massifSelect (querys) {
|
||||
return get('farm/admin/AdminMassif/massifSelect', querys)
|
||||
},
|
||||
// 地块详情
|
||||
massifInfo (querys) {
|
||||
return get('farm/admin/AdminMassif/massifInfo', querys)
|
||||
},
|
||||
// 新增地块
|
||||
massifAdd (querys) {
|
||||
return post('farm/admin/AdminMassif/massifAdd', querys)
|
||||
},
|
||||
// 编辑地块
|
||||
massifUpdate (querys) {
|
||||
return post('farm/admin/AdminMassif/massifUpdate', querys)
|
||||
},
|
||||
// 种子列表
|
||||
seedList (querys) {
|
||||
return get('farm/admin/AdminSeed/seedList', querys)
|
||||
},
|
||||
// 种子下拉
|
||||
seedSelect (querys) {
|
||||
return get('farm/admin/AdminSeed/seedSelect', querys)
|
||||
},
|
||||
// 种子详情
|
||||
seedInfo (querys) {
|
||||
return get('farm/admin/AdminSeed/seedInfo', querys)
|
||||
},
|
||||
// 新增种子
|
||||
seedAdd (querys) {
|
||||
return post('farm/admin/AdminSeed/seedAdd', querys)
|
||||
},
|
||||
// 编辑种子
|
||||
seedUpdate (querys) {
|
||||
return post('farm/admin/AdminSeed/seedUpdate', querys)
|
||||
},
|
||||
// 上下架/删除种子
|
||||
seedStatusUpdate (querys) {
|
||||
return post('farm/admin/AdminSeed/seedStatusUpdate', querys)
|
||||
},
|
||||
// 订单管理
|
||||
orderList (querys) {
|
||||
return get('/farm/admin/AdminLand/orderList', querys)
|
||||
},
|
||||
// 订单详情
|
||||
orderInfo (querys) {
|
||||
return get('/farm/admin/AdminLand/orderInfo', querys)
|
||||
},
|
||||
// 配送订单
|
||||
userSendOrderList (querys) {
|
||||
return get('/farm/admin/AdminLand/userSendOrderList', querys)
|
||||
}
|
||||
}
|
||||
122
uniapp/uni-admin/src/api/modules/market.js
Normal file
@@ -0,0 +1,122 @@
|
||||
/*
|
||||
* @Description: 营销管理
|
||||
* @Author: xiao li
|
||||
* @Date: 2021-07-06 18:32:16
|
||||
* @LastEditTime: 2022-07-25 17:01:07
|
||||
* @LastEditors: xiao li
|
||||
*/
|
||||
|
||||
import {
|
||||
get,
|
||||
post
|
||||
} from '../index'
|
||||
export default {
|
||||
// 优惠券列表
|
||||
couponList (querys) {
|
||||
return get('/farm/admin/AdminCoupon/couponList', querys)
|
||||
},
|
||||
// 优惠券下拉列表
|
||||
couponSelect (querys) {
|
||||
return get('/farm/admin/AdminCoupon/couponSelect', querys)
|
||||
},
|
||||
// 优惠券详情
|
||||
couponInfo (querys) {
|
||||
return get('/farm/admin/AdminCoupon/couponInfo', querys)
|
||||
},
|
||||
// 新增优惠券
|
||||
couponAdd (querys) {
|
||||
return post('/farm/admin/AdminCoupon/couponAdd', querys)
|
||||
},
|
||||
// 编辑优惠券
|
||||
couponUpdate (querys) {
|
||||
return post('/farm/admin/AdminCoupon/couponUpdate', querys)
|
||||
},
|
||||
// 上下架/删除
|
||||
couponStatusUpdate (querys) {
|
||||
return post('/farm/admin/AdminCoupon/couponStatusUpdate', querys)
|
||||
},
|
||||
// 派发卡券
|
||||
couponRecordAdd (querys) {
|
||||
return post('/farm/admin/AdminCoupon/couponRecordAdd', querys)
|
||||
},
|
||||
// 活动详情
|
||||
couponAtvInfo (querys) {
|
||||
return get('/farm/admin/AdminCoupon/couponAtvInfo', querys)
|
||||
},
|
||||
// 编辑活动
|
||||
couponAtvUpdate (querys) {
|
||||
return post('/farm/admin/AdminCoupon/couponAtvUpdate', querys)
|
||||
},
|
||||
// 积分列表
|
||||
integralList (querys) {
|
||||
return get('/shop/admin/AdminMark/integralList', querys)
|
||||
},
|
||||
// 积分详情
|
||||
integralInfo (querys) {
|
||||
return get('/shop/admin/AdminMark/integralInfo', querys)
|
||||
},
|
||||
// 新增积分
|
||||
integralAdd (querys) {
|
||||
return post('/shop/admin/AdminMark/integralAdd', querys)
|
||||
},
|
||||
// 编辑积分
|
||||
integralUpdate (querys) {
|
||||
return post('/shop/admin/AdminMark/integralUpdate', querys)
|
||||
},
|
||||
// 签到详情
|
||||
signInfo (querys) {
|
||||
return get('/shop/admin/AdminMark/signInfo', querys)
|
||||
},
|
||||
// 编辑签到
|
||||
signUpdate (querys) {
|
||||
return post('/shop/admin/AdminMark/signUpdate', querys)
|
||||
},
|
||||
// 抽奖列表
|
||||
luckList (querys) {
|
||||
return get('/shop/admin/AdminMark/luckList', querys)
|
||||
},
|
||||
// 抽奖详情
|
||||
luckInfo (querys) {
|
||||
return get('/shop/admin/AdminMark/luckInfo', querys)
|
||||
},
|
||||
// 新增抽奖
|
||||
luckAdd (querys) {
|
||||
return post('/shop/admin/AdminMark/luckAdd', querys)
|
||||
},
|
||||
// 编辑抽奖
|
||||
luckUpdate (querys) {
|
||||
return post('/shop/admin/AdminMark/luckUpdate', querys)
|
||||
},
|
||||
// 秒杀列表
|
||||
killList (querys) {
|
||||
return get('/shop/admin/AdminMark/killList', querys)
|
||||
},
|
||||
// 秒杀详情
|
||||
killInfo (querys) {
|
||||
return get('/shop/admin/AdminMark/killInfo', querys)
|
||||
},
|
||||
// 新增秒杀
|
||||
killAdd (querys) {
|
||||
return post('/shop/admin/AdminMark/killAdd', querys)
|
||||
},
|
||||
// 编辑秒杀
|
||||
killUpdate (querys) {
|
||||
return post('/shop/admin/AdminMark/killUpdate', querys)
|
||||
},
|
||||
// 秒杀商品列表
|
||||
killGoodsList (querys) {
|
||||
return get('/shop/admin/AdminMark/killGoodsList', querys)
|
||||
},
|
||||
// 秒杀商品详情
|
||||
killGoodsInfo (querys) {
|
||||
return get('/shop/admin/AdminMark/killGoodsInfo', querys)
|
||||
},
|
||||
// 新增秒杀商品
|
||||
addKillGoods (querys) {
|
||||
return post('/shop/admin/AdminMark/addKillGoods', querys)
|
||||
},
|
||||
// 删除秒杀商品
|
||||
killGoodsDel (querys) {
|
||||
return post('/shop/admin/AdminMark/killGoodsDel', querys)
|
||||
}
|
||||
}
|
||||
85
uniapp/uni-admin/src/api/modules/media.js
Normal file
@@ -0,0 +1,85 @@
|
||||
/*
|
||||
* @Descripttion: 多媒体管理
|
||||
* @Author: xiao li
|
||||
* @Date: 2020-07-06 12:17:06
|
||||
* @LastEditors: xiao li
|
||||
* @LastEditTime: 2022-07-01 14:45:08
|
||||
*/
|
||||
import {
|
||||
get,
|
||||
post
|
||||
} from '../index'
|
||||
export default {
|
||||
// 轮播图列表
|
||||
bannerList (querys) {
|
||||
return post('/farm/admin/AdminSetting/bannerList', querys)
|
||||
},
|
||||
// 轮播图信息
|
||||
bannerInfo (querys) {
|
||||
return get('/farm/admin/AdminSetting/bannerInfo', querys)
|
||||
},
|
||||
// 新增轮播图
|
||||
bannerAdd (querys) {
|
||||
return post('/farm/admin/AdminSetting/bannerAdd', querys)
|
||||
},
|
||||
// 编辑轮播图
|
||||
bannerUpdate (querys) {
|
||||
return post('/farm/admin/AdminSetting/bannerUpdate', querys)
|
||||
},
|
||||
// 文章列表
|
||||
articleList (querys) {
|
||||
return get('/farm/admin/AdminSetting/articleList', querys)
|
||||
},
|
||||
// 文章下拉框
|
||||
articleSelect (querys) {
|
||||
return get('/farm/admin/AdminSetting/articleSelect', querys)
|
||||
},
|
||||
// 文章详情
|
||||
articleInfo (querys) {
|
||||
return get('/farm/admin/AdminSetting/articleInfo', querys)
|
||||
},
|
||||
// 新增文章
|
||||
articleAdd (querys) {
|
||||
return post('/farm/admin/AdminSetting/articleAdd', querys)
|
||||
},
|
||||
// 编辑文章
|
||||
articleUpdate (querys) {
|
||||
return post('/farm/admin/AdminSetting/articleUpdate', querys)
|
||||
},
|
||||
// 关于我们列表 type 0关于我们,1认养,2土地
|
||||
aboutUsList (querys) {
|
||||
return get('/farm/admin/AdminSetting/aboutUsList', querys)
|
||||
},
|
||||
// 根据type获取详情
|
||||
aboutUsInfoType (querys) {
|
||||
return get('/farm/admin/AdminSetting/aboutUsInfoType', querys)
|
||||
},
|
||||
// 关于我们详情
|
||||
aboutUsInfo (querys) {
|
||||
return get('/farm/admin/AdminSetting/aboutUsInfo', querys)
|
||||
},
|
||||
// 新增关于我们
|
||||
aboutUsAdd (querys) {
|
||||
return post('/farm/admin/AdminSetting/aboutUsAdd', querys)
|
||||
},
|
||||
// 编辑关于我们
|
||||
aboutUsUpdate (querys) {
|
||||
return post('/farm/admin/AdminSetting/aboutUsUpdate', querys)
|
||||
},
|
||||
// 公益栏目列表
|
||||
welfareList (querys) {
|
||||
return get('/farm/admin/AdminSetting/welfareList', querys)
|
||||
},
|
||||
// 公益栏目详情
|
||||
welfareInfo (querys) {
|
||||
return get('/farm/admin/AdminSetting/welfareInfo', querys)
|
||||
},
|
||||
// 新增公益栏目 type:1公益栏目 2系统公告 3运营公告
|
||||
welfareAdd (querys) {
|
||||
return post('/farm/admin/AdminSetting/welfareAdd', querys)
|
||||
},
|
||||
// 编辑公益栏目
|
||||
welfareUpdate (querys) {
|
||||
return post('/farm/admin/AdminSetting/welfareUpdate', querys)
|
||||
}
|
||||
}
|
||||
117
uniapp/uni-admin/src/api/modules/shop.js
Normal file
@@ -0,0 +1,117 @@
|
||||
/*
|
||||
* @Descripttion: 商城
|
||||
* @Author: xiao li
|
||||
* @Date: 2020-07-06 12:17:06
|
||||
* @LastEditors: xiao li
|
||||
* @LastEditTime: 2022-08-24 11:13:07
|
||||
*/
|
||||
import {
|
||||
get,
|
||||
post
|
||||
} from '../index'
|
||||
export default {
|
||||
// 分类列表
|
||||
goodsCateList (querys) {
|
||||
return get('/shop/admin/AdminGoods/goodsCateList', querys)
|
||||
},
|
||||
// 分类下拉
|
||||
goodsCateSelect (querys) {
|
||||
return get('/shop/admin/AdminGoods/goodsCateSelect', querys)
|
||||
},
|
||||
// 分类详情
|
||||
goodsCateInfo (querys) {
|
||||
return get('/shop/admin/AdminGoods/goodsCateInfo', querys)
|
||||
},
|
||||
// 新增分类
|
||||
goodsCateAdd (querys) {
|
||||
return post('/shop/admin/AdminGoods/goodsCateAdd', querys)
|
||||
},
|
||||
// 编辑分类
|
||||
goodsCateUpdate (querys) {
|
||||
return post('/shop/admin/AdminGoods/goodsCateUpdate', querys)
|
||||
},
|
||||
// 商品列表
|
||||
goodsList (querys) {
|
||||
return get('/shop/admin/AdminGoods/goodsList', querys)
|
||||
},
|
||||
// 商品详情
|
||||
goodsInfo (querys) {
|
||||
return get('/shop/admin/AdminGoods/goodsInfo', querys)
|
||||
},
|
||||
// 新增商品
|
||||
goodsAdd (querys) {
|
||||
return post('/shop/admin/AdminGoods/goodsAdd', querys)
|
||||
},
|
||||
// 编辑商品
|
||||
goodsUpdate (querys) {
|
||||
return post('/shop/admin/AdminGoods/goodsUpdate', querys)
|
||||
},
|
||||
// 复制商品
|
||||
goodsCopy (querys) {
|
||||
return post('/shop/admin/AdminGoods/goodsCopy', querys)
|
||||
},
|
||||
// 上下架商品(status:1,0)和删除商品(status:-1);
|
||||
goodsStatusUpdate (querys) {
|
||||
return post('/shop/admin/AdminGoods/goodsStatusUpdate', querys)
|
||||
},
|
||||
// 编辑商品库存
|
||||
updateSpe (querys) {
|
||||
return post('/shop/admin/AdminGoods/updateSpe', querys)
|
||||
},
|
||||
// 编辑商品信息
|
||||
goodsBasicUpdate (querys) {
|
||||
return post('/shop/admin/AdminGoods/goodsBasicUpdate', querys)
|
||||
},
|
||||
// 运费模版列表
|
||||
tmplSelect (querys) {
|
||||
return get('/shop/admin/AdminFreight/tmplSelect', querys)
|
||||
},
|
||||
// 运费模版列表
|
||||
tmplList (querys) {
|
||||
return get('/shop/admin/AdminFreight/tmplList', querys)
|
||||
},
|
||||
// 运费模版详情
|
||||
tmplInfo (querys) {
|
||||
return get('/shop/admin/AdminFreight/tmplInfo', querys)
|
||||
},
|
||||
// 新增运费模版
|
||||
tmplAdd (querys) {
|
||||
return post('/shop/admin/AdminFreight/tmplAdd', querys)
|
||||
},
|
||||
// 编辑运费模版
|
||||
tmplUpdate (querys) {
|
||||
return post('/shop/admin/AdminFreight/tmplUpdate', querys)
|
||||
},
|
||||
// 订单管理
|
||||
orderList (querys) {
|
||||
return get('/farm/admin/AdminOrder/orderList', querys)
|
||||
},
|
||||
// 订单详情
|
||||
orderInfo (querys) {
|
||||
return get('/farm/admin/AdminOrder/orderInfo', querys)
|
||||
},
|
||||
// 发货
|
||||
shopOrderSend (querys) {
|
||||
return post('/farm/admin/AdminOrder/shopOrderSend', querys)
|
||||
},
|
||||
// 上传视频
|
||||
uploadVideo (querys) {
|
||||
return post('/farm/admin/AdminOrder/uploadVideo', querys)
|
||||
},
|
||||
// 退款管理
|
||||
refundOrderList (querys) {
|
||||
return get('/farm/admin/AdminOrder/refundOrderList', querys)
|
||||
},
|
||||
// 退款详情
|
||||
refundOrderInfo (querys) {
|
||||
return get('/farm/admin/AdminOrder/refundOrderInfo', querys)
|
||||
},
|
||||
// 同意退款
|
||||
passRefund (querys) {
|
||||
return post('/farm/admin/AdminOrder/passRefund', querys)
|
||||
},
|
||||
// 拒绝退款
|
||||
noPassRefund (querys) {
|
||||
return post('/farm/admin/AdminOrder/noPassRefund', querys)
|
||||
}
|
||||
}
|
||||
38
uniapp/uni-admin/src/api/modules/stored.js
Normal file
@@ -0,0 +1,38 @@
|
||||
/*
|
||||
* @Description: 储值管理
|
||||
* @Author: xiao li
|
||||
* @Date: 2021-07-03 11:41:05
|
||||
* @LastEditTime: 2021-09-15 13:33:20
|
||||
* @LastEditors: xiao li
|
||||
*/
|
||||
|
||||
import {
|
||||
get,
|
||||
post
|
||||
} from '../index'
|
||||
export default {
|
||||
// 储值充值卡列表
|
||||
cardList (querys) {
|
||||
return get('/farm/admin/AdminBalance/cardList', querys)
|
||||
},
|
||||
// 储值充值卡详情
|
||||
cardInfo (querys) {
|
||||
return get('/farm/admin/AdminBalance/cardInfo', querys)
|
||||
},
|
||||
// 新增储值充值卡
|
||||
cardAdd (querys) {
|
||||
return post('/farm/admin/AdminBalance/cardAdd', querys)
|
||||
},
|
||||
// 编辑储值充值卡
|
||||
cardUpdate (querys) {
|
||||
return post('/farm/admin/AdminBalance/cardUpdate', querys)
|
||||
},
|
||||
// 储值订单列表
|
||||
orderList (querys) {
|
||||
return get('/farm/admin/AdminBalance/orderList', querys)
|
||||
},
|
||||
// 储值订单详情
|
||||
orderInfo (querys) {
|
||||
return get('/farm/admin/AdminBalance/orderInfo', querys)
|
||||
}
|
||||
}
|
||||
57
uniapp/uni-admin/src/api/modules/system.js
Normal file
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* @Descripttion: 系统设置
|
||||
* @Author: xiao li
|
||||
* @Date: 2020-07-06 12:17:06
|
||||
* @LastEditors: xiao li
|
||||
* @LastEditTime: 2022-07-12 13:42:58
|
||||
*/
|
||||
import {
|
||||
get,
|
||||
post
|
||||
} from '../index'
|
||||
export default {
|
||||
// 获取上传配置信息
|
||||
getOssConfig (querys) {
|
||||
return get('/admin/admin/config/getOssConfig', querys)
|
||||
},
|
||||
// 设置上传配置信息
|
||||
updateOssConfig (querys) {
|
||||
return post('/admin/admin/config/updateOssConfig', querys)
|
||||
},
|
||||
// 获取系统配置信息
|
||||
configInfo (querys) {
|
||||
return post('/farm/admin/AdminSetting/configInfo', querys)
|
||||
},
|
||||
// 设置系统配置信息
|
||||
configUpdate (querys) {
|
||||
return post('/farm/admin/AdminSetting/configUpdate', querys)
|
||||
},
|
||||
// 获取支付配置信息
|
||||
payConfigInfo (querys) {
|
||||
return post('/farm/admin/AdminSetting/payConfigInfo', querys)
|
||||
},
|
||||
// 设置支付配置信息
|
||||
payConfigUpdate (querys) {
|
||||
return post('/farm/admin/AdminSetting/payConfigUpdate', querys)
|
||||
},
|
||||
// 获取配送信息
|
||||
sendConfigInfo (querys) {
|
||||
return get('/farm/admin/AdminSetting/sendConfigInfo', querys)
|
||||
},
|
||||
// 设置配送信息
|
||||
sendConfigUpdate (querys) {
|
||||
return post('/farm/admin/AdminSetting/sendConfigUpdate', querys)
|
||||
},
|
||||
// 获取订阅消息模板列表
|
||||
tmpLists (querys) {
|
||||
return post('/publics/tmpl/AdminTmpl/tmpLists', querys)
|
||||
},
|
||||
// 自动同步模板ID
|
||||
getTmplId (querys) {
|
||||
return post('/publics/tmpl/AdminTmpl/getTmplId', querys)
|
||||
},
|
||||
// 保存订阅消息模板
|
||||
tmplUpdate (querys) {
|
||||
return post('/publics/tmpl/AdminTmpl/tmplUpdate', querys)
|
||||
}
|
||||
}
|
||||
50
uniapp/uni-admin/src/api/modules/upload.js
Normal file
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* @Descripttion: 文件上传
|
||||
* @Author: xiao li
|
||||
* @Date: 2020-07-06 12:17:06
|
||||
* @LastEditors: xiao li
|
||||
* @LastEditTime: 2021-09-10 16:36:24
|
||||
*/
|
||||
import { post, get, postUpload } from '../index'
|
||||
|
||||
export default {
|
||||
// 新增分组
|
||||
addGroup (querys) {
|
||||
return post('/admin/admin/file/createGroup', querys)
|
||||
},
|
||||
// 修改分组
|
||||
updateGroup (querys) {
|
||||
return post('/admin/admin/file/updateGroup', querys)
|
||||
},
|
||||
// 移动分组
|
||||
moveGroup (querys) {
|
||||
return post('/admin/admin/file/moveGroup', querys)
|
||||
},
|
||||
// 删除单个分组
|
||||
delGroup (querys) {
|
||||
return post('/admin/admin/file/delGroup', querys)
|
||||
},
|
||||
delGroups (querys) {
|
||||
return post('/admin/admin/file/delAllGroup', querys)
|
||||
},
|
||||
// 获取上传商品分组列表
|
||||
getGroupsList () {
|
||||
return get('/admin/admin/file/listGroup')
|
||||
},
|
||||
// 上传图片
|
||||
uploadFiles (querys, fn) {
|
||||
return postUpload('/admin/admin/file/uploadFiles', querys, fn)
|
||||
},
|
||||
// 上传文件到云存储后返回给后端
|
||||
uploadAddFile (querys) {
|
||||
return post('/admin/admin/file/addFile', querys)
|
||||
},
|
||||
// 获取图片,视频,音频等 1=>图片 2=>音频 3=>视频
|
||||
getUploadFiles (querys) {
|
||||
return get('/admin/admin/file/listFile', querys)
|
||||
},
|
||||
// 删除图片,视频,音乐等
|
||||
delFiles (querys) {
|
||||
return post('/admin/admin/file/delFile', querys)
|
||||
}
|
||||
}
|
||||
BIN
uniapp/uni-admin/src/assets/app/activity.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
uniapp/uni-admin/src/assets/app/appointment.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
uniapp/uni-admin/src/assets/app/article.png
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
uniapp/uni-admin/src/assets/app/baidu.png
Normal file
|
After Width: | Height: | Size: 2.8 KiB |
BIN
uniapp/uni-admin/src/assets/app/closure.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
uniapp/uni-admin/src/assets/app/company.png
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
uniapp/uni-admin/src/assets/app/house.png
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
uniapp/uni-admin/src/assets/app/msg.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
uniapp/uni-admin/src/assets/app/pay.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
uniapp/uni-admin/src/assets/app/poster.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
uniapp/uni-admin/src/assets/app/present.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
uniapp/uni-admin/src/assets/audio.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
uniapp/uni-admin/src/assets/commonIcon/assemble.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
uniapp/uni-admin/src/assets/commonIcon/businessCard.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
uniapp/uni-admin/src/assets/commonIcon/company.png
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
uniapp/uni-admin/src/assets/commonIcon/customer.png
Normal file
|
After Width: | Height: | Size: 3.1 KiB |
BIN
uniapp/uni-admin/src/assets/commonIcon/dynamic.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
uniapp/uni-admin/src/assets/commonIcon/goods.png
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
uniapp/uni-admin/src/assets/commonIcon/website.png
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
BIN
uniapp/uni-admin/src/assets/diy/banner-tongping.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
uniapp/uni-admin/src/assets/diy/列.jpg
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
uniapp/uni-admin/src/assets/diy/排.jpg
Normal file
|
After Width: | Height: | Size: 2.4 KiB |
BIN
uniapp/uni-admin/src/assets/house/house1.jpg
Normal file
|
After Width: | Height: | Size: 910 KiB |
BIN
uniapp/uni-admin/src/assets/house/house2.jpg
Normal file
|
After Width: | Height: | Size: 1.2 MiB |
BIN
uniapp/uni-admin/src/assets/house/house3.jpg
Normal file
|
After Width: | Height: | Size: 1.7 MiB |
BIN
uniapp/uni-admin/src/assets/house/house_bottom1.jpg
Normal file
|
After Width: | Height: | Size: 11 KiB |
BIN
uniapp/uni-admin/src/assets/house/house_bottom2.jpg
Normal file
|
After Width: | Height: | Size: 13 KiB |
BIN
uniapp/uni-admin/src/assets/house/house_bottom3.jpg
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
uniapp/uni-admin/src/assets/house/house_nav.jpg
Normal file
|
After Width: | Height: | Size: 10 KiB |
BIN
uniapp/uni-admin/src/assets/icon/1.png
Normal file
|
After Width: | Height: | Size: 3.1 KiB |
BIN
uniapp/uni-admin/src/assets/icon/2.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
uniapp/uni-admin/src/assets/icon/3.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
uniapp/uni-admin/src/assets/icon/apps.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
uniapp/uni-admin/src/assets/logo.png
Normal file
|
After Width: | Height: | Size: 5.3 KiB |
BIN
uniapp/uni-admin/src/assets/nav-bg.png
Normal file
|
After Width: | Height: | Size: 8.1 KiB |
BIN
uniapp/uni-admin/src/assets/system/notice1.jpg
Normal file
|
After Width: | Height: | Size: 164 KiB |
BIN
uniapp/uni-admin/src/assets/system/notice2.jpg
Normal file
|
After Width: | Height: | Size: 178 KiB |
BIN
uniapp/uni-admin/src/assets/system/notice3.jpg
Normal file
|
After Width: | Height: | Size: 187 KiB |
BIN
uniapp/uni-admin/src/assets/video.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
81
uniapp/uni-admin/src/components/ad.vue
Normal file
@@ -0,0 +1,81 @@
|
||||
<!--
|
||||
* @Descripttion: 左侧边栏广告
|
||||
* @Author: xiao li
|
||||
* @Date: 2020-07-06 12:17:06
|
||||
* @LastEditors: xiao li
|
||||
* @LastEditTime: 2021-03-15 13:22:26
|
||||
-->
|
||||
<template>
|
||||
<div class="lb-ad" :class="!adSwitch ? 'ad-collapse' : ''">
|
||||
<div class="ad-main">
|
||||
<!-- <lb-image src="@/assets/icon/apps.png"/> -->
|
||||
</div>
|
||||
<div class="flod" @click="handleFold">{{adSwitch ? '折叠' : '展开'}}</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
key: '广告'
|
||||
}
|
||||
},
|
||||
created () {
|
||||
},
|
||||
methods: {
|
||||
handleFold () {
|
||||
let {adSwitch} = this
|
||||
this.$store.commit('handleAdSwitch', !adSwitch)
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['adSwitch'])
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.lb-ad{
|
||||
width: 220px;
|
||||
position: fixed;
|
||||
transition: width 0.2s linear;
|
||||
top: 70px;
|
||||
right: 0;
|
||||
height: 1000px;
|
||||
z-index: 2;
|
||||
.ad-main{
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 220px;
|
||||
background: #fff;
|
||||
height: 100%;
|
||||
font-size: 14px;
|
||||
padding: 10px;
|
||||
}
|
||||
.flod{
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: -20px;
|
||||
margin: auto;
|
||||
width: 20px;
|
||||
height: 80px;
|
||||
background: #BFBFBF;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border-top-left-radius: 5px;
|
||||
border-bottom-left-radius: 5px;
|
||||
cursor: pointer;
|
||||
color: #fff;
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
.ad-collapse{
|
||||
width: 0px;
|
||||
}
|
||||
</style>
|
||||
28
uniapp/uni-admin/src/components/basics/index.js
Normal file
@@ -0,0 +1,28 @@
|
||||
|
||||
import Vue from 'vue'
|
||||
import TopNav from './topNav.vue'
|
||||
import LbButton from './lbButton.vue'
|
||||
import LbSwitch from './lbSwitch.vue'
|
||||
import LbTips from './lbTips.vue'
|
||||
import LbPage from './lbPage.vue'
|
||||
import LbClassifyTitle from './lbClassifyTitle.vue'
|
||||
import LbUpload from './lbUpload.vue'
|
||||
import LbToolTips from './lbToolTips.vue'
|
||||
import LbUploadCover from './lbUploadCover.vue'
|
||||
import LbUeditor from './lbUeditor.vue'
|
||||
import LbCover from './lbCover.vue'
|
||||
import LbImage from './lbImage.vue'
|
||||
import LbMap from './lbMap.vue'
|
||||
Vue.component('top-nav', TopNav)
|
||||
Vue.component('lb-button', LbButton)
|
||||
Vue.component('lb-switch', LbSwitch)
|
||||
Vue.component('lb-tips', LbTips)
|
||||
Vue.component('lb-page', LbPage)
|
||||
Vue.component('lb-classify-title', LbClassifyTitle)
|
||||
Vue.component('lb-upload', LbUpload)
|
||||
Vue.component('lb-tool-tips', LbToolTips)
|
||||
Vue.component('lb-upload-cover', LbUploadCover)
|
||||
Vue.component('lb-ueditor', LbUeditor)
|
||||
Vue.component('lb-cover', LbCover)
|
||||
Vue.component('lb-image', LbImage)
|
||||
Vue.component('lb-map', LbMap)
|
||||
79
uniapp/uni-admin/src/components/basics/lbButton.vue
Normal file
@@ -0,0 +1,79 @@
|
||||
<template>
|
||||
<el-button
|
||||
:disabled="isDisabled"
|
||||
:type="type"
|
||||
:plain="plain"
|
||||
:round="round"
|
||||
:icon="icon"
|
||||
:size="size"
|
||||
:loading='loading'
|
||||
@click="handleClick"
|
||||
>
|
||||
<slot></slot>
|
||||
</el-button>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
type: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
plain: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
round: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
icon: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
size: {
|
||||
type: String,
|
||||
default: 'medium'
|
||||
},
|
||||
opType: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
loading: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
isDisabled: this.disabled,
|
||||
currentIndex: this.$store.state.operate.currentIndex
|
||||
}
|
||||
},
|
||||
created () {
|
||||
let {isOnly, auth, pagePermission} = this.$route.meta
|
||||
let {disabled} = this
|
||||
if (disabled) {
|
||||
this.isDisabled = disabled
|
||||
} else if (this.opType) {
|
||||
if (isOnly) {
|
||||
this.isDisabled = auth.indexOf(this.opType) === -1
|
||||
} else {
|
||||
this.isDisabled = pagePermission[this.currentIndex].auth.indexOf(this.opType) === -1
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleClick () {
|
||||
this.$emit('click')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
39
uniapp/uni-admin/src/components/basics/lbClassifyTitle.vue
Normal file
@@ -0,0 +1,39 @@
|
||||
<!--
|
||||
* @Description: 标题栏
|
||||
* @Author: xiao li
|
||||
* @Date: 2021-07-04 00:16:14
|
||||
* @LastEditTime: 2021-09-10 16:31:28
|
||||
* @LastEditors: xiao li
|
||||
-->
|
||||
<template>
|
||||
<div class="lb-goods-edit-classify mb-lg">
|
||||
<div class="title">{{ title }}</div>
|
||||
<span v-if="tips" class="tips">{{ tips }}</span>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: ['title', 'tips']
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.lb-goods-edit-classify {
|
||||
width: 100%;
|
||||
border-top: 1px solid $lineColor;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.title {
|
||||
display: inline-block;
|
||||
padding: 6px 15px;
|
||||
color: $themeColor;
|
||||
background: $columnBgColor;
|
||||
margin-right: 10px;
|
||||
}
|
||||
.tips {
|
||||
color: $tipsColor;
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
375
uniapp/uni-admin/src/components/basics/lbCover.vue
Normal file
@@ -0,0 +1,375 @@
|
||||
<template>
|
||||
<div class="lb-cover-wrap">
|
||||
<div
|
||||
class="lb-cover"
|
||||
:class="[size]"
|
||||
@click="showUploadModel"
|
||||
v-if="type === 'single'"
|
||||
>
|
||||
<lb-image v-if="cover.length > 0" :src="cover[cover.length - 1].url" />
|
||||
<i v-else class="el-icon-plus"></i>
|
||||
<i
|
||||
v-if="cover.length > 0"
|
||||
@click.stop="deleteCover"
|
||||
class="el-icon-circle-close"
|
||||
></i>
|
||||
</div>
|
||||
<div v-else-if="type === 'more'" class="lb-upload-more">
|
||||
<vuedraggable @change="dragChange" v-model="cover">
|
||||
<transition-group class="flex-warp">
|
||||
<div
|
||||
class="more-item"
|
||||
:class="[size]"
|
||||
v-for="(item, index) in cover"
|
||||
:key="`drag_${index}`"
|
||||
>
|
||||
<lb-image :src="item.url" />
|
||||
<div class="mask">
|
||||
<i
|
||||
@click="lookBigImg(item.url)"
|
||||
class="el-icon-zoom-in"
|
||||
v-if="item.url"
|
||||
></i>
|
||||
<i
|
||||
@click="delImg(index)"
|
||||
class="el-icon-delete"
|
||||
v-if="isToDel"
|
||||
></i>
|
||||
</div>
|
||||
</div>
|
||||
</transition-group>
|
||||
</vuedraggable>
|
||||
<div class="flex-warp" v-if="cover.length < fileSize">
|
||||
<div class="up-item" :class="[size]" @click="showUploadModel">
|
||||
<i class="el-icon-plus"></i>
|
||||
</div>
|
||||
<lb-tool-tips class="ml-sm" v-if="tips">{{
|
||||
`图片建议尺寸:${tips}`
|
||||
}}</lb-tool-tips>
|
||||
</div>
|
||||
<el-dialog
|
||||
:visible.sync="centerDialogVisible"
|
||||
width="800px"
|
||||
center
|
||||
:append-to-body="true"
|
||||
>
|
||||
<div class="dialog-inner-img">
|
||||
<lb-image class="dialog-img" :src="viewImg" />
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
<lb-button type="primary" size="mini" @click="showUploadModel" v-else
|
||||
>选择</lb-button
|
||||
>
|
||||
<block v-if="isToDel">
|
||||
<lb-upload
|
||||
:paramData="paramData"
|
||||
:filesLength="fileList.length"
|
||||
:fileSize="fileSize"
|
||||
:multilineType="type"
|
||||
:visibles.sync="showUpload"
|
||||
:fileType="fileType"
|
||||
:fileAccept="fileAccept"
|
||||
@selectedFiles="selectedFiles"
|
||||
></lb-upload>
|
||||
</block>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import vuedraggable from 'vuedraggable'
|
||||
export default {
|
||||
components: {
|
||||
vuedraggable
|
||||
},
|
||||
props: {
|
||||
type: {
|
||||
type: String,
|
||||
default () {
|
||||
return 'single'
|
||||
}
|
||||
},
|
||||
size: {
|
||||
type: String,
|
||||
default () {
|
||||
return 'big'
|
||||
}
|
||||
},
|
||||
tips: {
|
||||
type: String,
|
||||
default () {
|
||||
return ''
|
||||
}
|
||||
},
|
||||
fileType: {
|
||||
type: String,
|
||||
default () {
|
||||
return 'image'
|
||||
}
|
||||
},
|
||||
fileAccept: {
|
||||
type: String,
|
||||
default () {
|
||||
return ''
|
||||
}
|
||||
},
|
||||
fileSize: {
|
||||
type: Number,
|
||||
default () {
|
||||
return 9
|
||||
}
|
||||
},
|
||||
fileList: {
|
||||
type: [Array, String],
|
||||
default () {
|
||||
return []
|
||||
}
|
||||
},
|
||||
isToDel: {
|
||||
type: Boolean,
|
||||
default () {
|
||||
return true
|
||||
}
|
||||
},
|
||||
paramData: {
|
||||
type: Object,
|
||||
default () {
|
||||
return {}
|
||||
}
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
showUpload: false,
|
||||
cover: [],
|
||||
centerDialogVisible: false,
|
||||
viewImg: ''
|
||||
}
|
||||
},
|
||||
created () {
|
||||
if (this.fileList && this.fileList.length) {
|
||||
this.cover = this.fileList
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
selectedFiles (img) {
|
||||
if (!img.length) return false
|
||||
let selectedImgs = this.type === 'single' ? [img[img.length - 1]] : img
|
||||
this.cover = selectedImgs
|
||||
this.$emit('selectedFiles', selectedImgs)
|
||||
},
|
||||
dragChange (e) {
|
||||
this.$emit('moveFiles', this.cover)
|
||||
},
|
||||
showUploadModel () {
|
||||
this.showUpload = true
|
||||
},
|
||||
lookBigImg (url) {
|
||||
this.viewImg = url
|
||||
this.centerDialogVisible = true
|
||||
},
|
||||
delImg (index) {
|
||||
this.cover.splice(index, 1)
|
||||
},
|
||||
deleteCover () {
|
||||
this.cover = []
|
||||
this.$emit('selectedFiles', [])
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
fileList: {
|
||||
deep: true,
|
||||
handler (val) {
|
||||
if (val && typeof val === 'object') {
|
||||
this.cover = val
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.lb-cover-wrap {
|
||||
display: inline-block;
|
||||
.lb-cover.small {
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
.el-image {
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
}
|
||||
i {
|
||||
font-size: 20px;
|
||||
line-height: 60px;
|
||||
}
|
||||
.el-icon-circle-close {
|
||||
font-size: 18px;
|
||||
line-height: 18px;
|
||||
}
|
||||
}
|
||||
|
||||
.lb-cover.middle {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
.el-image {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
}
|
||||
i {
|
||||
font-size: 20px;
|
||||
line-height: 80px;
|
||||
}
|
||||
.el-icon-circle-close {
|
||||
font-size: 22px;
|
||||
line-height: 22px;
|
||||
}
|
||||
}
|
||||
.lb-cover {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
border: 1px dashed #d9d9d9;
|
||||
border-radius: 6px;
|
||||
cursor: pointer;
|
||||
text-align: center;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
.el-image {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
}
|
||||
i {
|
||||
font-size: 26px;
|
||||
line-height: 100px;
|
||||
}
|
||||
&:hover {
|
||||
border: 1px dashed #09f;
|
||||
.el-icon-circle-close {
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
.el-icon-circle-close {
|
||||
display: none;
|
||||
z-index: 10;
|
||||
position: absolute;
|
||||
right: 5px;
|
||||
top: 5px;
|
||||
line-height: 1;
|
||||
}
|
||||
}
|
||||
.lb-upload-more {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
.more-item.small {
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
.el-image {
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
z-index: 5;
|
||||
}
|
||||
}
|
||||
.more-item.middle {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
.el-image {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
z-index: 5;
|
||||
}
|
||||
}
|
||||
.more-item {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
border: 1px solid #d9d9d9;
|
||||
border-radius: 6px;
|
||||
position: relative;
|
||||
margin-right: 10px;
|
||||
margin-bottom: 10px;
|
||||
overflow: hidden;
|
||||
.el-image {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
z-index: 5;
|
||||
}
|
||||
.mask {
|
||||
display: none;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
font-size: 20px;
|
||||
color: #fff;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
z-index: 10;
|
||||
top: 0;
|
||||
left: 0;
|
||||
i {
|
||||
margin: 0 10px;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
&:hover {
|
||||
.mask {
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
}
|
||||
.up-item {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
border: 1px dashed #d9d9d9;
|
||||
border-radius: 6px;
|
||||
cursor: pointer;
|
||||
text-align: center;
|
||||
i {
|
||||
font-size: 26px;
|
||||
line-height: 100px;
|
||||
}
|
||||
&:hover {
|
||||
border: 1px dashed #09f;
|
||||
}
|
||||
}
|
||||
.up-item.small {
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
border: 1px dashed #d9d9d9;
|
||||
border-radius: 6px;
|
||||
cursor: pointer;
|
||||
text-align: center;
|
||||
i {
|
||||
font-size: 18px;
|
||||
line-height: 60px;
|
||||
}
|
||||
&:hover {
|
||||
border: 1px dashed #09f;
|
||||
}
|
||||
}
|
||||
.up-item.middle {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
border: 1px dashed #d9d9d9;
|
||||
border-radius: 6px;
|
||||
cursor: pointer;
|
||||
text-align: center;
|
||||
i {
|
||||
font-size: 22px;
|
||||
line-height: 80px;
|
||||
}
|
||||
&:hover {
|
||||
border: 1px dashed #09f;
|
||||
}
|
||||
}
|
||||
}
|
||||
.dialog-inner-img {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
.dialog-img {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
36
uniapp/uni-admin/src/components/basics/lbImage.vue
Normal file
@@ -0,0 +1,36 @@
|
||||
<template>
|
||||
<el-image :fit="fit" :src="src">
|
||||
<div slot="error" class="image-slot">
|
||||
<i class="el-icon-picture-outline"></i>
|
||||
</div>
|
||||
</el-image>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
fit: {
|
||||
type: String,
|
||||
default: 'cover'
|
||||
},
|
||||
src: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.el-image{
|
||||
background: $bgThemeColor;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
.image-slot{
|
||||
i{
|
||||
font-size: 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
173
uniapp/uni-admin/src/components/basics/lbMap.vue
Normal file
@@ -0,0 +1,173 @@
|
||||
<template>
|
||||
<el-dialog
|
||||
title="获取经纬度"
|
||||
:visible.sync="centerDialogVisible"
|
||||
width="600px"
|
||||
center
|
||||
:append-to-body="true"
|
||||
>
|
||||
<div class="dialog-inner">
|
||||
<div class="map-search">
|
||||
<el-input placeholder="输入地址" v-model="address"></el-input>
|
||||
<lb-button size="mini" type="primary" @click="searchMapAddr"
|
||||
>搜 索</lb-button
|
||||
>
|
||||
</div>
|
||||
<div id="container"></div>
|
||||
</div>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="centerDialogVisible = false">{{
|
||||
$t('action.cancel')
|
||||
}}</el-button>
|
||||
<el-button type="primary" @click="confirmLatLng">{{
|
||||
$t('action.comfirm')
|
||||
}}</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
dialogVisible: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
centerDialogVisible: false,
|
||||
map: null,
|
||||
info: null,
|
||||
address: '',
|
||||
marker: '',
|
||||
geocoder: null,
|
||||
latLng: {
|
||||
lat: 30.657535,
|
||||
lng: 104.065783
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
initMap () {
|
||||
let that = this
|
||||
let { lat, lng } = this.latLng
|
||||
// 中心坐标
|
||||
// eslint-disable-next-line no-undef
|
||||
let center = new qq.maps.LatLng(lat, lng)
|
||||
// eslint-disable-next-line no-undef
|
||||
let map = new qq.maps.Map(
|
||||
document.getElementById('container'),
|
||||
{
|
||||
center: center,
|
||||
zoom: 12
|
||||
}
|
||||
)
|
||||
that.map = map
|
||||
// eslint-disable-next-line no-undef
|
||||
that.info = new qq.maps.InfoWindow({
|
||||
map: map
|
||||
})
|
||||
// eslint-disable-next-line no-undef
|
||||
qq.maps.event.addListener(map, 'click', async function (val, el) {
|
||||
if (that.marker) { that.marker.setMap(null) }
|
||||
let { lat, lng } = val.latLng
|
||||
that.latLng = val.latLng
|
||||
// eslint-disable-next-line no-undef
|
||||
that.marker = new qq.maps.Marker({
|
||||
// 标记的位置
|
||||
// eslint-disable-next-line no-undef
|
||||
position: new qq.maps.LatLng(lat, lng),
|
||||
map: map
|
||||
})
|
||||
that.info.open()
|
||||
that.info.setContent(`<div style="margin:10px;">
|
||||
<p>纬度:${lat}</p>
|
||||
<p>经度:${lng}</p>
|
||||
</div>`)
|
||||
// eslint-disable-next-line no-undef
|
||||
that.info.setPosition(new qq.maps.LatLng(lat, lng))
|
||||
})
|
||||
},
|
||||
openQQMap () {
|
||||
setTimeout(() => {
|
||||
this.initMap()
|
||||
this.initGeocoder()
|
||||
}, 500)
|
||||
},
|
||||
/**
|
||||
* @method 根据位置搜索坐标
|
||||
*/
|
||||
searchMapAddr () {
|
||||
let { address } = this
|
||||
this.geocoder.getLocation(address)
|
||||
},
|
||||
initGeocoder () {
|
||||
let that = this
|
||||
// eslint-disable-next-line no-undef
|
||||
that.geocoder = new qq.maps.Geocoder()
|
||||
// 设置服务请求成功的回调函数
|
||||
that.geocoder.setComplete(function (result) {
|
||||
let { lat, lng } = result.detail.location
|
||||
that.latLng = result.detail.location
|
||||
that.map.setCenter(result.detail.location)
|
||||
// eslint-disable-next-line no-undef
|
||||
that.marker = new qq.maps.Marker({
|
||||
map: that.map,
|
||||
position: result.detail.location
|
||||
})
|
||||
that.info.open()
|
||||
that.info.setContent(`<div style="margin:10px;">
|
||||
<p>纬度:${lat}</p>
|
||||
<p>经度:${lng}</p>
|
||||
</div>`)
|
||||
// eslint-disable-next-line no-undef
|
||||
that.info.setPosition(new qq.maps.LatLng(lat, lng))
|
||||
})
|
||||
// 若服务请求失败,则运行以下函数
|
||||
that.geocoder.setError(function () {
|
||||
that.$message.error('请输入包含市级的地址!')
|
||||
})
|
||||
},
|
||||
/**
|
||||
* @method 确定经纬度
|
||||
*/
|
||||
confirmLatLng () {
|
||||
this.centerDialogVisible = false
|
||||
this.$emit('selectedLatLng', this.latLng)
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
dialogVisible (newValue, oldValue) {
|
||||
if (newValue) {
|
||||
this.centerDialogVisible = true
|
||||
this.openQQMap()
|
||||
}
|
||||
},
|
||||
centerDialogVisible (val) {
|
||||
if (!val) {
|
||||
this.$emit('update:dialogVisible', false)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
#container {
|
||||
width: 500px;
|
||||
height: 400px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.dialog-inner {
|
||||
.map-search {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin-bottom: 20px;
|
||||
.el-input {
|
||||
width: 300px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
150
uniapp/uni-admin/src/components/basics/lbPage.vue
Normal file
@@ -0,0 +1,150 @@
|
||||
<template>
|
||||
<div class="lb-page">
|
||||
<slot name="button">
|
||||
<!-- 插入按钮 -->
|
||||
</slot>
|
||||
<div v-if="batch">
|
||||
<div :class="[{ isShowBatch: isShowBatch }]">已选 {{ selected }} 条</div>
|
||||
<div>
|
||||
<span v-if="isShowBatch">批量</span>
|
||||
<slot>
|
||||
<!-- 插入按钮 -->
|
||||
</slot>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="slot">
|
||||
<slot>
|
||||
<!-- 插入按钮 -->
|
||||
</slot>
|
||||
</div>
|
||||
<span v-else></span>
|
||||
<el-pagination
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
:current-page="currentPage"
|
||||
:page-sizes="[5, 10, 20]"
|
||||
:page-size="currentPageSize"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
:total="total"
|
||||
v-if="isShowPage"
|
||||
>
|
||||
</el-pagination>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
isShowPage: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
isShowBatch: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
batch: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
slot: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
page: {
|
||||
type: Number,
|
||||
default: 1
|
||||
},
|
||||
pageSize: {
|
||||
type: Number,
|
||||
default: 10
|
||||
},
|
||||
total: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
selected: {
|
||||
type: Number,
|
||||
default: 0
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
currentPage: this.page,
|
||||
currentPageSize: this.pageSize
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleSizeChange (val) {
|
||||
this.currentPageSize = val
|
||||
this.$emit('handleSizeChange', val)
|
||||
},
|
||||
handleCurrentChange (val) {
|
||||
this.currentPage = val
|
||||
this.$emit('handleCurrentChange', val)
|
||||
},
|
||||
// 全选 反选
|
||||
batchUpperAll (type) {
|
||||
if (type === 1) {
|
||||
this.$refs.multipleTable.clearSelection()
|
||||
this.multipleSelection = this.tableData
|
||||
this.tableData.map(item => {
|
||||
this.$refs.multipleTable.toggleRowSelection(item)
|
||||
})
|
||||
} else {
|
||||
let data = JSON.parse(JSON.stringify(this.multipleSelection))
|
||||
let arr = []
|
||||
data.map(item => {
|
||||
arr.push(item.id)
|
||||
})
|
||||
this.$refs.multipleTable.clearSelection()
|
||||
this.multipleSelection = []
|
||||
this.tableData.map(item => {
|
||||
if (!arr.includes(item.id)) {
|
||||
this.multipleSelection.push(item)
|
||||
this.$refs.multipleTable.toggleRowSelection(item)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
page (val) {
|
||||
this.currentPage = val
|
||||
},
|
||||
pageSize (val) {
|
||||
this.currentPageSize = val
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.lb-page {
|
||||
width: 100%;
|
||||
margin-top: 20px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
height: 40px;
|
||||
font-size: 14px;
|
||||
> div {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
white-space: nowrap;
|
||||
> div.isShowBatch {
|
||||
border-right: 1px solid #e8e8e8;
|
||||
}
|
||||
> div {
|
||||
&:first-child {
|
||||
height: 40px;
|
||||
padding-right: 30px;
|
||||
margin-right: 30px;
|
||||
line-height: 40px;
|
||||
}
|
||||
.el-button {
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
109
uniapp/uni-admin/src/components/basics/lbSwitch.vue
Normal file
@@ -0,0 +1,109 @@
|
||||
<template>
|
||||
<el-switch
|
||||
v-model="val"
|
||||
:disabled='isDisabled'
|
||||
:width='coreWidth'
|
||||
:active-icon-class='activeIconClass'
|
||||
:inactive-icon-class='inactiveIconClass'
|
||||
:active-text='activeText'
|
||||
:inactive-text='inactiveText'
|
||||
:active-value='activeValue'
|
||||
:inactive-value='inactiveValue'
|
||||
:active-color='activeColor'
|
||||
:inactive-color='inactiveColor'
|
||||
:name='name'
|
||||
@change="handleSwitchValue"
|
||||
>
|
||||
</el-switch>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props:
|
||||
{
|
||||
opType: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
value: {
|
||||
type: [Boolean, String, Number],
|
||||
default: false
|
||||
},
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
width: {
|
||||
type: Number,
|
||||
default: 40
|
||||
},
|
||||
activeIconClass: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
inactiveIconClass: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
activeText: String,
|
||||
inactiveText: String,
|
||||
activeColor: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
inactiveColor: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
activeValue: {
|
||||
type: [Boolean, String, Number],
|
||||
default: true
|
||||
},
|
||||
inactiveValue: {
|
||||
type: [Boolean, String, Number],
|
||||
default: false
|
||||
},
|
||||
name: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
validateEvent: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
id: String
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
val: this.value,
|
||||
coreWidth: this.width,
|
||||
isDisabled: this.disabled,
|
||||
currentIndex: this.$store.state.operate.currentIndex
|
||||
}
|
||||
},
|
||||
created () {
|
||||
let {isOnly, auth, pagePermission} = this.$route.meta
|
||||
if (this.opType) {
|
||||
if (isOnly) {
|
||||
this.isDisabled = auth.indexOf(this.opType) === -1
|
||||
} else {
|
||||
this.isDisabled = pagePermission[this.currentIndex].auth.indexOf(this.opType) === -1
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
checked () {
|
||||
return this.value === this.activeValue
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleSwitchValue (val) {
|
||||
this.$emit('change', val)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
</style>
|
||||
62
uniapp/uni-admin/src/components/basics/lbTips.vue
Normal file
@@ -0,0 +1,62 @@
|
||||
<!--
|
||||
* @Descripttion: 头部批注
|
||||
* @Author: xiao li
|
||||
* @Date: 2020-07-06 12:17:06
|
||||
* @LastEditors: xiao li
|
||||
* @LastEditTime: 2021-04-15 14:21:09
|
||||
-->
|
||||
<template>
|
||||
<div class="lb-tips" :class="[type]">
|
||||
<i class="iconfont" :class="[icon]" v-if="isIcon"></i>
|
||||
<div class="custom-item">
|
||||
<slot></slot>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
icon: {
|
||||
type: String,
|
||||
default: 'icon-warn'
|
||||
},
|
||||
type: {
|
||||
type: String,
|
||||
default: 'danger'
|
||||
},
|
||||
isIcon: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.lb-tips {
|
||||
width: 100%;
|
||||
padding: 20px;
|
||||
border-radius: 4px;
|
||||
margin-bottom: 16px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-left: 5px solid $primaryColor;
|
||||
background: $primaryBgColor;
|
||||
i{
|
||||
color: $primaryColor;
|
||||
margin-right: 10px;
|
||||
}
|
||||
.custom-item{
|
||||
flex: 1;
|
||||
}
|
||||
}
|
||||
.lb-tips.danger {
|
||||
border-left: 5px solid $dangerColor;
|
||||
background: $dangerBgColor;
|
||||
i{
|
||||
color: $dangerColor;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
66
uniapp/uni-admin/src/components/basics/lbToolTips.vue
Normal file
@@ -0,0 +1,66 @@
|
||||
<!--
|
||||
* @Descripttion: 批注
|
||||
* @Author: xiao li
|
||||
* @Date: 2020-07-06 12:17:06
|
||||
* @LastEditors: xiao li
|
||||
* @LastEditTime: 2021-09-10 16:31:43
|
||||
-->
|
||||
<template>
|
||||
<block>
|
||||
<div class="lb-tool-tips" :class="[type]" v-if="mode === 'text'">
|
||||
<slot></slot>
|
||||
</div>
|
||||
<el-tooltip
|
||||
class="tool-tips"
|
||||
effect="dark"
|
||||
placement="right"
|
||||
:style="{ paddingTop: `${padding}px` }"
|
||||
v-if="mode === 'tooltip'"
|
||||
>
|
||||
<div class="content" slot="content"><slot></slot></div>
|
||||
<i class="el-icon-question"></i>
|
||||
</el-tooltip>
|
||||
</block>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
mode: {
|
||||
type: String,
|
||||
default: 'tooltip'
|
||||
},
|
||||
type: {
|
||||
type: String,
|
||||
default: 'c-caption'
|
||||
},
|
||||
padding: {
|
||||
type: Number,
|
||||
default: 10
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.lb-tool-tips {
|
||||
font-size: 12px;
|
||||
line-height: 1.6;
|
||||
padding-top: 10px;
|
||||
}
|
||||
.lb-tool-tips.c-link {
|
||||
cursor: pointer;
|
||||
}
|
||||
.tool-tips {
|
||||
margin-left: 5px;
|
||||
vertical-align: top;
|
||||
font-size: 18px;
|
||||
color: #333;
|
||||
.content {
|
||||
max-width: 300px;
|
||||
}
|
||||
.el-icon-question {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
355
uniapp/uni-admin/src/components/basics/lbUeditor.vue
Normal file
@@ -0,0 +1,355 @@
|
||||
<template>
|
||||
<div>
|
||||
<script ref="script" :name="name" type="text/plain"></script>
|
||||
<lb-upload
|
||||
type="more"
|
||||
:fileType="fileType"
|
||||
:visibles.sync="showDialog"
|
||||
:isIframe="isIframe"
|
||||
multilineType="more"
|
||||
@selectedFiles="getChoiceFiles"
|
||||
></lb-upload>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import LoadEvent from '@/utils/Event.js'
|
||||
import Debounce from '@/utils/Debounce.js'
|
||||
import Bus from '@/Bus'
|
||||
import { mapGetters } from 'vuex'
|
||||
export default {
|
||||
name: 'VueUeditorWrap',
|
||||
data () {
|
||||
return {
|
||||
showDialog: false,
|
||||
fileType: 'image',
|
||||
isIframe: false,
|
||||
status: 0,
|
||||
initValue: '',
|
||||
defaultConfig: {
|
||||
// VUE CLI 3 会添加 process.env.BASE_URL 的环境变量,而 VUE CLI 2 没有,所以借此设置 UEDITOR_HOME_URL,能涵盖大部分 Vue 开发者的使用场景
|
||||
UEDITOR_HOME_URL: process.env.NODE_ENV === 'production' ? window.lbConfig.jsPath + 'static/Ueditor/' : '/static/Ueditor/',
|
||||
enableAutoSave: false,
|
||||
// 编辑器不自动被内容撑高
|
||||
autoHeightEnabled: false,
|
||||
// 初始容器高度
|
||||
initialFrameHeight: 500,
|
||||
// 初始容器宽度
|
||||
initialFrameWidth: 'auto',
|
||||
// 上传文件接口(这个地址是我为了方便各位体验文件上传功能搭建的临时接口,请勿在生产环境使用!!!)
|
||||
serverUrl: 'http://35.201.165.105:8000/controller.php',
|
||||
// UEditor 资源文件的存放路径,如果你使用的是 vue-cli 生成的项目,通常不需要设置该选项,vue-ueditor-wrap 会自动处理常见的情况,如果需要特殊配置,参考下方的常见问题2
|
||||
// UEDITOR_HOME_URL: '/static/Ueditor/',
|
||||
zIndex: 5,
|
||||
topOffset: false,
|
||||
autoFloatEnabled: false,
|
||||
toolbars: []
|
||||
},
|
||||
thatUeditor: {}
|
||||
}
|
||||
},
|
||||
props: {
|
||||
// v-model 实现方式
|
||||
mode: {
|
||||
type: String,
|
||||
default: 'observer',
|
||||
validator: function (value) {
|
||||
// 1. observer 借助 MutationObserver API https://developer.mozilla.org/zh-CN/docs/Web/API/MutationObserver
|
||||
// 2. listener 借助 UEditor 的 contentChange 事件 https://ueditor.baidu.com/doc/#UE.Editor:contentChange
|
||||
return ['observer', 'listener'].indexOf(value) !== -1
|
||||
}
|
||||
},
|
||||
value: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
config: {
|
||||
type: Object,
|
||||
default: function () {
|
||||
return {}
|
||||
}
|
||||
},
|
||||
init: {
|
||||
type: Function,
|
||||
default: function () {
|
||||
return () => { }
|
||||
}
|
||||
},
|
||||
destroy: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
ueditorType: {
|
||||
type: Number,
|
||||
default: 1
|
||||
},
|
||||
name: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
observerDebounceTime: {
|
||||
type: Number,
|
||||
default: 50,
|
||||
validator: function (value) {
|
||||
return value >= 20
|
||||
}
|
||||
},
|
||||
observerOptions: {
|
||||
type: Object,
|
||||
default: function () {
|
||||
// https://developer.mozilla.org/en-US/docs/Web/API/MutationObserverInit
|
||||
return {
|
||||
attributes: true, // 是否监听 DOM 元素的属性变化
|
||||
attributeFilter: ['src', 'style', 'type', 'name'], // 只有在该数组中的属性值的变化才会监听
|
||||
characterData: true, // 是否监听文本节点
|
||||
childList: true, // 是否监听子节点
|
||||
subtree: true // 是否监听后代元素
|
||||
}
|
||||
}
|
||||
},
|
||||
// 本组件提供对普通 Vue 项目和 Nuxt 项目开箱即 用的支持,但如果是自己搭建的 Vue SSR 项目,可能需要自行区分是客户端还是服务端环境并跳过环境检测,直接初始化
|
||||
forceInit: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
created () {
|
||||
Bus.$on('showLbUpload', (obj) => {
|
||||
console.log(obj)
|
||||
this.thatUeditor = obj.ueditor
|
||||
let { uploadStatus } = this
|
||||
if (uploadStatus) {
|
||||
return false
|
||||
} else {
|
||||
this.showDialog = obj.val
|
||||
this.isIframe = true
|
||||
this.fileType = obj.fileType
|
||||
this.$store.commit('handleUploadStatus', obj.val)
|
||||
}
|
||||
})
|
||||
},
|
||||
computed: {
|
||||
mixedConfig () {
|
||||
return Object.assign({}, this.defaultConfig, this.config)
|
||||
},
|
||||
...mapGetters(['uploadStatus'])
|
||||
},
|
||||
methods: {
|
||||
// 添加自定义按钮(自定义按钮,自定义弹窗等操作从 2.2.0 版本 开始不再考虑直接集成,这会使得组件和 UEditor 过度耦合,但为了兼容一些老版用户的写法,这个方法依然保留)
|
||||
registerButton ({ name, icon, tip, handler, index, UE = window.UE }) {
|
||||
UE.registerUI(name, (editor, name) => {
|
||||
editor.registerCommand(name, {
|
||||
execCommand: () => {
|
||||
handler(editor, name)
|
||||
}
|
||||
})
|
||||
const btn = new UE.ui.Button({
|
||||
name,
|
||||
title: tip,
|
||||
cssRules: `background-image: url(${icon}) !important;background-size: cover;`,
|
||||
onclick () {
|
||||
editor.execCommand(name)
|
||||
}
|
||||
})
|
||||
editor.addListener('selectionchange', () => {
|
||||
const state = editor.queryCommandState(name)
|
||||
if (state === -1) {
|
||||
btn.setDisabled(true)
|
||||
btn.setChecked(false)
|
||||
} else {
|
||||
btn.setDisabled(false)
|
||||
btn.setChecked(state)
|
||||
}
|
||||
})
|
||||
return btn
|
||||
}, index, this.id)
|
||||
},
|
||||
// 实例化编辑器
|
||||
_initEditor () {
|
||||
let toolbars = [
|
||||
'fullscreen', 'source', '|',
|
||||
'undo', 'redo', '|',
|
||||
'bold', 'italic', 'underline', 'strikethrough', 'removeformat', 'formatmatch', 'autotypeset', 'pasteplain', '|',
|
||||
// 'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist', '|',
|
||||
'forecolor', 'backcolor', '|',
|
||||
'fontfamily', 'fontsize', '|',
|
||||
'justifyleft', 'justifycenter', 'justifyright', 'justifyjustify'
|
||||
]
|
||||
let arr = {
|
||||
1: ['|', 'lbinsertimage', 'lbinsertvideo', 'lbinsertmusic'],
|
||||
2: [],
|
||||
3: ['|', 'lbinsertimage']
|
||||
}
|
||||
if (arr[this.ueditorType].length > 0) {
|
||||
arr[this.ueditorType].map(item => {
|
||||
toolbars.push(item)
|
||||
})
|
||||
}
|
||||
this.defaultConfig.toolbars = [toolbars]
|
||||
this.$refs.script.id = this.id = 'editor_' + Math.random().toString(16).slice(-6) // 这么做是为了支持 Vue SSR,因为如果把 id 属性放在 data 里会导致服务端和客户端分别计算该属性的值,而造成 id 不匹配无法初始化的 BUG
|
||||
this.init()
|
||||
this.$emit('beforeInit', this.id, this.mixedConfig)
|
||||
this.editor = window.UE.getEditor(this.id, this.mixedConfig)
|
||||
this.editor.addListener('ready', () => {
|
||||
if (this.status === 2) { // 使用 keep-alive 组件会出现这种情况
|
||||
this.editor.setContent(this.value)
|
||||
} else {
|
||||
this.status = 2
|
||||
this.$emit('ready', this.editor)
|
||||
this.editor.setContent(this.initValue)
|
||||
}
|
||||
if (this.mode === 'observer' && window.MutationObserver) {
|
||||
this._observerChangeListener()
|
||||
} else {
|
||||
this._normalChangeListener()
|
||||
}
|
||||
})
|
||||
},
|
||||
// 检测依赖,确保 UEditor 资源文件已加载完毕
|
||||
_checkDependencies () {
|
||||
return new Promise((resolve, reject) => {
|
||||
// 判断ueditor.config.js和ueditor.all.js是否均已加载(仅加载完ueditor.config.js时UE对象和UEDITOR_CONFIG对象存在,仅加载完ueditor.all.js时UEDITOR_CONFIG对象存在,但为空对象)
|
||||
let scriptsLoaded = !!window.UE && !!window.UEDITOR_CONFIG && Object.keys(window.UEDITOR_CONFIG).length !== 0 && !!window.UE.getEditor
|
||||
if (scriptsLoaded) {
|
||||
resolve()
|
||||
} else if (window['$loadEnv']) { // 利用订阅发布,确保同时渲染多个组件时,不会重复创建script标签
|
||||
window['$loadEnv'].on('scriptsLoaded', () => {
|
||||
resolve()
|
||||
})
|
||||
} else {
|
||||
window['$loadEnv'] = new LoadEvent()
|
||||
// 如果在其他地方只引用ueditor.all.min.js,在加载ueditor.config.js之后仍需要重新加载ueditor.all.min.js,所以必须确保ueditor.config.js已加载
|
||||
this._loadConfig().then(() => this._loadCore()).then(() => {
|
||||
resolve()
|
||||
window['$loadEnv'].emit('scriptsLoaded')
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
_loadConfig () {
|
||||
return new Promise((resolve, reject) => {
|
||||
if (window.UE && window.UEDITOR_CONFIG && Object.keys(window.UEDITOR_CONFIG).length !== 0) {
|
||||
resolve()
|
||||
return
|
||||
}
|
||||
let configScript = document.createElement('script')
|
||||
configScript.type = 'text/javascript'
|
||||
configScript.src = this.mixedConfig.UEDITOR_HOME_URL + 'ueditor.config.js'
|
||||
document.getElementsByTagName('head')[0].appendChild(configScript)
|
||||
configScript.onload = function () {
|
||||
if (window.UE && window.UEDITOR_CONFIG && Object.keys(window.UEDITOR_CONFIG).length !== 0) {
|
||||
resolve()
|
||||
} else {
|
||||
console.warn('加载ueditor.config.js失败,请检查您的配置地址UEDITOR_HOME_URL填写是否正确!\n', configScript.src)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
_loadCore () {
|
||||
return new Promise((resolve, reject) => {
|
||||
if (window.UE && window.UE.getEditor) {
|
||||
resolve()
|
||||
return
|
||||
}
|
||||
let coreScript = document.createElement('script')
|
||||
coreScript.type = 'text/javascript'
|
||||
coreScript.src = this.mixedConfig.UEDITOR_HOME_URL + 'ueditor.all.min.js'
|
||||
document.getElementsByTagName('head')[0].appendChild(coreScript)
|
||||
coreScript.onload = function () {
|
||||
if (window.UE && window.UE.getEditor) {
|
||||
resolve()
|
||||
} else {
|
||||
console.warn('加载ueditor.all.min.js失败,请检查您的配置地址UEDITOR_HOME_URL填写是否正确!\n', coreScript.src)
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
// 设置内容
|
||||
_setContent (value) {
|
||||
value === this.editor.getContent() || this.editor.setContent(value)
|
||||
},
|
||||
contentChangeHandler () {
|
||||
this.$emit('input', this.editor.getContent())
|
||||
},
|
||||
// 基于 UEditor 的 contentChange 事件
|
||||
_normalChangeListener () {
|
||||
this.editor.addListener('contentChange', this.contentChangeHandler)
|
||||
},
|
||||
// 基于 MutationObserver API
|
||||
_observerChangeListener () {
|
||||
const changeHandle = (mutationsList) => {
|
||||
if (this.editor.document.getElementById('baidu_pastebin')) {
|
||||
return
|
||||
}
|
||||
this.$emit('input', this.editor.getContent())
|
||||
}
|
||||
// 函数防抖
|
||||
this.observer = new MutationObserver(Debounce(changeHandle, this.observerDebounceTime))
|
||||
this.observer.observe(this.editor.body, this.observerOptions)
|
||||
},
|
||||
getChoiceFiles (files) {
|
||||
console.log(files)
|
||||
for (let i = 0, len = files.length; i < len; i++) {
|
||||
let insetHtml
|
||||
if (files[i].type === 1) {
|
||||
insetHtml = `<img src="${files[i].url}" style="box-sizing: border-box !important; overflow-wrap: break-word !important; visibility: visible !important;"/>`
|
||||
} else if (files[i].type === 2) {
|
||||
insetHtml = `<audio src="${files[i].url}" controls="controls"></audio>`
|
||||
} else if (files[i].type === 3) {
|
||||
insetHtml = `<img width='343' height='220' class='edui-upload-video vjs-default-skin video-js' _url='${files[i].url}' style="background:url(https://lbqny.migugu.com/admin/public/videologo.gif) no-repeat center center; border:1px solid gray;" />`
|
||||
} else if (files[i].type === 5) { // iframe标签
|
||||
insetHtml = files[i].url
|
||||
}
|
||||
this.thatUeditor.execCommand('insertHtml', insetHtml)
|
||||
}
|
||||
}
|
||||
},
|
||||
deactivated () {
|
||||
this.editor && this.editor.removeListener('contentChange', this.contentChangeHandler)
|
||||
this.observer && this.observer.disconnect()
|
||||
},
|
||||
beforeDestroy () {
|
||||
if (this.destroy && this.editor && this.editor.destroy) {
|
||||
this.editor.destroy()
|
||||
}
|
||||
if (this.observer && this.observer.disconnect) {
|
||||
this.observer.disconnect()
|
||||
}
|
||||
this.$store.commit('handleUploadStatus', false)
|
||||
Bus.$off('showLbUpload')
|
||||
},
|
||||
// v-model语法糖实现
|
||||
watch: {
|
||||
value: {
|
||||
handler (value) {
|
||||
// 0: 尚未初始化 1: 开始初始化但尚未ready 2 初始化完成并已ready
|
||||
value = value.replace('font-family: "Microsoft Yahei";', 'font-family: Microsoft Yahei;')
|
||||
switch (this.status) {
|
||||
case 0:
|
||||
this.status = 1
|
||||
this.initValue = value;
|
||||
// 判断执行环境是服务端还是客户端,这里的 process.client 是 Nuxt 添加的环境变量
|
||||
(this.forceInit || (typeof process !== 'undefined' && process.client) || typeof window !== 'undefined') && this._checkDependencies().then(() => {
|
||||
this.$refs.script ? this._initEditor() : this.$nextTick(() => this._initEditor())
|
||||
})
|
||||
break
|
||||
case 1:
|
||||
this.initValue = value
|
||||
break
|
||||
case 2:
|
||||
this._setContent(value)
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
},
|
||||
immediate: true
|
||||
},
|
||||
showDialog (val) {
|
||||
if (!val) {
|
||||
this.$store.commit('handleUploadStatus', val)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
1295
uniapp/uni-admin/src/components/basics/lbUpload.vue
Normal file
66
uniapp/uni-admin/src/components/basics/lbUploadCover.vue
Normal file
@@ -0,0 +1,66 @@
|
||||
<!--
|
||||
* @Description:
|
||||
* @Author: xiao li
|
||||
* @Date: 2022-06-30 10:06:40
|
||||
* @LastEditTime: 2022-09-07 15:23:24
|
||||
* @LastEditors: xiao li
|
||||
-->
|
||||
<template>
|
||||
<el-upload
|
||||
class="avatar-uploader"
|
||||
action="https://jsonplaceholder.typicode.com/posts/"
|
||||
:show-file-list="false"
|
||||
:on-success="handleAvatarSuccess"
|
||||
:before-upload="beforeAvatarUpload"
|
||||
>
|
||||
<lb-image v-if="coverImg" :src="coverImg" class="avatar" />
|
||||
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
|
||||
</el-upload>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: ['coverImg'],
|
||||
methods: {
|
||||
handleAvatarSuccess (response, file) {
|
||||
let imageUrl = URL.createObjectURL(file.raw)
|
||||
this.$emit('uploadImg', imageUrl)
|
||||
},
|
||||
beforeAvatarUpload (file) {
|
||||
const isLt2M = file.size / 1024 / 1024 < 2
|
||||
if (!isLt2M) {
|
||||
this.$message.error('上传头像图片大小不能超过 2MB!')
|
||||
}
|
||||
return isLt2M
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.avatar-uploader {
|
||||
border: 1px dashed #d9d9d9;
|
||||
border-radius: 6px;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
width: 128px;
|
||||
height: 128px;
|
||||
}
|
||||
.avatar-uploader:hover {
|
||||
border-color: #409eff;
|
||||
}
|
||||
.avatar-uploader-icon {
|
||||
font-size: 28px;
|
||||
color: #8c939d;
|
||||
width: 128px;
|
||||
height: 128px;
|
||||
line-height: 128px;
|
||||
text-align: center;
|
||||
}
|
||||
.avatar {
|
||||
width: 128px;
|
||||
height: 128px;
|
||||
display: block;
|
||||
}
|
||||
</style>
|
||||
99
uniapp/uni-admin/src/components/basics/topNav.vue
Normal file
@@ -0,0 +1,99 @@
|
||||
<template>
|
||||
<div class="lb-top-nav">
|
||||
<div @click="goBack" class="nav-item" v-if="title">
|
||||
<i class="iconfont icon-left" v-if="isBack"></i> {{ title }}
|
||||
</div>
|
||||
<div @click="goBack" class="nav-item" v-else-if="nav.length === 1">
|
||||
<i class="iconfont icon-left" v-if="isBack"></i>
|
||||
{{ $t('menu.' + nav[0].title) }}
|
||||
</div>
|
||||
<router-link
|
||||
v-else-if="nav.length > 1"
|
||||
v-for="(item, index) in nav"
|
||||
tag="div"
|
||||
class="nav-item"
|
||||
:key="index"
|
||||
active-class="nav-item-active"
|
||||
:to="item.url"
|
||||
>
|
||||
{{ $t('menu.' + item.title) }}
|
||||
</router-link>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
active: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
isBack: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
title: {
|
||||
type: String,
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
activeNav: this.active,
|
||||
nav: []
|
||||
}
|
||||
},
|
||||
created () {
|
||||
let { pagePermission } = this.$route.meta
|
||||
if (pagePermission) {
|
||||
this.nav = pagePermission
|
||||
this.activeNav = this.nav[0].index
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
goBack () {
|
||||
if (!this.isBack) return
|
||||
this.$router.back(-1)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.lb-top-nav {
|
||||
width: 100%;
|
||||
height: 60px;
|
||||
border-bottom: 1px solid #e1e1e1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 10px;
|
||||
font-size: 14px;
|
||||
white-space: nowrap;
|
||||
.nav-item {
|
||||
height: 60px;
|
||||
padding: 0 20px;
|
||||
line-height: 60px;
|
||||
cursor: pointer;
|
||||
&::after {
|
||||
position: absolute;
|
||||
content: '';
|
||||
width: 0%;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
margin: auto;
|
||||
height: 0px;
|
||||
background: $themeColor;
|
||||
transform: all 0.3 linear;
|
||||
}
|
||||
}
|
||||
.nav-item-active {
|
||||
color: $themeColor;
|
||||
position: relative;
|
||||
&::after {
|
||||
width: 90%;
|
||||
height: 2px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
50
uniapp/uni-admin/src/components/container.vue
Normal file
@@ -0,0 +1,50 @@
|
||||
<template>
|
||||
<div class="lb-container">
|
||||
<top-nav :nav='nav' @changNav='handleNav'></top-nav>
|
||||
<transition name="fade">
|
||||
<router-view></router-view>
|
||||
</transition>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
nav: []
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.nav = this.$route.meta.topMenu || []
|
||||
},
|
||||
methods: {
|
||||
handleNav (index) {}
|
||||
},
|
||||
watch: {
|
||||
$route: {
|
||||
deep: true,
|
||||
handler (val) {
|
||||
this.nav = val.meta.topMenu || []
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.lb-container{
|
||||
width: 100%;
|
||||
height: 500px;
|
||||
margin-left: 120px;
|
||||
margin-top: 120px;
|
||||
.fade-enter, .fade-leave-to {
|
||||
opacity: 0
|
||||
}
|
||||
.fade-leave, .fade-enter-to {
|
||||
opacity: 1
|
||||
}
|
||||
.fade-enter-active, .fade-leave-active {
|
||||
transition: all .2s
|
||||
}
|
||||
}
|
||||
</style>
|
||||
46
uniapp/uni-admin/src/components/footer.vue
Normal file
@@ -0,0 +1,46 @@
|
||||
<!--
|
||||
* @Descripttion:
|
||||
* @Author: xiao li
|
||||
* @Date: 2020-07-06 12:17:06
|
||||
* @LastEditors: xiao li
|
||||
* @LastEditTime: 2020-12-17 17:22:48
|
||||
-->
|
||||
<!-- 页面底部 -->
|
||||
<template>
|
||||
<div v-html="fHtml" class="lb-footer"></div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
fHtml: ''
|
||||
}
|
||||
},
|
||||
created () {
|
||||
},
|
||||
methods: {
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.lb-footer{
|
||||
width: 100%;
|
||||
height: 49px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border-top: 1px solid #ccc;
|
||||
color: #ccc;
|
||||
font-size: 12px;
|
||||
z-index: 10;
|
||||
background: #fff;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
margin: auto;
|
||||
line-height: 1;
|
||||
}
|
||||
</style>
|
||||
202
uniapp/uni-admin/src/components/header.vue
Normal file
@@ -0,0 +1,202 @@
|
||||
<!-- 页面头部 -->
|
||||
<template>
|
||||
<div class="lb-header">
|
||||
<div class="lb-left">
|
||||
<div class="logo">
|
||||
<!-- <el-image class="logo-img" :src="routesItem.logo" fit="cover" @click="$router.push('/')" ></el-image> -->
|
||||
<div @click="$router.push('/')" class="flex-center logo-img c-base">
|
||||
<img class="flex-center logo-img c-base" :src="banner" />
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="isIndex" class="admin-title"></div>
|
||||
<div v-else class="menu-title">{{ $t('menu.' + title) }}</div>
|
||||
</div>
|
||||
<div class="lb-right">
|
||||
<el-link :underline="false" @click="clearCache" :icon="icon">清除缓存</el-link>
|
||||
<el-dropdown
|
||||
v-if="!isWe7"
|
||||
class="user-name"
|
||||
trigger="click"
|
||||
@command="handleCommand"
|
||||
>
|
||||
<span class="el-dropdown-link">
|
||||
{{ username }}
|
||||
<i class="el-icon-caret-bottom"></i>
|
||||
</span>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item command="myaccount">编辑账户</el-dropdown-item>
|
||||
<el-dropdown-item command="loginout">退出登录</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// import Bus from '@/Bus.js'
|
||||
import { mapState, mapMutations } from 'vuex'
|
||||
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
isIndex: true,
|
||||
title: '',
|
||||
banner: require('@/./style/image/zhnc.png'),
|
||||
icon: 'el-icon-s-open',
|
||||
notice_list: { data: [] },
|
||||
visible: false,
|
||||
isAdmin: window.lbConfig.isWe7 && window.lbConfig.is_founder,
|
||||
agentUrl: '',
|
||||
username: window.sessionStorage.getItem('ms_username'),
|
||||
isWe7: window.lbConfig.isWe7,
|
||||
dialogVisible: false
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.handleTitle(this.$route.meta.title)
|
||||
this.handleAgentUrl()
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
routesItem: state => state.routes
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
...mapMutations(['changeRoutesItem']),
|
||||
// 用户名下拉菜单选择事件
|
||||
handleCommand (command) {
|
||||
if (command === 'myaccount') {
|
||||
this.$emit('handleAccount', true)
|
||||
} else if (command === 'loginout') {
|
||||
// this.$api.userlogout().then(res => {
|
||||
// if (res.code === 200) {
|
||||
this.changeRoutesItem({ key: 'isAuth', val: false })
|
||||
sessionStorage.removeItem('lbtk') // 删除token
|
||||
sessionStorage.removeItem('ms_username')
|
||||
this.$router.push('/login')
|
||||
window.location.reload()
|
||||
// }
|
||||
// })
|
||||
}
|
||||
},
|
||||
clearCache () {
|
||||
this.icon = 'el-icon-loading'
|
||||
this.$api.base.clearCache().then(res => {
|
||||
this.icon = 'el-icon-s-open'
|
||||
if (res.code === 200) {
|
||||
this.$message.success('清除成功!')
|
||||
}
|
||||
})
|
||||
},
|
||||
handleTitle (title) {
|
||||
this.isIndex = !title
|
||||
this.title = title
|
||||
},
|
||||
handleAgentUrl () {
|
||||
let currentUrl = window.location.href
|
||||
let agentUrl = currentUrl.slice(0, currentUrl.indexOf('#')) + '&s=/agent/index'
|
||||
this.agentUrl = agentUrl
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
$route: {
|
||||
handler (val, oldVal) {
|
||||
this.handleTitle(val.meta.title)
|
||||
},
|
||||
// 深度观察监听
|
||||
deep: true
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.lb-header {
|
||||
width: 100%;
|
||||
height: 70px;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
background: #ffffff;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
z-index: 10;
|
||||
|
||||
.lb-left {
|
||||
display: flex;
|
||||
height: 71px;
|
||||
background: #1c2c3c;
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
|
||||
.logo {
|
||||
width: 120px;
|
||||
height: 70px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
.logo-img {
|
||||
width: 45px;
|
||||
height: 45px;
|
||||
margin-bottom: 0;
|
||||
border-radius: 50%;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
|
||||
.admin-title {
|
||||
padding: 0 32px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
background: #ffffff;
|
||||
|
||||
span {
|
||||
margin-right: 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.menu-title {
|
||||
height: 71px !important;
|
||||
width: 140px;
|
||||
border-right: 1px solid #eeeeee;
|
||||
border-bottom: 1px solid #eeeeee;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
font-size: 15px;
|
||||
font-weight: bold;
|
||||
color: #666;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: #ffffff;
|
||||
}
|
||||
}
|
||||
|
||||
.lb-right {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
padding: 0 30px;
|
||||
cursor: pointer;
|
||||
.notice-item {
|
||||
margin: 0 20px;
|
||||
}
|
||||
|
||||
.el-dropdown-link {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.el-dropdown-menu__item {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
span {
|
||||
margin: 0 5px 0 20px;
|
||||
}
|
||||
|
||||
.el-link {
|
||||
margin-left: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
313
uniapp/uni-admin/src/components/layout.vue
Normal file
@@ -0,0 +1,313 @@
|
||||
<!-- 公共组件 -->
|
||||
<template>
|
||||
<div class="home">
|
||||
<lb-header @handleAccount="handleAccount"></lb-header>
|
||||
<sidebar></sidebar>
|
||||
<div
|
||||
class="container"
|
||||
:style="{
|
||||
'margin-right': adSwitch ? '220px' : '0px',
|
||||
'margin-left': sideBarSwitch ? '260px' : '120px'
|
||||
}"
|
||||
>
|
||||
<!-- 内容区域 -->
|
||||
<div class="main">
|
||||
<transition name="fade" mode="out-in">
|
||||
<keep-alive :max="1">
|
||||
<router-view v-if="$route.meta.keepAlive"></router-view>
|
||||
</keep-alive>
|
||||
</transition>
|
||||
<transition name="fade" mode="out-in">
|
||||
<router-view v-if="!$route.meta.keepAlive"></router-view>
|
||||
</transition>
|
||||
</div>
|
||||
<!-- <div
|
||||
class="home-footer"
|
||||
v-html="fHtml"
|
||||
></div> -->
|
||||
</div>
|
||||
<!-- 右侧展开折叠栏 ad -->
|
||||
<!-- <ad></ad> -->
|
||||
<!-- <lb-footer></lb-footer> -->
|
||||
|
||||
<!-- 编辑账户 -->
|
||||
<el-dialog title="编辑账户" :visible.sync="dialogVisible" width="520px">
|
||||
<el-form
|
||||
@submit.native.prevent
|
||||
:model="accountForm"
|
||||
:rules="accountFormRules"
|
||||
ref="accountForm"
|
||||
label-width="130px"
|
||||
class="basic-form"
|
||||
style="padding-right: 30px"
|
||||
>
|
||||
<el-form-item label="账号" prop="account">
|
||||
<el-input
|
||||
v-model="accountForm.account"
|
||||
:disabled="true"
|
||||
placeholder="账号"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item
|
||||
label="原密码"
|
||||
prop="old_passwd"
|
||||
>
|
||||
<el-input
|
||||
v-model="accountForm.old_passwd"
|
||||
placeholder="请输入原密码"
|
||||
></el-input>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="新密码" prop="new_passwd">
|
||||
<el-input
|
||||
v-model="accountForm.new_passwd"
|
||||
placeholder="请输入新密码"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="确认新密码" prop="again_passwd">
|
||||
<el-input
|
||||
v-model="accountForm.again_passwd"
|
||||
placeholder="请确认新密码"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="submitForm('accountForm')">{{
|
||||
$t('action.submit')
|
||||
}}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import lbHeader from './header'
|
||||
import lbFooter from './footer'
|
||||
import sidebar from './sidebar'
|
||||
import ad from './ad'
|
||||
import { mapGetters, mapState, mapMutations } from 'vuex'
|
||||
export default {
|
||||
name: 'Home',
|
||||
data () {
|
||||
let validatePassword = (rule, value, callback) => {
|
||||
if (!value) {
|
||||
callback(new Error('请输入密码'))
|
||||
} else if (!/^(\S){6,20}$/.test(value)) {
|
||||
callback(new Error('请输入6-20位非空白符的字符!'))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
}
|
||||
let validateAgainPassword = (rule, value, callback) => {
|
||||
if (!value) {
|
||||
callback(new Error('请再次输入密码'))
|
||||
} else if (value !== this.accountForm.new_passwd) {
|
||||
callback(new Error('两次输入密码不一致'))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
}
|
||||
return {
|
||||
isChangeRoutes: true,
|
||||
fHtml: '',
|
||||
dialogVisible: false,
|
||||
accountForm: {
|
||||
account: window.sessionStorage.getItem('ms_username'),
|
||||
new_passwd: ''
|
||||
},
|
||||
accountFormRules: {
|
||||
// old_passwd: {
|
||||
// required: true,
|
||||
// type: 'string',
|
||||
// validator: validatePassword,
|
||||
// trigger: 'blur'
|
||||
// },
|
||||
new_passwd: {
|
||||
required: true,
|
||||
type: 'string',
|
||||
validator: validatePassword,
|
||||
trigger: 'blur'
|
||||
},
|
||||
again_passwd: {
|
||||
required: true,
|
||||
type: 'string',
|
||||
validator: validateAgainPassword,
|
||||
trigger: 'blur'
|
||||
}
|
||||
},
|
||||
authForm: {
|
||||
pass: ''
|
||||
},
|
||||
authFormRules: {
|
||||
pass: { required: true, type: 'string', message: '请输入获取到的激活口令', trigger: 'blur' }
|
||||
},
|
||||
modelAuthImg: 'https://lbqny.migugu.com/admin/card/WechatIMG322.jpeg',
|
||||
modelAuthList: {
|
||||
// https://lbqny.migugu.com/weixin/WechatIMG495.jpeg
|
||||
longbing_card: 'https://lbqny.migugu.com/admin/card/WechatIMG322.jpeg',
|
||||
longbing_radarstore: 'https://lbqny.migugu.com/admin/card/WechatIMG322.jpeg',
|
||||
longbing_decorate: 'https://lbqny.migugu.com/admin/card/WechatIMG322.jpeg',
|
||||
longbing_shortvideo: 'https://lbqny.migugu.com/admin/card/WechatIMG322.jpeg',
|
||||
longbing_restaurant: 'https://lbqny.migugu.com/admin/card/WechatIMG322.jpeg',
|
||||
longbing_member: 'https://lbqny.migugu.com/admin/card/WechatIMG322.jpeg'
|
||||
}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
lbHeader,
|
||||
lbFooter,
|
||||
sidebar,
|
||||
ad
|
||||
},
|
||||
created () {
|
||||
this.getCopyrightInfo()
|
||||
},
|
||||
computed: {
|
||||
...mapGetters(['adSwitch', 'sideBarSwitch']),
|
||||
...mapState({
|
||||
routesItem: state => state.routes
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
...mapMutations(['changeIsShowPrompt', 'changeRoutesItem']),
|
||||
handleAccount (flag) {
|
||||
this.dialogVisible = flag
|
||||
},
|
||||
submitForm (name) {
|
||||
this.$refs[name].validate(valid => {
|
||||
if (valid) {
|
||||
let {
|
||||
new_passwd: pass
|
||||
} = JSON.parse(JSON.stringify(this.accountForm))
|
||||
this.$api.base.updatePasswd({
|
||||
pass
|
||||
}).then(res => {
|
||||
if (res.code === 200) {
|
||||
this.$message.success(this.$t('tips.successRev'))
|
||||
sessionStorage.removeItem('lbtk') // 删除token
|
||||
sessionStorage.removeItem('ms_username') // 删除用户名
|
||||
this.$router.push('/login')
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
submitAuthForm (name) {
|
||||
this.$refs[name].validate(valid => {
|
||||
if (valid) {
|
||||
let { pass } = this.authForm
|
||||
this.$api.baseGiveAuth({
|
||||
pass
|
||||
}).then(res => {
|
||||
if (res.code === 200) {
|
||||
this.$message.success(this.$t('tips.successSub'))
|
||||
this.changeRoutesItem({ key: 'isFreeAuth', val: false })
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
getCopyrightInfo () {
|
||||
let { systemCopyInfo } = this.routesItem
|
||||
if (systemCopyInfo === 1) {
|
||||
this.fHtml = ''
|
||||
} else {
|
||||
if (!systemCopyInfo.footerleft) {
|
||||
this.fHtml =
|
||||
`<div>Powered by <a class='el-link el-link--info' href="http://www.we7.cc"><b>微擎</b></a>
|
||||
v${systemCopyInfo.version} © 2014-2015
|
||||
<a class='el-link el-link--info' href="http://www.we7.cc">www.we7.cc</a></div>`
|
||||
} else {
|
||||
this.fHtml = systemCopyInfo.footerleft
|
||||
}
|
||||
if (systemCopyInfo.icp) {
|
||||
this.fHtml = this.fHtml +
|
||||
`<div>备案号:<a class='el-link el-link--info' href="http://www.miitbeian.gov.cn" target="_blank">${systemCopyInfo.icp}</a></div>`
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.home {
|
||||
border: 1px solid transparent;
|
||||
background: #f0f0f0;
|
||||
|
||||
.container {
|
||||
margin: 70px 0 0 140px;
|
||||
padding: 20px;
|
||||
background: $bgThemeColor;
|
||||
transition: margin 0.2s linear;
|
||||
|
||||
.main {
|
||||
width: 100%;
|
||||
background: #fff;
|
||||
position: relative;
|
||||
min-height: calc(100vh - 70px - 92px);
|
||||
}
|
||||
|
||||
.home-footer {
|
||||
height: 49px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
color: #ccc;
|
||||
font-size: 12px;
|
||||
z-index: 10;
|
||||
margin: 0 auto;
|
||||
line-height: 1;
|
||||
width: 50%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.fade-transform-leave-active,
|
||||
.fade-transform-enter-active {
|
||||
transition: all 0.5s;
|
||||
}
|
||||
|
||||
.fade-transform-enter {
|
||||
opacity: 0;
|
||||
transform: translateX(-30px);
|
||||
}
|
||||
|
||||
.fade-transform-leave-to {
|
||||
opacity: 0;
|
||||
transform: translateX(30px);
|
||||
}
|
||||
|
||||
.slide-fade-enter-active {
|
||||
transition: all 2s ease;
|
||||
}
|
||||
|
||||
.slide-fade-leave-active {
|
||||
transition: all 0s ease;
|
||||
}
|
||||
|
||||
.slide-fade-enter,
|
||||
.slide-fade-leave-to {
|
||||
transform: translateX(20px);
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.fade-enter,
|
||||
.fade-leave-to {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.fade-leave,
|
||||
.fade-enter-to {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.fade-enter-active,
|
||||
.fade-leave-active {
|
||||
transition: all 0.2s;
|
||||
}
|
||||
.flex-center {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
</style>
|
||||
61
uniapp/uni-admin/src/components/prompt.vue
Normal file
@@ -0,0 +1,61 @@
|
||||
<template>
|
||||
<el-dialog :visible.sync="isShowPrompt" center :before-close="close">
|
||||
<el-form>
|
||||
<div solt="title" class="titleFont">服务到期通知</div>
|
||||
<div class="delog">
|
||||
<div>你开通的套餐{{promptData.status!==1?'已于':''}} {{ promptData.time }} {{promptData.status===1?'即将':''}}到期,请联系所属运营商续费后使用</div>
|
||||
<div>感谢对我们工作的理解与支持。</div>
|
||||
<el-button type="primary" size="small" class="pad" @click="close">我知道了</el-button>
|
||||
</div>
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
import { mapState, mapMutations } from 'vuex'
|
||||
export default {
|
||||
// props:{
|
||||
// isShow:String
|
||||
// },
|
||||
data () {
|
||||
return {
|
||||
}
|
||||
},
|
||||
created () {},
|
||||
computed: {
|
||||
...mapState({
|
||||
promptData: state => state.routes.promptData,
|
||||
isShowPrompt: state => state.routes.isShowPrompt
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
...mapMutations(['changeIsShowPrompt']),
|
||||
close () {
|
||||
this.changeIsShowPrompt(false)
|
||||
},
|
||||
handleClose (done) {
|
||||
this.$confirm('确认关闭?')
|
||||
.then(_ => {
|
||||
this.changeIsShowPrompt(false)
|
||||
})
|
||||
.catch(_ => {})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.delog {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
.titleFont {
|
||||
text-align: center;
|
||||
font-size: 20px;
|
||||
color: #000000;
|
||||
font-weight: bold;
|
||||
}
|
||||
.pad {
|
||||
margin-top: 100px;
|
||||
}
|
||||
</style>
|
||||
274
uniapp/uni-admin/src/components/sidebar.vue
Normal file
@@ -0,0 +1,274 @@
|
||||
<!-- 右侧边栏 -->
|
||||
<template>
|
||||
<div class="lb-sidebar">
|
||||
<div class="menu">
|
||||
<vue-scroll :ops="ops">
|
||||
<ul class="menu-top" @click="showDialog">
|
||||
<router-link
|
||||
v-for="(item, index) in routes"
|
||||
tag="li"
|
||||
:key="index"
|
||||
active-class="menu-active"
|
||||
:to="item.path"
|
||||
:style="{ marginTop: item.meta.menuName === 'diy' ? '50px' : '0' }"
|
||||
v-show="!item.isHidden"
|
||||
>
|
||||
<i
|
||||
v-if="item.meta.icon"
|
||||
class="iconfont"
|
||||
:class="item.meta.icon"
|
||||
></i>
|
||||
<img v-else :src="item.meta.img" />
|
||||
{{ $t('menu.' + item.meta.menuName) }}
|
||||
</router-link>
|
||||
</ul>
|
||||
</vue-scroll>
|
||||
</div>
|
||||
<div :class="subnav.length > 0 ? 'isopen' : ''" class="submenu">
|
||||
<vue-scroll :ops="ops">
|
||||
<el-collapse
|
||||
v-for="(item, index) in subnav"
|
||||
:key="index"
|
||||
v-model="activeNames"
|
||||
>
|
||||
<div :title="$t('menu.' + item.name)" :name="index">
|
||||
<div class="item" v-for="(items, indexs) in item.url" :key="indexs">
|
||||
<router-link
|
||||
tag="span"
|
||||
active-class="el-collapse-item-active"
|
||||
:to="items.url"
|
||||
>{{ $t('menu.' + items.name) }}</router-link
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
</el-collapse>
|
||||
</vue-scroll>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapMutations, mapState } from 'vuex'
|
||||
import vuescroll from 'vuescroll'
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
isFirst: true,
|
||||
routes: [], // 路由表
|
||||
subnav: [], // 二级菜单表
|
||||
activeNames: [], // 二级菜单展开的配置
|
||||
ops: {
|
||||
vuescroll: {
|
||||
wheelScrollDuration: 600
|
||||
},
|
||||
scrollPanel: {
|
||||
initialScrollY: false,
|
||||
initialScrollX: false,
|
||||
scrollingX: true,
|
||||
scrollingY: true,
|
||||
speed: 1000,
|
||||
easing: undefined,
|
||||
verticalNativeBarPos: 'right'
|
||||
},
|
||||
rail: {},
|
||||
bar: {
|
||||
showDelay: 500,
|
||||
onlyShowBarOnScroll: true,
|
||||
keepShow: false,
|
||||
background: '#c1c1c1',
|
||||
opacity: 0.5,
|
||||
hoverStyle: false,
|
||||
specifyBorderRadius: false,
|
||||
minSize: false,
|
||||
size: '6px',
|
||||
disable: false
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
promptData: state => state.routes.promptData
|
||||
})
|
||||
},
|
||||
components: {
|
||||
vuescroll
|
||||
},
|
||||
created () {
|
||||
this.handleRoute()
|
||||
this.handleSubnav(this.$route.name)
|
||||
},
|
||||
methods: {
|
||||
...mapMutations([]),
|
||||
showDialog () {
|
||||
},
|
||||
/**
|
||||
* @method 处理路由表,渲染到侧边栏
|
||||
*/
|
||||
handleRoute () {
|
||||
let { routes } = this.$store.getters // JSON.parse(localStorage.getItem('routes'))
|
||||
// console.log(routes)
|
||||
this.routes = routes.filter(item => {
|
||||
if (!item.hidden) {
|
||||
return item
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* @method 处理二级菜单导航
|
||||
*/
|
||||
handleSubnav (name) {
|
||||
let { routes } = this
|
||||
// console.log(routes)
|
||||
for (let i = 0, len = routes.length; i < len; i++) {
|
||||
let children = routes[i].children
|
||||
for (let j = 0, l = children.length; j < l; j++) {
|
||||
if (children[j].name === name) {
|
||||
this.subnav = routes[i].meta.subNavName || []
|
||||
this.$store.commit('handleSideBarSwitch', this.subnav.length > 0)
|
||||
this.openSubnav()
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
/**
|
||||
* @method 展开二级菜单
|
||||
*/
|
||||
openSubnav () {
|
||||
let arr = []
|
||||
this.subnav.forEach((item, index) => {
|
||||
arr.push(index)
|
||||
})
|
||||
this.activeNames = arr
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
$route: {
|
||||
handler (val, oldVal) {
|
||||
this.handleSubnav(val.name)
|
||||
},
|
||||
// 深度观察监听
|
||||
deep: true
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.lb-sidebar {
|
||||
position: fixed;
|
||||
top: 70px;
|
||||
left: 0;
|
||||
display: flex;
|
||||
height: calc(100% - 70px);
|
||||
z-index: 2;
|
||||
.menu {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
width: 120px;
|
||||
height: 100%;
|
||||
background: #1c2c3c;
|
||||
z-index: 3;
|
||||
.menu-top {
|
||||
width: 100%;
|
||||
color: #fff;
|
||||
font-size: 14px;
|
||||
text-align: center;
|
||||
line-height: 50px;
|
||||
li {
|
||||
width: 100%;
|
||||
min-height: 50px;
|
||||
padding: 15px 8px;
|
||||
line-height: 20px;
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
i {
|
||||
margin-right: 10px;
|
||||
}
|
||||
img {
|
||||
display: inline-block;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
&:hover {
|
||||
color: #fff;
|
||||
background-color: #26394b;
|
||||
}
|
||||
}
|
||||
.menu-active {
|
||||
background: #2d8cf0;
|
||||
color: #fff;
|
||||
&:hover {
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.submenu {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 120px;
|
||||
z-index: 2;
|
||||
width: 139px;
|
||||
height: 100%;
|
||||
background: #fff;
|
||||
display: none;
|
||||
transition: all 0.2s linear;
|
||||
.el-collapse {
|
||||
margin: 0 auto;
|
||||
border-top: 1px;
|
||||
.item {
|
||||
width: 100%;
|
||||
cursor: pointer;
|
||||
text-align: center;
|
||||
span {
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
line-height: 45px;
|
||||
}
|
||||
&:hover {
|
||||
span {
|
||||
background-color: #f5faff;
|
||||
color: #2d8cf0;
|
||||
}
|
||||
.el-collapse-item-active {
|
||||
color: #2d8cf0;
|
||||
}
|
||||
}
|
||||
.el-collapse-item-active {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
display: inline-block;
|
||||
background: #c9e9ff;
|
||||
border-radius: 2px;
|
||||
text-align: center;
|
||||
color: #2d8cf0;
|
||||
font-weight: bold;
|
||||
}
|
||||
.el-collapse-item-active:before {
|
||||
content: '';
|
||||
display: block;
|
||||
width: 2px;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
background: #2d8cf0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.isopen {
|
||||
width: 139px;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
46
uniapp/uni-admin/src/directives/index.js
Normal file
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
* @Description:
|
||||
* @Author: xiao li
|
||||
* @Date: 2022-01-04 11:10:45
|
||||
* @LastEditTime: 2022-07-19 11:56:55
|
||||
* @LastEditors: xiao li
|
||||
*/
|
||||
import store from '../store'
|
||||
export default {
|
||||
// 是否有按钮权限判定
|
||||
hasPermi: {
|
||||
inserted (el, bind) {
|
||||
let routes = JSON.parse(JSON.stringify(store.getters.routes))
|
||||
let arr = bind.value.split('-')
|
||||
routes.map(item => {
|
||||
if (!item.children) return
|
||||
item.children.map(aitem => {
|
||||
if (aitem.name === arr[0]) {
|
||||
if (
|
||||
!aitem.meta.pagePermission[0].auth.includes(arr[1])
|
||||
) {
|
||||
if (!!window.ActiveXObject || 'ActiveXObject' in window) {
|
||||
el.parentNode.removeChild(el)
|
||||
} else {
|
||||
el.remove()
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
// 防止重复点击
|
||||
preventReClick: {
|
||||
inserted (el, bind) {
|
||||
el.addEventListener('click', () => {
|
||||
if (!el.disabled) {
|
||||
el.disabled = true
|
||||
setTimeout(() => {
|
||||
el.disabled = false
|
||||
}, bind.value || 1000)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
38
uniapp/uni-admin/src/i18n/index.js
Normal file
@@ -0,0 +1,38 @@
|
||||
import Vue from 'vue'
|
||||
import VueI18n from 'vue-i18n'
|
||||
|
||||
Vue.use(VueI18n)
|
||||
const DEFAULT_LANG = 'zh'
|
||||
const LOCALE_KEY = 'localeLanguage'
|
||||
|
||||
let locales = {
|
||||
'zh': require('./langs/zh.json'),
|
||||
'en': require('./langs/en.json')
|
||||
}
|
||||
// 注册i18n实例并引入语言文件,文件格式等下解析
|
||||
const i18n = new VueI18n({
|
||||
locale: DEFAULT_LANG,
|
||||
messages: locales
|
||||
})
|
||||
|
||||
export const setup = lang => {
|
||||
if (lang === undefined) {
|
||||
lang = window.localStorage.getItem(LOCALE_KEY)
|
||||
if (locales[lang] === undefined) {
|
||||
lang = DEFAULT_LANG
|
||||
}
|
||||
}
|
||||
window.localStorage.setItem(LOCALE_KEY, lang)
|
||||
|
||||
Object.keys(locales).forEach(lang => {
|
||||
document.body.classList.remove(`lang-${lang}`)
|
||||
})
|
||||
document.body.classList.add(`lang-${lang}`)
|
||||
document.body.setAttribute('lang', lang)
|
||||
|
||||
Vue.config.lang = lang
|
||||
i18n.locale = lang
|
||||
}
|
||||
|
||||
setup('zh')
|
||||
export default i18n
|
||||
32
uniapp/uni-admin/src/i18n/langs/en.json
Normal file
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"common":{
|
||||
"login":"Login",
|
||||
"logout":"Logout",
|
||||
"exit":"Exit"
|
||||
},
|
||||
"action":{
|
||||
"operation": "Operation",
|
||||
"view":"View",
|
||||
"add": "Add",
|
||||
"edit": "Edit",
|
||||
"delete": "Delete",
|
||||
"batchDelete": "Batch Delete",
|
||||
"search": "Search",
|
||||
"loading": "loading",
|
||||
"submit": "Submit",
|
||||
"comfirm": "Comfirm",
|
||||
"cancel": "Cancel",
|
||||
"reset": "Reset",
|
||||
"save": "Save"
|
||||
},
|
||||
"tips":{
|
||||
"successOper":"Successful operation",
|
||||
"successRev":"Successful revision",
|
||||
"successDel":"Successful deletion",
|
||||
"successSub":"Successful submission"
|
||||
},
|
||||
"menu":{
|
||||
"set":"Business Card Set",
|
||||
"businessCard": "Business Card"
|
||||
}
|
||||
}
|
||||
312
uniapp/uni-admin/src/i18n/langs/zh.json
Normal file
@@ -0,0 +1,312 @@
|
||||
{
|
||||
"common": {
|
||||
"login": "登录",
|
||||
"logout": "退出登录",
|
||||
"exit": "退出"
|
||||
},
|
||||
"action": {
|
||||
"authFarmer": "授权农场主",
|
||||
"authFx": "授权分销商",
|
||||
"cancelAuth": "取消授权",
|
||||
"resetAuth": "重新授权",
|
||||
"agreeRefund":"立即退款",
|
||||
"rejectRefund":"拒绝退款",
|
||||
"sendOrder":"发货/取货",
|
||||
"sendGoods":"发货",
|
||||
"uploadVideo":"上传视频",
|
||||
"joinOrder":"关联订单",
|
||||
"agreeCashLine":"在线转账",
|
||||
"agreeCaseUnder":"线下转账",
|
||||
"rejectCash":"拒绝提现",
|
||||
"editIntegral":"修改积分",
|
||||
"removeInBlackList":"移入黑名单",
|
||||
"removeOutBlackList":"移出黑名单",
|
||||
"integralRecord":"兑换明细",
|
||||
"seckillGoods":"关联商品",
|
||||
"operation": "操作",
|
||||
"examine": "审核",
|
||||
"pagedata": "查看页面",
|
||||
"view": "查看",
|
||||
"add": "新增",
|
||||
"edit": "编辑",
|
||||
"delete": "删除",
|
||||
"copy": "复制",
|
||||
"remove": "移动",
|
||||
"batchUp": "批量上架",
|
||||
"batchDown": "批量下架",
|
||||
"batchDelete": "批量删除",
|
||||
"batchRemove": "批量移动",
|
||||
"search": "搜索",
|
||||
"loading": "加载中...",
|
||||
"submit": "提交",
|
||||
"back": "返回",
|
||||
"comfirm": "确定",
|
||||
"cancel": "取消",
|
||||
"reset": "重置",
|
||||
"save": "保存",
|
||||
"upload": "上传",
|
||||
"uploadfile": "上传文件",
|
||||
"checkAll": "全选",
|
||||
"selected": "已选",
|
||||
"toSelected": "可选",
|
||||
"choice": "选择",
|
||||
"batch": "批量",
|
||||
"ON": "开启",
|
||||
"OFF": "关闭",
|
||||
"print":"打印",
|
||||
"export":"导出",
|
||||
"pass":"通过",
|
||||
"reject":"驳回",
|
||||
"addImage":"新增图片",
|
||||
"download":"下载"
|
||||
},
|
||||
"title": {
|
||||
"imageUpload": "图片上传",
|
||||
"videoUpload": "视频上传",
|
||||
"audioUpload": "音频上传"
|
||||
},
|
||||
"tips": {
|
||||
"successOper": "操作成功",
|
||||
"successRev": "修改成功",
|
||||
"successDel": "删除成功",
|
||||
"successSave": "保存成功",
|
||||
"successSub": "提交成功",
|
||||
"successRemove": "移动成功",
|
||||
"reminder": "温馨提示",
|
||||
"confirmCancel": "你确认要取消吗?",
|
||||
"confirmDelete": "你确认要删除吗?",
|
||||
"confirmRemove": "你确认要移动吗?",
|
||||
"confirmOperate": "你确认要操作吗?",
|
||||
"confirmPass": "你确认要通过吗?",
|
||||
"confirmNoPass": "你确认要取消授权吗?",
|
||||
"confirmNoRefund": "你确认要拒绝退款吗?",
|
||||
"confirmDeleteSpecImage": "当前商品仅支持一个规格名添加图片,是否需要替换已有图片的规格名?",
|
||||
"successUpload": "上传成功",
|
||||
"failedUpload": "上传失败",
|
||||
"successClip": "内容已复制到剪切板",
|
||||
"failedClip": "抱歉,复制失败",
|
||||
"fillValidate": "请填写必填项",
|
||||
"chooseFile": "请选择文件"
|
||||
},
|
||||
"menu": {
|
||||
"Home": "概况",
|
||||
"HomeManage": "概况管理",
|
||||
|
||||
|
||||
"Farmer": "农场主",
|
||||
"FarmerManage": "农场主审核",
|
||||
|
||||
|
||||
"Land": "土地",
|
||||
"LandManage": "土地管理",
|
||||
"LandClassify": "土地分类",
|
||||
"LandClassifyAdd": "新增土地分类",
|
||||
"LandClassifyEdit": "编辑土地分类",
|
||||
"LandList": "土地管理",
|
||||
"LandListAdd": "新增土地",
|
||||
"LandListEdit": "编辑土地",
|
||||
"LandSpeAdd": "新增土地规格",
|
||||
"LandSpeEdit": "编辑土地规格",
|
||||
"LandCycleAdd": "新增租赁周期",
|
||||
"LandCycleEdit": "编辑租赁周期",
|
||||
"LandMassif": "地块服务",
|
||||
"LandMassifAdd": "新增地块服务",
|
||||
"LandMassifEdit": "编辑地块服务",
|
||||
"LandServiceAdd": "新增服务类型",
|
||||
"LandServiceEdit": "编辑服务类型",
|
||||
"LandSeed": "种子管理",
|
||||
"LandSeedAdd": "新增种子",
|
||||
"LandSeedEdit": "编辑种子",
|
||||
"LandSet": "土地设置",
|
||||
|
||||
|
||||
"Claim": "认养",
|
||||
"ClaimManage": "认养管理",
|
||||
"ClaimClassify": "认养分类",
|
||||
"ClaimClassifyAdd": "新增认养分类",
|
||||
"ClaimClassifyEdit": "编辑认养分类",
|
||||
"ClaimList": "认养管理",
|
||||
"ClaimListAdd": "新增认养",
|
||||
"ClaimListEdit": "编辑认养",
|
||||
"ClaimProcessAdd": "新增认养流程",
|
||||
"ClaimProcessEdit": "编辑认养流程",
|
||||
"ClaimBreed": "养殖管理",
|
||||
"ClaimBreedAdd": "新增养殖",
|
||||
"ClaimBreedEdit": "编辑养殖",
|
||||
"ClaimCollage": "众筹活动",
|
||||
"ClaimCollageAdd": "新增众筹活动",
|
||||
"ClaimCollageEdit": "编辑众筹活动",
|
||||
"ClaimBanner": "轮播图管理",
|
||||
"ClaimBannerManage": "轮播图管理",
|
||||
"ClaimBannerAdd": "新增轮播图",
|
||||
"ClaimBannerEdit": "编辑轮播图",
|
||||
"ClaimSet": "认养设置",
|
||||
|
||||
|
||||
|
||||
"Shop": "商城",
|
||||
"ShopManage": "商城管理",
|
||||
"ShopStore": "店铺管理",
|
||||
"ShopStoreAdd": "新增店铺",
|
||||
"ShopStoreEdit": "编辑点评",
|
||||
"ShopClassify": "商品分类",
|
||||
"ShopClassifyAdd": "新增商品分类",
|
||||
"ShopClassifyEdit": "编辑商品分类",
|
||||
"ShopGoods": "商品管理",
|
||||
"ShopGoodsAdd": "新增商品",
|
||||
"ShopGoodsEdit": "编辑商品",
|
||||
|
||||
|
||||
|
||||
"Order":"订单",
|
||||
"OrderManage":"订单管理",
|
||||
"OrderShop":"商城订单",
|
||||
"OrderLand":"土地订单",
|
||||
"OrderClaim":"认养订单",
|
||||
"OrderDetail":"订单详情",
|
||||
"OrderRefundManage":"退款管理",
|
||||
"OrderRefundShop":"商城退款订单",
|
||||
"OrderDistribution":"配送订单",
|
||||
"OrderRefundShopDetail":"退款订单详情",
|
||||
"OrderEvaluateManage":"评价管理",
|
||||
"OrderEvaluate":"评价管理",
|
||||
|
||||
|
||||
|
||||
"Custom":"会员",
|
||||
"CustomManage":"会员管理",
|
||||
"CustomMemberLevel":"会员等级",
|
||||
"CustomMemberLevelAdd":"新增会员等级",
|
||||
"CustomMemberLevelEdit":"编辑会员等级",
|
||||
"CustomMemberSet":"会员设置",
|
||||
|
||||
|
||||
|
||||
"Distribution":"分销",
|
||||
"DistributionManage":"分销管理",
|
||||
"DistributionExamine":"分销商审核",
|
||||
"DistributionRelation":"分销商信息",
|
||||
"DistributionProfit":"收益信息",
|
||||
"DistributionCommission":"佣金信息",
|
||||
"DistributionCash":"提现信息",
|
||||
|
||||
|
||||
|
||||
"Finance":"财务",
|
||||
"FinanceManage":"财务管理",
|
||||
"FinanceDetail":"账务汇总详情",
|
||||
"FinanceRecord":"提现申请",
|
||||
|
||||
|
||||
|
||||
"Market": "营销",
|
||||
"MarketManage": "营销管理",
|
||||
"MarketCoupon": "卡券管理",
|
||||
"MarketCouponAdd": "新增卡券",
|
||||
"MarketCouponEdit": "编辑卡券",
|
||||
"MarketCouponSet": "卡券设置",
|
||||
"MarketIntegral": "积分活动",
|
||||
"MarketIntegralAdd": "新增积分活动",
|
||||
"MarketIntegralEdit": "编辑积分活动",
|
||||
"MarketSign": "每日签到",
|
||||
"MarketLuck": "抽奖活动",
|
||||
"MarketLuckAdd": "新增抽奖活动",
|
||||
"MarketLuckEdit": "编辑抽奖活动",
|
||||
"MarketLuckSetAdd": "新增抽奖设置",
|
||||
"MarketLuckSetEdit": "编辑抽奖设置",
|
||||
"MarketSeckill": "限时秒杀",
|
||||
"MarketSeckillAdd": "新增秒杀活动",
|
||||
"MarketSeckillEdit": "编辑秒杀活动",
|
||||
"MarketSeckillGoods": "活动商品列表",
|
||||
"MarketSeckillGoodsAdd": "新增秒杀商品",
|
||||
"MarketSeckillGoodsEdit": "编辑秒杀商品",
|
||||
|
||||
|
||||
|
||||
"Stored":"储值",
|
||||
"StoredManage":"储值管理",
|
||||
"StoredAdd":"新增储值套餐",
|
||||
"StoredEdit":"编辑储值套餐",
|
||||
"StoredOrder":"储值订单",
|
||||
|
||||
|
||||
|
||||
"Media": "多媒体",
|
||||
"MediaManage": "多媒体管理",
|
||||
"MediaHomeManage": "首页设置",
|
||||
"MediaBanner": "轮播图",
|
||||
"MediaBannerManage": "轮播图管理",
|
||||
"MediaBannerAdd": "新增轮播图",
|
||||
"MediaBannerEdit": "编辑轮播图",
|
||||
"MediaAdvertisement":"广告图",
|
||||
"MediaAdvertisementManage":"广告图管理",
|
||||
"MediaAdvertisementAdd":"新增广告图",
|
||||
"MediaAdvertisementEdit":"编辑广告图",
|
||||
"MediaArticleManage":"文章管理",
|
||||
"MediaArticleAdd":"新增文章",
|
||||
"MediaArticleEdit":"编辑文章",
|
||||
"MediaAboutManage":"关于我们",
|
||||
"MediaAboutAdd":"新增文章",
|
||||
"MediaAboutEdit":"编辑文章",
|
||||
"MediaNoticeManage":"系统公告",
|
||||
"MediaNoticeAdd":"新增系统公告",
|
||||
"MediaNoticeEdit":"编辑系统公告",
|
||||
"MediaWelfareManage":"公益栏目",
|
||||
"MediaWelfareAdd":"新增公益栏目",
|
||||
"MediaWelfareEdit":"编辑公益栏目",
|
||||
"MediaOperateManage":"运营公告",
|
||||
"MediaOperateAdd":"新增运营公告",
|
||||
"MediaOperateEdit":"编辑运营公告",
|
||||
"MediaOtherManage":"其他设置",
|
||||
"MediaSetScreen":"开屏广告",
|
||||
|
||||
|
||||
|
||||
|
||||
"Hardware": "硬件",
|
||||
"HardwareManage": "硬件管理",
|
||||
"HardwareMachine": "土地监测仪",
|
||||
"HardwareMachineAdd": "新增监测仪",
|
||||
"HardwareMachineEdit": "编辑监测仪",
|
||||
"HardwareMonitor": "监控管理",
|
||||
"HardwareMonitorAdd": "新增监控",
|
||||
"HardwareMonitorEdit": "编辑监控",
|
||||
"HardwareMonitorSet": "监控设置",
|
||||
|
||||
|
||||
|
||||
|
||||
"Account":"权限",
|
||||
"AccountManage":"权限管理",
|
||||
"AccountRole":"角色管理",
|
||||
"AccountRoleAdd":"新增角色",
|
||||
"AccountRoleEdit":"编辑角色",
|
||||
"AccountList":"账号管理",
|
||||
"AccountAdd":"新增账号",
|
||||
"AccountEdit":"编辑账号",
|
||||
|
||||
|
||||
|
||||
"System": "系统",
|
||||
"SystemSetting": "系统设置",
|
||||
"SystemWechat": "小程序设置",
|
||||
"SystemApp": "APP设置",
|
||||
"SystemPayment": "支付配置",
|
||||
"SystemPaymentWechat": "微信支付设置",
|
||||
"SystemPaymentAlipay": "支付宝支付设置",
|
||||
"SystemUpload": "上传配置",
|
||||
"SystemTransaction":"交易设置",
|
||||
"SystemMessage":"短信配置",
|
||||
"SystemNotice":"万能通知",
|
||||
"SystemClientNotice":"客户订阅消息",
|
||||
"SystemRadarNotice":"店主通知",
|
||||
"SystemOtherSetting":"其他设置",
|
||||
"SystemFreight":"运费模版",
|
||||
"SystemFreightAdd":"新增运费模版",
|
||||
"SystemFreightEdit":"编辑运费模版",
|
||||
"SystemFreightAreaAdd":"新增配送区域和运费",
|
||||
"SystemFreightAreaEdit":"编辑配送区域和运费",
|
||||
"SystemDistribution":"配送设置",
|
||||
"SystemOther":"其他设置"
|
||||
}
|
||||
}
|
||||
84
uniapp/uni-admin/src/main.js
Normal file
@@ -0,0 +1,84 @@
|
||||
/*
|
||||
* @Descripttion:
|
||||
* @Author: xiao li
|
||||
* @Date: 2020-07-06 12:17:06
|
||||
* @LastEditors: xiao li
|
||||
* @LastEditTime: 2022-07-19 20:16:14
|
||||
*/
|
||||
// The Vue build version to load with the `import` command
|
||||
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
|
||||
import Vue from 'vue'
|
||||
import App from './App'
|
||||
import i18n from './i18n' // 语言包
|
||||
import store from './store'
|
||||
import router from './router'
|
||||
import {
|
||||
api
|
||||
} from './api' // 接口
|
||||
import routes from './permission'
|
||||
import util from './utils/public'
|
||||
import Print from './utils/print'
|
||||
import {
|
||||
reg
|
||||
} from '@/utils/reg'
|
||||
import './components/basics'
|
||||
import Nprogress from 'nprogress'
|
||||
import vuescroll from 'vuescroll'
|
||||
import '../static/Ueditor/ueditor.config.js'
|
||||
import '../static/Ueditor/ueditor.all.js'
|
||||
import '../static/Ueditor/lang/zh-cn/zh-cn.js'
|
||||
|
||||
import VueClipboard from 'vue-clipboard2'
|
||||
|
||||
Vue.use(VueClipboard)
|
||||
Vue.use(vuescroll)
|
||||
|
||||
// 全局directive指令
|
||||
import directives from './directives'
|
||||
// 注册本页全局指令方法
|
||||
Object.keys(directives).forEach(key => {
|
||||
Vue.directive(key, directives[key])
|
||||
})
|
||||
|
||||
Vue.config.productionTip = false
|
||||
Vue.use(Print)
|
||||
Vue.prototype.$api = api
|
||||
Vue.prototype.$util = util
|
||||
Vue.prototype.$reg = reg
|
||||
|
||||
router.beforeEach((to, from, next) => {
|
||||
Nprogress.start()
|
||||
if (to.path === '/login') {
|
||||
window.sessionStorage.removeItem('minitk')
|
||||
window.sessionStorage.removeItem('ms_username')
|
||||
next()
|
||||
} else if (!store.getters.isAuth) {
|
||||
if (!window.sessionStorage.getItem('minitk')) {
|
||||
next('/login')
|
||||
} else {
|
||||
store.dispatch('getUserPromission', {
|
||||
to,
|
||||
next,
|
||||
routes
|
||||
})
|
||||
}
|
||||
} else {
|
||||
next()
|
||||
}
|
||||
})
|
||||
router.afterEach(() => {
|
||||
Nprogress.done()
|
||||
})
|
||||
|
||||
/* eslint-disable no-new */
|
||||
let vue = new Vue({
|
||||
el: '#app',
|
||||
router,
|
||||
i18n,
|
||||
store,
|
||||
components: {
|
||||
App
|
||||
},
|
||||
template: '<App/>'
|
||||
})
|
||||
export default vue
|
||||
1946
uniapp/uni-admin/src/permission.js
Normal file
1
uniapp/uni-admin/src/router/_import_development.js
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = file => require('@/view' + file + '.vue').default
|
||||
1
uniapp/uni-admin/src/router/_import_production.js
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = file => () => import('@/view' + file + '.vue')
|
||||
48
uniapp/uni-admin/src/router/index.js
Normal file
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
* @Descripttion:
|
||||
* @Author: xiao li
|
||||
* @Date: 2020-07-06 12:17:07
|
||||
* @LastEditors: xiao li
|
||||
* @LastEditTime: 2021-12-14 16:09:49
|
||||
*/
|
||||
import Vue from 'vue'
|
||||
import Router from 'vue-router'
|
||||
// import Layout from '@/components/layout'
|
||||
|
||||
Vue.use(Router)
|
||||
|
||||
const constantRoutes = [
|
||||
// 无权限路由
|
||||
{
|
||||
path: '/login',
|
||||
name: 'Login',
|
||||
component: () => import('@/view/login'),
|
||||
hidden: true
|
||||
},
|
||||
// 404
|
||||
{
|
||||
path: '/404',
|
||||
name: '404',
|
||||
component: () => import('@/view/404'),
|
||||
hidden: true
|
||||
},
|
||||
// 权限路由
|
||||
{
|
||||
path: '/',
|
||||
redirect: '/home',
|
||||
hidden: true // 是否展示在侧边栏的菜单里
|
||||
}
|
||||
]
|
||||
|
||||
// 路由表
|
||||
export default new Router({
|
||||
mode: 'hash',
|
||||
linkActiveClass: 'active',
|
||||
scrollBehavior: () => {
|
||||
return {
|
||||
x: 0,
|
||||
y: 0
|
||||
}
|
||||
},
|
||||
routes: constantRoutes
|
||||
})
|
||||
43
uniapp/uni-admin/src/store/index.js
Normal file
@@ -0,0 +1,43 @@
|
||||
import Vue from 'vue'
|
||||
import Vuex from 'vuex'
|
||||
import routes from './modules/routes'
|
||||
import operate from './modules/operate'
|
||||
|
||||
Vue.use(Vuex)
|
||||
|
||||
const store = new Vuex.Store({
|
||||
modules: {
|
||||
routes,
|
||||
operate
|
||||
},
|
||||
state: {
|
||||
adSwitch: false,
|
||||
sideBarSwitch: false,
|
||||
uploadStatus: false
|
||||
},
|
||||
getters: {
|
||||
adSwitch: state => {
|
||||
return state.adSwitch
|
||||
},
|
||||
sideBarSwitch: state => {
|
||||
return state.sideBarSwitch
|
||||
},
|
||||
uploadStatus: state => {
|
||||
return state.uploadStatus
|
||||
}
|
||||
},
|
||||
mutations: {
|
||||
handleAdSwitch (state, value) {
|
||||
state.adSwitch = value
|
||||
},
|
||||
handleSideBarSwitch (state, value) {
|
||||
state.sideBarSwitch = value
|
||||
},
|
||||
handleUploadStatus (state, value) {
|
||||
state.uploadStatus = value
|
||||
}
|
||||
},
|
||||
actions: {}
|
||||
})
|
||||
|
||||
export default store
|
||||
19
uniapp/uni-admin/src/store/modules/operate.js
Normal file
@@ -0,0 +1,19 @@
|
||||
const state = {
|
||||
currentIndex: 0
|
||||
}
|
||||
const getters = {
|
||||
currentIndex: state => {
|
||||
return state.currentIndex
|
||||
}
|
||||
}
|
||||
const mutations = {
|
||||
setCurrentIndex (state, index = 0) {
|
||||
state.currentIndex = index
|
||||
}
|
||||
}
|
||||
|
||||
export default {
|
||||
state,
|
||||
getters,
|
||||
mutations
|
||||
}
|
||||
185
uniapp/uni-admin/src/store/modules/routes.js
Normal file
@@ -0,0 +1,185 @@
|
||||
import {
|
||||
api
|
||||
} from '@/api'
|
||||
import router from '@/router'
|
||||
import Layout from '@/components/layout'
|
||||
const _import = require('../../router/_import_' + process.env.NODE_ENV)
|
||||
const state = {
|
||||
promptData: '',
|
||||
isFirst: true,
|
||||
isAuth: false,
|
||||
isW7: false,
|
||||
isShowPrompt: false, // 是否显示到期提醒
|
||||
systemCopyInfo: '', // 获取微擎系统版本信息
|
||||
routes: [],
|
||||
notice_num: 0
|
||||
}
|
||||
const getters = {
|
||||
isAuth: state => {
|
||||
return state.isAuth
|
||||
},
|
||||
isW7: state => {
|
||||
return state.isW7
|
||||
},
|
||||
routes: state => {
|
||||
return state.routes
|
||||
}
|
||||
}
|
||||
const mutations = {
|
||||
changeRoutesItem (state, item) {
|
||||
console.log('changeItem ==>', item)
|
||||
let { key, val } = item
|
||||
state[key] = val
|
||||
},
|
||||
saveRoutes (state, item = []) {
|
||||
state.routes = item
|
||||
state.isAuth = true
|
||||
}
|
||||
}
|
||||
const actions = {
|
||||
isWeiVersion ({ commit }, obj) {
|
||||
let data = { key: 'isW7', val: obj }
|
||||
commit('changeRoutesItem', data)
|
||||
},
|
||||
getUserPromission ({
|
||||
commit
|
||||
}, obj) {
|
||||
api.account.adminNodeInfo().then(res => {
|
||||
if (res.code === 200) {
|
||||
let { is_admin: isAdmin, node } = res.data
|
||||
let routes = JSON.parse(JSON.stringify(obj.routes))
|
||||
commit('changeRoutesItem', { key: 'allRoutes', val: routes })
|
||||
let allRoutes = []
|
||||
if (isAdmin === 0) {
|
||||
let arr = node.map(item => { return item.node })
|
||||
let isHavePayment = arr.includes('SystemPaymentWechat') && arr.includes('SystemPaymentAlipay') ? 1 : arr.includes('SystemPaymentWechat') || arr.includes('SystemPaymentAlipay') ? arr.includes('SystemPaymentWechat') ? 2 : 3 : 0
|
||||
let paymentUrl = isHavePayment && isHavePayment === 3 ? '/sys/payment' : '/sys/alipay'
|
||||
let isHaveNotice = arr.includes('SystemClientNotice') && arr.includes('SystemRadarNotice') ? 1 : arr.includes('SystemClientNotice') || arr.includes('SystemRadarNotice') ? arr.includes('SystemClientNotice') ? 2 : 3 : 0
|
||||
let noticeUrl = isHaveNotice && isHaveNotice === 3 ? '/sys/radarNotice' : '/sys/clientNotice'
|
||||
let newRoutes = []
|
||||
routes.map(item => {
|
||||
if (item.hidden) return
|
||||
let children = []
|
||||
item.children.map(aitem => {
|
||||
if (arr.includes(aitem.name)) {
|
||||
let ind = node.findIndex(bitem => {
|
||||
return bitem.node === aitem.name
|
||||
})
|
||||
aitem.meta.pagePermission[0].auth = node[ind].auth
|
||||
if ((isHavePayment && isHavePayment === 2 && aitem.name === 'SystemPaymentWechat') || (isHaveNotice && isHaveNotice === 2 && aitem.name === 'SystemClientNotice')) {
|
||||
aitem.meta.pagePermission.splice(1, 1)
|
||||
}
|
||||
if ((isHavePayment && isHavePayment === 3 && aitem.name === 'SystemPaymentAlipay') || (isHaveNotice && isHaveNotice === 3 && aitem.name === 'SystemRadarNotice')) {
|
||||
aitem.meta.pagePermission.splice(0, 1)
|
||||
}
|
||||
children.push(aitem)
|
||||
}
|
||||
})
|
||||
let hidden = item.children.filter(item => {
|
||||
return item.hidden
|
||||
})
|
||||
if (children.length > 0) {
|
||||
let arr = children.map(item => {
|
||||
return item.name
|
||||
})
|
||||
children = [...children, ...hidden]
|
||||
item.children = children
|
||||
if (item.meta.subNavName && item.meta.subNavName.length > 0) {
|
||||
let subNavName = []
|
||||
item.meta.subNavName.map(aitem => {
|
||||
let url = aitem.url.filter(bitem => {
|
||||
return arr.includes(bitem.name)
|
||||
})
|
||||
if (aitem.name === 'SystemSetting') {
|
||||
if (isHavePayment && paymentUrl) {
|
||||
url.push({name: 'SystemPayment', url: paymentUrl})
|
||||
}
|
||||
if (isHaveNotice && noticeUrl) {
|
||||
url.push({name: 'SystemNotice', url: noticeUrl})
|
||||
}
|
||||
}
|
||||
if (url.length > 0) {
|
||||
subNavName.push({name: aitem.name, url})
|
||||
}
|
||||
})
|
||||
if (subNavName.length > 0) {
|
||||
item.redirect = subNavName[0].url[0].url
|
||||
item.meta.subNavName = subNavName
|
||||
}
|
||||
}
|
||||
newRoutes.push(item)
|
||||
}
|
||||
})
|
||||
allRoutes = [...newRoutes, {
|
||||
path: '*',
|
||||
redirect: '/404',
|
||||
hidden: true
|
||||
}]
|
||||
} else {
|
||||
allRoutes = routes
|
||||
}
|
||||
commit('saveRoutes', allRoutes)
|
||||
obj.routes = allRoutes
|
||||
let { path = '' } = obj.to
|
||||
let arr = []
|
||||
allRoutes.map(item => {
|
||||
if (item.children && item.children.length) {
|
||||
item.children.map(aitem => {
|
||||
arr.push(`${item.path}/${aitem.path}`)
|
||||
})
|
||||
}
|
||||
})
|
||||
if (!path || (path && !arr.includes(path))) {
|
||||
obj.to = allRoutes[0]
|
||||
}
|
||||
routerGo(allRoutes, obj)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
export default {
|
||||
state,
|
||||
getters,
|
||||
mutations,
|
||||
actions
|
||||
}
|
||||
|
||||
function routerGo (routes, obj) {
|
||||
let getRouter = filterAsyncRouter(routes) // 过滤路由
|
||||
router.options.routes.push(...getRouter)
|
||||
router.addRoutes(getRouter) // 动态添加路由
|
||||
// localStorage.setItem('routes', JSON.stringify(getRouter))
|
||||
obj.next({
|
||||
...obj.to,
|
||||
replace: true
|
||||
})
|
||||
}
|
||||
|
||||
function filterAsyncRouter (asyncRouterMap) { // 遍历后台传来的路由字符串,转换为组件对象
|
||||
const accessedRouters = asyncRouterMap.filter(route => {
|
||||
if (route.component) {
|
||||
if (route.component === 'Layout') { // Layout组件特殊处理
|
||||
route.component = Layout
|
||||
} else {
|
||||
route.component = _import(route.component)
|
||||
}
|
||||
}
|
||||
if (route.children && route.children.length) {
|
||||
route.children = filterAsyncRouter(route.children)
|
||||
}
|
||||
return true
|
||||
})
|
||||
return accessedRouters
|
||||
}
|
||||
|
||||
// function getRouteChildre (routes, name) {
|
||||
// let routeObj = ''
|
||||
// for (let i = 0, len = routes.length; i < len; i++) {
|
||||
// if (routes[i].path === name) {
|
||||
// routeObj = routes[i]
|
||||
// break
|
||||
// }
|
||||
// }
|
||||
// return routeObj
|
||||
// }
|
||||
394
uniapp/uni-admin/src/style/base.css
Normal file
@@ -0,0 +1,394 @@
|
||||
|
||||
/* 字体大小 */
|
||||
.f-icontext{font-size: 11px}/* 很小的文字,一般和图标一起使用 */
|
||||
.f-caption{font-size: 12px;}/* 辅助描述性文字 */
|
||||
.f-desc{font-size: 13px;}/* 辅助描述性文字 */
|
||||
.f-paragraph{font-size: 14px;}/* 段落字体 */
|
||||
.f-title{font-size: 16px;}/* 标题 */
|
||||
.f-big-title{font-size: 20px;}/* 大点的标题 */
|
||||
|
||||
|
||||
/* 字体颜色 */
|
||||
.c-base{color:#ffffff;}/* 白色 */
|
||||
.c-black{color: #000000;}/* 黑色 */
|
||||
.c-title{color: #333333}/* 标题/副标题 */
|
||||
.c-caption{color:#999999;}/* 辅助描述性文字 */
|
||||
.c-paragraph{color:#666666;}/* 段落字体 */
|
||||
.c-success{color:#19c865;}/* 成功/链接文字 */
|
||||
.c-tips{color:#F56C6C;}/* 失效 */
|
||||
.c-warning{color:#f12c20;}/* 警告/非法 */
|
||||
.c-danger{color:#FA5B69;}/* 警告/非法 */
|
||||
.c-nodata{color:#cccccc;}/* 暂无数据 */
|
||||
.c-link{color:#409EFF;}/* 链接文字 */
|
||||
.c-shadow{text-shadow:1px 1px 1px #808080;}/* 字体阴影 */
|
||||
|
||||
/* 填充色 */
|
||||
.fill-base{background:#ffffff;}/* 默认 */
|
||||
.fill-body{background:#f4f6f8;}/* 页面 */
|
||||
.fill-primary{background:#19c865;}/* 主题色/主要活动按钮 */
|
||||
.fill-caption{background:#ffd753;}/* 辅助色 */
|
||||
.fill-warning{background:#f12c20;}/* 警告/非法 */
|
||||
.fill-second{background:#efeff4;}/* 区块分割线 */
|
||||
.fill-space{background:#eeeeee;}/* 次要活动按钮 */
|
||||
|
||||
/* 阴影 */
|
||||
.box-shadow{box-shadow:0 2px 15px rgba(21,13,13,0.05);}
|
||||
.box-shadow-mini{box-shadow: 1px 0 5px rgba(4,0,0,0.08);}
|
||||
|
||||
/* 字体样式 */
|
||||
text{vertical-align: middle;}/* 上下居中 */
|
||||
.text-left{text-align: left;}/* 左对齐 */
|
||||
.text-center { text-align: center}/* 中对齐 */
|
||||
.text-right {text-align: right}/* 右对齐 */
|
||||
.text-justify{text-align: justify;}/* 两端对齐,谨慎使用 */
|
||||
.text-justify::after{content: '';width: 100%;display: inline-block;}
|
||||
.text-delete {text-decoration: line-through}/* 删除线 */
|
||||
.text-underline{text-decoration: underline}/* 下划线 */
|
||||
.text-bold{ font-weight:bold;}/* 加粗 */
|
||||
.text-normal{font-style:normal}
|
||||
|
||||
|
||||
/* 文本溢出省略 */
|
||||
.ellipsis{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}
|
||||
.ellipsis-2{display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp:2;overflow: hidden;}
|
||||
.ellipsis-3{display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp:3;overflow: hidden;}
|
||||
.ellipsis-4{display: -webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp:4;overflow: hidden;}
|
||||
|
||||
|
||||
/* 最大宽度 */
|
||||
.max-300{max-width: 150px;}
|
||||
.max-380{max-width: 190px;}
|
||||
.max-456{max-width: 228px;}
|
||||
.max-500{max-width: 150px;}
|
||||
.max-520{max-width: 260px;}
|
||||
.max-550{max-width: 275px;}
|
||||
.max-566{max-width: 288px;}
|
||||
.max-580{max-width: 290px;}
|
||||
.h-100{height: 50px;}
|
||||
.h-140{height: 70px;}
|
||||
.h-64{height: 32px;}
|
||||
.lh-54{line-height: 27px;}
|
||||
.h-80{height: 40px;}
|
||||
/* 外间距 */
|
||||
.mg-sm{margin:5px;}
|
||||
.mg-md{margin:10px;}
|
||||
.mg-lg{margin:16px;}
|
||||
.mg-xl{margin:20px;}
|
||||
|
||||
.mt-sm{margin-top:5px;}
|
||||
.mt-md{margin-top:10px;}
|
||||
.mt-lg{margin-top:16px;}
|
||||
.mt-xl{margin-top:20px;}
|
||||
|
||||
.mr-sm{margin-right:5px;}
|
||||
.mr-md{margin-right:10px;}
|
||||
.mr-lg{margin-right:16px;}
|
||||
.mr-xl{margin-right:20px;}
|
||||
|
||||
.mb-sm{margin-bottom:5px;}
|
||||
.mb-md{margin-bottom:10px;}
|
||||
.mb-lg{margin-bottom:16px;}
|
||||
.mb-xl{margin-bottom:20px;}
|
||||
|
||||
.ml-sm{margin-left:5px;}
|
||||
.ml-md{margin-left:10px;}
|
||||
.ml-lg{margin-left:16px;}
|
||||
.ml-xl{margin-left:20px;}
|
||||
|
||||
|
||||
/* 内间距 */
|
||||
|
||||
.pd-sm{padding:5px;}
|
||||
.pd-md{padding:10px;}
|
||||
.pd-lg{padding:16px;}
|
||||
.pd-xl{padding:20px;}
|
||||
|
||||
.pt-sm{padding-top:5px;}
|
||||
.pt-md{padding-top:10px;}
|
||||
.pt-lg{padding-top:16px;}
|
||||
.pt-xl{padding-top:20px;}
|
||||
|
||||
.pr-sm{padding-right:5px;}
|
||||
.pr-md{padding-right:10px;}
|
||||
.pr-lg{padding-right:16px;}
|
||||
.pr-xl{padding-right:20px;}
|
||||
|
||||
.pb-sm{padding-bottom:5px;}
|
||||
.pb-md{padding-bottom:10px;}
|
||||
.pb-lg{padding-bottom:16px;}
|
||||
.pb-xl{padding-bottom:20px;}
|
||||
|
||||
.pl-sm{padding-left:5px;}
|
||||
.pl-md{padding-left:10px;}
|
||||
.pl-lg{padding-left:16px;}
|
||||
.pl-xl{padding-left:20px;}
|
||||
|
||||
|
||||
/* 图标尺寸 */
|
||||
.icon-xs{width:16px; height:16px;display: block;font-size: 16px;}
|
||||
.icon-sm{width:22px; height:22px;display: block;font-size: 22px;}
|
||||
.icon-md{width:30px; height:30px;display: block;font-size: 30px;}
|
||||
.icon-lg{width:40px; height:40px;display: block;font-size: 40px;}
|
||||
|
||||
|
||||
/* 组件间距 */
|
||||
.space-sm{height: 5px;}
|
||||
.space-md{height: 10px;}
|
||||
.space-lg{height: 16px;}
|
||||
.space-xl{height: 20px;}
|
||||
.space-body{height: 75px;}
|
||||
.space{height: 1px ;background: rgba(216, 216, 216, 0.5);}
|
||||
|
||||
|
||||
/* 圆角 */
|
||||
.radius{border-radius: 5000px;}
|
||||
.radius-5 {border-radius: 3px;}
|
||||
.radius-10 {border-radius: 5px;}
|
||||
.radius-15 {border-radius: 8px;}
|
||||
.circle{border-radius: 50%;}
|
||||
|
||||
/* 旋转 */
|
||||
.rotate-45{transform: rotate(45deg);}
|
||||
.rotate-90{transform: rotate(90deg);}
|
||||
.rotate-180{transform: rotate(180deg);}
|
||||
.rotate-270{transform: rotate(270deg);}
|
||||
|
||||
/* 定位 */
|
||||
.rel{position: relative;}
|
||||
.abs{position: absolute;}
|
||||
.fix{position: fixed;width: 100%;z-index: 100;}
|
||||
|
||||
/* 固定 */
|
||||
.fixed-top{position: fixed;left: 0;right: 0;top: 0;z-index: 100;}
|
||||
.fixed-bottom{position: fixed;left: 0;right: 0;bottom: 0;z-index: 100;}
|
||||
/* 灰度 */
|
||||
.grayscale {-webkit-filter: grayscale(100%);filter: grayscale(100%);}
|
||||
|
||||
/*flex布局,可以自己定义适合自己的*/
|
||||
|
||||
.flex {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.flex-1 {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.flex-2 {
|
||||
flex: 0 0 50%;
|
||||
}
|
||||
|
||||
.flex-3 {
|
||||
flex: 0 0 33.3%;
|
||||
}
|
||||
|
||||
.flex-4 {
|
||||
flex: 0 0 25%;
|
||||
}
|
||||
|
||||
.flex-5 {
|
||||
flex: 0 0 20%;
|
||||
}
|
||||
|
||||
|
||||
.flex-column {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.flex-warp {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.flex-center {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.flex-between {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.flex-x-center {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.flex-x-between {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.flex-y-center {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.flex-y-start {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.flex-y-end {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
}
|
||||
|
||||
.flex-y-baseline {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
}
|
||||
|
||||
/* 头像 */
|
||||
.avatar {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
display: inline-flex;
|
||||
text-align: center;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background: #f4f6f8;
|
||||
color: #fff;
|
||||
white-space: nowrap;
|
||||
position: relative;
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.avatar.md {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
}
|
||||
.avatar.sm {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
}
|
||||
.avatar-group {
|
||||
direction: ltl;
|
||||
unicode-bidi: bidi-override;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.avatar-group .avatar {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
font-size: 1em;
|
||||
border-radius: 50%;
|
||||
margin-left: -10px;
|
||||
border: 2px solid white;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.avatar-group .avatar:nth-child(1) {
|
||||
margin-left: 0rpx;
|
||||
}
|
||||
/* 1px方案,改变border的颜色即可 */
|
||||
|
||||
.b-1px, .b-1px-t, .b-1px-b, .b-1px-tb, .b-1px-l, .b-1px-r {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.b-1px:before {
|
||||
content: " ";
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 200%;
|
||||
border: 1px solid rgba(0, 0, 0, 0.1);
|
||||
color: rgba(0, 0, 0, 0.1);
|
||||
height: 200%;
|
||||
transform-origin: left top;
|
||||
transform: scale(0.5);
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.b-1px-t:before {
|
||||
content: " ";
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
right: 0;
|
||||
height: 1px;
|
||||
border-top: 1px solid rgba(0, 0, 0, 0.1);
|
||||
color: rgba(0, 0, 0, 0.1);
|
||||
transform-origin: 0 0;
|
||||
transform: scaley(0.5);
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.b-1px-b:after {
|
||||
content: " ";
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
height: 1px;
|
||||
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
|
||||
color: rgba(0, 0, 0, 0.1);
|
||||
transform-origin: 0 100%;
|
||||
transform: scaley(0.5);
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.b-1px-tb:before {
|
||||
content: " ";
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
right: 0;
|
||||
height: 1px;
|
||||
border-top: 1px solid rgba(0, 0, 0, 0.1);
|
||||
color: rgba(0, 0, 0, 0.1);
|
||||
transform-origin: 0 0;
|
||||
transform: scaley(0.5);
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.b-1px-tb:after {
|
||||
content: " ";
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
height: 1px;
|
||||
border-bottom: 1px solid rgba(0, 0, 0, 0.1);
|
||||
color: rgba(0, 0, 0, 0.1);
|
||||
transform-origin: 0 100%;
|
||||
transform: scaley(0.5);
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.b-1px-l::before {
|
||||
content: " ";
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 1px;
|
||||
bottom: 0;
|
||||
border-left: 1px solid rgba(0, 0, 0, 0.1);
|
||||
color: rgba(0, 0, 0, 0.1);
|
||||
transform-origin: 0 0;
|
||||
transform: scalex(0.5);
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.b-1px-r::after {
|
||||
content: " ";
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
width: 1px;
|
||||
bottom: 0;
|
||||
border-right: 1px solid rgba(0, 0, 0, 0.1);
|
||||
color: rgba(0, 0, 0, 0.1);
|
||||
transform-origin: 100% 0;
|
||||
transform: scalex(0.5);
|
||||
box-sizing: border-box;
|
||||
}
|
||||
28
uniapp/uni-admin/src/style/common.css
Normal file
@@ -0,0 +1,28 @@
|
||||
.page-search-form{
|
||||
width: 100%;
|
||||
padding: 20px 32px 0px 32px;
|
||||
margin-bottom: 20px;
|
||||
border: 1px solid #E1E1E1;
|
||||
}
|
||||
.page-search-form .el-row{
|
||||
width: 100%;
|
||||
}
|
||||
.el-button .iconfont {
|
||||
font-size: 12px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
.lb-tips-text{
|
||||
font-size: 12px;
|
||||
line-height:1.6;
|
||||
}
|
||||
.cursor-pointer {
|
||||
cursor: pointer;
|
||||
}
|
||||
.lb-space{
|
||||
height:20px;
|
||||
background: #f4f6f8;
|
||||
}
|
||||
.lb-border{
|
||||
padding: 20px;
|
||||
border: 1px solid #E1E1E1;
|
||||
}
|
||||
277
uniapp/uni-admin/src/style/diy.css
Normal file
@@ -0,0 +1,277 @@
|
||||
/* 拖拽组件 */
|
||||
.drag-box::-webkit-scrollbar {
|
||||
/*滚动条整体样式*/
|
||||
width: 0;
|
||||
/*高宽分别对应横竖滚动条的尺寸*/
|
||||
height: 0;
|
||||
}
|
||||
.drag-box {
|
||||
width: 100%;
|
||||
flex: 1;
|
||||
overflow-x: hidden;
|
||||
/* overflow-y: scroll; */
|
||||
}
|
||||
|
||||
.drag-item {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
}
|
||||
.drag-item-questionnaire{
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
position: fixed;
|
||||
bottom: 225px;
|
||||
margin-left: 300px;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
.drag-item--select {
|
||||
border: 1px dashed #429dff;
|
||||
}
|
||||
|
||||
.drag-item:hover {
|
||||
border: 1px dashed #429dff;
|
||||
}
|
||||
/* 操作栏 */
|
||||
.op-area {
|
||||
background: #fff;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
display: none;
|
||||
z-index: 100;
|
||||
border: 1px solid #429dff;
|
||||
border-radius: 0 0 3px 3px;
|
||||
}
|
||||
|
||||
.op-area-item {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.op-area .op-area-item:not(:first-child) {
|
||||
border-left: 1px solid #429dff;
|
||||
}
|
||||
|
||||
.drag-item:hover .op-area {
|
||||
display: flex;
|
||||
}
|
||||
/* 表单 */
|
||||
.form-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 10px;
|
||||
}
|
||||
.form-label {
|
||||
width: 110px;
|
||||
}
|
||||
.form-explain {
|
||||
font-size: 12px;
|
||||
color: #888;
|
||||
margin-left: 10px;
|
||||
}
|
||||
/* 选择模板 */
|
||||
.module-item {
|
||||
width: 90px;
|
||||
height: 110px;
|
||||
border: 1px solid #eee;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin: 5px 0;
|
||||
}
|
||||
/* .module-item:not(:first-child) {
|
||||
margin-left: 10px;
|
||||
} */
|
||||
.module-item:nth-child(odd){
|
||||
margin-right: 10px;
|
||||
}
|
||||
.module-item--select {
|
||||
border-color: #429dff;
|
||||
}
|
||||
.module-item_icon {
|
||||
width: 70px;
|
||||
height: 70px;
|
||||
background: #fff;
|
||||
/* background: #e0f2f9; */
|
||||
margin: 5px 0;
|
||||
}
|
||||
.module-item_text {
|
||||
font-size: 12px;
|
||||
line-height: 20px;
|
||||
}
|
||||
.data-item {
|
||||
width: 100%;
|
||||
border: 1px solid #eeeeee;
|
||||
margin-top: 20px;
|
||||
position: relative;
|
||||
}
|
||||
/* 删除模板按钮 */
|
||||
.del-box {
|
||||
position: absolute;
|
||||
right: -11px;
|
||||
top: -11px;
|
||||
z-index: 20;
|
||||
background: white;
|
||||
border-radius: 50%;
|
||||
}
|
||||
.del-box .el-icon-circle-close {
|
||||
font-size: 24px;
|
||||
}
|
||||
/* 添加模板 */
|
||||
.add-btn {
|
||||
width: 320px;
|
||||
height: 70px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
border: 1px solid #eeeeee;
|
||||
background: #fff;
|
||||
margin-top: 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
}
|
||||
.add-btn_title {
|
||||
color: #429dff;
|
||||
font-size: 14px;
|
||||
}
|
||||
.add-btn_caption {
|
||||
color: #999;
|
||||
font-size: 12px;
|
||||
margin-top: 4px;
|
||||
}
|
||||
/* 选择弹窗 */
|
||||
.dialog-footer-diy {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.dialog-footer_op {
|
||||
flex: 1;
|
||||
text-align: left;
|
||||
}
|
||||
.dialog-module-list {
|
||||
/* height: 70px; */
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
.dialog-module-item {
|
||||
width: 90px;
|
||||
height: 34px;
|
||||
background: #eeeeee;
|
||||
font-size: 14px;
|
||||
color: #333;
|
||||
border-radius: 3px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.dialog-module-item:not(:first-child) {
|
||||
margin-left: 30px;
|
||||
}
|
||||
.dialog-module-item--select {
|
||||
background: #429dff;
|
||||
color: #fff;
|
||||
}
|
||||
.dialog-left {
|
||||
width: 170px;
|
||||
height: auto;
|
||||
/* height: 400px; */
|
||||
border: 1px solid #eeeeee;
|
||||
margin-right: 20px;
|
||||
}
|
||||
.dialog-left_title {
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
color: #333333;
|
||||
height: 40px;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: #eeeeee;
|
||||
}
|
||||
.dialog-left_item {
|
||||
color: #333333;
|
||||
height: 40px;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: #fff;
|
||||
}
|
||||
.dialog-left_item--select {
|
||||
background: #e0f2f9;
|
||||
color: #429dff;
|
||||
}
|
||||
/*官网页 通用标题栏 */
|
||||
.web-item-title {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
border-radius: 50%;
|
||||
background: white;
|
||||
border:4px solid #000000;
|
||||
}
|
||||
/* 名片页 通用标题栏*/
|
||||
.card-item-title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding:10px 16px;
|
||||
font-weight: bold;
|
||||
}
|
||||
.card-icon-box {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
border-radius: 50%;
|
||||
background: #000000;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.card-icon-box .iconfont{
|
||||
transform: scale(0.8);
|
||||
}
|
||||
/* VR全景/我的视频 */
|
||||
.cover-box {
|
||||
width: 343px;
|
||||
height: 200px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.cover-img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: #EEEEEE;
|
||||
border-radius: 7px;
|
||||
}
|
||||
|
||||
.cover-content {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.cover-btn {
|
||||
width: 75px;
|
||||
height: 28px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 14px;
|
||||
background: #eeeeee;
|
||||
font-size: 12px;
|
||||
margin-top: 10px;
|
||||
}
|
||||
484
uniapp/uni-admin/src/style/icon.css
Normal file
@@ -0,0 +1,484 @@
|
||||
@font-face {
|
||||
font-family: "iconfont"; /* Project id 3016672 */
|
||||
src: url('//at.alicdn.com/t/c/font_3016672_ifef15ow7n.woff2?t=1660010518400') format('woff2'),
|
||||
url('//at.alicdn.com/t/c/font_3016672_ifef15ow7n.woff?t=1660010518400') format('woff'),
|
||||
url('//at.alicdn.com/t/c/font_3016672_ifef15ow7n.ttf?t=1660010518400') format('truetype'),
|
||||
url('//at.alicdn.com/t/c/font_3016672_ifef15ow7n.svg?t=1660010518400#iconfont') format('svg');
|
||||
}
|
||||
|
||||
.iconfont {
|
||||
font-family: "iconfont" !important;
|
||||
font-size: 16px;
|
||||
line-height: 1;
|
||||
font-style: normal;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
.icon-fenxiao:before {
|
||||
content: "\e630";
|
||||
}
|
||||
|
||||
.icon-down:before {
|
||||
content: "\e68e";
|
||||
}
|
||||
|
||||
.icon-up:before {
|
||||
content: "\e6b3";
|
||||
}
|
||||
|
||||
.icon-account:before {
|
||||
content: "\e610";
|
||||
}
|
||||
|
||||
.icon-alipay:before {
|
||||
content: "\e68a";
|
||||
}
|
||||
|
||||
.icon-tixing:before {
|
||||
content: "\e612";
|
||||
}
|
||||
|
||||
.icon-gengduo:before {
|
||||
content: "\e607";
|
||||
}
|
||||
|
||||
.icon-wenhao:before {
|
||||
content: "\e61a";
|
||||
}
|
||||
|
||||
.icon-yingjian:before {
|
||||
content: "\e64b";
|
||||
}
|
||||
|
||||
.icon-star-bold-fill:before {
|
||||
content: "\e603";
|
||||
}
|
||||
|
||||
.icon-gouwuche:before {
|
||||
content: "\e601";
|
||||
}
|
||||
|
||||
.icon-required:before {
|
||||
content: "\e808";
|
||||
}
|
||||
|
||||
.icon-edit:before {
|
||||
content: "\e7d8";
|
||||
}
|
||||
|
||||
.icon-search:before {
|
||||
content: "\e605";
|
||||
}
|
||||
|
||||
.icon-camera:before {
|
||||
content: "\e606";
|
||||
}
|
||||
|
||||
.icon-right-bold:before {
|
||||
content: "\e617";
|
||||
}
|
||||
|
||||
.icon-add-circle-fill:before {
|
||||
content: "\e61d";
|
||||
}
|
||||
|
||||
.icon-del:before {
|
||||
content: "\e621";
|
||||
}
|
||||
|
||||
.icon-chakan:before {
|
||||
content: "\e624";
|
||||
}
|
||||
|
||||
.icon-home-fill:before {
|
||||
content: "\e625";
|
||||
}
|
||||
|
||||
.icon-weixin:before {
|
||||
content: "\e627";
|
||||
}
|
||||
|
||||
.icon-zhibo:before {
|
||||
content: "\e62a";
|
||||
}
|
||||
|
||||
.icon-home:before {
|
||||
content: "\e62b";
|
||||
}
|
||||
|
||||
.icon-mine:before {
|
||||
content: "\e62c";
|
||||
}
|
||||
|
||||
.icon-cate:before {
|
||||
content: "\e62d";
|
||||
}
|
||||
|
||||
.icon-claim-fill:before {
|
||||
content: "\e62e";
|
||||
}
|
||||
|
||||
.icon-cate-fill:before {
|
||||
content: "\e62f";
|
||||
}
|
||||
|
||||
.icon-shop:before {
|
||||
content: "\e631";
|
||||
}
|
||||
|
||||
.icon-shop-fill:before {
|
||||
content: "\e633";
|
||||
}
|
||||
|
||||
.icon-erweima:before {
|
||||
content: "\e634";
|
||||
}
|
||||
|
||||
.icon-claim:before {
|
||||
content: "\e635";
|
||||
}
|
||||
|
||||
.icon-mine-fill:before {
|
||||
content: "\e636";
|
||||
}
|
||||
|
||||
.icon-about-us:before {
|
||||
content: "\e637";
|
||||
}
|
||||
|
||||
.icon-share:before {
|
||||
content: "\e638";
|
||||
}
|
||||
|
||||
.icon-add-square:before {
|
||||
content: "\e63f";
|
||||
}
|
||||
|
||||
.iconshouye:before {
|
||||
content: "\e644";
|
||||
}
|
||||
|
||||
.icon-seed:before {
|
||||
content: "\e645";
|
||||
}
|
||||
|
||||
.icon-remove-square:before {
|
||||
content: "\e646";
|
||||
}
|
||||
|
||||
.icon-dianhua:before {
|
||||
content: "\e64c";
|
||||
}
|
||||
|
||||
.icon-remove-circle:before {
|
||||
content: "\e651";
|
||||
}
|
||||
|
||||
.icon-down-bold:before {
|
||||
content: "\e652";
|
||||
}
|
||||
|
||||
.icon-add-circle:before {
|
||||
content: "\e657";
|
||||
}
|
||||
|
||||
.icon-shuaxin:before {
|
||||
content: "\e658";
|
||||
}
|
||||
|
||||
.icon-qiehuan:before {
|
||||
content: "\e659";
|
||||
}
|
||||
|
||||
.icon-up-bold:before {
|
||||
content: "\e65a";
|
||||
}
|
||||
|
||||
.icon-delete:before {
|
||||
content: "\e65b";
|
||||
}
|
||||
|
||||
.icon-peisong:before {
|
||||
content: "\e65d";
|
||||
}
|
||||
|
||||
.icon-sall-out:before {
|
||||
content: "\e65e";
|
||||
}
|
||||
|
||||
.icon-xitong:before {
|
||||
content: "\e65f";
|
||||
}
|
||||
|
||||
.icon-shipin:before {
|
||||
content: "\e66a";
|
||||
}
|
||||
|
||||
.icon-dingwei:before {
|
||||
content: "\e674";
|
||||
}
|
||||
|
||||
.icon-dianpu:before {
|
||||
content: "\e675";
|
||||
}
|
||||
|
||||
.icon-land:before {
|
||||
content: "\e76b";
|
||||
}
|
||||
|
||||
.icon-claim-service:before {
|
||||
content: "\e8a9";
|
||||
}
|
||||
|
||||
.icon-gouwuche-fill:before {
|
||||
content: "\e600";
|
||||
}
|
||||
|
||||
.icon-dingwei-fill:before {
|
||||
content: "\e602";
|
||||
}
|
||||
|
||||
.icon-left:before {
|
||||
content: "\e604";
|
||||
}
|
||||
|
||||
.icon-right:before {
|
||||
content: "\e608";
|
||||
}
|
||||
|
||||
.icon-close:before {
|
||||
content: "\e609";
|
||||
}
|
||||
|
||||
.icon-add:before {
|
||||
content: "\e611";
|
||||
}
|
||||
|
||||
.icon-chanpin:before {
|
||||
content: "\e73e";
|
||||
}
|
||||
|
||||
.icon-caiwu:before {
|
||||
content: "\e6a7";
|
||||
}
|
||||
|
||||
.icon-kehu:before {
|
||||
content: "\e6ad";
|
||||
}
|
||||
|
||||
.icon-member:before {
|
||||
content: "\e761";
|
||||
}
|
||||
|
||||
.icon-shenhe:before {
|
||||
content: "\e695";
|
||||
}
|
||||
|
||||
.icon-daifukuan:before {
|
||||
content: "\e787";
|
||||
}
|
||||
|
||||
.icon-dingdanguanli:before {
|
||||
content: "\e632";
|
||||
}
|
||||
|
||||
.icon-shangpin:before {
|
||||
content: "\e63c";
|
||||
}
|
||||
|
||||
.icon-daihexiao:before {
|
||||
content: "\e6f8";
|
||||
}
|
||||
|
||||
.icon-yiwancheng:before {
|
||||
content: "\e6f9";
|
||||
}
|
||||
|
||||
.icon-pingjia:before {
|
||||
content: "\e77e";
|
||||
}
|
||||
|
||||
.icon-shouhouguanli:before {
|
||||
content: "\e773";
|
||||
}
|
||||
|
||||
.icon-wodeshouhou:before {
|
||||
content: "\e60d";
|
||||
}
|
||||
|
||||
.icon-tongzhi-fill:before {
|
||||
content: "\e615";
|
||||
}
|
||||
|
||||
.icon-down-fill:before {
|
||||
content: "\e60a";
|
||||
}
|
||||
|
||||
.icon-xuanze:before {
|
||||
content: "\e77c";
|
||||
}
|
||||
|
||||
.icon-xuanze-fill:before {
|
||||
content: "\e77d";
|
||||
}
|
||||
|
||||
.icon-switch:before {
|
||||
content: "\e642";
|
||||
}
|
||||
|
||||
.icon-switch-on:before {
|
||||
content: "\e643";
|
||||
}
|
||||
|
||||
.icon-jian-fill:before {
|
||||
content: "\e61f";
|
||||
}
|
||||
|
||||
.icon-jian:before {
|
||||
content: "\e6fa";
|
||||
}
|
||||
|
||||
.icon-radio-fill:before {
|
||||
content: "\e620";
|
||||
}
|
||||
|
||||
.icon-chanpin-fill:before {
|
||||
content: "\e6d8";
|
||||
}
|
||||
|
||||
.icon-eyeclose:before {
|
||||
content: "\e6ab";
|
||||
}
|
||||
|
||||
.icon-eyeopen:before {
|
||||
content: "\e6ac";
|
||||
}
|
||||
|
||||
.icon-mima:before {
|
||||
content: "\e69e";
|
||||
}
|
||||
|
||||
.icon-username:before {
|
||||
content: "\e6b7";
|
||||
}
|
||||
|
||||
.icon-tongzhi:before {
|
||||
content: "\e60b";
|
||||
}
|
||||
|
||||
.icon-jia-bold:before {
|
||||
content: "\e613";
|
||||
}
|
||||
|
||||
.icon-jian-bold:before {
|
||||
content: "\e614";
|
||||
}
|
||||
|
||||
.icon-tianjia:before {
|
||||
content: "\e653";
|
||||
}
|
||||
|
||||
.icon-zhuanhuan:before {
|
||||
content: "\e6c2";
|
||||
}
|
||||
|
||||
.icon-xiaochengxu:before {
|
||||
content: "\e6c3";
|
||||
}
|
||||
|
||||
.icon-warn:before {
|
||||
content: "\e6a5";
|
||||
}
|
||||
|
||||
.icon-weirenzheng:before {
|
||||
content: "\e63a";
|
||||
}
|
||||
|
||||
.icon-biaoqian:before {
|
||||
content: "\e60c";
|
||||
}
|
||||
|
||||
.icon-yingxiao:before {
|
||||
content: "\e701";
|
||||
}
|
||||
|
||||
.icon-yuyue:before {
|
||||
content: "\e6da";
|
||||
}
|
||||
|
||||
.icon-star:before {
|
||||
content: "\e779";
|
||||
}
|
||||
|
||||
.icon-star-fill:before {
|
||||
content: "\e77b";
|
||||
}
|
||||
|
||||
.icon-liuyanguanli:before {
|
||||
content: "\e6bb";
|
||||
}
|
||||
|
||||
.icon-heart:before {
|
||||
content: "\e68c";
|
||||
}
|
||||
|
||||
.icon-heart-fill:before {
|
||||
content: "\e689";
|
||||
}
|
||||
|
||||
.icon-wechat-pay:before {
|
||||
content: "\e764";
|
||||
}
|
||||
|
||||
.icon-qianbao:before {
|
||||
content: "\e829";
|
||||
}
|
||||
|
||||
.icon-sanjiao:before {
|
||||
content: "\e671";
|
||||
}
|
||||
|
||||
.icon-notice:before {
|
||||
content: "\e64e";
|
||||
}
|
||||
|
||||
.icon-nan:before {
|
||||
content: "\e7b1";
|
||||
}
|
||||
|
||||
.icon-nv:before {
|
||||
content: "\e7b4";
|
||||
}
|
||||
|
||||
.icon-che:before {
|
||||
content: "\e616";
|
||||
}
|
||||
|
||||
.icon-kaquan:before {
|
||||
content: "\e60f";
|
||||
}
|
||||
|
||||
.icon-banner:before {
|
||||
content: "\e64a";
|
||||
}
|
||||
|
||||
.icon-article:before {
|
||||
content: "\ec2b";
|
||||
}
|
||||
|
||||
.icon-balance:before {
|
||||
content: "\faf6";
|
||||
}
|
||||
|
||||
.icon-bofang:before {
|
||||
content: "\e664";
|
||||
}
|
||||
|
||||
.icon-video:before {
|
||||
content: "\e72d";
|
||||
}
|
||||
|
||||
.icon-shouji:before {
|
||||
content: "\e6d4";
|
||||
}
|
||||
BIN
uniapp/uni-admin/src/style/image/login_bg.png
Normal file
|
After Width: | Height: | Size: 154 KiB |
BIN
uniapp/uni-admin/src/style/image/login_left.png
Normal file
|
After Width: | Height: | Size: 574 KiB |
BIN
uniapp/uni-admin/src/style/image/logo.png
Normal file
|
After Width: | Height: | Size: 3.5 KiB |
BIN
uniapp/uni-admin/src/style/image/zhnc.png
Normal file
|
After Width: | Height: | Size: 7.4 KiB |
95
uniapp/uni-admin/src/style/reset.css
Normal file
@@ -0,0 +1,95 @@
|
||||
html,body,div,p,h1,h2,h3,h4,h5,h6,button,img,textarea,input,ul,li{
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
list-style: none;
|
||||
}
|
||||
html,
|
||||
body,
|
||||
#app {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
font-size: 14px;
|
||||
color: #666666;
|
||||
min-width: 1000px;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: 'PingFang-SC-Heavy', "microsoft yahei", 'SourceHanSansSC-regular', 'PingFang SC', "Helvetica Neue", Helvetica, arial, STHeiTi, sans-serif;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none
|
||||
}
|
||||
.page-main{
|
||||
padding: 30px;
|
||||
width: 100%;
|
||||
overflow: auto;
|
||||
}
|
||||
.bigfont{
|
||||
font-size: 16px;
|
||||
}
|
||||
.minifont{
|
||||
font-size: 12px;
|
||||
}
|
||||
.table-operate .el-button{
|
||||
margin: 5px !important;
|
||||
}
|
||||
.top-video-switch .lb-tabs .el-tabs__nav-scroll{
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
/* .table-operate .el-button+.el-button{
|
||||
margin-left: 0px;
|
||||
} */
|
||||
.el-button+.el-button{
|
||||
margin-left: 5px;
|
||||
}
|
||||
.page-top-operate{
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
.page-top-operate.el-row{
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
.page-top-operate .el-button{
|
||||
margin: 0 24px 16px 0;
|
||||
}
|
||||
.page-top-operate .el-form--inline{
|
||||
line-height: 40px;
|
||||
}
|
||||
.page-top-operate .el-form-item{
|
||||
margin: 0 24px 16px 0;
|
||||
}
|
||||
.tipsColor{
|
||||
color: #aaafbb;
|
||||
}
|
||||
.lineColor{
|
||||
border-color: #eff2f6;
|
||||
}
|
||||
.bgThemeColor{
|
||||
background: #f5f7fa;
|
||||
}
|
||||
.el-table .el-image{
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
/* width: 80px;
|
||||
height: 80px; */
|
||||
}
|
||||
.lb-input-number.el-input-number .el-input__inner{text-align: left;}
|
||||
.lb-collapse.el-collapse .el-collapse-item__header{background: rgb(245, 247, 250); padding: 0 10px;}
|
||||
.upload-file-warp{
|
||||
width: 435px;
|
||||
/* width: 500px; */
|
||||
height: 40px;
|
||||
border: 1px solid #DCDFE6;
|
||||
border-radius: 5px;
|
||||
padding: 0 15px;
|
||||
line-height: 35px;
|
||||
display: inline-block;
|
||||
}
|
||||
.upload-file-warp .choice-file-input{
|
||||
border: none;
|
||||
width: 84%;
|
||||
outline:none;
|
||||
font-size: 14px;
|
||||
}
|
||||