| | |
| | | v-if="form1.starttime" |
| | | :show="show5" |
| | | :minDate="formatTimeStamp(form1.starttime)" |
| | | :maxDate="formatTimeStamp(maxTime)" |
| | | mode="datetime" |
| | | @cancel="show5 = false" |
| | | @confirm="setoutDate" |
| | |
| | | show6: false, |
| | | show7: false, |
| | | fileList: [], |
| | | columns1: [[{name: '身份è¯', id: 0}, {name: '港澳è¯ä»¶', id: 1},{name: 'æ¤ç
§', id: 2}]], |
| | | columns1: [ |
| | | [{name: '身份è¯', id: 0}, {name: '港澳è¯ä»¶', id: 1},{name: 'æ¤ç
§', id: 2}], |
| | | ], |
| | | columns: [], |
| | | cars: [], |
| | | day: null, |
| | |
| | | if (options.data) { |
| | | this.form = JSON.parse(options.data) |
| | | } |
| | | this.getvisit() |
| | | this.getVisit1() |
| | | this.getUserValid() |
| | | // this.getvisit() |
| | | // this.getVisit1() |
| | | // this.getUserValid() |
| | | }, |
| | | methods: { |
| | | openInput(type) { |
| | |
| | | seleIdcard(e) { |
| | | this.withUserList.idcardType = e.value[0].id |
| | | this.withUserList.idcardTypeName = e.value[0].name |
| | | console.log(e); |
| | | this.show6 = false |
| | | }, |
| | | submitCart() { |
| | |
| | | }, |
| | | setinDate(e) { |
| | | this.form1.starttime = uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM'); |
| | | this.maxTime = getDaysAfterDate(uni.$u.timeFormat(e.value, 'yyyy-mm-dd'), this.day) |
| | | // this.maxTime = getDaysAfterDate(uni.$u.timeFormat(e.value, 'yyyy-mm-dd hh:MM'), this.day) |
| | | this.maxTime = this.form1.starttime |
| | | console.log(this.form1.starttime); |
| | | this.show4 = false |
| | | }, |
| | | setoutDate(e) { |
¶Ô±ÈÐÂÎļþ |
| | |
| | | |
| | | export const baseUrl = 'api/' |
| | | export const uploadUrl = `${baseUrl}visitsAdmin/cloudService/web/public/uploadFtp.do` |
| | |
| | | export const baseUrl = 'api/' |
| | | export const uploadUrl = `${baseUrl}visitsAdmin/cloudService/web/public/uploadFtp.do` |
| | | import {baseUrl, uploadUrl} from './config' |
| | | |
| | | const install = (Vue, vm) => { |
| | | |
| | |
| | | config.timeout = 60000; |
| | | return config; |
| | | }) |
| | | |
| | | Vue.prototype.$baseUrl = baseUrl; |
| | | Vue.prototype.$uploadUrl = uploadUrl; |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import { baseUrl } from "./config.js" |
| | | export const http = function (options) { |
| | | { |
| | | return new Promise((resolve, reject) => { |
| | | let token = uni.getStorageSync('token') |
| | | // å¨ç»å½çæ¶åéè¦å¨å token uni.setStorageSync("authorization","è¿éæ¯ç»å½è·åçtokenå¼") |
| | | |
| | | // uni.showLoading({ |
| | | // title:"å è½½ä¸..." |
| | | // }) |
| | | uni.showLoading({ |
| | | title: 'å è½½ä¸', |
| | | mask: true |
| | | }) |
| | | uni.request({ |
| | | url: baseUrl + options.url, |
| | | data: options.data || {}, |
| | | method: options.method || 'GET', |
| | | header: options.header || { |
| | | // æ ¹æ®å®é
æ¥å£è®¾è®¡ key å token æè
authorization |
| | | token: token, |
| | | "content-type": 'application/json' |
| | | }, |
| | | success: (res) => { |
| | | let data = res.data |
| | | // æ§å¶å°æ¾ç¤ºæ°æ®ä¿¡æ¯ |
| | | uni.hideLoading() |
| | | // ç»å½è¿æ |
| | | if (data.code === 401) { |
| | | uni.navigateTo({ |
| | | url: '/packageA/loginAgain/loginAgain' |
| | | }) |
| | | } |
| | | if (data.code !== 200) { |
| | | uni.showToast({ |
| | | title: response.data.message, |
| | | icon: "none", |
| | | duration: 2000 |
| | | }) |
| | | } |
| | | resolve(data) |
| | | // return response.data |
| | | }, |
| | | fail: (err) => { |
| | | // 页é¢ä¸å¼¹æ¡æ¾ç¤ºå¤±è´¥ |
| | | uni.showToast({ |
| | | title: 'è¯·æ±æ¥å£å¤±è´¥' |
| | | }) |
| | | // è¿åéè¯¯æ¶æ¯ |
| | | reject(err) |
| | | uni.hideLoading() |
| | | return Promise.reject(err) |
| | | }, |
| | | catch: (e) => { |
| | | console.log(e) |
| | | } |
| | | }) |
| | | }) |
| | | } |
| | | } |