闫增涛
2025-03-28 abbd7d18ea431ee8b6b8e634abf3e8ccb1fbb1b3
packageBookService/pages/components/webView/index.js
@@ -24,7 +24,6 @@
   */
  onLoad(options) {
    console.log(options)
    if (options && options.link) {
      this.setData({
        src: decodeURIComponent(options.link),
@@ -43,15 +42,12 @@
      }
    }
    const token = wx.getStorageSync(app.config.tokenKey)
    if (!token) {
      loginInfo(app, (data) => {
        if (data) {
          this.getProgress(options)
        } else {
          this.getProgress(options)
        }
      })
    if (token) {
      this.getProgress(options)
    } else {
      this.setWebViewSrc(options);
    }
  },
  onLoadWeb(e) {
@@ -117,7 +113,6 @@
    }
  },
  // 获取UserKey
  getProgress: function (dataObj) {
@@ -241,6 +236,14 @@
    app.MG.job.newJobWithApiNewEvent(data).then((res) => {})
  },
  //预览图片,放大预览
  preview(event) {
    let urls = [event.currentTarget.dataset.src]
    wx.previewImage({
      urls: urls // 需要预览的图片http链接列表
    })
  },
  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
@@ -254,4 +257,9 @@
  onReachBottom() {
  },
  /**
   * 用户点击右上角分享
   */
  onShareAppMessage() {},
  onShareTimeline() {},
})