首先这是A页面我要传值过去
在方法中:
methods: {
//提交去另一个页面
submit (type) {
uni.navigateTo({
url: './memberform?type=' + type
})
},
//提交去另一个页面
}
./memberform就是我们要去的下个页面的路径
另一个页面接收传过来的值
下面的代码片段属于接收这个传过来值的页面
// 用户的类型
onLoad(options) {
this.userType = options.type
//this.vipForm.userType 这里需要用到传过来的值 我就赋值一下
this.vipForm.userType = options.type
},