2025-07-03 13:14:39 +08:00

85 lines
1.4 KiB
JavaScript
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// case/pages/webView/webView.js
Page({
/**
* 页面的初始数据
*/
data: {
src:''
},
load(){
wx.hideLoading();
},
getMeaasge(e){
let { data }= e.detail;
let pages = getCurrentPages(); //获取当前页面js里面的pages里的所有信息。
let prevPage = pages[ pages.length - 2 ];
if(prevPage.ocrImgText){
let img=data[0].imgUrl.split(',');
prevPage.ocrImgText(img[1],data[0].name)
}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.setData({
src:decodeURIComponent(options.src)
})
wx.showLoading({
title: '加载中...',
mask:true
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {
},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {
}
})