1.使用本地存储实现跳tabBar页动态传参给input中的value
tabBar页面
<template>
<view class="agreement">
<input type="text" :value="number" />
</view>
</template>
<script>
export default {
data() {
return {
number:''
}
},
onShow(){
uni.getStorage({
key: 'dkey',
success:(res)=>{
this.number = res.data
}
})
},
onLoad() {
},
methods: {
}
}
</script>
<style>
</style>
跳转页
<script>
export default {
data() {
return {
abcd:'123'
}
},
onLoad() {
},
methods: {
backone(){
uni.reLaunch({
url:'../advert/advert',
})
},
submit(){
uni.setStorage({
key: 'dkey',
data: this.abcd,
});
}
}
</script>