1.当前页定义全局变量,并给变量赋值
<script>
// 定义全局变量
const app = getApp();
createPage({...
selectCounty(county) {
= ;
({
url: 'shop-list'
});
}
2.跳转页shop-list 定义全局变量,在onShow()中获取值
<script>
// 定义全局变量
const app = getApp();
createPage({...
onShow(){
= ;
},