| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { baseUrl } from '@/utils/config.js' |
| | | export default { |
| | | data() { |
| | | return { |
| | | param: { |
| | | baseUrl: 'http://192.168.5.13/gateway_interface/' |
| | | baseUrl, |
| | | time: 60 |
| | | } |
| | | }; |
| | | }, |
| | | onLoad(){ |
| | | const param = uni.getStorageSync('param') || { |
| | | baseUrl: 'http://192.168.5.13/gateway_interface/' |
| | | baseUrl: baseUrl, |
| | | time: 60 |
| | | } |
| | | this.param = { ...param } |
| | | }, |
| | |
| | | 4: '即将开始',
|
| | | 5: '已撤销',
|
| | | },
|
| | | meetingInfo: {}
|
| | | meetingInfo: {}, |
| | | timer: null
|
| | | }
|
| | | },
|
| | | onShow() {
|
| | | this.initDatetime()
|
| | | this.param = uni.getStorageSync('param') || {}
|
| | | if (!this.param.code) {
|
| | | return uni.navigateTo({
|
| | | url: '/pages/index/config'
|
| | | })
|
| | | }
|
| | | this.getData()
|
| | | },
|
| | | onReady() {},
|
| | | onReady() {}, |
| | | onHide(){ |
| | | if(this.timer){ |
| | | clearInterval(this.timer) |
| | | } |
| | | },
|
| | | methods: {
|
| | | getData() {
|
| | | this.showQrbg = false
|
| | |
| | | this.timer = setInterval(() => {
|
| | | this.time = dayjs().format('HH:mm')
|
| | | this.date = dayjs().format('YYYY-MM-DD') + ' ' + weeks[new Date().getDay()]
|
| | | }, 1000)
|
| | | setInterval(() => {
|
| | | }, 1000) |
| | | this.param = uni.getStorageSync('param') || {} |
| | | if(this.timer){ |
| | | clearInterval(this.timer) |
| | | } |
| | | this.getData()
|
| | | this.timer = setInterval(() => {
|
| | | this.getData()
|
| | | }, this.param.time ? this.param.time * 1000 : 60 * 1000)
|
| | | }
|
| | |
| | | |
| | | export const baseUrl = 'gateway_interface/' |
| | | // export const baseUrl = 'http://192.168.5.13/gateway_interface/' |
| | | // export const baseUrl = 'gateway_interface/' |
| | | export const baseUrl = 'http://192.168.5.13/gateway_interface/' |
| | | // export const baseUrl = 'http://10.50.250.253:8088/gateway_interface/' |
| | | |
| | | export const statusMap = { |
| | | 0: '待确认', |
| | |
| | | // uni.showLoading({ |
| | | // title:"加载中..." |
| | | // }) |
| | | uni.showLoading({ |
| | | title: '加载中', |
| | | mask: true |
| | | }) |
| | | // uni.showLoading({ |
| | | // title: '加载中', |
| | | // mask: true |
| | | // }) |
| | | const param = uni.getStorageSync('param') || {} |
| | | uni.request({ |
| | | url: (param.baseUrl || baseUrl) + options.url, |
| | | // url: baseUrl + options.url, |
| | | data: options.data || {}, |
| | | method: options.method || 'GET', |
| | | header: options.header || { |
| | |
| | | success: (res) => { |
| | | let data = res.data |
| | | // 控制台显示数据信息 |
| | | uni.hideLoading() |
| | | // uni.hideLoading() |
| | | // 登录过期 |
| | | if (data.code === 5112) { |
| | | setTimeout(() => { |
| | |
| | | console.log('msg', baseUrl + options.url) |
| | | // 返回错误消息 |
| | | reject(err) |
| | | uni.hideLoading() |
| | | // uni.hideLoading() |
| | | }, |
| | | catch: (e) => { |
| | | console.log(e) |