diff --git a/components/appointItem-student/appointItem-student.vue b/components/appointItem-student/appointItem-student.vue index 4edca22..c811fbb 100644 --- a/components/appointItem-student/appointItem-student.vue +++ b/components/appointItem-student/appointItem-student.vue @@ -33,7 +33,7 @@ - + 最新状态:就先放着不做 diff --git a/config/request.js b/config/request.js index ae56f9f..a227d54 100644 --- a/config/request.js +++ b/config/request.js @@ -28,7 +28,7 @@ module.exports = (vm) => { // alert(contentTypeIndex) config.header['content-type'] = ContentType[contentTypeIndex] } - // config.header['content-type'] = 'application/x-www-form-urlencoded; charset=UTF-8' + config.header['content-type'] = 'application/json;charset=utf-8' // 初始化请求拦截器时,会执行此方法,此时data为undefined,赋予默认{} config.data = config.data || {} // 根据custom参数中配置的是否需要token,添加对应的请求头 @@ -40,6 +40,35 @@ module.exports = (vm) => { if(noToken&&config.header.Authorization) { delete config.header.Authorization } + + // get请求映射params参数 + console.log(config.method) + // if (config.method === 'GET' && config.params) { + // let url = config.url + '?'; + // for (const propName of Object.keys(config.params)) { + // const value = config.params[propName]; + // const part = encodeURIComponent(propName) + '=' + // if (value !== null && typeof(value) !== "undefined") { + + // if (typeof value === 'object') { + // for (const key of Object.keys(value)) { + // let params = propName + '[' + key + ']'; + // const subPart = params + '=' + // // console.log(subPart + (value[key]) + '&') + // url += subPart + decodeURIComponent(value[key]) + "&"; + + // } + + // } else { + // url += part + encodeURI(value) + "&"; + // } + // } + // } + // url = url.slice(0, -1); + // console.log(url) + // config.params = {}; + // config.url = url; + // } return config }, config => { // 可使用async await 做异步操作 return Promise.reject(config) diff --git a/manifest.json b/manifest.json index 4cdbdbe..de2d416 100644 --- a/manifest.json +++ b/manifest.json @@ -82,7 +82,7 @@ "disableHostCheck" : true, "proxy" : { "/api" : { - "target" : "http://192.168.1.39:48080/", + "target" : "http://192.168.1.36:48080/", "changeOrigin" : true, "secure" : true, "pathRewrite" : { diff --git a/pages.json b/pages.json index 0e33eda..6c1cbfa 100644 --- a/pages.json +++ b/pages.json @@ -297,9 +297,6 @@ ] } - - - ], "globalStyle": { "navigationBarTextStyle": "black", diff --git a/pages/login/login.vue b/pages/login/login.vue index 1179cc8..df70428 100644 --- a/pages/login/login.vue +++ b/pages/login/login.vue @@ -33,7 +33,7 @@ --> - + diff --git a/pages/tabbar/student/index.vue b/pages/tabbar/student/index.vue index efcffcf..96ca94a 100644 --- a/pages/tabbar/student/index.vue +++ b/pages/tabbar/student/index.vue @@ -143,7 +143,14 @@ methods: { confirmDatePicker(val) { this.showDatePicker = false - this.params.applyDate = this.screen.timer = uni.$u.date(val.value, 'yyyy-mm-dd') + + // this.params.applyDate = this.screen.timer = uni.$u.date(val.value, 'yyyy-mm-dd') + this.screen.timer = uni.$u.date(val.value, 'yyyy-mm-dd') + let startTimer = this.screen.timer + ' 00:00:00' + let endTimer = this.screen.timer+ ' 23:59:59' + this.params.applyDate = [startTimer, endTimer] + // this.params['applyDate[0]'] = encodeURI(startTimer) + // this.params['applyDate[1]'] = encodeURI(endTimer) this.listInit() }, confirmCar(val) { diff --git a/static/images/index/newSatus.png b/static/images/index/newSatus.png new file mode 100644 index 0000000..32d1269 Binary files /dev/null and b/static/images/index/newSatus.png differ