禅道bug修复
This commit is contained in:
parent
2f206974e9
commit
067d507e72
|
|
@ -1,13 +1,32 @@
|
||||||
<template>
|
<template>
|
||||||
<view class="content">
|
<view class="content">
|
||||||
<view class="success-container">
|
<view class="success-container" v-if="isCode == '203'">
|
||||||
<up-icon name="close" color="#ff0000" size="80" bold="true"></up-icon>
|
<up-icon name="close" color="#ff0000" size="80" bold="true" />
|
||||||
<text class="success">此二维码已失效</text>
|
<text class="success">此二维码已失效</text>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="success-container" v-if="isCode == '204'">
|
||||||
|
<up-icon name="error-circle-fill" color="#ff9900" size="80" bold="true" />
|
||||||
|
<text class="success">当前二维码填写时间未到</text>
|
||||||
|
<text class="success">请于{{ startTime }}之后再扫码填写</text>
|
||||||
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup></script>
|
<script setup>
|
||||||
|
import { onLoad } from '@dcloudio/uni-app'
|
||||||
|
import { ref } from 'vue'
|
||||||
|
const isCode = ref('203')
|
||||||
|
const startTime = ref('')
|
||||||
|
|
||||||
|
onLoad((option) => {
|
||||||
|
if (option.code) {
|
||||||
|
isCode.value = option.code
|
||||||
|
}
|
||||||
|
if (option.time) {
|
||||||
|
startTime.value = option.time
|
||||||
|
}
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.content {
|
.content {
|
||||||
|
|
|
||||||
|
|
@ -35,13 +35,12 @@ const getTaskDetailsData = async () => {
|
||||||
|
|
||||||
taskType.value = res.type
|
taskType.value = res.type
|
||||||
|
|
||||||
console.log(res, '数据源')
|
|
||||||
if (res.code == 200) {
|
if (res.code == 200) {
|
||||||
isError.value = false
|
isError.value = false
|
||||||
taskDescribe.value = res.data.taskDescribe
|
taskDescribe.value = res.data.taskDescribe
|
||||||
} else {
|
} else {
|
||||||
isError.value = true
|
isError.value = true
|
||||||
uni.redirectTo({ url: `/pages/error/index` })
|
uni.redirectTo({ url: `/pages/error/index?code=${res.code}&time=${res.data.startTime}` })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ import { useMemberStore } from '@/stores'
|
||||||
* baseURL 设置请求ip地址和端口
|
* baseURL 设置请求ip地址和端口
|
||||||
*/
|
*/
|
||||||
const ENV = process.env.NODE_ENV
|
const ENV = process.env.NODE_ENV
|
||||||
const baseURL = ENV === 'development' ? '/api' : 'http://192.168.0.14:21666'
|
const baseURL = ENV === 'development' ? '/api' : 'http://36.33.26.201:21624'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* httpInterceptor 分别拦截 request 和 uploadFile 请求
|
* httpInterceptor 分别拦截 request 和 uploadFile 请求
|
||||||
|
|
@ -68,7 +68,7 @@ export const http = (options) => {
|
||||||
} else if (res.data.code === 500) {
|
} else if (res.data.code === 500) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
title: `${res.data.msg}`,
|
title: `${res.data.msg},请更换网络后尝试`,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
} else if (res.statusCode === 401) {
|
} else if (res.statusCode === 401) {
|
||||||
|
|
@ -84,7 +84,7 @@ export const http = (options) => {
|
||||||
// 3. 其他错误
|
// 3. 其他错误
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
title: '请求错误',
|
title: '请求失败,请更换网络后尝试',
|
||||||
})
|
})
|
||||||
reject(res)
|
reject(res)
|
||||||
}
|
}
|
||||||
|
|
@ -93,7 +93,7 @@ export const http = (options) => {
|
||||||
fail(err) {
|
fail(err) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
title: '网络错误,请更换网络后尝试',
|
title: '请求失败,请更换网络后尝试',
|
||||||
})
|
})
|
||||||
console.log(err, '请求失败')
|
console.log(err, '请求失败')
|
||||||
reject(err)
|
reject(err)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue