FangDiYiTiHuaChaXunXiaoChengXu/pages/home/home.js

88 lines
1.5 KiB
JavaScript

// pages/home/home.js
const app = getApp();
const $ = require('../../utils/util.js')
Page({
/**
* 页面的初始数据
*/
data: {
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady: function() {
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function() {
},
/**
* 生命周期函数--监听页面隐藏
*/
onHide: function() {
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload: function() {
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh: function() {
},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom: function() {
},
/**
* 用户点击右上角分享
*/
sceneCode(){
wx.scanCode({
onlyFromCamera: true,
success (res) {
console.log('00000', res)
if(res.result){
// let str = "37021693933&鲁-2023-蒙阴县-0001971&371328101020JC00182F00030001&2023-371328-100060199-000108&SYZJD972fc69e688c41968e5a1b476fdfa756&0&1"
let str = res.result
wx.navigateTo({
url: "/pages/infoquery/index?query=" + encodeURIComponent(str)
})
}
}
})
},
gopage: function (e) {
console.log('ee',e)
let url = e.currentTarget.dataset.url
wx.navigateTo({
url: url,
})
},
})