You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
66 lines
1.2 KiB
66 lines
1.2 KiB
<template> |
|
<view class="start-container"> |
|
<image :src="imgURL"></image> |
|
</view> |
|
</template> |
|
|
|
<script> |
|
import wxCode from '@/api/wxcode.js' |
|
export default { |
|
data() { |
|
return { |
|
imgURL:'' |
|
} |
|
}, |
|
onLoad(e=null) { |
|
this.init(e) |
|
}, |
|
created() { |
|
this.imgURL = `${this.baseImgURL}/start.png` |
|
}, |
|
methods: { |
|
Interceptor(id) { |
|
let taht = this |
|
console.log(`%c 检测到参数拦截器启动`, 'color:red;font-size:50px'); |
|
wxCode.getQrCodeType({ |
|
qrCode: id |
|
}).then(res => { |
|
if (res.code == 20000) { |
|
uni.redirectTo({ |
|
url: '/AppletCode/pages/index/index?details=' + JSON.stringify({ |
|
...res.data, |
|
qrCode: id |
|
}), |
|
fail(e) { |
|
console.log(e, '跳转失败') |
|
} |
|
}) |
|
} |
|
}) |
|
}, |
|
init(e){ |
|
if(e&&e.scene){ |
|
this.Interceptor(e.scene) |
|
}else{ |
|
setTimeout(()=>{ |
|
uni.redirectTo({ |
|
// url:'/pages/index/index' |
|
url:'/pages/login/index' |
|
}) |
|
// uni.redirectTo({ |
|
// url:'/pages/login/index' |
|
// }) |
|
// uni.switchTab({ |
|
// url:'/pages/home/index' |
|
// }) |
|
},2000) |
|
} |
|
} |
|
} |
|
} |
|
</script> |
|
|
|
<style scoped> |
|
@import 'index.css'; |
|
|
|
</style>
|
|
|