home.js
2.46 KB
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
"use strict";
const common_vendor = require("../common/vendor.js");
const common_assets = require("../common/assets.js");
const _sfc_main = {
data() {
return {
title: "Hello",
apkUrl: "https://app.dyguoxin.com/android/smartPen.apk",
iosURl: "https://testflight.apple.com/join/2etMUNQS"
};
},
onLoad() {
},
methods: {
gotoDownloadAndroid() {
this.redirectToStore();
},
gotoDownloadIOS() {
this.redirectToStore();
},
safeAreaInsets() {
return common_vendor.index.getSystemInfoSync().safeAreaInsets.bottom;
},
redirectToStore() {
let platform = plus.os.name.toLocaleLowerCase();
if (platform.toLowerCase() === "android") {
if (this.apkUrl) {
plus.runtime.openURL(this.apkUrl);
} else {
plus.runtime.openURL(`market://details?id=${appId}`);
}
} else if (platform.toLowerCase() === "ios") {
plus.runtime.openURL(this.iosURl);
}
},
//全屏高
getCurrentHeight() {
var h = 0;
let device = common_vendor.index.getSystemInfoSync();
let screenHeight = device.screenHeight;
let statusBarHeight = device.statusBarHeight;
let safeAreaInsets = device.safeAreaInsets.bottom;
h = screenHeight - statusBarHeight;
h -= 44;
h -= 60;
if (isLoadMore.value) {
h -= 40;
}
return h - safeAreaInsets + "px";
},
goto(index) {
var url = "";
if (index == 1) {
url = "/pages/permission";
} else if (index == 2) {
url = "/pages/privacy";
} else {
url = "/pages/function";
}
common_vendor.index.navigateTo({
url
});
}
}
};
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return {
a: common_assets._imports_0,
b: common_assets._imports_1,
c: common_assets._imports_2,
d: common_assets._imports_3,
e: common_vendor.o((...args) => $options.gotoDownloadIOS && $options.gotoDownloadIOS(...args)),
f: common_assets._imports_4,
g: common_vendor.o((...args) => $options.gotoDownloadAndroid && $options.gotoDownloadAndroid(...args)),
h: common_vendor.o(($event) => $options.goto(1)),
i: common_vendor.o(($event) => $options.goto(2)),
j: common_vendor.o(($event) => $options.goto(3))
};
}
const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-41317691"]]);
wx.createPage(MiniProgramPage);