|
@@ -8,7 +8,7 @@ import {
|
8
|
8
|
|
9
|
9
|
export default class App {
|
10
|
10
|
constructor() {
|
11
|
|
- // let common = new Common(document.querySelector('.main'),2) //导航菜单高亮,0是首页,后面的按顺序添加
|
|
11
|
+ let common = new Common(document.querySelector('.main'),2) //导航菜单高亮,0是首页,后面的按顺序添加
|
12
|
12
|
this.isMobile = isMobile()
|
13
|
13
|
// this.tabChange()
|
14
|
14
|
// 图片及视频资源懒加载。防止阻塞js执行
|
|
@@ -29,52 +29,9 @@ export default class App {
|
29
|
29
|
}
|
30
|
30
|
});
|
31
|
31
|
|
32
|
|
- // vx()
|
33
|
|
- // function vx(){
|
34
|
|
- // wx.config({
|
35
|
|
- // debug: false, // 开启调试模式
|
36
|
|
- // appId: 'YOUR_APP_ID', // 公众号的唯一标识
|
37
|
|
- // timestamp: 176565448486313, // 生成签名的时间戳
|
38
|
|
- // nonceStr: 'NONCESTR', // 生成签名的随机串
|
39
|
|
- // signature: 'SIGNATURE', // 签名,见附录1
|
40
|
|
- // jsApiList: ['onMenuShareTimeline', 'onMenuShareAppMessage'] // 需要使用的 JS 接口列表
|
41
|
|
- // });
|
42
|
|
-
|
43
|
|
- // wx.ready(function () {
|
44
|
|
- // // 分享到朋友圈
|
45
|
|
- // wx.onMenuShareTimeline({
|
46
|
|
- // title: '分享标题', // 分享标题
|
47
|
|
- // link: 'https://example.com', // 分享链接
|
48
|
|
- // imgUrl: 'https://example.com/image.jpg', // 分享图标
|
49
|
|
- // success: function () {
|
50
|
|
- // // 用户确认分享后执行的回调函数
|
51
|
|
- // },
|
52
|
|
- // cancel: function () {
|
53
|
|
- // // 用户取消分享后执行的回调函数
|
54
|
|
- // }
|
55
|
|
- // });
|
56
|
|
- // const shareWx = document.querySelector('.shareWx');
|
57
|
|
- // console.log(shareWx)
|
58
|
|
- // shareWx.addEventListener('click',function(){
|
59
|
|
- // // 分享给朋友
|
60
|
|
- // wx.onMenuShareAppMessage({
|
61
|
|
- // title: '分享标题', // 分享标题
|
62
|
|
- // desc: '分享描述', // 分享描述
|
63
|
|
- // type: 'link', // 分享类型,music、video或link,不填默认为link
|
64
|
|
- // success: function () {
|
65
|
|
- // // 用户确认分享后执行的回调函数
|
66
|
|
-
|
67
|
|
- // },
|
68
|
|
- // cancel: function () {
|
69
|
|
- // // 用户取消分享后执行的回调函数
|
70
|
|
- // }
|
71
|
|
- // });
|
72
|
|
- // })
|
73
|
|
-
|
74
|
|
- // });
|
75
|
|
- // }
|
76
|
|
- numberOfViews()
|
77
|
|
- getNums()
|
|
32
|
+
|
|
33
|
+ // numberOfViews()
|
|
34
|
+ // getNums()
|
78
|
35
|
async function numberOfViews() {
|
79
|
36
|
try {
|
80
|
37
|
const canshu = document.querySelector('.canshu');
|