禅道bug修复
This commit is contained in:
parent
2f206974e9
commit
067d507e72
|
|
@ -1,13 +1,32 @@
|
|||
<template>
|
||||
<view class="content">
|
||||
<view class="success-container">
|
||||
<up-icon name="close" color="#ff0000" size="80" bold="true"></up-icon>
|
||||
<view class="success-container" v-if="isCode == '203'">
|
||||
<up-icon name="close" color="#ff0000" size="80" bold="true" />
|
||||
<text class="success">此二维码已失效</text>
|
||||
</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>
|
||||
</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>
|
||||
.content {
|
||||
|
|
|
|||
|
|
@ -35,13 +35,12 @@ const getTaskDetailsData = async () => {
|
|||
|
||||
taskType.value = res.type
|
||||
|
||||
console.log(res, '数据源')
|
||||
if (res.code == 200) {
|
||||
isError.value = false
|
||||
taskDescribe.value = res.data.taskDescribe
|
||||
} else {
|
||||
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地址和端口
|
||||
*/
|
||||
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 请求
|
||||
|
|
@ -68,7 +68,7 @@ export const http = (options) => {
|
|||
} else if (res.data.code === 500) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: `${res.data.msg}`,
|
||||
title: `${res.data.msg},请更换网络后尝试`,
|
||||
})
|
||||
}
|
||||
} else if (res.statusCode === 401) {
|
||||
|
|
@ -84,7 +84,7 @@ export const http = (options) => {
|
|||
// 3. 其他错误
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '请求错误',
|
||||
title: '请求失败,请更换网络后尝试',
|
||||
})
|
||||
reject(res)
|
||||
}
|
||||
|
|
@ -93,7 +93,7 @@ export const http = (options) => {
|
|||
fail(err) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '网络错误,请更换网络后尝试',
|
||||
title: '请求失败,请更换网络后尝试',
|
||||
})
|
||||
console.log(err, '请求失败')
|
||||
reject(err)
|
||||
|
|
|
|||
Loading…
Reference in New Issue