1、//跳轉到page頁面並傳一個變量customerTaskId
showVideo(index) {
let file = this.fastImgLists[index].id;
console.log(file);
uni.navigateTo({
url: `../page/page?customerTaskId=${_this.dataList[index].customerTaskId}&projectId=${_this.dataList[index].projectId}`
});
},
2、//跳轉到page頁面並將后台返回的值傳遞過去
url="跳轉頁面?參數名="+參數+“&參數名”+參數值
uni.navigateTo({
url: '../page/page?id=' + res.data.id
+ '&name=' + res.data.name
+ '&deviceLocation=' + res.data.deviceLocation
+ '&pageFlag=' + res.data.pageFlag
+ '&device=' + res.data.device
});
在page頁面,進行接收,將值寫入相應位置
onLoad(obj) {
console.log(obj);
this.id = obj.id;
this.name = obj.name;
this.deviceLocation = obj.deviceLocation;
this.pageFlag = obj.pageFlag;
this.device = obj.device;
},
