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/m_user/p_about/p_about.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/m_user/p_changepw/p_changepw"
| break;
| }
| if (url != "") {
| wx.navigateTo({
| url: url
| })
| } else {
| wx.showToast({
| title: '功能敬请期待',
| duration: 1000,
| icon: 'none',
| mask: true,
| })
| }
| },
|
| })
|
|