riku
2023-02-24 5d8e52e398bff7bc8f83e8f5b8a387175b958c98
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
// pages/mUser/pAbout/pAbout.js
const app = getApp()
 
Page({
 
  /**
   * 页面的初始数据
   */
  data: {
    version: app.globalData.version,
  },
 
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad(options) {
 
  },
 
  goto(e) {
    var url = ""
    var index = e.currentTarget.dataset.index
    switch (index) {
      case "0":
        wx.downloadFile({
          url: app.globalData.agreement,
          success: function (res) {
            wx.hideLoading()
            const filePath = res.tempFilePath
            wx.openDocument({
              filePath: filePath,
              success: function (res) {
                console.log('打开文档成功')
              },
              fail(error) {
                console.log(error);
              }
            })
          }
        })
        return;
      case "1":
        url = "/pages/mUser/pChangepw/pChangepw"
        break;
    }
    if (url != "") {
      wx.navigateTo({
        url: url
      })
    } else {
      wx.showToast({
        title: '功能敬请期待',
        duration: 1000,
        icon: 'none',
        mask: true,
      })
    }
  },
 
})