diff --git a/src/App.vue b/src/App.vue
index 184a8ff..e33996c 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -31,6 +31,15 @@ export default {
body, uni-page-body {
background-color: #f8f8f8;
}
+
+.cu-form {
+ .u-form-item--left {
+ // min-height: 76rpx;
+ // align-items: center !important;
+ // line-height: 42rpx;
+ }
+}
+
.bg-page {
width: 100%;
min-height: 100%;
diff --git a/src/api/index.js b/src/api/index.js
index 76aeab4..4d06d9d 100644
--- a/src/api/index.js
+++ b/src/api/index.js
@@ -1,6 +1,6 @@
import Request from './luch-request/index.js'
import jwt from './jwt.js'
-import {toast} from '@/com/utils.js'
+import { toast } from '@/com/utils.js'
//测试地址
// const baseApi = 'http://36.133.205.221:81';
const baseApi = 'http://lcny.sk797.cn';
@@ -9,59 +9,62 @@ const http = new Request();
http.setConfig((config) => { /* 设置全局配置 */
config.baseURL = baseApi
config.header = {
- ...config.header,
- 'Accept': 'application/json'
+ ...config.header,
+ 'Accept': 'application/json'
}
config.custom = {
auth: true, // 是否传token
// loading: false // 是否使用loading
}
config.imeout = 30000
-
+
return config
})
/* 请求之前拦截器 */
http.interceptors.request.use((config, cancel) => {
if (config.custom.auth) {
- // 需要权限认证的路由 需携带自定义参数 {custom: {auth: true}}
- config.header.Authorization = 'Bearer '+jwt.getAccessToken();
+ // 需要权限认证的路由 需携带自定义参数 {custom: {auth: true}}
+ config.header.Authorization = 'Bearer ' + jwt.getAccessToken();
}
return config
})
- /* 请求之后拦截器 */
+/* 请求之后拦截器 */
let isRefreshing = false;//多次锁
http.interceptors.response.use((response) => { /* 请求之后拦截器*/
- const {code} = response.data
- console.log(response)
- if(code ==4024){
- toast(response.data.msg)
- }else if(code ==401){
- toast('请关闭,重新进入')
- } else{
-
+ const { code } = response.data
+ if (code != 200) {
+ if (code == 4024) {
+ toast(response.data.msg)
+ } else if (code == 401) {
+ toast('请关闭,重新进入')
+ } else {
+
+ }
+ return Promise.reject(response)
}
+
return response
}, (err) => { // 请求错误
- const {code} = err.data
- console.log(code)
- if(code == 401){//过期未登录
- const config = err.config
- if(!isRefreshing){
- isRefreshing = true
-
- }else{
-
- }
- }else {
-
- }
- console.log(err,'======')
- return Promise.reject(err)
+ const { code } = err.data
+ console.log(code)
+ if (code == 401) {//过期未登录
+ const config = err.config
+ if (!isRefreshing) {
+ isRefreshing = true
+
+ } else {
+
+ }
+ } else {
+
+ }
+ console.log(err, '======')
+ return Promise.reject(err)
})
-const getFullUrl = (url,params,header) => {
- return http.post(url, params,{...header});
+const getFullUrl = (url, params, header) => {
+ return http.post(url, params, { ...header });
};
export {
http,
diff --git a/src/components/base-table/popup.vue b/src/components/base-table/popup.vue
new file mode 100644
index 0000000..ab4aecf
--- /dev/null
+++ b/src/components/base-table/popup.vue
@@ -0,0 +1,69 @@
+
+
+
+
+
+
+ 删除
+
+
+ 编辑
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/cu-popup/index.vue b/src/components/cu-popup/index.vue
new file mode 100644
index 0000000..bd41379
--- /dev/null
+++ b/src/components/cu-popup/index.vue
@@ -0,0 +1,52 @@
+
+
+
+
+
+ {{ title }}
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages.json b/src/pages.json
index 4cf5c3e..80209a6 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -214,6 +214,13 @@
"enablePullDownRefresh": false
}
+ },{
+ "path" : "pages/basics/town-base",
+ "style" :
+ {
+ "navigationBarTitleText": "城镇数据",
+ "enablePullDownRefresh": false
+ }
}
],
"globalStyle": {
diff --git a/src/pages/basics/components/town-city-edit.vue b/src/pages/basics/components/town-city-edit.vue
new file mode 100644
index 0000000..abdae57
--- /dev/null
+++ b/src/pages/basics/components/town-city-edit.vue
@@ -0,0 +1,289 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 取消
+
+ 保存
+
+
+
+
+
diff --git a/src/pages/basics/components/town-count-edit.vue b/src/pages/basics/components/town-count-edit.vue
new file mode 100644
index 0000000..850572f
--- /dev/null
+++ b/src/pages/basics/components/town-count-edit.vue
@@ -0,0 +1,170 @@
+
+
+
+
+
+
+
+
+ {{ item.unit }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 取消
+
+ 保存
+
+
+
+
+
+
diff --git a/src/pages/basics/components/town-count-item.vue b/src/pages/basics/components/town-count-item.vue
new file mode 100644
index 0000000..633d5ad
--- /dev/null
+++ b/src/pages/basics/components/town-count-item.vue
@@ -0,0 +1,21 @@
+
+
+
+ {{ data.name }}
+
+
+ {{ data.value }}
+ {{ data.unit }}
+
+
+
+
diff --git a/src/pages/basics/town-base.vue b/src/pages/basics/town-base.vue
new file mode 100644
index 0000000..63effe2
--- /dev/null
+++ b/src/pages/basics/town-base.vue
@@ -0,0 +1,249 @@
+
+
+
+
+ 全市数据统计
+ 编辑
+
+
+
+
+
+
+
+
+
+
+ 查询
+
+
+
+
+
+
+
+
+ 街镇名称:{{ item.name }}
+ 街镇地址:{{ item.address }}
+
+
+
+
+
+ 街镇面积
+ 耕地面积
+ 街镇人数
+
+
+ {{ item.areas }}
+ {{ item.cultivated }}
+ {{ item.workforce }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/pages/index/index.vue b/src/pages/index/index.vue
index f21a707..194cb19 100644
--- a/src/pages/index/index.vue
+++ b/src/pages/index/index.vue
@@ -77,6 +77,7 @@
children:[
{
label:'城镇数据',
+ url:'/pages/basics/town-base'
},
{
label:'基地数据',