| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127 |
- // pages/workprocessing/workprocessing.js
- import { getBTdata } from "../../utils/fetch"
- const app = getApp()
- Page({
- /**
- * 页面的初始数据
- */
- data: {
- userName: "",
- isShow1: false, //控制显示 中心 看的
- isShow2: false, //控制显示 公园 看的
- },
- // 详细评分
- junpXiang() {
- wx.navigateTo({
- url: "/packageA/pages/myWaitTest-detail/myWaitTest-detail",
- })
- },
- //页面跳转
- nav(e) {
- console.log("路径",e.currentTarget.dataset.url)
- var url = e.currentTarget.dataset.url
- wx.navigateTo({
- url: url,
- })
- },
- nav1() {
- wx.showModal({
- title: "提示",
- content: "功能正在开发中",
- showCancel: false,
- success(res) {
- if (res.confirm) {
- console.log("用户点击确定")
- } else if (res.cancel) {
- console.log("用户点击取消")
- }
- },
- })
- },
- //所有公园-----------------end
- // onLoad (options) {
- // },
- onLoad: async function (options) {
- var userName = wx.getStorageSync("fUsername")
- this.setData({
- userName: userName,
- })
- const res = await app.getUserTrue()
- if (res.data == null) {
- // data 是null 是 中心的人
- this.setData({
- isShow1: true,
- isShow2: false,
- })
- // 发 报表请求
- let msg = await getBTdata()
- ////console.log('mag',msg)
- if (msg.statusCode == 200) {
- app.globalData.msg = msg.data.data
- }
- return
- }
- if (res.data.fParkid == null) {
- // 没有 公园id 是中心的人
- this.setData({
- isShow1: true,
- isShow2: false,
- })
- // 发 报表请求
- let msg = await getBTdata()
- if (msg.statusCode == 200) {
- app.globalData.msg = msg.data.data
- }
- return
- }
- if (res.data.fParkid !== null) {
- // 有公园id 是公园的人
- this.setData({
- isShow1: false,
- isShow2: true,
- })
- return
- }
- },
- // 获取 个人信息
- onReady: function () {},
- /**
- * 生命周期函数--监听页面显示
- */
- onShow: function () {},
- /**
- * 生命周期函数--监听页面隐藏
- */
- onHide: function () {},
- /**
- * 生命周期函数--监听页面卸载
- */
- onUnload: function () {},
- /**
- * 页面相关事件处理函数--监听用户下拉动作
- */
- onPullDownRefresh: function () {},
- /**
- * 页面上拉触底事件的处理函数
- */
- onReachBottom: function () {},
- /**
- * 用户点击右上角分享
- */
- onShareAppMessage: function () {},
- })
|