diff --git a/.env.development b/.env.development index 821466f..bf0bedc 100644 --- a/.env.development +++ b/.env.development @@ -1,3 +1,3 @@ NODE_ENV = 'development' -VUE_APP_URL = '' -VUE_APP_CDN = '' \ No newline at end of file +VUE_APP_URL = 'http://121.41.26.2251:8002/admin' +VUE_APP_CDN = 'http://121.41.26.2251:8002/admin' \ No newline at end of file diff --git a/.env.production b/.env.production index 3e595a6..f891222 100644 --- a/.env.production +++ b/.env.production @@ -1,3 +1,3 @@ NODE_ENV = 'production' -VUE_APP_URL = '' -VUE_APP_CDN = '' \ No newline at end of file +VUE_APP_URL = 'http://121.41.26.2251:8002/admin' +VUE_APP_CDN = 'http://121.41.26.2251:8002/admin' \ No newline at end of file diff --git a/src/api/basic/index.js b/src/api/basic/index.js new file mode 100644 index 0000000..8acfc97 --- /dev/null +++ b/src/api/basic/index.js @@ -0,0 +1,10 @@ +import httpService from "@/request" + +// 获取预报列表 +export function functionName(params) { + return httpService({ + url: `url`, + method: 'post', + data: params, + }) +} diff --git a/src/api/login/index.js b/src/api/login/index.js new file mode 100644 index 0000000..d817180 --- /dev/null +++ b/src/api/login/index.js @@ -0,0 +1,10 @@ +import httpService from "@/request" + +// 登录 +export function loginTel(params) { + return httpService({ + url: `/manage/loginTelCode`, + method: 'post', + data: params, + }) +} diff --git a/src/components/drawer/index.vue b/src/components/drawer/index.vue new file mode 100644 index 0000000..5a1dfbc --- /dev/null +++ b/src/components/drawer/index.vue @@ -0,0 +1,36 @@ + + diff --git a/src/components/table/index.vue b/src/components/table/index.vue index 94d5ba2..abcd728 100644 --- a/src/components/table/index.vue +++ b/src/components/table/index.vue @@ -4,6 +4,7 @@ - - + + + + + + {{ formatter(tag) }} + @@ -55,6 +64,18 @@ export default { showSizeChanger: true, showQuickJumper: true, }, + activeAction:undefined, + /** + * + * + * customRender: function (gender) { + if (gender === 1) { + return "是"; + } else { + return "否"; + } + }, + */ loading: false, // 选择的index selectedRowKeys: [], @@ -71,6 +92,7 @@ export default { columns: Array, tableData: Array, ActionsList: Array, + // activeAction:Number }, methods: { // 选择selection @@ -85,7 +107,11 @@ export default { // 功能 Actions(val) { this.$emit("Actions", val); + this.activeAction = undefined }, + formatter(val){ + this.$emit("formatter", val); + } }, }; diff --git a/src/request/index.js b/src/request/index.js index b3fbcf0..e9befb1 100644 --- a/src/request/index.js +++ b/src/request/index.js @@ -1,15 +1,9 @@ -/* - * @Author: your name - * @Date: 2021-10-13 09:28:02 - * @LastEditTime: 2021-11-11 10:45:00 - * @LastEditors: Please set LastEditors - * @Description: In User Settings Edit - * @FilePath: /data-show/src/request/index.js - */ import axios from 'axios'; -import qs from 'qs'; +// import qs from 'qs'; import router from "@/permission" import { message} from 'ant-design-vue' +import store from '@/store' +// import baseURL from "@/utils/baseURL" function filterRequestData(obj) { let o = {}; for(let key in obj) { @@ -23,22 +17,20 @@ function filterRequestData(obj) { } //创建axios的实例 const httpService = axios.create({ - baseURL: 'http://cloud.sws010.com',// TODO:具体的配置可以根据项目情况而来 + baseURL: process.env.VUE_APP_URL + '/1',// TODO:具体的配置可以根据项目情况而来 timeout: 5000 }) - +// + communityCode //axios的拦截--request httpService.interceptors.request.use(config => { - // 请求成功处理 - // if(localStorage.getItem('token')){//判断浏览器中的cookie中是否存在项目的token - // config.headers.token = localStorage.getItem('token') - // } const rqParams = filterRequestData(config.params); const rqData = filterRequestData(config.data); // post 'Content-Type' === 'application/x-www-form-urlencoded' - config.headers['Content-Type'] = 'application/x-www-form-urlencoded' + config.headers['Content-Type'] = "application/json"; + config.headers['manage-login-token'] = store.getters.getToken; + config.headers['device-type'] = "web"; if(config.method === 'post') { - config.data = qs.stringify(rqData); + config.data = rqData; } else { config.data = rqData; config.params = rqParams; @@ -52,24 +44,25 @@ httpService.interceptors.request.use(config => { httpService.interceptors.response.use(response => { // TODO:具体的code对应的处理可继续添加修改 let data = null; - let data1 = null; let msg = ''; let res = response.data; - let totalNum = 0; - if(res.Code == 1){ - data = res.Data || []; - data1 = res.Data1 || []; - msg = res.Msg || ""; - totalNum = res.totalNum || 0; - return {data,data1, msg, totalNum}; + if(res.code == 0){ + data = res.data; + msg = res.msg || ""; + return {data, msg}; + } else if(res.code == 100000) { + router.replace({ + path: '/login' + }); } else { - msg = res.Msg || ""; + msg = res.msg || ""; message.error(msg); return Promise.reject(new Error(msg)) } },err => { + console.log(err) // TODO:具体的code对应的处理可继续添加修改 - if(err.response.Code === 301){ + if(err.response.code === 301){ //登录过期跳转登录页面,并将要浏览的页面fullPath传过去,登录成功后跳转需要访问的页面 ---主页(index) 或者 退出到登录前的浏览的页面 //这样登录页面登录接口成功之后可以进行跳转 主页(index) 或者 退出到登录前的页面: let path = this.$route.query.redirect || '/index.js'; this.$router.push(path); setTimeout(() => { diff --git a/src/router/basic.js b/src/router/basic.js index a30df89..61066ff 100644 --- a/src/router/basic.js +++ b/src/router/basic.js @@ -23,7 +23,7 @@ export default [ icon: 'container', hide: true, component: resolve => require(['@/views/Basic/home/settled.vue'], resolve), - meta: {title: '首页-入驻企业申请'}, + meta: {title: '入驻企业申请'}, }, { path: '/Basic/home/newOrder', @@ -32,7 +32,7 @@ export default [ icon: 'container', hide: true, component: resolve => require(['@/views/Basic/home/newOrder.vue'], resolve), - meta: {title: '首页-购买功能'}, + meta: {title: '购买功能'}, }, { path: '/Basic/adminSet', diff --git a/src/styles/antd.less b/src/styles/antd.less index b6cc3b9..da2418e 100644 --- a/src/styles/antd.less +++ b/src/styles/antd.less @@ -1,6 +1,6 @@ .ant-layout { width: 100% !important; - height: 100% !important; + min-height: 100% !important; } .ant-layout-sider-children { background-color: #2a334f; diff --git a/src/styles/index.less b/src/styles/index.less index 41e39d7..429f53b 100644 --- a/src/styles/index.less +++ b/src/styles/index.less @@ -1,37 +1,69 @@ @import "./antd.less"; + // 公共样式 -#app{ +#app { background: #E5E5E5; } -.content{ + +.content { padding: 13px; } -.main{ - padding: 13px; + +.main { + padding : 13px; background: #fff; } -.cardTitle{ - border-left: 8px solid #205FBD; - padding-left:10px; - margin-left: 10px; + +.cardTitle { + border-left : 8px solid #205FBD; + padding-left : 10px; + margin-left : 10px; margin-bottom: 10px; } -#commonTable{ + +// 表格 +#commonTable { margin: 24px; } + .search-box { margin: 30px; } + +.add-btn{ + background-color: rgba(251, 101, 61, 1) !important; + color: rgba(255, 255, 255, 1) !important; +} .footer { - height: 84px; - width: 100%; - background: #fff; - position: fixed; - bottom: 0; - z-index: 999; - line-height: 84px; - box-shadow: 0px -2px 4px 0px rgba(0, 0, 0, 0.35); + height : 84px; + width : 100%; + background : #fff; + position : fixed; + bottom : 0; + z-index : 999; + line-height : 84px; + box-shadow : 0px -2px 4px 0px rgba(0, 0, 0, 0.35); border-radius: 4px 4px 0px 0px; - border: 1px solid #e8e8e8; - left: 200px; - } \ No newline at end of file + border : 1px solid #e8e8e8; + left : 200px; +} + +// 抽屉 +.drawer-content { + text-align: left; +} + +.drawer-footer { + position : absolute; + right : 0; + bottom : 0; + width : 100%; + border-top: 1px solid #e9e9e9; + padding : 10px 16px; + background: #fff; + text-align: right; + z-index : 1; +} +.ant-modal-content{ + margin-top:100px; +} \ No newline at end of file diff --git a/src/views/Login/index.vue b/src/views/Login/index.vue index 183e811..547de55 100644 --- a/src/views/Login/index.vue +++ b/src/views/Login/index.vue @@ -10,6 +10,7 @@
+ 智慧小区平台