|
@@ -1,4 +1,6 @@
|
|
|
import * as api from '@/api'
|
|
import * as api from '@/api'
|
|
|
|
|
+import Storage from '@/utils/storage'
|
|
|
|
|
+const lStorage = new Storage('localStorage')
|
|
|
export default {
|
|
export default {
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
@@ -30,20 +32,38 @@ export default {
|
|
|
async inData() {
|
|
async inData() {
|
|
|
this.loading.data = true
|
|
this.loading.data = true
|
|
|
try {
|
|
try {
|
|
|
- let { result_id } = this.$route.query
|
|
|
|
|
- let res = await api.apiGetVolumeResult({ result_id })
|
|
|
|
|
- let data = res.data
|
|
|
|
|
|
|
+ // let { result_id } = this.$route.query
|
|
|
|
|
+ // let res = await api.apiGetVolumeResult({ result_id })
|
|
|
|
|
+ // let data = res.data
|
|
|
|
|
+ let data = lStorage.getItem('FormResultAbnormal')
|
|
|
this.$set(this, 'data', data)
|
|
this.$set(this, 'data', data)
|
|
|
} catch (error) {
|
|
} catch (error) {
|
|
|
console.log(error)
|
|
console.log(error)
|
|
|
}
|
|
}
|
|
|
this.loading.data = false
|
|
this.loading.data = false
|
|
|
},
|
|
},
|
|
|
- btnBack () {
|
|
|
|
|
- let { go, replace } = this.$route.query
|
|
|
|
|
- replace
|
|
|
|
|
- ? this.$router.replace({ name: replace })
|
|
|
|
|
- : this.$router.go(go || -1)
|
|
|
|
|
|
|
+ btnLinkBack() {
|
|
|
|
|
+ var ua = navigator.userAgent.toLowerCase();
|
|
|
|
|
+ let { go, replace, to } = this.$route.query
|
|
|
|
|
+ if (replace) {
|
|
|
|
|
+ location.replace(decodeURIComponent(replace))
|
|
|
|
|
+ } else if (to) {
|
|
|
|
|
+ location.href = decodeURIComponent(to)
|
|
|
|
|
+ } else if (go) {
|
|
|
|
|
+ this.$router.go(go)
|
|
|
|
|
+ }
|
|
|
|
|
+ else if (ua.match(/MicroMessenger/i) == "micromessenger") {
|
|
|
|
|
+ //ios的ua中无miniProgram,但都有MicroMessenger(表示是微信浏览器)
|
|
|
|
|
+ wx.miniProgram.getEnv((res) => {
|
|
|
|
|
+ if (res.miniprogram) {
|
|
|
|
|
+ // 在小程序里
|
|
|
|
|
+ console.log('miniprogram')
|
|
|
|
|
+ wx.miniProgram.switchTab({ url: '/pages/index/index' })
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$router.go(-1)
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|