diyici
This commit is contained in:
8
pages/startPage/index.css
Normal file
8
pages/startPage/index.css
Normal file
@@ -0,0 +1,8 @@
|
||||
.start-container{
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
}
|
||||
.start-container image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
65
pages/startPage/index.vue
Normal file
65
pages/startPage/index.vue
Normal file
@@ -0,0 +1,65 @@
|
||||
<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'
|
||||
})
|
||||
// uni.redirectTo({
|
||||
// url:'/pages/login/index'
|
||||
// })
|
||||
// uni.switchTab({
|
||||
// url:'/pages/home/index'
|
||||
// })
|
||||
},2000)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
@import 'index.css';
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user