正在显示
100 个修改的文件
包含
4319 行增加
和
0 行删除
app.js
0 → 100644
1 | +//app.js | ||
2 | +App({ | ||
3 | + post(url, data) { | ||
4 | + /** | ||
5 | + * 自定义post函数,返回Promise | ||
6 | + * +------------------- | ||
7 | + * @param {String} url 接口网址 | ||
8 | + * @param {arrayObject} data 要传的数组对象 like: {name: 'name', age: 32} | ||
9 | + * +------------------- | ||
10 | + * @return {Promise} promise 返回promise供后续操作 | ||
11 | + */ | ||
12 | + wx.showNavigationBarLoading() | ||
13 | + wx.showLoading({ | ||
14 | + title: '加载中', | ||
15 | + }) | ||
16 | + var promise = new Promise((resolve, reject) => { | ||
17 | + let that = this; | ||
18 | + let postData = data; | ||
19 | + // let baseurl = 'http://ewords.w.bronet.cn/portal/';//仅为测试地址 | ||
20 | + let baseurl = 'https://smallpro.igmat.cn/portal/' | ||
21 | + //发起网络请求 | ||
22 | + wx.request({ | ||
23 | + url: baseurl + url, | ||
24 | + data: postData, | ||
25 | + method: 'POST', | ||
26 | + header: { | ||
27 | + 'content-type': 'application/x-www-form-urlencoded' | ||
28 | + }, | ||
29 | + success: function(res) { | ||
30 | + //返回取得的数据 | ||
31 | + if (res.data.code == 1) { | ||
32 | + resolve(res); | ||
33 | + setTimeout(function() { | ||
34 | + wx.hideLoading() | ||
35 | + }, 600) | ||
36 | + wx.hideNavigationBarLoading() | ||
37 | + } else if (res.data.code == '40000') { | ||
38 | + wx.showModal({ | ||
39 | + title: '提示', | ||
40 | + content: '登陆超时,请重新登陆', | ||
41 | + showCancel: false, | ||
42 | + success: function(res) { | ||
43 | + if (res.confirm) { | ||
44 | + wx.navigateTo({ | ||
45 | + url: '/pages/star/star', | ||
46 | + }) | ||
47 | + } | ||
48 | + } | ||
49 | + }) | ||
50 | + } | ||
51 | + }, | ||
52 | + error: function(e) { | ||
53 | + reject("网络错误"); | ||
54 | + wx.hideLoading(); | ||
55 | + wx.hideNavigationBarLoading(); | ||
56 | + wx.showModal({ | ||
57 | + title: '提示', | ||
58 | + content: res.data.msg, | ||
59 | + showCancel: false | ||
60 | + }) | ||
61 | + } | ||
62 | + }) | ||
63 | + }) | ||
64 | + wx.hideLoading(); | ||
65 | + return promise; | ||
66 | + }, | ||
67 | + | ||
68 | + globalData: { | ||
69 | + userInfo: null, | ||
70 | + } | ||
71 | +}) |
app.json
0 → 100644
1 | +{ | ||
2 | + "pages": [ | ||
3 | + "pages/star/star", | ||
4 | + "pages/index/index", | ||
5 | + "pages/MemorizingWords/reviewWordsDetail/reviewWordsDetail", | ||
6 | + "pages/MemorizingWords/MemorizingWords", | ||
7 | + "pages/MemorizingWords/wordsReport/wordsReport", | ||
8 | + "pages/MemorizingWords/wordsPlan/wordsPlan", | ||
9 | + "pages/MemorizingWords/wordsDetail/wordsDetail", | ||
10 | + "pages/MemorizingWords/reviewWords/reviewWords", | ||
11 | + "pages/index/goldDetail/goldDetail", | ||
12 | + "pages/index/boy/boy", | ||
13 | + "pages/index/goldArticle/goldArticle", | ||
14 | + "pages/my/my", | ||
15 | + "pages/lectureRoom/lectureRoom", | ||
16 | + "pages/MemorizingWords/wordsPackage/wordsPackage", | ||
17 | + "pages/community/community", | ||
18 | + "pages/index/goldArticleSearch/goldArticleSearch", | ||
19 | + "pages/index/goldArticleDetail/goldArticleDetail", | ||
20 | + "pages/index/goldArticleList/goldArticleList", | ||
21 | + "pages/index/articleDetail/articleDetail", | ||
22 | + "pages/index/articleList/articleList", | ||
23 | + "pages/course/course", | ||
24 | + "pages/course/courseDetail/courseDetail", | ||
25 | + "pages/communityDetail/communityDetail", | ||
26 | + "pages/lectureRoomDetail/lectureRoomDetail", | ||
27 | + "pages/MemorizingWords/searchwords/searchwords", | ||
28 | + "pages/index/searchlist/searchlist", | ||
29 | + "pages/out/out", | ||
30 | + "pages/MemorizingWords/wordsDetail_review/wordsDetail_review", | ||
31 | + "pages/contact/contact" | ||
32 | + ], | ||
33 | + "window": { | ||
34 | + "backgroundTextStyle": "light", | ||
35 | + "navigationBarBackgroundColor": "#fff", | ||
36 | + "navigationBarTitleText": "WeChat", | ||
37 | + "navigationBarTextStyle": "black" | ||
38 | + }, | ||
39 | + "tabBar": { | ||
40 | + "color": "#A1A1A1", | ||
41 | + "selectedColor": "#1CB9FA", | ||
42 | + "list": [ | ||
43 | + { | ||
44 | + "pagePath": "pages/index/index", | ||
45 | + "text": "首页", | ||
46 | + "iconPath": "images/tab1.png", | ||
47 | + "selectedIconPath": "images/tab2.png" | ||
48 | + }, | ||
49 | + { | ||
50 | + "pagePath": "pages/community/community", | ||
51 | + "text": "社区", | ||
52 | + "iconPath": "images/tab3.png", | ||
53 | + "selectedIconPath": "images/tab4.png" | ||
54 | + }, | ||
55 | + { | ||
56 | + "pagePath": "pages/lectureRoom/lectureRoom", | ||
57 | + "text": "大仙讲堂", | ||
58 | + "iconPath": "images/tab5.png", | ||
59 | + "selectedIconPath": "images/tab6.png" | ||
60 | + }, | ||
61 | + { | ||
62 | + "pagePath": "pages/MemorizingWords/MemorizingWords", | ||
63 | + "text": "背单词", | ||
64 | + "iconPath": "/images/tab7.png", | ||
65 | + "selectedIconPath": "images/tab8.png" | ||
66 | + }, | ||
67 | + { | ||
68 | + "pagePath": "pages/my/my", | ||
69 | + "text": "我的", | ||
70 | + "iconPath": "/images/tab9.png", | ||
71 | + "selectedIconPath": "/images/tab10.png" | ||
72 | + } | ||
73 | + ] | ||
74 | + } | ||
75 | +} |
app.wxss
0 → 100644
1 | +/**app.wxss**/ | ||
2 | +.nodata{ | ||
3 | + color:#999; | ||
4 | + font-size:30rpx; | ||
5 | + margin-top:36%; | ||
6 | + left:50%; | ||
7 | + transform:translateX(-50%); | ||
8 | + position: absolute; | ||
9 | + z-index:100; | ||
10 | +} | ||
11 | +.wxParse-strong .WxEmojiView{ | ||
12 | + font-weight:bold; | ||
13 | +} | ||
14 | +/* html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, | ||
15 | +blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, | ||
16 | +ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, | ||
17 | +dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, | ||
18 | +tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, | ||
19 | +figcaption, footer, header, menu, nav, output, ruby, section, summary, time, | ||
20 | +mark, audio, video, input, view, text, template, blockquote, page { | ||
21 | + margin: 0; | ||
22 | + padding: 0; | ||
23 | + border: 0; | ||
24 | + font-size: 100%; | ||
25 | + font-weight: normal; | ||
26 | + vertical-align: baseline; | ||
27 | + box-sizing: border-box; | ||
28 | + font-family: 'pingfang'; | ||
29 | +} */ | ||
30 | + | ||
31 | +/* HTML5 display-role reset for older browsers */ | ||
32 | + | ||
33 | +article, aside, details, figcaption, figure, footer, header, menu, nav, section { | ||
34 | + display: block; | ||
35 | +} | ||
36 | + | ||
37 | +body { | ||
38 | + line-height: 1; | ||
39 | + height: 100%; | ||
40 | + position: relative; | ||
41 | +} | ||
42 | + | ||
43 | +blockquote, q { | ||
44 | + quotes: none; | ||
45 | +} | ||
46 | + | ||
47 | +blockquote:before, blockquote:after, q:before, q:after { | ||
48 | + content: none; | ||
49 | +} | ||
50 | + | ||
51 | +table { | ||
52 | + border-collapse: collapse; | ||
53 | + border-spacing: 0; | ||
54 | +} | ||
55 | + | ||
56 | +html, body { | ||
57 | + width: 100%; | ||
58 | +} | ||
59 | +.wxParse-span{ | ||
60 | + display: inline !important; | ||
61 | +} | ||
62 | +.wxParse-span .wxParse-inline{ | ||
63 | + display: inline !important; | ||
64 | +} | ||
65 | +/* custom */ | ||
66 | +a { | ||
67 | + color: #000; | ||
68 | + text-decoration: none; | ||
69 | + -webkit-backface-visibility: hidden; | ||
70 | +} | ||
71 | + | ||
72 | +li { | ||
73 | + list-style: none; | ||
74 | +} | ||
75 | + | ||
76 | +body { | ||
77 | + -webkit-text-size-adjust: none; | ||
78 | + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); | ||
79 | +} | ||
80 | + | ||
81 | +img { | ||
82 | + border: 0; | ||
83 | + margin: 0; | ||
84 | +} | ||
85 | + | ||
86 | +input, textarea { | ||
87 | + height: 100%; | ||
88 | + width: 100%; | ||
89 | + border: 0; | ||
90 | + outline: none; | ||
91 | + background: none; | ||
92 | +} | ||
93 | + | ||
94 | + | ||
95 | + | ||
96 | + | ||
97 | +@font-face { | ||
98 | + font-family: 'iconfont'; /* project id 792131 */ | ||
99 | + src: url('//at.alicdn.com/t/font_792131_ccibtpxh1ok.eot'); | ||
100 | + src: url('//at.alicdn.com/t/font_792131_ccibtpxh1ok.eot?#iefix') format('embedded-opentype'), | ||
101 | + url('//at.alicdn.com/t/font_792131_ccibtpxh1ok.woff') format('woff'), | ||
102 | + url('//at.alicdn.com/t/font_792131_ccibtpxh1ok.ttf') format('truetype'), | ||
103 | + url('//at.alicdn.com/t/font_792131_ccibtpxh1ok.svg#iconfont') format('svg'); | ||
104 | +} | ||
105 | + | ||
106 | + | ||
107 | + | ||
108 | + | ||
109 | +.iconfont { | ||
110 | + font-family:"iconfont" !important; | ||
111 | + font-size:16px; | ||
112 | + font-style:normal; | ||
113 | + -webkit-font-smoothing: antialiased; | ||
114 | + -moz-osx-font-smoothing: grayscale; | ||
115 | +} | ||
116 | + | ||
117 | +.icon-jiantouarrow487:before { content: "\e6ab"; } | ||
118 | + | ||
119 | +.icon-tianjiaadd73:before { content: "\e71f"; } | ||
120 | + | ||
121 | +.icon-shouye:before { content: "\e61b"; } | ||
122 | + | ||
123 | +.icon-fenxiang:before { content: "\e619"; } | ||
124 | + | ||
125 | +.icon-dingdan:before { content: "\e649"; } | ||
126 | + | ||
127 | +.icon-dianji:before { content: "\e76c"; } | ||
128 | + | ||
129 | +.icon-zhinanzhen:before { content: "\e60a"; } | ||
130 | + | ||
131 | +.icon-wode:before { content: "\e636"; } | ||
132 | + | ||
133 | +.icon-yuan:before { content: "\e601"; } | ||
134 | + | ||
135 | +.icon-bianji:before { content: "\e6c7"; } | ||
136 | + | ||
137 | +.icon-time:before { content: "\e61e"; } | ||
138 | + | ||
139 | +.icon-ren:before { content: "\e602"; } | ||
140 | + | ||
141 | +.icon-yuan1:before { content: "\e6ba"; } | ||
142 | + | ||
143 | +.icon-shouye1:before { content: "\e60c"; } | ||
144 | + | ||
145 | +.icon-laba:before { content: "\e60d"; } | ||
146 | + | ||
147 | +.icon-laba1:before { content: "\e62d"; } | ||
148 | + | ||
149 | +.icon-huatong:before { content: "\e61d"; } | ||
150 | + | ||
151 | +.icon-sousuo:before { content: "\e608"; } | ||
152 | + | ||
153 | +.icon-xinxi-:before { content: "\e614"; } | ||
154 | + | ||
155 | +.icon-jia:before { content: "\e603"; } | ||
156 | + | ||
157 | +.icon-xuanzhong:before { content: "\e637"; } |
images/background.jpg
0 → 100644
77.1 KB
images/banner.png
0 → 100644
71.6 KB
images/bg.gif
0 → 100644
43.4 KB
images/bg2.gif
0 → 100644
4.3 KB
images/bg2.png
0 → 100644
100.2 KB
images/bg3.png
0 → 100644
3.9 KB
images/book.png
0 → 100644
5.3 KB
images/car.gif
0 → 100644
71.3 KB
images/chart1.png
0 → 100644
2.1 KB
images/chart2.png
0 → 100644
2.6 KB
images/class.png
0 → 100644
122.3 KB
images/class1.png
0 → 100644
76.8 KB
images/class2.jpg
0 → 100644
82.5 KB
images/class3.jpg
0 → 100644
100.2 KB
images/class4.jpg
0 → 100644
57.6 KB
images/classs1.png
0 → 100644
1.7 KB
images/classs2.png
0 → 100644
2.1 KB
images/huatong1.png
0 → 100644
1.7 KB
images/huatong2.png
0 → 100644
2.0 KB
images/img1.png
0 → 100644
28.7 KB
images/index1.png
0 → 100644
2.0 KB
images/index2.png
0 → 100644
1.7 KB
images/index3.png
0 → 100644
2.0 KB
images/laba.png
0 → 100644
1.4 KB
images/my1.png
0 → 100644
1.6 KB
images/my2.png
0 → 100644
1.7 KB
images/person.png
0 → 100644
2.2 KB
images/play.png
0 → 100644
61.6 KB
images/popup.png
0 → 100644
99.8 KB
images/popup2.gif
0 → 100644
32.7 KB
images/suxue.png
0 → 100644
59.0 KB
images/tab1.png
0 → 100644
1.9 KB
images/tab10.png
0 → 100644
2.4 KB
images/tab2.png
0 → 100644
1.8 KB
images/tab3.png
0 → 100644
2.5 KB
images/tab4.png
0 → 100644
2.2 KB
images/tab5.png
0 → 100644
1.7 KB
images/tab6.png
0 → 100644
1.8 KB
images/tab7.png
0 → 100644
1.9 KB
images/tab8.png
0 → 100644
1.8 KB
images/tab9.png
0 → 100644
2.3 KB
images/teacher.png
0 → 100644
25.8 KB
images/teacher2.png
0 → 100644
92.9 KB
images/wenfa.png
0 → 100644
58.8 KB
images/words1.png
0 → 100644
32.3 KB
images/words2.png
0 → 100644
25.2 KB
images/wu.png
0 → 100644
32.5 KB
images/组 7.jpg
0 → 100644
8.8 KB
pages/MemorizingWords/MemorizingWords.js
0 → 100644
1 | +// pages/MemorizingWords/MemorizingWords.js | ||
2 | +const app=getApp(); | ||
3 | +Page({ | ||
4 | + /** | ||
5 | + * 页面的初始数据 | ||
6 | + */ | ||
7 | + data: { | ||
8 | + page: 0,//0表示没有计划显示词包,1有计划显示计划 | ||
9 | + wordspackage:[],//词包 | ||
10 | + reciteInfo:[],//背诵信息 | ||
11 | + swiper_index:1,//当前swiper_index滑块 | ||
12 | + next_margin:'60rpx',//后边距 | ||
13 | + previous_margin:'60rpx',//前边距 | ||
14 | + circular:true, | ||
15 | + | ||
16 | + }, | ||
17 | + //词包详情 | ||
18 | + wordsPackgeDetail(e) { | ||
19 | + let that=this; | ||
20 | + wx.navigateTo({ | ||
21 | + url: '../MemorizingWords/wordsPackage/wordsPackage?id=' + e.currentTarget.id, | ||
22 | + }) | ||
23 | + }, | ||
24 | + //修改计划 | ||
25 | + editPlan(){ | ||
26 | + let that=this; | ||
27 | + let days = that.data.reciteInfo.days; | ||
28 | + let wordspackageid = that.data.reciteInfo.package_id; | ||
29 | + let everyday_words = that.data.reciteInfo.everyday_words; | ||
30 | + wx.navigateTo({ | ||
31 | + url: '../MemorizingWords/wordsPlan/wordsPlan?wordspackageid=' + wordspackageid + '&days=' + days + '&wordnum=' + everyday_words, | ||
32 | + success: function(res) {}, | ||
33 | + fail: function(res) {}, | ||
34 | + complete: function(res) {}, | ||
35 | + }) | ||
36 | + }, | ||
37 | + //修改词包 | ||
38 | + editwordspage(){ | ||
39 | + let that=this; | ||
40 | + let reciteInfo = that.data.reciteInfo; | ||
41 | + let package_id = reciteInfo.package_id;//词包Id | ||
42 | + let wordspackage = that.data.wordspackage; | ||
43 | + let swiper_index = that.data.swiper_index; | ||
44 | + for (let i in wordspackage){ | ||
45 | + if (wordspackage[i].id == package_id){ | ||
46 | + wordspackage[i].jindu = reciteInfo.jindu; | ||
47 | + swiper_index=i; | ||
48 | + } | ||
49 | + } | ||
50 | + wx.setStorageSync('ifeidtwordpackage',true); | ||
51 | + that.setData({ | ||
52 | + page:0, | ||
53 | + wordspackage: wordspackage, | ||
54 | + swiper_index: swiper_index | ||
55 | + }) | ||
56 | + }, | ||
57 | + //搜索页 | ||
58 | + searchPage() { | ||
59 | + wx.navigateTo({ | ||
60 | + url: '../../pages/index/goldArticleSearch/goldArticleSearch?type='+2, | ||
61 | + }) | ||
62 | + }, | ||
63 | + //开始背单词 | ||
64 | + startWords() { | ||
65 | + wx.navigateTo({ | ||
66 | + url: '../MemorizingWords/wordsDetail/wordsDetail', | ||
67 | + }) | ||
68 | + }, | ||
69 | + //复习跳转 | ||
70 | + review() { | ||
71 | + wx.navigateTo({ | ||
72 | + url: '../MemorizingWords/reviewWords/reviewWords', | ||
73 | + }) | ||
74 | + }, | ||
75 | + //单词报告 | ||
76 | + wordReport() { | ||
77 | + wx.navigateTo({ | ||
78 | + url: '../MemorizingWords/wordsReport/wordsReport', | ||
79 | + }) | ||
80 | + }, | ||
81 | + //判断是否有计划 | ||
82 | + getjudge(){ | ||
83 | + let that=this; | ||
84 | + let url = 'Words/ifHasPlan'; | ||
85 | + let params={ | ||
86 | + token:wx.getStorageSync('token') | ||
87 | + }; | ||
88 | + app.post(url,params).then((res)=>{ | ||
89 | + if(res.data.code==1){ | ||
90 | + if(res.data.data==0){ | ||
91 | + that.setData({ | ||
92 | + page:0 | ||
93 | + }) | ||
94 | + that.getPackage(); | ||
95 | + } else{ | ||
96 | + that.setData({ | ||
97 | + page: 1 | ||
98 | + }) | ||
99 | + that.getReciteInfo(); | ||
100 | + } | ||
101 | + } | ||
102 | + }).catch((errMsg)=>{ | ||
103 | + console.log(errMsg) | ||
104 | + }) | ||
105 | + }, | ||
106 | + //获取全部词包 | ||
107 | + getPackage(){ | ||
108 | + let that=this; | ||
109 | + let reciteInfo = that.data.reciteInfo; | ||
110 | + let package_id = reciteInfo.package_id;//词包Id | ||
111 | + let url ='Words/getPackage'; | ||
112 | + app.post(url,{}).then((res)=>{ | ||
113 | + if(res.data.code==1){ | ||
114 | + let wordspackage=res.data.data; | ||
115 | + for (let obj of res.data.data){ | ||
116 | + if (obj.id == package_id){ | ||
117 | + obj.jindu = reciteInfo.jindu | ||
118 | + }else{ | ||
119 | + obj.jindu = '0%' | ||
120 | + } | ||
121 | + } | ||
122 | + that.setData({ | ||
123 | + wordspackage: wordspackage | ||
124 | + }) | ||
125 | + } | ||
126 | + }).catch((errMsg)=>{ | ||
127 | + }) | ||
128 | + }, | ||
129 | + //获取背单词页面数据 | ||
130 | + getReciteInfo() { | ||
131 | + let that=this; | ||
132 | + let url ='Words/getReciteInfo'; | ||
133 | + let params={ | ||
134 | + token: wx.getStorageSync('token') | ||
135 | + } | ||
136 | + app.post(url,params).then((res)=>{ | ||
137 | + if(res.data.code==1){ | ||
138 | + that.setData({ | ||
139 | + reciteInfo:res.data.data | ||
140 | + }) | ||
141 | + } | ||
142 | + }).catch((errMsg)=>{ | ||
143 | + console.log(errMsg) | ||
144 | + }) | ||
145 | + }, | ||
146 | + /** | ||
147 | + * 生命周期函数--监听页面加载 | ||
148 | + */ | ||
149 | + onLoad: function(options) { | ||
150 | + let that=this; | ||
151 | + that.getjudge(); | ||
152 | + that.getPackage(); | ||
153 | + that.getReciteInfo(); | ||
154 | + }, | ||
155 | + /** | ||
156 | + * 生命周期函数--监听页面初次渲染完成 | ||
157 | + */ | ||
158 | + onReady: function() { | ||
159 | + | ||
160 | + }, | ||
161 | + /** | ||
162 | + * 生命周期函数--监听页面显示 | ||
163 | + */ | ||
164 | + onShow: function() { | ||
165 | + let that = this; | ||
166 | + that.getjudge(); | ||
167 | + that.getReciteInfo(); | ||
168 | + }, | ||
169 | + | ||
170 | + /** | ||
171 | + * 生命周期函数--监听页面隐藏 | ||
172 | + */ | ||
173 | + onHide: function() { | ||
174 | + | ||
175 | + }, | ||
176 | + | ||
177 | + /** | ||
178 | + * 生命周期函数--监听页面卸载 | ||
179 | + */ | ||
180 | + onUnload: function() { | ||
181 | + | ||
182 | + }, | ||
183 | + | ||
184 | + /** | ||
185 | + * 页面相关事件处理函数--监听用户下拉动作 | ||
186 | + */ | ||
187 | + onPullDownRefresh: function() { | ||
188 | + | ||
189 | + }, | ||
190 | + | ||
191 | + /** | ||
192 | + * 页面上拉触底事件的处理函数 | ||
193 | + */ | ||
194 | + onReachBottom: function() { | ||
195 | + | ||
196 | + }, | ||
197 | + | ||
198 | + /** | ||
199 | + * 用户点击右上角分享 | ||
200 | + */ | ||
201 | + onShareAppMessage: function() { | ||
202 | + | ||
203 | + } | ||
204 | +}) |
pages/MemorizingWords/MemorizingWords.json
0 → 100644
1 | +{"navigationBarTitleText": "背单词"} |
pages/MemorizingWords/MemorizingWords.wxml
0 → 100644
1 | +<!--pages/MemorizingWords/MemorizingWords.wxml--> | ||
2 | +<view class='title'>背单词</view> | ||
3 | +<view class='content_item' wx:if='{{page==0}}'> | ||
4 | + <swiper class='swiper_box' next-margin='{{next_margin}}'previous-margin='{{previous_margin}}' circular='{{circular}}' current='{{swiper_index}}'> | ||
5 | + <block wx:for='{{wordspackage}}' wx:key='' > | ||
6 | + <swiper-item class='swiper_item' id='{{item.id}}' bindtap='wordsPackgeDetail'> | ||
7 | + <view class='sub_title'>GMAT</view> | ||
8 | + <view class='title_info'>{{item.name}}</view> | ||
9 | + <view class='sub_title_info'>{{item.short_content}}</view> | ||
10 | + <view class='progress_box' > | ||
11 | + <view class='progress_num'>{{item.jindu}}</view> | ||
12 | + <view class='progress_img' style='left:{{item.jindu}}'> | ||
13 | + <image src='/images/person.png'></image> | ||
14 | + </view> | ||
15 | + <view class='progress_bar'> | ||
16 | + <view class='progress_ing' style='width:{{item.jindu}}'></view> | ||
17 | + </view> | ||
18 | + </view> | ||
19 | + </swiper-item> | ||
20 | + </block> | ||
21 | + </swiper> | ||
22 | +</view> | ||
23 | +<view class='content_box'> | ||
24 | + <block wx:if='{{page==1}}'> | ||
25 | + <view class='content_item'> | ||
26 | + <view class='serack_box' bindtap='searchPage'> | ||
27 | + <view class='iconfont icon-sousuo'></view> | ||
28 | + <view class='search_input'> | ||
29 | + <input placeholder='请输入要搜索的单词' placeholder-class='input_color' disabled></input> | ||
30 | + </view> | ||
31 | + </view> | ||
32 | + <view class='content_progress'> | ||
33 | + <view class='label'>已坚持{{reciteInfo.jianchi_days}}天</view> | ||
34 | + <view class='days'> | ||
35 | + <image src='/images/bg2.gif'> | ||
36 | + <view class='image_txt'> | ||
37 | + <text class='day_num'>{{reciteInfo.days}}</text> | ||
38 | + <text class='dau_unit'>天</text> | ||
39 | + </view> | ||
40 | + </image> | ||
41 | + </view> | ||
42 | + <view class='plan' bindtap='editPlan'>改计划</view> | ||
43 | + <view class='plan_box'> | ||
44 | + <view class='plan_item'> | ||
45 | + <view class=''> | ||
46 | + <text class='plan_num'>{{reciteInfo.everyday_words}}</text> 个</view> | ||
47 | + <view>今天需背单词</view> | ||
48 | + </view> | ||
49 | + <view class='line'>|</view> | ||
50 | + <view class='plan_item'> | ||
51 | + <view> | ||
52 | + <text class='plan_num'>{{reciteInfo.finish}}</text> 个</view> | ||
53 | + <view>累计已背</view> | ||
54 | + </view> | ||
55 | + </view> | ||
56 | + <view class='words_type' bindtap='editwordspage'> | ||
57 | + <view class='iconfont icon-bianji'></view> | ||
58 | + <view>GMAT-{{reciteInfo.package_name}}</view> | ||
59 | + </view> | ||
60 | + <view class='progress_num2'>{{reciteInfo.jindu}}</view> | ||
61 | + <view class='progress_img img2' style='left:{{reciteInfo.jindu}}'> | ||
62 | + <image src='/images/person.png'></image> | ||
63 | + </view> | ||
64 | + <view class='progress_bar bar2'> | ||
65 | + <view class='progress_ing ing2' style='width:{{reciteInfo.jindu}}'></view> | ||
66 | + </view> | ||
67 | + </view> | ||
68 | + </view> | ||
69 | + | ||
70 | + <view class='bottom_btn'> | ||
71 | + <view class='btn1' bindtap='startWords'>开始背单词</view> | ||
72 | + <view class='btn2' bindtap='review'>复习</view> | ||
73 | + <view class='btn3' bindtap='wordReport'>单词报告</view> | ||
74 | + </view> | ||
75 | + </block> | ||
76 | +</view> |
pages/MemorizingWords/MemorizingWords.wxss
0 → 100644
1 | +/* pages/MemorizingWords/MemorizingWords.wxss */ | ||
2 | +@import "/pages/index/goldArticle/goldArticle.wxss"; | ||
3 | + | ||
4 | +.content_box { | ||
5 | + padding: 0 30rpx; | ||
6 | + margin: 0; | ||
7 | +} | ||
8 | + | ||
9 | +.title { | ||
10 | + font-size: 48rpx; | ||
11 | + font-weight: bold; | ||
12 | + color: #1a1a1a; | ||
13 | + margin-left: 30rpx; | ||
14 | +} | ||
15 | + | ||
16 | +.content_item { | ||
17 | + padding: 0; | ||
18 | + margin-top: 40rpx; | ||
19 | + /* background: http://ewords.w.bronet.cn/images/ */ | ||
20 | +} | ||
21 | + | ||
22 | +.swiper_box { | ||
23 | + width: 100%; | ||
24 | + height: 535rpx; | ||
25 | +} | ||
26 | +.swiper_item{ | ||
27 | + padding: 0 30rpx; | ||
28 | + box-sizing: border-box; | ||
29 | +} | ||
30 | +.sub_title { | ||
31 | + font-size: 24rpx; | ||
32 | + color: #1db9fa; | ||
33 | +} | ||
34 | + | ||
35 | +.title_info { | ||
36 | + font-size: 24rpx; | ||
37 | + color: #1a1a1a; | ||
38 | + margin: 5rpx 0; | ||
39 | +} | ||
40 | + | ||
41 | +.sub_title_info { | ||
42 | + font-size: 30rpx; | ||
43 | + color: #999; | ||
44 | +} | ||
45 | + | ||
46 | +.progress_box { | ||
47 | + width: 100%; | ||
48 | + height: 400rpx; | ||
49 | + background: radial-gradient(circle, #6cf0f9, #1cb9fa); | ||
50 | + /* background: url(http://ewords.w.bronet.cn/images/) */ | ||
51 | + border-radius: 10rpx; | ||
52 | + overflow: hidden; | ||
53 | + position: relative; | ||
54 | + margin-top: 10rpx; | ||
55 | +} | ||
56 | + | ||
57 | +.progress_num { | ||
58 | + font-size: 87rpx; | ||
59 | + color: #cdefff; | ||
60 | + position: absolute; | ||
61 | + top: 110rpx; | ||
62 | + left: 40rpx; | ||
63 | +} | ||
64 | + | ||
65 | +.progress_bar { | ||
66 | + width: 100%; | ||
67 | + height: 60rpx; | ||
68 | + background: rgba(0, 0, 0, 0.2); | ||
69 | + position: absolute; | ||
70 | + left: 0; | ||
71 | + bottom: 48rpx; | ||
72 | +} | ||
73 | + | ||
74 | +.progress_ing { | ||
75 | + width: 0%; | ||
76 | + border-top: 60rpx solid rgba(0, 0, 0, 0.2); | ||
77 | + border-right: 37rpx solid transparent; | ||
78 | +} | ||
79 | + | ||
80 | +.progress_img { | ||
81 | + width: 51rpx; | ||
82 | + height: 42rpx; | ||
83 | + display: flex; | ||
84 | + align-items: center; | ||
85 | + justify-content: center; | ||
86 | + position: absolute; | ||
87 | + bottom: 110rpx; | ||
88 | + left: 0%; | ||
89 | +} | ||
90 | + | ||
91 | +.progress_img image { | ||
92 | + width: 100%; | ||
93 | + height: 100%; | ||
94 | +} | ||
95 | + | ||
96 | +/* 选完词包的界面 */ | ||
97 | + | ||
98 | +.content_progress { | ||
99 | + width: 100%; | ||
100 | + height: 551rpx; | ||
101 | + background: #1dbafa; | ||
102 | + border-radius: 10rpx; | ||
103 | + margin-top: 35rpx; | ||
104 | + position: relative; | ||
105 | + /* display: flex; | ||
106 | + flex-direction: column; | ||
107 | + align-items: center; | ||
108 | + justify-content: center; */ | ||
109 | + overflow: hidden; | ||
110 | +} | ||
111 | + | ||
112 | +.label { | ||
113 | + width: 131rpx; | ||
114 | + height: 43rpx; | ||
115 | + font-size: 20rpx; | ||
116 | + color: #fff; | ||
117 | + border-radius: 0 22rpx 22rpx 0; | ||
118 | + background: #ffda94; | ||
119 | + display: flex; | ||
120 | + align-items: center; | ||
121 | + justify-content: center; | ||
122 | + position: absolute; | ||
123 | + left: 0; | ||
124 | + top: 24rpx; | ||
125 | +} | ||
126 | + | ||
127 | +.days { | ||
128 | + width: 120rpx; | ||
129 | + height: 120rpx; | ||
130 | + border-radius: 50%; | ||
131 | + display: flex; | ||
132 | + align-items: center; | ||
133 | + justify-content: center; | ||
134 | + /* overflow: hidden; */ | ||
135 | + position: relative; | ||
136 | + margin: 0 auto; | ||
137 | + margin-top: 28rpx; | ||
138 | +} | ||
139 | + | ||
140 | +.days image { | ||
141 | + width: 100%; | ||
142 | + height: 100%; | ||
143 | + border-radius: 50%; | ||
144 | +} | ||
145 | +.image_txt{ | ||
146 | + position: absolute; | ||
147 | + top:50%; | ||
148 | + left:50%; | ||
149 | + transform: translate(-50%,-50%); | ||
150 | + display: flex; | ||
151 | + justify-content: center; | ||
152 | + align-items: center; | ||
153 | + z-index:10; | ||
154 | +} | ||
155 | +.day_num { | ||
156 | +font-size:32rpx; | ||
157 | +color:#131313; | ||
158 | +font-weight:bold; | ||
159 | +/* position:absolute; | ||
160 | +z-index:10; | ||
161 | +top:18rpx; | ||
162 | +left:50%; | ||
163 | +transform: rotateX(-50%); */ | ||
164 | + | ||
165 | +} | ||
166 | + | ||
167 | +.dau_unit { | ||
168 | + font-size: 20rpx; | ||
169 | + font-weight: bold; | ||
170 | + color: #131313; | ||
171 | + /* position: absolute; | ||
172 | + z-index: 10; | ||
173 | + top: 34rpx; | ||
174 | + right: 13rpx; */ | ||
175 | +} | ||
176 | + | ||
177 | +.plan { | ||
178 | + width: 100rpx; | ||
179 | + height: 40rpx; | ||
180 | + font-size: 20rpx; | ||
181 | + color: #fff; | ||
182 | + border: 1rpx solid rgba(255, 255, 255, 1); | ||
183 | + border-radius: 10rpx; | ||
184 | + display: flex; | ||
185 | + align-items: center; | ||
186 | + justify-content: center; | ||
187 | + margin: 0 auto; | ||
188 | + margin-top: 18rpx; | ||
189 | + line-height: 40rpx; | ||
190 | +} | ||
191 | + | ||
192 | +.plan_box { | ||
193 | + display: flex; | ||
194 | + align-items: center; | ||
195 | + justify-content: center; | ||
196 | + margin-top: 40rpx; | ||
197 | +} | ||
198 | + | ||
199 | +.plan_item { | ||
200 | + font-size: 24rpx; | ||
201 | + color: #fff; | ||
202 | + text-align: center; | ||
203 | +} | ||
204 | + | ||
205 | +.plan_num { | ||
206 | + font-size: 36rpx; | ||
207 | + font-weight: bold; | ||
208 | + color: #fff; | ||
209 | +} | ||
210 | + | ||
211 | +.line { | ||
212 | + font-size: 50rpx; | ||
213 | + color: #fff; | ||
214 | + margin: 0 75rpx; | ||
215 | +} | ||
216 | + | ||
217 | +.words_type { | ||
218 | + font-size: 24rpx; | ||
219 | + color: #e0f5ff; | ||
220 | + display: flex; | ||
221 | + align-items: center; | ||
222 | + justify-content: center; | ||
223 | + margin-top: 47rpx; | ||
224 | +} | ||
225 | + | ||
226 | +.icon-bianji { | ||
227 | + font-size: 15rpx; | ||
228 | + margin-right: 15rpx; | ||
229 | +} | ||
230 | + | ||
231 | +.progress_num2 { | ||
232 | + font-size: 72rpx; | ||
233 | + color: #cdefff; | ||
234 | + position: absolute; | ||
235 | + right: 46rpx; | ||
236 | + bottom: 47rpx; | ||
237 | +} | ||
238 | + | ||
239 | +.bar2 { | ||
240 | + height: 16rpx; | ||
241 | + position: absolute; | ||
242 | + bottom: 0; | ||
243 | + left: 0; | ||
244 | +} | ||
245 | + | ||
246 | +.ing2 { | ||
247 | + border-top: 16rpx solid rgba(0, 0, 0, 0.2); | ||
248 | + border-right: 37rpx solid transparent; | ||
249 | +} | ||
250 | + | ||
251 | +.img2 { | ||
252 | + position: absolute; | ||
253 | + bottom: 19rpx; | ||
254 | +} | ||
255 | + | ||
256 | +.bottom_btn { | ||
257 | + margin-top: 50rpx; | ||
258 | +} | ||
259 | + | ||
260 | +.btn1, .btn2, .btn3 { | ||
261 | + width: 100%; | ||
262 | + height: 80rpx; | ||
263 | + background: rgba(29, 185, 250, 1); | ||
264 | + border-radius: 40rpx; | ||
265 | + display: flex; | ||
266 | + align-items: center; | ||
267 | + justify-content: center; | ||
268 | + font-size: 36rpx; | ||
269 | + color: #fff; | ||
270 | + margin-bottom: 20rpx; | ||
271 | +} | ||
272 | + | ||
273 | +.btn2, .btn3 { | ||
274 | + color: #1db9fa; | ||
275 | + background: none; | ||
276 | + border: 1rpx solid #1db9fa; | ||
277 | +} |
1 | +// pages/MemorizingWords/reviewWords/reviewWords.js | ||
2 | +Page({ | ||
3 | + | ||
4 | + /** | ||
5 | + * 页面的初始数据 | ||
6 | + */ | ||
7 | + data: { | ||
8 | + | ||
9 | + }, | ||
10 | + | ||
11 | + //错词列表 | ||
12 | + wrongWordsList() { | ||
13 | + var page = 0 | ||
14 | + wx.navigateTo({ | ||
15 | + url: '../../MemorizingWords/reviewWordsDetail/reviewWordsDetail?page=' + page, | ||
16 | + }) | ||
17 | + }, | ||
18 | + | ||
19 | + //时间段复习 | ||
20 | + timeList() { | ||
21 | + var page = 1 | ||
22 | + wx.navigateTo({ | ||
23 | + url: '../../MemorizingWords/reviewWordsDetail/reviewWordsDetail?page=' + page, | ||
24 | + }) | ||
25 | + }, | ||
26 | + | ||
27 | + /** | ||
28 | + * 生命周期函数--监听页面加载 | ||
29 | + */ | ||
30 | + onLoad: function(options) { | ||
31 | + | ||
32 | + }, | ||
33 | + | ||
34 | + /** | ||
35 | + * 生命周期函数--监听页面初次渲染完成 | ||
36 | + */ | ||
37 | + onReady: function() { | ||
38 | + | ||
39 | + }, | ||
40 | + | ||
41 | + /** | ||
42 | + * 生命周期函数--监听页面显示 | ||
43 | + */ | ||
44 | + onShow: function() { | ||
45 | + | ||
46 | + }, | ||
47 | + | ||
48 | + /** | ||
49 | + * 生命周期函数--监听页面隐藏 | ||
50 | + */ | ||
51 | + onHide: function() { | ||
52 | + | ||
53 | + }, | ||
54 | + | ||
55 | + /** | ||
56 | + * 生命周期函数--监听页面卸载 | ||
57 | + */ | ||
58 | + onUnload: function() { | ||
59 | + | ||
60 | + }, | ||
61 | + | ||
62 | + /** | ||
63 | + * 页面相关事件处理函数--监听用户下拉动作 | ||
64 | + */ | ||
65 | + onPullDownRefresh: function() { | ||
66 | + | ||
67 | + }, | ||
68 | + | ||
69 | + /** | ||
70 | + * 页面上拉触底事件的处理函数 | ||
71 | + */ | ||
72 | + onReachBottom: function() { | ||
73 | + | ||
74 | + }, | ||
75 | + | ||
76 | + /** | ||
77 | + * 用户点击右上角分享 | ||
78 | + */ | ||
79 | + onShareAppMessage: function() { | ||
80 | + | ||
81 | + } | ||
82 | +}) |
1 | +{"navigationBarTitleText": "复习界面"} |
1 | +<!--pages/MemorizingWords/reviewWords/reviewWords.wxml--> | ||
2 | +<view class='null_box'></view> | ||
3 | +<view class='content_box'> | ||
4 | + <view class='content_img' bindtap='wrongWordsList'> | ||
5 | + <image src='/images/words1.png'></image> | ||
6 | + </view> | ||
7 | + <view class='content_img' bindtap='timeList'> | ||
8 | + <image src='/images/words2.png'></image> | ||
9 | + </view> | ||
10 | + | ||
11 | +</view> |
1 | +/* pages/MemorizingWords/reviewWords/reviewWords.wxss */ | ||
2 | +@import "/pages/index/articleList/articleList.wxss"; | ||
3 | +.content_box{ | ||
4 | + display: flex; | ||
5 | + align-items: center; | ||
6 | + justify-content: space-between; | ||
7 | + padding: 40rpx; | ||
8 | +} | ||
9 | +.content_img{ | ||
10 | + width: 300rpx; | ||
11 | + height: 300rpx; | ||
12 | + display: flex; | ||
13 | + align-items: center; | ||
14 | + justify-content: center; | ||
15 | +} | ||
16 | +.content_img image{ | ||
17 | + width: 100%; | ||
18 | + height: 100%; | ||
19 | +} |
1 | +// pages/MemorizingWords/reviewWordsDetail/reviewWordsDetail.js | ||
2 | +const app = getApp(); | ||
3 | +var temdata_i=0;//动态加载开始天数 | ||
4 | +var temdata_i1 = 0;//动态加载结束天数 | ||
5 | +Page({ | ||
6 | + | ||
7 | + /** | ||
8 | + * 页面的初始数据 | ||
9 | + */ | ||
10 | + data: { | ||
11 | + starttime:'', | ||
12 | + endtime:'', | ||
13 | + page:0, | ||
14 | + pushdate:[],//动态加载开始的时间 | ||
15 | + pushdate1: [],//动态加载结束的时间 | ||
16 | + moudel:false, | ||
17 | + Recitewords:'',//根据时间段所需背单词数 | ||
18 | + toView:'' | ||
19 | + }, | ||
20 | + | ||
21 | + //确定选择某时间段背的单词数 | ||
22 | + confirmWords(){ | ||
23 | + let that=this; | ||
24 | + if (that.data.starttime==''){ | ||
25 | + wx.showToast({ | ||
26 | + title: '请选择开始时间', | ||
27 | + icon: 'none', | ||
28 | + duration: 2000, | ||
29 | + }) | ||
30 | + } else if (that.data.endtime==''){ | ||
31 | + wx.showToast({ | ||
32 | + title: '请选择结束时间', | ||
33 | + icon: 'none', | ||
34 | + duration: 2000, | ||
35 | + }) | ||
36 | + }else{ | ||
37 | + that.getTimeWords(); | ||
38 | + } | ||
39 | + }, | ||
40 | + //获取复习界面信息(错词,模糊词) | ||
41 | + getFuxiInfo(){ | ||
42 | + let that=this; | ||
43 | + let url ='Words/getFuxiInfo'; | ||
44 | + let params={ | ||
45 | + token: wx.getStorageSync('token') | ||
46 | + } | ||
47 | + app.post(url,params).then((res)=>{ | ||
48 | + if(res.data.code==1){ | ||
49 | + that.setData({ | ||
50 | + listdata:res.data.data | ||
51 | + }) | ||
52 | + } | ||
53 | + }) | ||
54 | + }, | ||
55 | + //按时间共需复习单词数 | ||
56 | + getTimeWords(){ | ||
57 | + let that=this; | ||
58 | + let url ='Words/getTimeWords'; | ||
59 | + let params={ | ||
60 | + token: wx.getStorageSync('token'), | ||
61 | + start_time: that.data.starttime, | ||
62 | + end_time: that.data.endtime | ||
63 | + } | ||
64 | + app.post(url,params).then((res)=>{ | ||
65 | + if(res.data.code==1){ | ||
66 | + if (parseInt(res.data.data.total_num)>0){ | ||
67 | + that.setData({ | ||
68 | + moudel: true, | ||
69 | + Recitewords: res.data.data.total_num | ||
70 | + }) | ||
71 | + }else{ | ||
72 | + wx.showToast({ | ||
73 | + title: '没有错词请重新选择', | ||
74 | + icon: 'none', | ||
75 | + duration: 2000, | ||
76 | + }) | ||
77 | + } | ||
78 | + | ||
79 | + } | ||
80 | + }).catch((errMsg)=>{ | ||
81 | + console.log(errMsg) | ||
82 | + }) | ||
83 | + | ||
84 | + }, | ||
85 | + setmoudel_no(){ | ||
86 | + let that=this; | ||
87 | + that.setData({ | ||
88 | + moudel:false, | ||
89 | + starttime: '', | ||
90 | + endtime: '', | ||
91 | + }) | ||
92 | + }, | ||
93 | + setmoudel_yes(){ | ||
94 | + let that = this; | ||
95 | + that.setData({ | ||
96 | + moudel: true | ||
97 | + }) | ||
98 | + }, | ||
99 | + voidfun(){ | ||
100 | + }, | ||
101 | + gowordsDetail_review(e){ | ||
102 | + let that=this; | ||
103 | + let id=e.currentTarget.id; | ||
104 | + if(id=='-1'){ | ||
105 | + wx.showToast({ | ||
106 | + title: '暂无错词,不需要复习', | ||
107 | + icon: 'none', | ||
108 | + duration: 2000, | ||
109 | + }) | ||
110 | + }else{ | ||
111 | + wx.navigateTo({ | ||
112 | + url: '../wordsDetail_review/wordsDetail_review?id=' + id + '&starttime=' + that.data.starttime + '&endtime=' + that.data.endtime, | ||
113 | + success: function (res) { }, | ||
114 | + fail: function (res) { }, | ||
115 | + complete: function (res) { }, | ||
116 | + }) | ||
117 | + } | ||
118 | + | ||
119 | + }, | ||
120 | + //开始:根据年月日获取(星期等信息)////later=0 当前 later=1明天 later=2后天... | ||
121 | + dateLater(later) { | ||
122 | + let that=this; | ||
123 | + let pushdate = that.data.pushdate; | ||
124 | + let dateObj = {}; | ||
125 | + let date = new Date(); | ||
126 | + date.setDate(date.getDate() + later); | ||
127 | + let timestamp = Date.parse(date); | ||
128 | + dateObj.dataday = date.getFullYear() + '-' + ((date.getMonth() + 1) < 10 ? ("0" + (date.getMonth() + 1)) : date.getMonth() + 1) + '-' + (date.getDate() < 10 ? ("0" + date.getDate()) : date.getDate()); | ||
129 | + if (later==0){ | ||
130 | + dateObj.state = true; | ||
131 | + that.setData({ | ||
132 | + toView: 'date' + dateObj.dataday, | ||
133 | + starttime: dateObj.dataday, | ||
134 | + endtime: dateObj.dataday, | ||
135 | + }) | ||
136 | + }else{ | ||
137 | + dateObj.state = false; | ||
138 | + } | ||
139 | + dateObj.timestamp = timestamp; | ||
140 | + pushdate.push(dateObj); | ||
141 | + that.setData({ | ||
142 | + pushdate: pushdate, | ||
143 | + }) | ||
144 | + temdata_i++; | ||
145 | + }, | ||
146 | + //开始:动态加载时间 | ||
147 | + loaddate(){ | ||
148 | + let that=this; | ||
149 | + that.dateLater(temdata_i); | ||
150 | + }, | ||
151 | + //开始: | ||
152 | + setstarcell(e){ | ||
153 | + let that=this; | ||
154 | + let index = parseInt(e.currentTarget.dataset.index); | ||
155 | + let pushdate = that.data.pushdate; | ||
156 | + let pushdate1 = that.data.pushdate1; | ||
157 | + let starttime = pushdate[index].dataday; | ||
158 | + for (let i in pushdate){ | ||
159 | + pushdate[i].state=false; | ||
160 | + if (i == index){ | ||
161 | + pushdate[i].state = true; | ||
162 | + } | ||
163 | + } | ||
164 | + for (let obj of pushdate1){ | ||
165 | + obj.state = false; | ||
166 | + if (starttime == obj.dataday){ | ||
167 | + obj.state=true; | ||
168 | + } | ||
169 | + } | ||
170 | + that.setData({ | ||
171 | + pushdate: pushdate, | ||
172 | + pushdate1: pushdate1, | ||
173 | + starttime: starttime, | ||
174 | + endtime: starttime, | ||
175 | + toView: 'date' + pushdate[index].dataday | ||
176 | + }) | ||
177 | + }, | ||
178 | + //结束:根据年月日获取(星期等信息)////later=0 当前 later=1明天 later=2后天... | ||
179 | + dateLater1(later) { | ||
180 | + let that = this; | ||
181 | + let pushdate1 = that.data.pushdate1; | ||
182 | + let dateObj = {}; | ||
183 | + let date = new Date(); | ||
184 | + date.setDate(date.getDate() + later); | ||
185 | + let timestamp = Date.parse(date); | ||
186 | + dateObj.dataday = date.getFullYear() + '-' + ((date.getMonth() + 1) < 10 ? ("0" + (date.getMonth() + 1)) : date.getMonth() + 1) + '-' + (date.getDate() < 10 ? ("0" + date.getDate()) : date.getDate()); | ||
187 | + if (later == 0) { | ||
188 | + dateObj.state = true; | ||
189 | + } else { | ||
190 | + dateObj.state = false; | ||
191 | + } | ||
192 | + dateObj.timestamp = timestamp; | ||
193 | + pushdate1.push(dateObj); | ||
194 | + that.setData({ | ||
195 | + pushdate1: pushdate1, | ||
196 | + }) | ||
197 | + temdata_i1++; | ||
198 | + }, | ||
199 | + //结束动态加载时间 | ||
200 | + loaddate1() { | ||
201 | + let that = this; | ||
202 | + that.dateLater1(temdata_i1); | ||
203 | + }, | ||
204 | + //结束 | ||
205 | + setstarcell1(e) { | ||
206 | + let that = this; | ||
207 | + let starttimestamp=''//选中开始时间搓 | ||
208 | + let endttimestamp = e.currentTarget.dataset.timestamp//选中结束时间搓 | ||
209 | + let endtime = that.data.endtime; | ||
210 | + let index = parseInt(e.currentTarget.dataset.index); | ||
211 | + let pushdate1 = that.data.pushdate1; | ||
212 | + let pushdate = that.data.pushdate; | ||
213 | + for (let obj of pushdate){ | ||
214 | + if (obj.state){ | ||
215 | + starttimestamp = obj.timestamp | ||
216 | + } | ||
217 | + } | ||
218 | + if (starttimestamp==''){ | ||
219 | + wx.showToast({ | ||
220 | + title: '请选择开始时间', | ||
221 | + icon: 'none', | ||
222 | + duration: 2000, | ||
223 | + }) | ||
224 | + } else if (starttimestamp > endttimestamp){ | ||
225 | + wx.showToast({ | ||
226 | + title: '结束时间应该大于开始时间', | ||
227 | + icon: 'none', | ||
228 | + duration: 2000, | ||
229 | + }) | ||
230 | + } | ||
231 | + else{ | ||
232 | + for (let i in pushdate1) { | ||
233 | + pushdate1[i].state = false; | ||
234 | + if (i == index) { | ||
235 | + pushdate1[i].state = true; | ||
236 | + endtime = pushdate1[i].dataday | ||
237 | + } | ||
238 | + } | ||
239 | + that.setData({ | ||
240 | + pushdate1: pushdate1, | ||
241 | + endtime: endtime | ||
242 | + }) | ||
243 | + } | ||
244 | + }, | ||
245 | + /** | ||
246 | + * 生命周期函数--监听页面加载 | ||
247 | + */ | ||
248 | + onLoad: function (options) { | ||
249 | + let that=this; | ||
250 | + that.setData({ | ||
251 | + page:options.page, | ||
252 | + pushdate:[], | ||
253 | + pushdate1: [], | ||
254 | + }) | ||
255 | + that.getFuxiInfo(); | ||
256 | + temdata_i = 0;//动态加载开始天数 | ||
257 | + temdata_i1 = 0;//动态加载结束天数 | ||
258 | + if (options.page==1){ | ||
259 | + for(var i=0;i<8;i++){ | ||
260 | + that.dateLater(temdata_i); | ||
261 | + that.dateLater1(temdata_i1); | ||
262 | + } | ||
263 | + } | ||
264 | + }, | ||
265 | + | ||
266 | + /** | ||
267 | + * 生命周期函数--监听页面初次渲染完成 | ||
268 | + */ | ||
269 | + onReady: function () { | ||
270 | + | ||
271 | + }, | ||
272 | + | ||
273 | + /** | ||
274 | + * 生命周期函数--监听页面显示 | ||
275 | + */ | ||
276 | + onShow: function () { | ||
277 | + let that = this; | ||
278 | + that.getFuxiInfo(); | ||
279 | + if (options.page == 1) { | ||
280 | + for (var i = 0; i < 8; i++) { | ||
281 | + that.dateLater(temdata_i); | ||
282 | + that.dateLater1(temdata_i1); | ||
283 | + } | ||
284 | + } | ||
285 | + }, | ||
286 | + | ||
287 | + /** | ||
288 | + * 生命周期函数--监听页面隐藏 | ||
289 | + */ | ||
290 | + onHide: function () { | ||
291 | + | ||
292 | + }, | ||
293 | + | ||
294 | + /** | ||
295 | + * 生命周期函数--监听页面卸载 | ||
296 | + */ | ||
297 | + onUnload: function () { | ||
298 | + | ||
299 | + }, | ||
300 | + | ||
301 | + /** | ||
302 | + * 页面相关事件处理函数--监听用户下拉动作 | ||
303 | + */ | ||
304 | + onPullDownRefresh: function () { | ||
305 | + | ||
306 | + }, | ||
307 | + | ||
308 | + /** | ||
309 | + * 页面上拉触底事件的处理函数 | ||
310 | + */ | ||
311 | + onReachBottom: function () { | ||
312 | + | ||
313 | + }, | ||
314 | + | ||
315 | + /** | ||
316 | + * 用户点击右上角分享 | ||
317 | + */ | ||
318 | + onShareAppMessage: function () { | ||
319 | + | ||
320 | + } | ||
321 | +}) |
1 | +{"navigationBarTitleText": "复习界面"} |
1 | +<!--pages/MemorizingWords/reviewWordsDetail/reviewWordsDetail.wxml--> | ||
2 | +<view class='null_box'></view> | ||
3 | +<view class='content_box'> | ||
4 | + <view wx:if='{{page==0}}'> | ||
5 | + <view class='title_box'> | ||
6 | + <text>共有错词:</text> | ||
7 | + <text class='num'> {{listdata.total_error}}</text> | ||
8 | + <text>个</text> | ||
9 | + </view> | ||
10 | + <view> | ||
11 | + <view class='label_box' > | ||
12 | + <view class='label_item' wx:for='{{listdata.list}}' wx:key id='{{item[0]}}' bindtap='gowordsDetail_review'>{{item[1]}}</view> | ||
13 | + </view> | ||
14 | + </view> | ||
15 | + </view> | ||
16 | + <block wx:elif='{{page==1}}'> | ||
17 | + <view> | ||
18 | + <view class='title title2'>请选择某时间内背的单词</view> | ||
19 | + <view class='picker_box'> | ||
20 | + <view class='date_box'> | ||
21 | + <view class='picker_title'>开始时间</view> | ||
22 | + <view class="picker"> | ||
23 | + {{starttime}} | ||
24 | + </view> | ||
25 | + <scroll-view class='starbox' bindscrolltolower='loaddate' scroll-y="true"> | ||
26 | + <view class="starcell {{item.state?'starcellactivite':''}}" wx:for='{{pushdate}}' wx:key bindtap='setstarcell' data-index='{{index}}'>{{item.dataday}}</view> | ||
27 | + </scroll-view> | ||
28 | + </view> | ||
29 | + <view class='words_box'> | ||
30 | + <view class='picker_title'>截止时间</view> | ||
31 | + <view class="picker"> | ||
32 | + {{endtime}} | ||
33 | + </view> | ||
34 | + <view class='starbox'> | ||
35 | + <scroll-view class='starbox' bindscrolltolower='loaddate1' scroll-into-view="{{toView}}" scroll-y="true" scroll-with-animation="true" > | ||
36 | + <view class="starcell {{item.state?'starcellactivite':''}}" wx:for='{{pushdate1}}' wx:key bindtap='setstarcell1' data-index='{{index}}' data-timestamp='{{item.timestamp}}' id="{{'date'+item.dataday}}">{{item.dataday}}</view> | ||
37 | + </scroll-view></view> | ||
38 | + </view> | ||
39 | + </view> | ||
40 | + </view> | ||
41 | + <view class='bottom_btn' bindtap='confirmWords'>确定</view> | ||
42 | + </block> | ||
43 | +</view> | ||
44 | + | ||
45 | +<view class='mask_box' wx:if='{{moudel}}' bindtap='setmoudel_no'> | ||
46 | + <view class='popup_box' catchtap='voidfun'> | ||
47 | + <view class='popup_title'>共需复习单词数</view> | ||
48 | + <view class='days'>{{Recitewords}}</view> | ||
49 | + <view class='btn_box'> | ||
50 | + <view class='popup_btn' catchtap='gowordsDetail_review'>开始复习</view> | ||
51 | + <view class='popup_btn btn2' catchtap='setmoudel_no'>重新选择</view> | ||
52 | + </view> | ||
53 | + </view> | ||
54 | +</view> |
1 | +/* pages/MemorizingWords/reviewWordsDetail/reviewWordsDetail.wxss */ | ||
2 | +@import "/pages/index/articleList/articleList.wxss"; | ||
3 | +@import "/pages/MemorizingWords/wordsPlan/wordsPlan.wxss"; | ||
4 | +.picker_title{ | ||
5 | + font-size: 30rpx; | ||
6 | + color: #666666; | ||
7 | + text-align: center; | ||
8 | + margin-bottom: 24rpx; | ||
9 | +} | ||
10 | +.title_box { | ||
11 | + font-size: 36rpx; | ||
12 | + color: #1db9fa; | ||
13 | +} | ||
14 | + | ||
15 | +.num { | ||
16 | + font-size: 48rpx; | ||
17 | +} | ||
18 | + | ||
19 | +.label_box { | ||
20 | + display: flex; | ||
21 | + align-items: center; | ||
22 | + flex-wrap: wrap; | ||
23 | + justify-content: space-between; | ||
24 | + padding: 0 40rpx; | ||
25 | +} | ||
26 | + | ||
27 | +.label_item { | ||
28 | + width: 260rpx; | ||
29 | + height: 80rpx; | ||
30 | + font-size: 36rpx; | ||
31 | + color: #1db9fa; | ||
32 | + border: 1rpx solid rgba(29, 185, 250, 1); | ||
33 | + border-radius: 20rpx; | ||
34 | + display: flex; | ||
35 | + align-items: center; | ||
36 | + justify-content: center; | ||
37 | +} | ||
38 | + | ||
39 | +.title2 { | ||
40 | + margin-top: 30rpx; | ||
41 | +} | ||
42 | + | ||
43 | +.mask_box { | ||
44 | + width: 100%; | ||
45 | + height: 100%; | ||
46 | + background: rgba(250, 250, 250, 0.7); | ||
47 | + /* filter: blur(2rpx); */ | ||
48 | + position: fixed; | ||
49 | + top: 0; | ||
50 | + left: 0; | ||
51 | + overflow: hidden; | ||
52 | + z-index: 5; | ||
53 | + display: flex; | ||
54 | + align-items: center; | ||
55 | + justify-content: center; | ||
56 | +} | ||
57 | + | ||
58 | +.popup_box { | ||
59 | + width: 500rpx; | ||
60 | + height: 410rpx; | ||
61 | + background: rgba(29, 185, 250, 1); | ||
62 | + border-radius: 20rpx; | ||
63 | + position: absolute; | ||
64 | + z-index: 10; | ||
65 | + display: flex; | ||
66 | + flex-direction: column; | ||
67 | + align-items: center; | ||
68 | + justify-content: center; | ||
69 | +} | ||
70 | + | ||
71 | +.popup_title { | ||
72 | + font-size: 48rpx; | ||
73 | + color: #fff; | ||
74 | +} | ||
75 | + | ||
76 | +.days { | ||
77 | + font-size: 120rpx; | ||
78 | + color: #fff; | ||
79 | +} | ||
80 | + | ||
81 | +.btn_box { | ||
82 | + display: flex; | ||
83 | + align-items: center; | ||
84 | + justify-content: space-between; | ||
85 | +} | ||
86 | + | ||
87 | +.btn_box { | ||
88 | + margin-top: 30rpx; | ||
89 | +} | ||
90 | + | ||
91 | +.popup_btn { | ||
92 | + width: 200rpx; | ||
93 | + height: 60rpx; | ||
94 | + border-radius: 40rpx; | ||
95 | + font-size: 30rpx; | ||
96 | + color: #2ebbf6; | ||
97 | + background: #fff; | ||
98 | + display: flex; | ||
99 | + align-items: center; | ||
100 | + justify-content: center; | ||
101 | +} | ||
102 | + | ||
103 | +.btn2 { | ||
104 | + background: none; | ||
105 | + border: 1rpx solid #fff; | ||
106 | + color: #fff; | ||
107 | + margin-left: 30rpx; | ||
108 | +} | ||
109 | +.starbox{ | ||
110 | + width:100%; | ||
111 | + margin:16rpx 0 0 0; | ||
112 | + height: 560rpx; | ||
113 | + background-color: #fafafa; | ||
114 | + border-radius: 5rpx; | ||
115 | + border:1rpx solid #EBEBEB; | ||
116 | + overflow: scroll; | ||
117 | +} | ||
118 | +.starcell{ | ||
119 | + color:#1DB9FA; | ||
120 | + font-size:30rpx; | ||
121 | + margin: 0 30rpx; | ||
122 | + display: flex; | ||
123 | + justify-content: center; | ||
124 | + align-items: center; | ||
125 | + height: 80rpx; | ||
126 | + border-bottom:1rpx solid #ccc; | ||
127 | +} | ||
128 | +.starbox:last-child{ | ||
129 | + border:none; | ||
130 | +} | ||
131 | +.starcellactivite{ | ||
132 | + background-color: #EBEBEB; | ||
133 | + border-radius: 5rpx; | ||
134 | + margin: 0; | ||
135 | +} |
1 | +// pages/MemorizingWords/searchwords/searchwords.js | ||
2 | +const app = getApp(); | ||
3 | +Page({ | ||
4 | + | ||
5 | + /** | ||
6 | + * 页面的初始数据 | ||
7 | + */ | ||
8 | + data: { | ||
9 | + f:false, | ||
10 | + page: 0,//0默认,1显示示意 | ||
11 | + moudel: false, | ||
12 | + listdata: []//单词详情数据 | ||
13 | + }, | ||
14 | + | ||
15 | + //显示释义 | ||
16 | + showParaphrase() { | ||
17 | + this.setData({ | ||
18 | + page: 1, | ||
19 | + }) | ||
20 | + }, | ||
21 | + /** | ||
22 | + * 生命周期函数--监听页面加载 | ||
23 | + */ | ||
24 | + onLoad: function (options) { | ||
25 | + let that = this; | ||
26 | + that.setData({ | ||
27 | + listdata: wx.getStorageSync('searchend') | ||
28 | + }) | ||
29 | + console.log(wx.getStorageSync('searchend')) | ||
30 | + }, | ||
31 | + /** | ||
32 | + * 生命周期函数--监听页面初次渲染完成 | ||
33 | + */ | ||
34 | + onReady: function () { | ||
35 | + | ||
36 | + }, | ||
37 | + | ||
38 | + /** | ||
39 | + * 生命周期函数--监听页面显示 | ||
40 | + */ | ||
41 | + onShow: function () { | ||
42 | + | ||
43 | + }, | ||
44 | + | ||
45 | + /** | ||
46 | + * 生命周期函数--监听页面隐藏 | ||
47 | + */ | ||
48 | + onHide: function () { | ||
49 | + | ||
50 | + }, | ||
51 | + | ||
52 | + /** | ||
53 | + * 生命周期函数--监听页面卸载 | ||
54 | + */ | ||
55 | + onUnload: function () { | ||
56 | + | ||
57 | + }, | ||
58 | + | ||
59 | + /** | ||
60 | + * 页面相关事件处理函数--监听用户下拉动作 | ||
61 | + */ | ||
62 | + onPullDownRefresh: function () { | ||
63 | + | ||
64 | + }, | ||
65 | + /** | ||
66 | + * 页面上拉触底事件的处理函数 | ||
67 | + */ | ||
68 | + onReachBottom: function () { | ||
69 | + | ||
70 | + }, | ||
71 | + | ||
72 | + /** | ||
73 | + * 用户点击右上角分享 | ||
74 | + */ | ||
75 | + onShareAppMessage: function () { | ||
76 | + | ||
77 | + } | ||
78 | +}) |
1 | +{"navigationBarTitleText": "单词详情"} |
1 | +<!--pages/MemorizingWords/searchwords/searchwords.wxml--> | ||
2 | +<view class='null_box'></view> | ||
3 | +<view class='content_box'> | ||
4 | + <view class='banner_box'> | ||
5 | + </view> | ||
6 | +</view> | ||
7 | +<view class='content_item' wx:if='{{page==0}}'> | ||
8 | + <view class='item_content'> | ||
9 | + <view class='words'>{{listdata.word}}</view> | ||
10 | + <view class='phonetic_symbol'> | ||
11 | + <view class='iconfont icon-laba1' wx:if='{{f}}'></view> | ||
12 | + <view>{{listdata.yinbiao}}</view> | ||
13 | + </view> | ||
14 | + <view class='paraphrase'>{{listdata.explain}}</view> | ||
15 | + </view> | ||
16 | + <view class='mask_box' bindtap='showParaphrase'> | ||
17 | + <view class='iconfont icon-dianji'></view> | ||
18 | + <view>点击屏幕显示释义</view> | ||
19 | + </view> | ||
20 | +</view> | ||
21 | + | ||
22 | +<block wx:if='{{page==1}}'> | ||
23 | + <view class='content_item content_item2'> | ||
24 | + <view class='content_itembox'> | ||
25 | + <view class='item_content'> | ||
26 | + <view class='words'>{{listdata.word}}</view> | ||
27 | + <view class='phonetic_symbol'> | ||
28 | + <view class='iconfont icon-laba1' wx:if='{{f}}'></view> | ||
29 | + <view>{{listdata.yinbiao}}</view> | ||
30 | + </view> | ||
31 | + <view class='paraphrase'>{{listdata.explain}}</view> | ||
32 | + </view> | ||
33 | + <view class='item_box'> | ||
34 | + <view class='item_list'> | ||
35 | + <view class='title'>例句</view> | ||
36 | + <view class='list_content'> | ||
37 | + <view> | ||
38 | + <view class='point' wx:if='{{listdata.liju.length !=0}}'></view> | ||
39 | + </view> | ||
40 | + <view><text>{{listdata.liju}}</text> | ||
41 | + </view> | ||
42 | + | ||
43 | + </view> | ||
44 | + </view> | ||
45 | + <view class='item_list'> | ||
46 | + <view class='title'>大仙点评</view> | ||
47 | + <view class='list_content'> | ||
48 | + <view> | ||
49 | + <view class='point' wx:if='{{listdata.dianping.length !=0}}'></view> | ||
50 | + </view> | ||
51 | + <view>{{listdata.dianping}} | ||
52 | + </view> | ||
53 | + </view> | ||
54 | + </view> | ||
55 | + <view class='item_list'> | ||
56 | + <view class='title'>近义词</view> | ||
57 | + <view class='list_content'> | ||
58 | + <view>{{listdata.jinyici}}</view> | ||
59 | + </view> | ||
60 | + </view> | ||
61 | + </view> | ||
62 | + </view> | ||
63 | + </view> | ||
64 | +</block> |
1 | +/* pages/MemorizingWords/searchwords/searchwords.wxss */ | ||
2 | +@import "/pages/index/articleList/articleList.wxss"; | ||
3 | + | ||
4 | +.banner_box { | ||
5 | + display: flex; | ||
6 | + align-items: center; | ||
7 | + justify-content: space-between; | ||
8 | + padding: 0 20rpx; | ||
9 | +} | ||
10 | + | ||
11 | +.label_box { | ||
12 | + display: flex; | ||
13 | + align-items: center; | ||
14 | +} | ||
15 | + | ||
16 | +.label_item { | ||
17 | + width: 120rpx; | ||
18 | + height: 40rpx; | ||
19 | + font-size: 24rpx; | ||
20 | + color: #666; | ||
21 | + background: rgba(204, 240, 255, 1); | ||
22 | + border-radius: 4rpx; | ||
23 | + display: flex; | ||
24 | + align-items: center; | ||
25 | + justify-content: center; | ||
26 | + margin-right: 20rpx; | ||
27 | +} | ||
28 | + | ||
29 | +.info { | ||
30 | + font-size: 28rpx; | ||
31 | + color: #1db9fa; | ||
32 | +} | ||
33 | + | ||
34 | +.icon-xuanzhong { | ||
35 | + font-size: 26rpx; | ||
36 | + margin-top: 6rpx; | ||
37 | + margin-right: 17rpx; | ||
38 | +} | ||
39 | + | ||
40 | +.item_content { | ||
41 | + /* background: url(/images/bg3.png); */ | ||
42 | + background: #ebebeb; | ||
43 | + text-align: center; | ||
44 | + padding: 70rpx 0; | ||
45 | +} | ||
46 | + | ||
47 | +.words { | ||
48 | + font-size: 48rpx; | ||
49 | + color: #19191a; | ||
50 | + /* margin-top: 78rpx; */ | ||
51 | +} | ||
52 | + | ||
53 | +.phonetic_symbol { | ||
54 | + display: flex; | ||
55 | + align-items: center; | ||
56 | + justify-content: center; | ||
57 | + font-size: 30rpx; | ||
58 | + color: #19191a; | ||
59 | + margin-top: 30rpx; | ||
60 | +} | ||
61 | + | ||
62 | +.icon-laba1 { | ||
63 | + color: #1db9fa; | ||
64 | +} | ||
65 | + | ||
66 | +.paraphrase { | ||
67 | + font-size: 20rpx; | ||
68 | + color: #1db9fa; | ||
69 | + margin-top: 19rpx; | ||
70 | +} | ||
71 | + | ||
72 | +.mask_box { | ||
73 | + font-size: 30rpx; | ||
74 | + color: #ccc; | ||
75 | + background: #fff; | ||
76 | + text-align: center; | ||
77 | + margin-top: 220rpx; | ||
78 | +} | ||
79 | + | ||
80 | +.icon-dianji { | ||
81 | + font-size: 87rpx; | ||
82 | + color: #ccc; | ||
83 | + margin-bottom: 22rpx; | ||
84 | +} | ||
85 | + | ||
86 | +.content_item2 { | ||
87 | + width: 100%; | ||
88 | + height: 100%; | ||
89 | + position: fixed; | ||
90 | + left: 0; | ||
91 | + background: #fafafa; | ||
92 | +} | ||
93 | +.content_itembox{ | ||
94 | +height:70%; | ||
95 | +overflow:scroll; | ||
96 | +padding:0 0 100rpx 0; | ||
97 | + | ||
98 | +} | ||
99 | + | ||
100 | +.item_box { | ||
101 | + padding: 0 50rpx; | ||
102 | +} | ||
103 | + | ||
104 | +.item_list { | ||
105 | + background: rgba(255, 255, 255, 1); | ||
106 | + border-radius: 20rpx; | ||
107 | + font-size: 26rpx; | ||
108 | + color: #666; | ||
109 | + padding: 20rpx; | ||
110 | + margin-top: 28rpx; | ||
111 | +} | ||
112 | + | ||
113 | +.list_content { | ||
114 | + display: flex; | ||
115 | + align-items: flex-start; | ||
116 | +} | ||
117 | + | ||
118 | +.title { | ||
119 | + font-size: 30rpx; | ||
120 | + color: #666; | ||
121 | + margin-bottom: 20rpx; | ||
122 | +} | ||
123 | + | ||
124 | +.point { | ||
125 | + width: 23rpx; | ||
126 | + height: 23rpx; | ||
127 | +} | ||
128 | + | ||
129 | +.bottom_btn { | ||
130 | + width: 100%; | ||
131 | + height: 100rpx; | ||
132 | + display: flex; | ||
133 | + align-items: center; | ||
134 | + justify-content: space-between; | ||
135 | + background: #1db9fa; | ||
136 | + border-radius: 20rpx 20rpx 0rpx 0rpx; | ||
137 | + position: fixed; | ||
138 | + bottom: 0; | ||
139 | + left: 0; | ||
140 | + padding: 0 40rpx; | ||
141 | +} | ||
142 | + | ||
143 | +.btn { | ||
144 | + width: 192rpx; | ||
145 | + height: 60rpx; | ||
146 | + font-size: 30rpx; | ||
147 | + color: #FFFFFF; | ||
148 | + border: 1rpx solid rgba(255, 255, 255, 1); | ||
149 | + border-radius: 10rpx; | ||
150 | + display: flex; | ||
151 | + align-items: center; | ||
152 | + justify-content: center; | ||
153 | +} |
1 | +// pages/MemorizingWords/wordsDetail/wordsDetail.js | ||
2 | +const app=getApp(); | ||
3 | +const innerAudioContext = wx.createInnerAudioContext(); | ||
4 | +//下面是64个基本的编码 | ||
5 | +var base64EncodeChars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; | ||
6 | +var base64DecodeChars = new Array( | ||
7 | + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, | ||
8 | + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, | ||
9 | + -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63, | ||
10 | + 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1, | ||
11 | + -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, | ||
12 | + 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1, | ||
13 | + -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, | ||
14 | + 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1); | ||
15 | +Page({ | ||
16 | + /** | ||
17 | + * 页面的初始数据 | ||
18 | + */ | ||
19 | + data: { | ||
20 | + f:false, | ||
21 | + ifclick:true, | ||
22 | + page: 0,//0默认,1显示示意 | ||
23 | + moudel: false, | ||
24 | + listdata:[]//单词详情数据59 | ||
25 | + }, | ||
26 | + //显示释义 | ||
27 | + showParaphrase() { | ||
28 | + this.setData({ | ||
29 | + page: 1, | ||
30 | + }) | ||
31 | + }, | ||
32 | + //单词分批处理 | ||
33 | + handleWords(e) { | ||
34 | + let that = this; | ||
35 | + that.setData({ | ||
36 | + ifclick:false | ||
37 | + }) | ||
38 | + let url = 'Words/handleWords'; | ||
39 | + let md_id = that.data.listdata.info.md_id; | ||
40 | + let params = { | ||
41 | + status: e.currentTarget.dataset.status, | ||
42 | + } | ||
43 | + if (md_id==undefined){ | ||
44 | + params.id='' | ||
45 | + }else{ | ||
46 | + params.id= md_id | ||
47 | + } | ||
48 | + app.post(url, params).then(res => { | ||
49 | + if (res.data.code == 1) { | ||
50 | + that.getPackageDetailInfo(); | ||
51 | + that.setData({ | ||
52 | + page:0, | ||
53 | + | ||
54 | + }) | ||
55 | + } | ||
56 | + | ||
57 | + }).catch((errMsg) => { | ||
58 | + console.log(errMsg) | ||
59 | + }) | ||
60 | + }, | ||
61 | +//开始背单词 | ||
62 | + getPackageDetailInfo(){ | ||
63 | + let that=this; | ||
64 | + let url ='Words/getPackageDetailInfo'; | ||
65 | + let params={ | ||
66 | + token: wx.getStorageSync('token') | ||
67 | + } | ||
68 | + app.post(url,params).then((ret)=>{ | ||
69 | + console.log('开始背单词',ret); | ||
70 | + let tem= that.base64decode(ret.data.data.info.liju); | ||
71 | + ret.data.data.info.liju=tem; | ||
72 | + if(ret.data.code==1){ | ||
73 | + if (ret.data.data==''){ | ||
74 | + wx.showToast({ | ||
75 | + title: ret.data.msg, | ||
76 | + icon:'success', | ||
77 | + duration:2000, | ||
78 | + }) | ||
79 | + wx.navigateTo({ | ||
80 | + url: '../wordsReport/wordsReport', | ||
81 | + }) | ||
82 | + }else{ | ||
83 | + that.setData({ | ||
84 | + listdata: ret.data.data, | ||
85 | + ifclick:true | ||
86 | + }) | ||
87 | + } | ||
88 | + | ||
89 | + } | ||
90 | + }).catch((errMsg)=>{ | ||
91 | + console.log(errMsg) | ||
92 | + }) | ||
93 | + }, | ||
94 | + //解码的方法 | ||
95 | + base64decode(str){ | ||
96 | + var c1, c2, c3, c4; | ||
97 | + var i, len, out; | ||
98 | + len = str.length; | ||
99 | + i = 0; | ||
100 | + out = ""; | ||
101 | + while(i <len) { | ||
102 | + | ||
103 | + do { | ||
104 | + c1 = base64DecodeChars[str.charCodeAt(i++) & 0xff]; | ||
105 | + } while (i < len && c1 == -1); | ||
106 | + if (c1 == -1) | ||
107 | + break; | ||
108 | + | ||
109 | + do { | ||
110 | + c2 = base64DecodeChars[str.charCodeAt(i++) & 0xff]; | ||
111 | + } while (i < len && c2 == -1); | ||
112 | + if (c2 == -1) | ||
113 | + break; | ||
114 | + out += String.fromCharCode((c1 << 2) | ((c2 & 0x30) >> 4)); | ||
115 | + | ||
116 | + do { | ||
117 | + c3 = str.charCodeAt(i++) & 0xff; | ||
118 | + if (c3 == 61) | ||
119 | + return out; | ||
120 | + c3 = base64DecodeChars[c3]; | ||
121 | + } while (i < len && c3 == -1); | ||
122 | + if (c3 == -1) | ||
123 | + break; | ||
124 | + out += String.fromCharCode(((c2 & 0XF) << 4) | ((c3 & 0x3C) >> 2)); | ||
125 | + | ||
126 | + do { | ||
127 | + c4 = str.charCodeAt(i++) & 0xff; | ||
128 | + if (c4 == 61) | ||
129 | + return out; | ||
130 | + c4 = base64DecodeChars[c4]; | ||
131 | + } while (i < len && c4 == -1); | ||
132 | + if (c4 == -1) | ||
133 | + break; | ||
134 | + out += String.fromCharCode(((c3 & 0x03) << 6) | c4); | ||
135 | + } | ||
136 | + return out; | ||
137 | + }, | ||
138 | + //播放音频 | ||
139 | + audioPlay(e) { | ||
140 | + console.log('播放音频'); | ||
141 | + let that = this; | ||
142 | + innerAudioContext.stop() | ||
143 | + let listdata = that.data.listdata; | ||
144 | + innerAudioContext.src = listdata.info.voice_url; | ||
145 | + innerAudioContext.play(); | ||
146 | + innerAudioContext.onPlay(() => { | ||
147 | + console.log('录音播放中'); | ||
148 | + }) | ||
149 | + | ||
150 | + innerAudioContext.onStop(() => { | ||
151 | + console.log('录音播放停止'); | ||
152 | + }) | ||
153 | + | ||
154 | + innerAudioContext.onEnded(() => { | ||
155 | + console.log('录音播放结束'); | ||
156 | + innerAudioContext.stop(); | ||
157 | + }) | ||
158 | + }, | ||
159 | + | ||
160 | + /** | ||
161 | + * 生命周期函数--监听页面加载 | ||
162 | + */ | ||
163 | + onLoad: function(options) { | ||
164 | + let that=this; | ||
165 | + that.getPackageDetailInfo(); | ||
166 | + }, | ||
167 | + /** | ||
168 | + * 生命周期函数--监听页面初次渲染完成 | ||
169 | + */ | ||
170 | + onReady: function() { | ||
171 | + | ||
172 | + }, | ||
173 | + | ||
174 | + /** | ||
175 | + * 生命周期函数--监听页面显示 | ||
176 | + */ | ||
177 | + onShow: function() { | ||
178 | + | ||
179 | + }, | ||
180 | + | ||
181 | + /** | ||
182 | + * 生命周期函数--监听页面隐藏 | ||
183 | + */ | ||
184 | + onHide: function() { | ||
185 | + innerAudioContext.stop() | ||
186 | + }, | ||
187 | + | ||
188 | + /** | ||
189 | + * 生命周期函数--监听页面卸载 | ||
190 | + */ | ||
191 | + onUnload: function() { | ||
192 | + innerAudioContext.stop() | ||
193 | + }, | ||
194 | + | ||
195 | + /** | ||
196 | + * 页面相关事件处理函数--监听用户下拉动作 | ||
197 | + */ | ||
198 | + onPullDownRefresh: function() { | ||
199 | + | ||
200 | + }, | ||
201 | + | ||
202 | + /** | ||
203 | + * 页面上拉触底事件的处理函数 | ||
204 | + */ | ||
205 | + onReachBottom: function() { | ||
206 | + | ||
207 | + }, | ||
208 | + | ||
209 | + /** | ||
210 | + * 用户点击右上角分享 | ||
211 | + */ | ||
212 | + onShareAppMessage: function() { | ||
213 | + | ||
214 | + } | ||
215 | +}) |
1 | +{"navigationBarTitleText": "单词详情界面"} |
1 | +<!--pages/MemorizingWords/wordsDetail/wordsDetail.wxml--> | ||
2 | +<view class='null_box'></view> | ||
3 | +<view class='content_box'> | ||
4 | + <view class='banner_box'> | ||
5 | + <view class='label_box'> | ||
6 | + <view class='label_item'> | ||
7 | + <text>新学</text> | ||
8 | + <text>{{listdata.new_study}}</text> | ||
9 | + </view> | ||
10 | + <view class='label_item'> | ||
11 | + <text>需复习</text> | ||
12 | + <text>{{listdata.review}}</text> | ||
13 | + </view> | ||
14 | + </view> | ||
15 | + <view class='label_box info' data-status='4' bindtap='{{ifclick?"handleWords":""}}'> | ||
16 | + <view class='iconfont icon-xuanzhong'></view> | ||
17 | + <view>熟识</view> | ||
18 | + </view> | ||
19 | + </view> | ||
20 | +</view> | ||
21 | +<view class='content_item' wx:if='{{page==0}}'> | ||
22 | + <view class='item_content'> | ||
23 | + <view class='words'>{{listdata.info.word}}</view> | ||
24 | + <view class='phonetic_symbol' catchtap='audioPlay' > | ||
25 | + <view class='iconfont icon-laba1' wx:if='{{f}}'></view> | ||
26 | + <view>{{listdata.info.yinbiao}}</view> | ||
27 | + </view> | ||
28 | + <view class='paraphrase'>{{listdata.info.explain}}</view> | ||
29 | + </view> | ||
30 | + <view class='mask_box' bindtap='showParaphrase'> | ||
31 | + <view class='iconfont icon-dianji'></view> | ||
32 | + <view>点击屏幕显示释义</view> | ||
33 | + </view> | ||
34 | +</view> | ||
35 | + | ||
36 | +<block wx:if='{{page==1}}'> | ||
37 | + <view class='content_item content_item2'> | ||
38 | + <view class='content_itembox'> | ||
39 | + <view class='item_content'> | ||
40 | + <view class='words'>{{listdata.info.word}}</view> | ||
41 | + <view class='phonetic_symbol'> | ||
42 | + <view class='iconfont icon-laba1' wx:if='{{f}}'></view> | ||
43 | + <view>{{listdata.info.yinbiao}}</view> | ||
44 | + </view> | ||
45 | + <view class='paraphrase'>{{listdata.info.explain}}</view> | ||
46 | + </view> | ||
47 | + <view class='item_box'> | ||
48 | + <view class='item_list'> | ||
49 | + <view class='title'>例句</view> | ||
50 | + <view class='list_content'> | ||
51 | + <view> | ||
52 | + <view class='point' wx:if='{{listdata.info.liju.length !=0}}'></view> | ||
53 | + </view> | ||
54 | + <view><text> {{listdata.info.liju}}</text> | ||
55 | + </view> | ||
56 | + </view> | ||
57 | + </view> | ||
58 | + <view class='item_list'> | ||
59 | + <view class='title'>大仙点评</view> | ||
60 | + <view class='list_content'> | ||
61 | + <view> | ||
62 | + <view class='point' wx:if='{{listdata.info.dianping.length !=0}}'></view> | ||
63 | + </view> | ||
64 | + <view>{{listdata.info.dianping}} | ||
65 | + </view> | ||
66 | + </view> | ||
67 | + </view> | ||
68 | + <view class='item_list'> | ||
69 | + <view class='title'>近义词</view> | ||
70 | + <view class='list_content'> | ||
71 | + <view>{{listdata.info.jinyici?listdata.info.jinyici:'暂无'}}</view> | ||
72 | + </view> | ||
73 | + </view> | ||
74 | + </view> | ||
75 | + </view> | ||
76 | + | ||
77 | + </view> | ||
78 | +</block> | ||
79 | + <view class='bottom_btn'> | ||
80 | + <view class='btn' data-status='1' bindtap='{{ifclick?"handleWords":""}}'>认识</view> | ||
81 | + <view class='btn' data-status='2' bindtap='{{ifclick?"handleWords":""}}'>不认识</view> | ||
82 | + <view class='btn' data-status='3' bindtap='{{ifclick?"handleWords":""}}'>模糊</view> | ||
83 | + <view class='btn' wx:if=''>忘记</view> | ||
84 | +</view> |
1 | +/* pages/MemorizingWords/wordsDetail/wordsDetail.wxss */ | ||
2 | +@import "/pages/index/articleList/articleList.wxss"; | ||
3 | + | ||
4 | +.banner_box { | ||
5 | + display: flex; | ||
6 | + align-items: center; | ||
7 | + justify-content: space-between; | ||
8 | + padding: 0 20rpx; | ||
9 | +} | ||
10 | +.label_box { | ||
11 | + display: flex; | ||
12 | + align-items: center; | ||
13 | +} | ||
14 | +.label_item { | ||
15 | + width: 120rpx; | ||
16 | + height: 40rpx; | ||
17 | + font-size: 24rpx; | ||
18 | + color: #666; | ||
19 | + background: rgba(204, 240, 255, 1); | ||
20 | + border-radius: 4rpx; | ||
21 | + display: flex; | ||
22 | + align-items: center; | ||
23 | + justify-content: center; | ||
24 | + margin-right: 20rpx; | ||
25 | +} | ||
26 | +.info { | ||
27 | + font-size: 28rpx; | ||
28 | + color: #1db9fa; | ||
29 | +} | ||
30 | + | ||
31 | +.icon-xuanzhong { | ||
32 | + font-size: 26rpx; | ||
33 | + margin-top: 6rpx; | ||
34 | + margin-right: 17rpx; | ||
35 | +} | ||
36 | +.content_itembox{ | ||
37 | + height: 70%; | ||
38 | + overflow:scroll; | ||
39 | + padding:0 0 100rpx 0; | ||
40 | +} | ||
41 | + | ||
42 | +.item_content { | ||
43 | + /* background: url(/images/bg3.png); */ | ||
44 | + background: #ebebeb; | ||
45 | + text-align: center; | ||
46 | + padding: 70rpx 0; | ||
47 | + /* height: 30%; */ | ||
48 | +} | ||
49 | + | ||
50 | +.words { | ||
51 | + font-size: 48rpx; | ||
52 | + color: #19191a; | ||
53 | + /* margin-top: 78rpx; */ | ||
54 | +} | ||
55 | + | ||
56 | +.phonetic_symbol { | ||
57 | + display: flex; | ||
58 | + align-items: center; | ||
59 | + justify-content: center; | ||
60 | + font-size: 30rpx; | ||
61 | + color: #19191a; | ||
62 | + margin-top: 30rpx; | ||
63 | +} | ||
64 | + | ||
65 | +.icon-laba1 { | ||
66 | + color: #1db9fa; | ||
67 | +} | ||
68 | + | ||
69 | +.paraphrase { | ||
70 | + font-size: 20rpx; | ||
71 | + color: #1db9fa; | ||
72 | + margin-top: 19rpx; | ||
73 | +} | ||
74 | + | ||
75 | +.mask_box { | ||
76 | + font-size: 30rpx; | ||
77 | + color: #ccc; | ||
78 | + background: #fff; | ||
79 | + text-align: center; | ||
80 | + margin-top: 220rpx; | ||
81 | +} | ||
82 | + | ||
83 | +.icon-dianji { | ||
84 | + font-size: 87rpx; | ||
85 | + color: #ccc; | ||
86 | + margin-bottom: 22rpx; | ||
87 | +} | ||
88 | + | ||
89 | +.content_item2 { | ||
90 | + width: 100%; | ||
91 | + height: 100%; | ||
92 | + position: fixed; | ||
93 | + left: 0; | ||
94 | + background: #fafafa; | ||
95 | +} | ||
96 | + | ||
97 | + | ||
98 | +.item_box { | ||
99 | + padding: 0 50rpx; | ||
100 | + /* height: 50%; | ||
101 | + overflow: scroll; */ | ||
102 | +} | ||
103 | +.item_list { | ||
104 | + background: rgba(255, 255, 255, 1); | ||
105 | + border-radius: 20rpx; | ||
106 | + font-size: 26rpx; | ||
107 | + color: #666; | ||
108 | + padding: 20rpx; | ||
109 | + margin-top: 28rpx; | ||
110 | +} | ||
111 | + | ||
112 | +.list_content { | ||
113 | + display: flex; | ||
114 | + align-items: flex-start; | ||
115 | +} | ||
116 | + | ||
117 | +.title { | ||
118 | + font-size: 30rpx; | ||
119 | + color: #666; | ||
120 | + margin-bottom: 20rpx; | ||
121 | +} | ||
122 | + | ||
123 | +.point { | ||
124 | + width: 23rpx; | ||
125 | + height: 23rpx; | ||
126 | +} | ||
127 | + | ||
128 | +.bottom_btn { | ||
129 | + width: 100%; | ||
130 | + height: 100rpx; | ||
131 | + box-sizing: border-box; | ||
132 | + display: flex; | ||
133 | + align-items: center; | ||
134 | + justify-content: space-between; | ||
135 | + background: #1db9fa; | ||
136 | + border-radius: 20rpx 20rpx 0rpx 0rpx; | ||
137 | + position: fixed; | ||
138 | + bottom: 0; | ||
139 | + left: 0; | ||
140 | + padding: 0 40rpx; | ||
141 | +} | ||
142 | + | ||
143 | +.btn { | ||
144 | + width: 192rpx; | ||
145 | + height: 60rpx; | ||
146 | + font-size: 30rpx; | ||
147 | + color: #FFFFFF; | ||
148 | + border: 1rpx solid rgba(255, 255, 255, 1); | ||
149 | + border-radius: 10rpx; | ||
150 | + display: flex; | ||
151 | + align-items: center; | ||
152 | + justify-content: center; | ||
153 | +} |
1 | +// pages/MemorizingWords/wordsDetail/wordsDetail.js | ||
2 | +const app = getApp(); | ||
3 | +const innerAudioContext = wx.createInnerAudioContext(); | ||
4 | +Page({ | ||
5 | + /** | ||
6 | + * 页面的初始数据 | ||
7 | + */ | ||
8 | + data: { | ||
9 | + page: 0,//0默认,1显示示意 | ||
10 | + moudel: false, | ||
11 | + listdata: [],//单词详情数据 | ||
12 | + myplan_detail_id:'',//下一题id | ||
13 | + handle_myplan_detail_id:'',//本题的id | ||
14 | + myplan_id:'', | ||
15 | + starttime:'', | ||
16 | + endtime: '', | ||
17 | + if_time: '' | ||
18 | + }, | ||
19 | + | ||
20 | + //显示释义 | ||
21 | + showParaphrase() { | ||
22 | + this.setData({ | ||
23 | + page: 1, | ||
24 | + }) | ||
25 | + }, | ||
26 | + //单词分批处理 | ||
27 | + handleWords(e) { | ||
28 | + console.log(e); | ||
29 | + let that = this; | ||
30 | + that.handleWordsError(e.currentTarget.dataset.status); | ||
31 | + }, | ||
32 | + //播放音频 | ||
33 | + audioPlay(e) { | ||
34 | + let that = this; | ||
35 | + innerAudioContext.stop() | ||
36 | + let listdata = that.data.listdata; | ||
37 | + innerAudioContext.src = listdata.info.voice_url; | ||
38 | + innerAudioContext.play(); | ||
39 | + innerAudioContext.onPlay(() => { | ||
40 | + console.log('录音播放中'); | ||
41 | + }) | ||
42 | + innerAudioContext.onStop(() => { | ||
43 | + console.log('录音播放停止'); | ||
44 | + }) | ||
45 | + innerAudioContext.onEnded(() => { | ||
46 | + console.log('录音播放结束'); | ||
47 | + }) | ||
48 | + }, | ||
49 | + //获取复习界面单词详情(错词,模糊词) | ||
50 | + getPackageDetailInfo() { | ||
51 | + let that = this; | ||
52 | + let url = 'Words/getWordsDetailError'; | ||
53 | + let params = { | ||
54 | + myplan_id: that.data.myplan_id, | ||
55 | + myplan_detail_id: that.data.myplan_detail_id | ||
56 | + } | ||
57 | + app.post(url, params).then((res) => { | ||
58 | + if (res.data.code == 1) { | ||
59 | + if (res.data.data == '') { | ||
60 | + wx.showToast({ | ||
61 | + title: res.data.msg, | ||
62 | + icon: 'success', | ||
63 | + duration: 2000, | ||
64 | + }) | ||
65 | + wx.navigateTo({ | ||
66 | + url: '../wordsReport/wordsReport', | ||
67 | + }) | ||
68 | + } else { | ||
69 | + that.setData({ | ||
70 | + listdata: res.data.data, | ||
71 | + myplan_detail_id: res.data.data.myplan_detail_id, | ||
72 | + handle_myplan_detail_id: res.data.data.handle_myplan_detail_id | ||
73 | + }) | ||
74 | + } | ||
75 | + }else if(res.data.code==0){ | ||
76 | + wx.showToast({ | ||
77 | + title: res.data.msg, | ||
78 | + icon: 'success', | ||
79 | + duration: 2000, | ||
80 | + }) | ||
81 | + setTimeout(function(){ | ||
82 | + wx.switchTab({ | ||
83 | + url: '/pages/MemorizingWords/MemorizingWords', | ||
84 | + }) | ||
85 | + },2000) | ||
86 | + } | ||
87 | + }).catch((errMsg) => { | ||
88 | + console.log(errMsg) | ||
89 | + }) | ||
90 | + }, | ||
91 | + //获取复习界面单词详情(按时间) | ||
92 | + getTimeWordsDetail(){ | ||
93 | + let that=this; | ||
94 | + let url ='Words/getTimeWordsDetail'; | ||
95 | + let params={ | ||
96 | + token: wx.getStorageSync('token'), | ||
97 | + start_time: that.data.starttime, | ||
98 | + end_time: that.data.endtime, | ||
99 | + myplan_detail_id: that.data.myplan_detail_id | ||
100 | + } | ||
101 | + app.post(url, params).then((res) => { | ||
102 | + if (res.data.code == 1) { | ||
103 | + if (res.data.data == '') { | ||
104 | + wx.showToast({ | ||
105 | + title: res.data.msg, | ||
106 | + icon: 'success', | ||
107 | + duration: 2000, | ||
108 | + }) | ||
109 | + wx.navigateTo({ | ||
110 | + url: '../wordsReport/wordsReport', | ||
111 | + }) | ||
112 | + } else { | ||
113 | + that.setData({ | ||
114 | + listdata: res.data.data, | ||
115 | + myplan_detail_id: res.data.data.myplan_detail_id, | ||
116 | + handle_myplan_detail_id: res.data.data.handle_myplan_detail_id | ||
117 | + }) | ||
118 | + } | ||
119 | + } else if (res.data.code == 0) { | ||
120 | + wx.showToast({ | ||
121 | + title: res.data.msg, | ||
122 | + icon: 'success', | ||
123 | + duration: 2000, | ||
124 | + }) | ||
125 | + setTimeout(function () { | ||
126 | + wx.switchTab({ | ||
127 | + url: '/pages/MemorizingWords/MemorizingWords', | ||
128 | + }) | ||
129 | + }, 2000) | ||
130 | + } | ||
131 | + }).catch((errMsg) => { | ||
132 | + console.log(errMsg) | ||
133 | + }) | ||
134 | + }, | ||
135 | + //处理错词 | ||
136 | + handleWordsError(status){ | ||
137 | + let that=this; | ||
138 | + let url ='Words/handleWordsError'; | ||
139 | + let params={ | ||
140 | + id: that.data.handle_myplan_detail_id, | ||
141 | + status: status | ||
142 | + } | ||
143 | + app.post(url,params).then((res)=>{ | ||
144 | + | ||
145 | + if(res.data.code=='1'){ | ||
146 | + if (that.data.if_time){ | ||
147 | + that.getTimeWordsDetail(); | ||
148 | + }else{ | ||
149 | + that.getPackageDetailInfo(); | ||
150 | + } | ||
151 | + } | ||
152 | + }).catch((errMsg)=>{ | ||
153 | + console.log(errMsg) | ||
154 | + }) | ||
155 | + }, | ||
156 | + /** | ||
157 | + * 生命周期函数--监听页面加载 | ||
158 | + */ | ||
159 | + onLoad: function (options) { | ||
160 | + let that=this; | ||
161 | + if (options.id.length !=0 ){ | ||
162 | + that.setData({ | ||
163 | + myplan_id: options.id, | ||
164 | + if_time:false | ||
165 | + }) | ||
166 | + that.getPackageDetailInfo(); | ||
167 | + } | ||
168 | + if (options.starttime.length !=0){ | ||
169 | + that.setData({ | ||
170 | + starttime: options.starttime, | ||
171 | + endtime: options.endtime, | ||
172 | + if_time: true | ||
173 | + }) | ||
174 | + that.getTimeWordsDetail(); | ||
175 | + } | ||
176 | + | ||
177 | + }, | ||
178 | + | ||
179 | + /** | ||
180 | + * 生命周期函数--监听页面初次渲染完成 | ||
181 | + */ | ||
182 | + onReady: function () { | ||
183 | + | ||
184 | + }, | ||
185 | + | ||
186 | + /** | ||
187 | + * 生命周期函数--监听页面显示 | ||
188 | + */ | ||
189 | + onShow: function () { | ||
190 | + | ||
191 | + }, | ||
192 | + | ||
193 | + /** | ||
194 | + * 生命周期函数--监听页面隐藏 | ||
195 | + */ | ||
196 | + onHide: function () { | ||
197 | + innerAudioContext.stop() | ||
198 | + }, | ||
199 | + | ||
200 | + /** | ||
201 | + * 生命周期函数--监听页面卸载 | ||
202 | + */ | ||
203 | + onUnload: function () { | ||
204 | + innerAudioContext.stop() | ||
205 | + }, | ||
206 | + | ||
207 | + /** | ||
208 | + * 页面相关事件处理函数--监听用户下拉动作 | ||
209 | + */ | ||
210 | + onPullDownRefresh: function () { | ||
211 | + | ||
212 | + }, | ||
213 | + | ||
214 | + /** | ||
215 | + * 页面上拉触底事件的处理函数 | ||
216 | + */ | ||
217 | + onReachBottom: function () { | ||
218 | + | ||
219 | + }, | ||
220 | + | ||
221 | + /** | ||
222 | + * 用户点击右上角分享 | ||
223 | + */ | ||
224 | + onShareAppMessage: function () { | ||
225 | + | ||
226 | + } | ||
227 | +}) |
1 | +{"navigationBarTitleText": "复习单词"} |
1 | +<!--pages/MemorizingWords/wordsDetail_review/wordsDetail_review.wxml--> | ||
2 | +<!--pages/MemorizingWords/wordsDetail/wordsDetail.wxml--> | ||
3 | +<view class='null_box'></view> | ||
4 | +<view class='content_box'> | ||
5 | + <view class='banner_box'> | ||
6 | + <view class='label_box'> | ||
7 | + <view class='label_item'> | ||
8 | + <text>新学</text> | ||
9 | + <text>{{listdata.new_study}}</text> | ||
10 | + </view> | ||
11 | + <view class='label_item'> | ||
12 | + <text>需复习</text> | ||
13 | + <text>{{listdata.review}}</text> | ||
14 | + </view> | ||
15 | + </view> | ||
16 | + <view class='label_box info' data-status='4' bindtap='handleWords'> | ||
17 | + <view class='iconfont icon-xuanzhong'></view> | ||
18 | + <view>熟识</view> | ||
19 | + </view> | ||
20 | + </view> | ||
21 | +</view> | ||
22 | +<view class='content_item' wx:if='{{page==0}}'> | ||
23 | + <view class='item_content'> | ||
24 | + <view class='words'>{{listdata.info.word}}</view> | ||
25 | + <view class='phonetic_symbol' catchtap='audioPlay'> | ||
26 | + <view class='iconfont icon-laba1'></view> | ||
27 | + <view>{{listdata.info.yinbiao}}</view> | ||
28 | + </view> | ||
29 | + <view class='paraphrase'>{{listdata.info.explain}}</view> | ||
30 | + </view> | ||
31 | + | ||
32 | + <view class='mask_box' bindtap='showParaphrase'> | ||
33 | + <view class='iconfont icon-dianji'></view> | ||
34 | + <view>点击屏幕显示释义</view> | ||
35 | + </view> | ||
36 | +</view> | ||
37 | + | ||
38 | +<block wx:if='{{page==1}}'> | ||
39 | + <view class='content_item content_item2'> | ||
40 | + <view class='item_content'> | ||
41 | + <view class='words'>{{listdata.info.word}}</view> | ||
42 | + <view class='phonetic_symbol'> | ||
43 | + <view class='iconfont icon-laba1'></view> | ||
44 | + <view>{{listdata.info.yinbiao}}</view> | ||
45 | + </view> | ||
46 | + <view class='paraphrase'>{{listdata.info.explain}}</view> | ||
47 | + </view> | ||
48 | + <view class='item_box'> | ||
49 | + <view class='item_list'> | ||
50 | + <view class='title'>例句</view> | ||
51 | + <view class='list_content'> | ||
52 | + <view> | ||
53 | + <view class='point' wx:if='{{listdata.info.liju.length !=0}}'></view> | ||
54 | + </view> | ||
55 | + <view>{{listdata.info.liju}} | ||
56 | + </view> | ||
57 | + </view> | ||
58 | + </view> | ||
59 | + <view class='item_list'> | ||
60 | + <view class='title'>近义词</view> | ||
61 | + <view class='list_content'> | ||
62 | + | ||
63 | + <view>{{listdata.info.jinyici}}</view> | ||
64 | + </view> | ||
65 | + </view> | ||
66 | + </view> | ||
67 | + <view class='bottom_btn'> | ||
68 | + <view class='btn' data-status='1' bindtap='handleWords'>认识</view> | ||
69 | + <view class='btn' data-status='2' bindtap='handleWords'>不认识</view> | ||
70 | + <view class='btn' data-status='3' bindtap='handleWords'>忘记</view> | ||
71 | + | ||
72 | + </view> | ||
73 | + </view> | ||
74 | +</block> |
1 | +/* pages/MemorizingWords/wordsDetail_review/wordsDetail_review.wxss */ | ||
2 | +@import "/pages/index/articleList/articleList.wxss"; | ||
3 | + | ||
4 | +.banner_box { | ||
5 | + display: flex; | ||
6 | + align-items: center; | ||
7 | + justify-content: space-between; | ||
8 | + padding: 0 20rpx; | ||
9 | +} | ||
10 | + | ||
11 | +.label_box { | ||
12 | + display: flex; | ||
13 | + align-items: center; | ||
14 | +} | ||
15 | + | ||
16 | +.label_item { | ||
17 | + width: 120rpx; | ||
18 | + height: 40rpx; | ||
19 | + font-size: 24rpx; | ||
20 | + color: #666; | ||
21 | + background: rgba(204, 240, 255, 1); | ||
22 | + border-radius: 4rpx; | ||
23 | + display: flex; | ||
24 | + align-items: center; | ||
25 | + justify-content: center; | ||
26 | + margin-right: 20rpx; | ||
27 | +} | ||
28 | + | ||
29 | +.info { | ||
30 | + font-size: 28rpx; | ||
31 | + color: #1db9fa; | ||
32 | +} | ||
33 | + | ||
34 | +.icon-xuanzhong { | ||
35 | + font-size: 26rpx; | ||
36 | + margin-top: 6rpx; | ||
37 | + margin-right: 17rpx; | ||
38 | +} | ||
39 | + | ||
40 | +.item_content { | ||
41 | + /* background: url(/images/bg3.png); */ | ||
42 | + background: #ebebeb; | ||
43 | + text-align: center; | ||
44 | + padding: 70rpx 0; | ||
45 | +} | ||
46 | + | ||
47 | +.words { | ||
48 | + font-size: 48rpx; | ||
49 | + color: #19191a; | ||
50 | + /* margin-top: 78rpx; */ | ||
51 | +} | ||
52 | + | ||
53 | +.phonetic_symbol { | ||
54 | + display: flex; | ||
55 | + align-items: center; | ||
56 | + justify-content: center; | ||
57 | + font-size: 30rpx; | ||
58 | + color: #19191a; | ||
59 | + margin-top: 30rpx; | ||
60 | +} | ||
61 | + | ||
62 | +.icon-laba1 { | ||
63 | + color: #1db9fa; | ||
64 | +} | ||
65 | + | ||
66 | +.paraphrase { | ||
67 | + font-size: 20rpx; | ||
68 | + color: #1db9fa; | ||
69 | + margin-top: 19rpx; | ||
70 | +} | ||
71 | + | ||
72 | +.mask_box { | ||
73 | + font-size: 30rpx; | ||
74 | + color: #ccc; | ||
75 | + background: #fff; | ||
76 | + text-align: center; | ||
77 | + margin-top: 220rpx; | ||
78 | +} | ||
79 | + | ||
80 | +.icon-dianji { | ||
81 | + font-size: 87rpx; | ||
82 | + color: #ccc; | ||
83 | + margin-bottom: 22rpx; | ||
84 | +} | ||
85 | + | ||
86 | +.content_item2 { | ||
87 | + width: 100%; | ||
88 | + height: 100%; | ||
89 | + position: fixed; | ||
90 | + left: 0; | ||
91 | + background: #fafafa; | ||
92 | +} | ||
93 | + | ||
94 | +.item_box { | ||
95 | + padding: 0 50rpx; | ||
96 | +} | ||
97 | + | ||
98 | +.item_list { | ||
99 | + background: rgba(255, 255, 255, 1); | ||
100 | + border-radius: 20rpx; | ||
101 | + font-size: 26rpx; | ||
102 | + color: #666; | ||
103 | + padding: 20rpx; | ||
104 | + margin-top: 28rpx; | ||
105 | +} | ||
106 | + | ||
107 | +.list_content { | ||
108 | + display: flex; | ||
109 | + align-items: flex-start; | ||
110 | +} | ||
111 | + | ||
112 | +.title { | ||
113 | + font-size: 30rpx; | ||
114 | + color: #666; | ||
115 | + margin-bottom: 20rpx; | ||
116 | +} | ||
117 | + | ||
118 | +.point { | ||
119 | + width: 23rpx; | ||
120 | + height: 23rpx; | ||
121 | +} | ||
122 | + | ||
123 | +.bottom_btn { | ||
124 | + width: 100%; | ||
125 | + height: 100rpx; | ||
126 | + display: flex; | ||
127 | + box-sizing: border-box; | ||
128 | + align-items: center; | ||
129 | + justify-content: space-between; | ||
130 | + background: #1db9fa; | ||
131 | + border-radius: 20rpx 20rpx 0rpx 0rpx; | ||
132 | + position: fixed; | ||
133 | + bottom: 0; | ||
134 | + left: 0; | ||
135 | + padding: 0 40rpx; | ||
136 | +} | ||
137 | + | ||
138 | +.btn { | ||
139 | + width: 192rpx; | ||
140 | + height: 60rpx; | ||
141 | + font-size: 30rpx; | ||
142 | + color: #FFFFFF; | ||
143 | + border: 1rpx solid rgba(255, 255, 255, 1); | ||
144 | + border-radius: 10rpx; | ||
145 | + display: flex; | ||
146 | + align-items: center; | ||
147 | + justify-content: center; | ||
148 | +} |
1 | +// pages/MemorizingWords/wordsPackage/wordsPackage.js | ||
2 | +const app=getApp(); | ||
3 | +const innerAudioContext = wx.createInnerAudioContext(); | ||
4 | +Page({ | ||
5 | + /** | ||
6 | + * 页面的初始数据 | ||
7 | + */ | ||
8 | + data: { | ||
9 | + wordspackageid:'',//词包id | ||
10 | + total:0,//单词量 | ||
11 | + listdata:{ | ||
12 | + list: [], | ||
13 | + package_id: '', | ||
14 | + total_num: 0 | ||
15 | + },//词包内容 | ||
16 | + scroll_height:'',//可视区域的高度 | ||
17 | + page:1,//当前页 | ||
18 | + pageNum:20,//每页条数 | ||
19 | + ifload:true | ||
20 | + }, | ||
21 | + // 开始背单词 | ||
22 | + startPlan() { | ||
23 | + let that=this; | ||
24 | + let wordspackageid = that.data.wordspackageid; | ||
25 | + // wx.setStorageSync('ifeditpage', false); | ||
26 | + wx.navigateTo({ | ||
27 | + url: '../../MemorizingWords/wordsPlan/wordsPlan?wordspackageid=' + wordspackageid | ||
28 | + }) | ||
29 | + }, | ||
30 | + audioPlay(e){ | ||
31 | + let that=this; | ||
32 | + innerAudioContext.stop() | ||
33 | + let listdata = that.data.listdata; | ||
34 | + let index =e.currentTarget.dataset.index; | ||
35 | + innerAudioContext.src = listdata.list[index].voice_url; | ||
36 | + innerAudioContext.play(); | ||
37 | + innerAudioContext.onPlay(() => { | ||
38 | + console.log('录音播放中'); | ||
39 | + }) | ||
40 | + innerAudioContext.onStop(() => { | ||
41 | + console.log('录音播放停止'); | ||
42 | + }) | ||
43 | + innerAudioContext.onEnded(() => { | ||
44 | + console.log('录音播放结束'); | ||
45 | + innerAudioContext.stop() | ||
46 | + }) | ||
47 | + }, | ||
48 | + //获取单词包详情 | ||
49 | + getdata(){ | ||
50 | + let that=this; | ||
51 | + let url ='Words/againGetPackageDetail'; | ||
52 | + let params={ | ||
53 | + token:wx.getStorageSync('token'), | ||
54 | + page:that.data.page, | ||
55 | + pageNum: that.data.pageNum, | ||
56 | + id: that.data.wordspackageid | ||
57 | + } | ||
58 | + app.post(url, params).then((res)=>{ | ||
59 | + if(res.data.code==1){ | ||
60 | + if (res.data.data.list.length < that.data.pageNum){ | ||
61 | + that.setData({ | ||
62 | + ifload:false | ||
63 | + }) | ||
64 | + } | ||
65 | + let list=res.data.data.list; | ||
66 | + let listdata = that.data.listdata; | ||
67 | + let temist=listdata.list.concat(list); | ||
68 | + listdata.list = temist; | ||
69 | + that.setData({ | ||
70 | + listdata: listdata, | ||
71 | + total: res.data.data.total_num, | ||
72 | + page:parseInt(that.data.page)+1 | ||
73 | + }) | ||
74 | + } | ||
75 | + }).catch((errMsg)=>{ | ||
76 | + console.log(errMsg) | ||
77 | + }) | ||
78 | + }, | ||
79 | + //加载更多 | ||
80 | + onloading(){ | ||
81 | + let that=this; | ||
82 | + if (that.data.ifload){ | ||
83 | + that.getdata(); | ||
84 | + } | ||
85 | + }, | ||
86 | + /** | ||
87 | + * 生命周期函数--监听页面加载 | ||
88 | + */ | ||
89 | + onLoad: function(options) { | ||
90 | + let that=this; | ||
91 | + let windowHeight = wx.getSystemInfoSync().windowHeight // 屏幕的高度 | ||
92 | + let windowWidth = wx.getSystemInfoSync().windowWidth // 屏幕的宽度 | ||
93 | + this.setData({ | ||
94 | + scroll_height: windowHeight * 750 / windowWidth - 100 | ||
95 | + }) | ||
96 | + that.setData({ | ||
97 | + wordspackageid:options.id, | ||
98 | + page:1, | ||
99 | + listdata:{ | ||
100 | + list:[], | ||
101 | + package_id:'', | ||
102 | + total_num:0 | ||
103 | + } | ||
104 | + }) | ||
105 | + that.getdata(); | ||
106 | + }, | ||
107 | + /** | ||
108 | + * 生命周期函数--监听页面初次渲染完成 | ||
109 | + */ | ||
110 | + onReady: function() { | ||
111 | + | ||
112 | + }, | ||
113 | + | ||
114 | + /** | ||
115 | + * 生命周期函数--监听页面显示 | ||
116 | + */ | ||
117 | + onShow: function() { | ||
118 | + | ||
119 | + }, | ||
120 | + | ||
121 | + /** | ||
122 | + * 生命周期函数--监听页面隐藏 | ||
123 | + */ | ||
124 | + onHide: function() { | ||
125 | + innerAudioContext.stop(); | ||
126 | + }, | ||
127 | + | ||
128 | + /** | ||
129 | + * 生命周期函数--监听页面卸载 | ||
130 | + */ | ||
131 | + onUnload: function() { | ||
132 | + innerAudioContext.stop(); | ||
133 | + }, | ||
134 | + | ||
135 | + /** | ||
136 | + * 页面相关事件处理函数--监听用户下拉动作 | ||
137 | + */ | ||
138 | + onPullDownRefresh: function() { | ||
139 | + | ||
140 | + }, | ||
141 | + | ||
142 | + /** | ||
143 | + * 页面上拉触底事件的处理函数 | ||
144 | + */ | ||
145 | + onReachBottom: function() { | ||
146 | + | ||
147 | + }, | ||
148 | + | ||
149 | + /** | ||
150 | + * 用户点击右上角分享 | ||
151 | + */ | ||
152 | + onShareAppMessage: function() { | ||
153 | + | ||
154 | + } | ||
155 | +}) |
1 | +{"navigationBarTitleText": "词包详情界面"} |
1 | +<!--pages/MemorizingWords/wordsPackage/wordsPackage.wxml--> | ||
2 | +<scroll-view scroll-y='true' bindscrolltolower='onloading' style='max-height:{{scroll_height}}rpx'> | ||
3 | +<view class='null_box'></view> | ||
4 | +<view class='content_box'> | ||
5 | + <view class='content_title'> | ||
6 | + <view>单词量: | ||
7 | + <text class='current_num'>{{total}}</text> | ||
8 | + <text>/{{listdata.total_num}}</text> </view> | ||
9 | + <view class='state_box'> | ||
10 | + <view class='state_item'> | ||
11 | + <view class='iconfont icon-yuan1'></view> | ||
12 | + <view>没背</view> | ||
13 | + </view> | ||
14 | + <view class='state_item'> | ||
15 | + <view class='iconfont icon-yuan1 blue'></view> | ||
16 | + <view>认识</view> | ||
17 | + </view> | ||
18 | + <view class='state_item'> | ||
19 | + <view class='iconfont icon-yuan1 gree'></view> | ||
20 | + <view>不认识 </view> | ||
21 | + </view> | ||
22 | + <view class='state_item'> | ||
23 | + <view class='iconfont icon-yuan1 yellow'></view> | ||
24 | + <view>模糊</view> | ||
25 | + </view> | ||
26 | + </view> | ||
27 | + </view> | ||
28 | + <view class='content_item'> | ||
29 | + <block wx:for='{{listdata.list}}' wx:key> | ||
30 | + <view class="item_list" wx:if='{{item.status==0}}' > | ||
31 | + <view class='iconfont icon-laba1' bindtap='audioPlay' data-index="{{index}}"> | ||
32 | + </view> | ||
33 | + <view> | ||
34 | + <view> | ||
35 | + <text>{{item.word}}</text> | ||
36 | + <text class='phonetic_symbol' >{{item.yinbiao}}</text> | ||
37 | + </view> | ||
38 | + <view class='explain'>释义:{{item.explain}}</view> | ||
39 | + </view> | ||
40 | + </view> | ||
41 | + <view class="item_list bgblue" wx:elif='{{item.status==1}}' > | ||
42 | + <view class='iconfont icon-laba1' bindtap='audioPlay' data-index="{{index}}"> | ||
43 | + </view> | ||
44 | + <view> | ||
45 | + <view> | ||
46 | + <text>{{item.word}}</text> | ||
47 | + <text class='phonetic_symbol' >{{item.yinbiao}}</text> | ||
48 | + </view> | ||
49 | + <view class='explain'>释义:{{item.explain}}</view> | ||
50 | + </view> | ||
51 | + </view> | ||
52 | + <view class="item_list bggree" wx:elif='{{item.status==2}}' > | ||
53 | + <view class='iconfont icon-laba1' bindtap='audioPlay' data-index="{{index}}"> | ||
54 | + </view> | ||
55 | + <view> | ||
56 | + <view> | ||
57 | + <text>{{item.word}}</text> | ||
58 | + <text class='phonetic_symbol' >{{item.yinbiao}}</text> | ||
59 | + </view> | ||
60 | + <view class='explain'>释义:{{item.explain}}</view> | ||
61 | + </view> | ||
62 | + </view> | ||
63 | + <view class="item_list bgyellow" wx:elif='{{item.status==3}}' > | ||
64 | + <view class='iconfont icon-laba1' bindtap='audioPlay' data-index="{{index}}"> | ||
65 | + </view> | ||
66 | + <view> | ||
67 | + <view> | ||
68 | + <text>{{item.word}}</text> | ||
69 | + <text class='phonetic_symbol' >{{item.yinbiao}}</text> | ||
70 | + </view> | ||
71 | + <view class='explain'>释义:{{item.explain}}</view> | ||
72 | + </view> | ||
73 | + </view> | ||
74 | + </block> | ||
75 | + </view> | ||
76 | +</view> | ||
77 | +</scroll-view> | ||
78 | +<view class='bottom_btn' bindtap='startPlan'>开始背单词</view> |
1 | +/* pages/MemorizingWords/wordsPackage/wordsPackage.wxss */ | ||
2 | +@import "/pages/index/articleList/articleList.wxss"; | ||
3 | +page{ | ||
4 | + padding:0 0 100rpx 0; | ||
5 | +} | ||
6 | +.content_box { | ||
7 | + padding: 30rpx 0; | ||
8 | +} | ||
9 | + | ||
10 | +.current_num { | ||
11 | + color: #1db9fa; | ||
12 | +} | ||
13 | + | ||
14 | +.content_title { | ||
15 | + display: flex; | ||
16 | + align-items: center; | ||
17 | + justify-content: space-between; | ||
18 | + font-size: 30rpx; | ||
19 | + color: #010000; | ||
20 | + padding: 0 30rpx; | ||
21 | +} | ||
22 | + | ||
23 | +.state_box { | ||
24 | + display: flex; | ||
25 | + align-items: center; | ||
26 | +} | ||
27 | + | ||
28 | +.state_item { | ||
29 | + font-size: 24rpx; | ||
30 | + color: #999; | ||
31 | + margin-left: 30rpx; | ||
32 | +} | ||
33 | + | ||
34 | +.icon-yuan1 { | ||
35 | + font-size: 24rpx; | ||
36 | + color: #ebebeb; | ||
37 | + text-align: center; | ||
38 | +} | ||
39 | + | ||
40 | +.blue { | ||
41 | + color: #a2e4ff; | ||
42 | +} | ||
43 | + | ||
44 | +.gree { | ||
45 | + color: #1dfac3; | ||
46 | +} | ||
47 | + | ||
48 | +.yellow { | ||
49 | + color: RGBA(245, 231, 139, 1); | ||
50 | +} | ||
51 | +.content_item .bgblue { | ||
52 | + background-color: #a2e4ff; | ||
53 | +} | ||
54 | + | ||
55 | +.content_item .bggree { | ||
56 | + background-color: #1dfac3; | ||
57 | +} | ||
58 | + | ||
59 | +.content_item .bgyellow { | ||
60 | + background-color: RGBA(245, 231, 139, 1); | ||
61 | +} | ||
62 | +.item_list .txt_color{ | ||
63 | + color:#ebebeb; | ||
64 | +} | ||
65 | + | ||
66 | +.item_list { | ||
67 | + width: 100%; | ||
68 | + height: 100rpx; | ||
69 | + background: #ebebeb; | ||
70 | + display: flex; | ||
71 | + align-items: flex-start; | ||
72 | + padding: 0 30rpx 0 0; | ||
73 | + margin-bottom: 20rpx; | ||
74 | +} | ||
75 | + | ||
76 | +.icon-laba1 { | ||
77 | + font-size: 30rpx; | ||
78 | + color: #1db9fa; | ||
79 | + padding: 20rpx 17rpx 20rpx 30rpx; | ||
80 | + box-sizing: border-box; | ||
81 | +} | ||
82 | + | ||
83 | +.phonetic_symbol { | ||
84 | + font-size: 24rpx; | ||
85 | + color: #999; | ||
86 | + margin-left: 12rpx; | ||
87 | +} | ||
88 | + | ||
89 | +.explain { | ||
90 | + font-size: 24rpx; | ||
91 | + color: #4d4d4d; | ||
92 | +} | ||
93 | + | ||
94 | +.bottom_btn { | ||
95 | + width: 100%; | ||
96 | + height: 100rpx; | ||
97 | + font-size: 36rpx; | ||
98 | + color: #FFFFFF; | ||
99 | + background: rgba(29, 185, 250, 1); | ||
100 | + border-radius: 10rpx 10rpx 0rpx 0rpx; | ||
101 | + position: fixed; | ||
102 | + bottom: 0; | ||
103 | + left: 0; | ||
104 | + display: flex; | ||
105 | + align-items: center; | ||
106 | + justify-content: center; | ||
107 | +} |
pages/MemorizingWords/wordsPlan/wordsPlan.js
0 → 100644
1 | +// pages/MemorizingWords/wordsPlan/wordsPlan.js | ||
2 | +const app=getApp(); | ||
3 | +Page({ | ||
4 | + | ||
5 | + /** | ||
6 | + * 页面的初始数据 | ||
7 | + */ | ||
8 | + data: { | ||
9 | + f:false, | ||
10 | + ifedit:false,//是否是修改计划 | ||
11 | + dayNum: [ | ||
12 | + { | ||
13 | + show:'15天', | ||
14 | + num:15, | ||
15 | + state:false | ||
16 | + }, | ||
17 | + { | ||
18 | + show: '30天', | ||
19 | + num: 30, | ||
20 | + state: false | ||
21 | + }, | ||
22 | + { | ||
23 | + show: '45天', | ||
24 | + num: 45, | ||
25 | + state: false | ||
26 | + }, | ||
27 | + { | ||
28 | + show: '60天', | ||
29 | + num: 60, | ||
30 | + state: false | ||
31 | + } | ||
32 | + ],//天数选择数组 | ||
33 | + days: '', | ||
34 | + wordsNums:[],//单词数选择数组 | ||
35 | + wordsNum:'',//每天背的单词数 | ||
36 | + wordspackageid:'',//词包ID | ||
37 | + packageDetail:[],//词包详情 | ||
38 | + toView: '',//天数to | ||
39 | + toView1:'',//单词数to | ||
40 | + ifeidtwordpackage:false//是否是编辑词包 | ||
41 | + }, | ||
42 | + setdayNum(e){ | ||
43 | + let that = this; | ||
44 | + let days = e.currentTarget.dataset.num; | ||
45 | + let index = parseInt(e.currentTarget.dataset.index); | ||
46 | + let dayNum = that.data.dayNum; | ||
47 | + let url = 'Words/handle'; | ||
48 | + let params = { | ||
49 | + days: days, | ||
50 | + package_id: that.data.wordspackageid | ||
51 | + } | ||
52 | + app.post(url, params).then((res) => { | ||
53 | + if (res.data.code == 1) { | ||
54 | + for (let i in dayNum){ | ||
55 | + dayNum[i].state = false | ||
56 | + if(i == index){ | ||
57 | + dayNum[i].state = true | ||
58 | + } | ||
59 | + } | ||
60 | + that.setData({ | ||
61 | + days: days, | ||
62 | + wordsNum: res.data.data.everyday_words, | ||
63 | + dayNum: dayNum, | ||
64 | + }) | ||
65 | + } | ||
66 | + }).catch((errMsg) => { | ||
67 | + console.log(errMsg) | ||
68 | + }) | ||
69 | + }, | ||
70 | + setwordsNum(e){ | ||
71 | + let that=this; | ||
72 | + let url ='Words/handle2'; | ||
73 | + let index = parseInt(e.currentTarget.dataset.index); | ||
74 | + let wordsNum=e.currentTarget.dataset.num; | ||
75 | + let dayNum = that.data.dayNum; | ||
76 | + let wordsNums = that.data.wordsNums; | ||
77 | + let params = { | ||
78 | + words_num: e.currentTarget.dataset.num, | ||
79 | + package_id: that.data.wordspackageid | ||
80 | + } | ||
81 | + app.post(url, params).then((res) => { | ||
82 | + if (res.data.code == 1) { | ||
83 | + for (let i in wordsNums) { | ||
84 | + wordsNums[i].state = false | ||
85 | + if (i == index) { | ||
86 | + wordsNums[i].state = true | ||
87 | + } | ||
88 | + } | ||
89 | + for (let i in dayNum) { | ||
90 | + dayNum[i].state = false | ||
91 | + if (parseInt(dayNum[i].num) == parseInt(res.data.data.everyday_days)) { | ||
92 | + dayNum[i].state = true | ||
93 | + } | ||
94 | + } | ||
95 | + that.setData({ | ||
96 | + days: res.data.data.everyday_days, | ||
97 | + wordsNum: wordsNum, | ||
98 | + dayNum: dayNum, | ||
99 | + wordsNums: wordsNums, | ||
100 | + toView: 'inToView' + res.data.data.everyday_days | ||
101 | + }) | ||
102 | + } | ||
103 | + }).catch((errMsg) => { | ||
104 | + console.log(errMsg) | ||
105 | + }) | ||
106 | + }, | ||
107 | + setplanpage(){ | ||
108 | + let that=this; | ||
109 | + if (wx.getStorageSync('ifeidtwordpackage')){//true为修改词包 | ||
110 | + that.setPackage(); | ||
111 | + }else{//false为设置计划 | ||
112 | + that.confirmPlan(); | ||
113 | + } | ||
114 | + }, | ||
115 | + //设定计划操作 | ||
116 | + confirmPlan() { | ||
117 | + let that=this; | ||
118 | + if (that.data.days==''){ | ||
119 | + wx.showToast({ | ||
120 | + title: '请选择天数!', | ||
121 | + icon: 'none', | ||
122 | + duration: 2000 | ||
123 | + }) | ||
124 | + }else{ | ||
125 | + let url ='Words/setPlan'; | ||
126 | + let params={ | ||
127 | + package_id: that.data.wordspackageid, | ||
128 | + token: wx.getStorageSync('token'), | ||
129 | + days:that.data.days, | ||
130 | + everyday_words: that.data.wordsNum | ||
131 | + } | ||
132 | + app.post(url,params).then((res)=>{ | ||
133 | + wx.switchTab({ | ||
134 | + url: '../../MemorizingWords/MemorizingWords', | ||
135 | + }) | ||
136 | + }).catch((errMsg)=>{ | ||
137 | + console.log(errMssg) | ||
138 | + }) | ||
139 | + } | ||
140 | + }, | ||
141 | + //接口:修改词包 | ||
142 | + setPackage() { | ||
143 | + let that = this; | ||
144 | + if (that.data.days == '') { | ||
145 | + wx.showToast({ | ||
146 | + title: '请选择天数!', | ||
147 | + icon: 'none', | ||
148 | + duration: 2000 | ||
149 | + }) | ||
150 | + }else{ | ||
151 | + let url = 'Words/setPackage'; | ||
152 | + wx.setStorageSync('ifeidtwordpackage', false); | ||
153 | + let params = { | ||
154 | + package_id: that.data.wordspackageid, | ||
155 | + token: wx.getStorageSync('token'), | ||
156 | + days: that.data.days, | ||
157 | + everyday_words: that.data.wordsNum | ||
158 | + } | ||
159 | + app.post(url, params).then((res) => { | ||
160 | + if (res.data.code == 1) { | ||
161 | + wx.switchTab({ | ||
162 | + url: '../../MemorizingWords/MemorizingWords', | ||
163 | + }) | ||
164 | + } | ||
165 | + }).catch((errMsg) => { | ||
166 | + console.log(errMssg) | ||
167 | + }) | ||
168 | + } | ||
169 | + | ||
170 | + | ||
171 | + }, | ||
172 | + //修改计划操作 | ||
173 | + seteditPlan() { | ||
174 | + let that = this; | ||
175 | + if (that.data.days == '') { | ||
176 | + wx.showToast({ | ||
177 | + title: '请选择天数!', | ||
178 | + icon: 'none', | ||
179 | + duration: 2000 | ||
180 | + }) | ||
181 | + } else { | ||
182 | + let url = 'Words/editPlan'; | ||
183 | + let params = { | ||
184 | + token: wx.getStorageSync('token'), | ||
185 | + days: that.data.days, | ||
186 | + everyday_words: that.data.wordsNum | ||
187 | + } | ||
188 | + app.post(url, params).then((res) => { | ||
189 | + if (res.data.code == 1) { | ||
190 | + wx.switchTab({ | ||
191 | + url: '../../MemorizingWords/MemorizingWords', | ||
192 | + }) | ||
193 | + } | ||
194 | + }).catch((errMsg) => { | ||
195 | + console.log(errMssg) | ||
196 | + }) | ||
197 | + } | ||
198 | + | ||
199 | + }, | ||
200 | + | ||
201 | + //获取计划页面详情 | ||
202 | + getplan(){ | ||
203 | + let that=this; | ||
204 | + let url ='Words/getPlanInfo'; | ||
205 | + let days = parseInt(that.data.days);//选择天 | ||
206 | + let wordsNum = parseInt(that.data.wordsNum);//每天背的单词数 | ||
207 | + let params={ | ||
208 | + package_id: that.data.wordspackageid | ||
209 | + } | ||
210 | + app.post(url,params).then((res)=>{ | ||
211 | + if(res.data.code==1){ | ||
212 | + that.setData({ | ||
213 | + packageDetail: res.data.data, | ||
214 | + total_num: res.data.data.total_num, | ||
215 | + }) | ||
216 | + } | ||
217 | + }).catch((errMsg)=>{ | ||
218 | + console.log(errMsg) | ||
219 | + }) | ||
220 | + }, | ||
221 | + /** | ||
222 | + * 生命周期函数--监听页面加载 | ||
223 | + */ | ||
224 | + onLoad: function(options) { | ||
225 | + let that=this; | ||
226 | + if (options.wordspackageid !=undefined){//设置或修改词包 | ||
227 | + that.setData({ | ||
228 | + wordspackageid:options.wordspackageid, | ||
229 | + ifeidtwordpackage: wx.getStorageSync('ifeidtwordpackage') | ||
230 | + }) | ||
231 | + } | ||
232 | + if (options.days !=undefined){ | ||
233 | + let dayNum = that.data.dayNum; | ||
234 | + for (let obj of dayNum){ | ||
235 | + if (obj.num == options.days){ | ||
236 | + obj.state=true | ||
237 | + } | ||
238 | + } | ||
239 | + that.setData({ | ||
240 | + ifedit:true, | ||
241 | + dayNum: dayNum, | ||
242 | + days: options.days,//选择天(默认是第一天) | ||
243 | + wordsNum: options.wordnum,//每天背的单词数 | ||
244 | + }) | ||
245 | + } | ||
246 | + that.getplan(); | ||
247 | + }, | ||
248 | + /** | ||
249 | + * 生命周期函数--监听页面初次渲染完成 | ||
250 | + */ | ||
251 | + onReady: function() { | ||
252 | + | ||
253 | + }, | ||
254 | + | ||
255 | + /** | ||
256 | + * 生命周期函数--监听页面显示 | ||
257 | + */ | ||
258 | + onShow: function() { | ||
259 | + | ||
260 | + }, | ||
261 | + | ||
262 | + /** | ||
263 | + * 生命周期函数--监听页面隐藏 | ||
264 | + */ | ||
265 | + onHide: function() { | ||
266 | + | ||
267 | + }, | ||
268 | + | ||
269 | + /** | ||
270 | + * 生命周期函数--监听页面卸载 | ||
271 | + */ | ||
272 | + onUnload: function() { | ||
273 | + | ||
274 | + }, | ||
275 | + | ||
276 | + /** | ||
277 | + * 页面相关事件处理函数--监听用户下拉动作 | ||
278 | + */ | ||
279 | + onPullDownRefresh: function() { | ||
280 | + | ||
281 | + }, | ||
282 | + | ||
283 | + /** | ||
284 | + * 页面上拉触底事件的处理函数 | ||
285 | + */ | ||
286 | + onReachBottom: function() { | ||
287 | + | ||
288 | + }, | ||
289 | + | ||
290 | + /** | ||
291 | + * 用户点击右上角分享 | ||
292 | + */ | ||
293 | + onShareAppMessage: function() { | ||
294 | + | ||
295 | + } | ||
296 | +}) |
1 | +{"navigationBarTitleText": "我的计划"} |
1 | +<!--pages/MemorizingWords/wordsPlan/wordsPlan.wxml--> | ||
2 | +<view class='null_box'></view> | ||
3 | +<view class='content_box'> | ||
4 | + <view> | ||
5 | + <view class='title'>GMAT-{{packageDetail.package_name}}({{packageDetail.total_num}}个词)</view> | ||
6 | + <view class='content_info'>我计划 | ||
7 | + <text class='date_num'>{{days}}</text> 天,每天背 | ||
8 | + <text class='words_num'>{{wordsNum}}</text>个单词</view> | ||
9 | + <view class='picker_box'> | ||
10 | + <view class='date_box'> | ||
11 | + <view class="picker"> | ||
12 | + {{days}}天 | ||
13 | + </view> | ||
14 | + <view class='starbox'> | ||
15 | + <scroll-view class='starbox' scroll-y='true' scroll-into-view="{{toView}}" scroll-y="true" scroll-with-animation="true"> | ||
16 | + <view class="starcell {{item.state?'starcellactivite':''}}" wx:for='{{dayNum}}' wx:key bindtap='setdayNum' data-num='{{item.num}}' data-index='{{index}}' id="{{ 'inToView'+item.num}}">{{item.show}}</view> | ||
17 | + </scroll-view></view> | ||
18 | + </view> | ||
19 | + <view class='words_box' wx:if='{{f}}'> | ||
20 | + <view class="pickerdata"> | ||
21 | + {{wordsNum}}个 | ||
22 | + </view> | ||
23 | + <view class='starbox'> | ||
24 | + <scroll-view class='starbox' scroll-y='true' scroll-into-view="{{toView1}}" scroll-y="true" scroll-with-animation="true"> | ||
25 | + <view class="starcell {{item.state?'starcellactivite':''}}" wx:for='{{wordsNums}}' wx:key data-index='{{index}}' data-num='{{item.num}}' id="{{ 'inToView1'+item.num}}" bindtap='setwordsNum' >{{item.show}}</view> | ||
26 | + </scroll-view></view> | ||
27 | + </view> | ||
28 | + </view> | ||
29 | + </view> | ||
30 | + <view class='bottom_btn' bindtap='{{ifedit?"seteditPlan":"setplanpage"}}'>确定</view> | ||
31 | +</view> |
1 | +/* pages/MemorizingWords/wordsPlan/wordsPlan.wxss */ | ||
2 | +@import "/pages/index/articleList/articleList.wxss"; | ||
3 | + | ||
4 | +.title { | ||
5 | + font-size: 36rpx; | ||
6 | + color: #666; | ||
7 | + text-align: center; | ||
8 | +} | ||
9 | + | ||
10 | +.content_info { | ||
11 | + font-size: 26rpx; | ||
12 | + color: #666; | ||
13 | + text-align: center; | ||
14 | + margin-top: 50rpx; | ||
15 | +} | ||
16 | + | ||
17 | +.date_num, .words_num { | ||
18 | + display: inline-block; | ||
19 | + width: 45rpx; | ||
20 | + font-size: 26rpx; | ||
21 | + color: #1db9fa; | ||
22 | + text-align: center; | ||
23 | + border-bottom: 1rpx solid #666; | ||
24 | +} | ||
25 | + | ||
26 | +.picker_box { | ||
27 | + display: flex; | ||
28 | + align-items: center; | ||
29 | + justify-content: space-between; | ||
30 | + margin-top: 56rpx; | ||
31 | + padding: 0 40rpx; | ||
32 | +} | ||
33 | + | ||
34 | +.picker,.pickerdata{ | ||
35 | + margin: 0 auto; | ||
36 | + width: 260rpx; | ||
37 | + height: 80rpx; | ||
38 | + border: 1rpx solid rgba(29, 185, 250, 1); | ||
39 | + border-radius: 20rpx; | ||
40 | + font-size: 36rpx; | ||
41 | + color: #1db9fa; | ||
42 | + display: flex; | ||
43 | + align-items: center; | ||
44 | + justify-content: center; | ||
45 | +} | ||
46 | + | ||
47 | +.bottom_btn { | ||
48 | + width: 100%; | ||
49 | + height: 100rpx; | ||
50 | + font-size: 36rpx; | ||
51 | + color: #fff; | ||
52 | + background: rgba(29, 185, 250, 1); | ||
53 | + border-radius: 10rpx 10rpx 0rpx 0rpx; | ||
54 | + position: fixed; | ||
55 | + bottom: 0; | ||
56 | + left: 0; | ||
57 | + display: flex; | ||
58 | + align-items: center; | ||
59 | + justify-content: center; | ||
60 | +} | ||
61 | +.starbox{ | ||
62 | + width:100%; | ||
63 | + margin:16rpx 0 0 0; | ||
64 | + height: auto; | ||
65 | + background-color: #fafafa; | ||
66 | + border-radius: 5rpx; | ||
67 | + | ||
68 | + overflow: scroll; | ||
69 | +} | ||
70 | +.starcell{ | ||
71 | + color:#1DB9FA; | ||
72 | + font-size:30rpx; | ||
73 | + margin: 0 30rpx; | ||
74 | + display: flex; | ||
75 | + justify-content: center; | ||
76 | + align-items: center; | ||
77 | + height: 80rpx; | ||
78 | + border-bottom:1rpx solid #ccc; | ||
79 | +} | ||
80 | +.starcell:last-child{ | ||
81 | + border:none; | ||
82 | +} | ||
83 | +.starcellactivite{ | ||
84 | + background-color: #EBEBEB; | ||
85 | + border-radius: 5rpx; | ||
86 | + margin: 0; | ||
87 | + border:none; | ||
88 | +} | ||
89 | +.date_box{ | ||
90 | + width:260rpx; | ||
91 | + margin: 0 auto; | ||
92 | +} |
1 | +// pages/MemorizingWords/wordsReport/wordsReport.js | ||
2 | +const app=getApp(); | ||
3 | +Page({ | ||
4 | + | ||
5 | + /** | ||
6 | + * 页面的初始数据 | ||
7 | + */ | ||
8 | + data: { | ||
9 | + | ||
10 | + }, | ||
11 | + getWordsReport() {//获取单词报告 | ||
12 | + let that=this; | ||
13 | + let url ='Words/getWordsReport'; | ||
14 | + let params={ | ||
15 | + token: wx.getStorageSync('token') | ||
16 | + }; | ||
17 | + app.post(url,params).then((res)=>{ | ||
18 | + if(res.data.code==1){ | ||
19 | + that.setData({ | ||
20 | + listdata:res.data.data | ||
21 | + }) | ||
22 | + | ||
23 | + } | ||
24 | + }).catch((errMsg)=>{ | ||
25 | + console.log(errMsg) | ||
26 | + }) | ||
27 | + | ||
28 | + | ||
29 | + }, | ||
30 | + /** | ||
31 | + * 生命周期函数--监听页面加载 | ||
32 | + */ | ||
33 | + onLoad: function (options) { | ||
34 | + let that=this; | ||
35 | + that.getWordsReport(); | ||
36 | + }, | ||
37 | + | ||
38 | + /** | ||
39 | + * 生命周期函数--监听页面初次渲染完成 | ||
40 | + */ | ||
41 | + onReady: function () { | ||
42 | + | ||
43 | + }, | ||
44 | + | ||
45 | + /** | ||
46 | + * 生命周期函数--监听页面显示 | ||
47 | + */ | ||
48 | + onShow: function () { | ||
49 | + | ||
50 | + }, | ||
51 | + | ||
52 | + /** | ||
53 | + * 生命周期函数--监听页面隐藏 | ||
54 | + */ | ||
55 | + onHide: function () { | ||
56 | + | ||
57 | + }, | ||
58 | + | ||
59 | + /** | ||
60 | + * 生命周期函数--监听页面卸载 | ||
61 | + */ | ||
62 | + onUnload: function () { | ||
63 | + | ||
64 | + }, | ||
65 | + | ||
66 | + /** | ||
67 | + * 页面相关事件处理函数--监听用户下拉动作 | ||
68 | + */ | ||
69 | + onPullDownRefresh: function () { | ||
70 | + | ||
71 | + }, | ||
72 | + | ||
73 | + /** | ||
74 | + * 页面上拉触底事件的处理函数 | ||
75 | + */ | ||
76 | + onReachBottom: function () { | ||
77 | + | ||
78 | + }, | ||
79 | + | ||
80 | + /** | ||
81 | + * 用户点击右上角分享 | ||
82 | + */ | ||
83 | + onShareAppMessage: function () { | ||
84 | + | ||
85 | + } | ||
86 | +}) |
1 | +{"navigationBarTitleText": "单词报告界面"} |
1 | +<!--pages/MemorizingWords/wordsReport/wordsReport.wxml--> | ||
2 | +<view class='content_box'> | ||
3 | + <view class='content_item'> | ||
4 | + <view class='content_progress'> | ||
5 | + <view class='label'>已坚持{{listdata.jianchi_days}}天</view> | ||
6 | + <view class='days'> | ||
7 | + <image src='/images/bg2.gif'></image> | ||
8 | + <text class='day_num'>{{listdata.total_num}}</text> | ||
9 | + </view> | ||
10 | + <view class='plan'>总单词数</view> | ||
11 | + <view class='plan_box'> | ||
12 | + <view class='plan_item'> | ||
13 | + <view class=''> | ||
14 | + <text class='plan_num'>{{listdata.know}}</text> | ||
15 | + </view> | ||
16 | + <view>认识数</view> | ||
17 | + </view> | ||
18 | + <view class='line'>|</view> | ||
19 | + <view class='plan_item'> | ||
20 | + <view> | ||
21 | + <text class='plan_num'>{{listdata.noknow}}</text> </view> | ||
22 | + <view>不认识数</view> | ||
23 | + </view> | ||
24 | + </view> | ||
25 | + <view class='words_type'> | ||
26 | + <view>已完成单词数:{{listdata.total_look_num}}/{{listdata.total_num}}</view> | ||
27 | + </view> | ||
28 | + <view class='progress_num2'>{{listdata.jindu}}</view> | ||
29 | + <view class='progress_img img2' style='left:{{listdata.jindu}}' > | ||
30 | + <image src='/images/person.png'></image> | ||
31 | + </view> | ||
32 | + <view class='progress_bar bar2'> | ||
33 | + <view class='progress_ing ing2' style='width:{{listdata.jindu}}'></view> | ||
34 | + </view> | ||
35 | + </view> | ||
36 | + </view> | ||
37 | + | ||
38 | + <view class='info_box'> | ||
39 | + | ||
40 | + <view> | ||
41 | + <view class='symble_box top'> | ||
42 | + <view class='review1'></view> | ||
43 | + <view>平均每天复习的单词量</view> | ||
44 | + </view> | ||
45 | + <view class='symble_box'> | ||
46 | + <view class='new_learn1'></view> | ||
47 | + <view>平均每天新学的单词量</view> | ||
48 | + </view> | ||
49 | + </view> | ||
50 | + <view class='symble_box'> | ||
51 | + <view class="review {{listdata.everyday_fuxi>listdata.everyday_new?'gao_height':'lowheight'}}" >{{listdata.everyday_fuxi}}</view> | ||
52 | + <view class="new_learn left {{listdata.everyday_fuxi>listdata.everyday_new?'lowheight':'gao_height'}}">{{listdata.everyday_new}}</view> | ||
53 | + </view> | ||
54 | + | ||
55 | + | ||
56 | + </view> | ||
57 | + | ||
58 | +</view> |
1 | +/* pages/MemorizingWords/wordsReport/wordsReport.wxss */ | ||
2 | +@import "/pages/MemorizingWords/MemorizingWords.wxss"; | ||
3 | +.days{ | ||
4 | + position: relative; | ||
5 | +} | ||
6 | +.day_num{ | ||
7 | + position: absolute; | ||
8 | + top:50%; | ||
9 | + left:50%; | ||
10 | + transform: translate(-50%,-50%); | ||
11 | + font-size: 48rpx; | ||
12 | + | ||
13 | +} | ||
14 | +.plan{ | ||
15 | + border: none; | ||
16 | + font-size: 20rpx; | ||
17 | +} | ||
18 | + | ||
19 | +.words_type{ | ||
20 | + font-size: 24rpx; | ||
21 | +} | ||
22 | +.content_box { | ||
23 | + padding: 0 30rpx; | ||
24 | +} | ||
25 | + | ||
26 | +.info_box { | ||
27 | + width: 691rpx; | ||
28 | + height: 309rpx; | ||
29 | + box-sizing: border-box; | ||
30 | + background: rgba(29, 185, 250, 1); | ||
31 | + border-radius: 20rpx; | ||
32 | + margin-top: 20rpx; | ||
33 | + display: flex; | ||
34 | + align-items: center; | ||
35 | + justify-content: space-between; | ||
36 | + font-size: 24rpx; | ||
37 | + color: #3a3a3a; | ||
38 | + padding: 56rpx; | ||
39 | +} | ||
40 | + | ||
41 | +.symble_box { | ||
42 | + display: flex; | ||
43 | + align-items: flex-end; | ||
44 | +} | ||
45 | + | ||
46 | +.review1 { | ||
47 | + width: 30rpx; | ||
48 | + height: 30rpx; | ||
49 | + background: rgba(162, 224, 250, 1); | ||
50 | + margin-right: 15rpx; | ||
51 | +} | ||
52 | + | ||
53 | +.new_learn1 { | ||
54 | + width: 30rpx; | ||
55 | + height: 30rpx; | ||
56 | + background: rgba(255, 255, 255, 1); | ||
57 | + margin-right: 15rpx; | ||
58 | +} | ||
59 | + | ||
60 | +.review { | ||
61 | + width: 40rpx; | ||
62 | + height: 74rpx; | ||
63 | + background: rgba(162, 224, 250, 1); | ||
64 | + border-radius: 20rpx; | ||
65 | + font-size: 24rpx; | ||
66 | + color: #fff; | ||
67 | + display: flex; | ||
68 | + align-items: flex-end; | ||
69 | + justify-content: center; | ||
70 | + padding-bottom: 7rpx; | ||
71 | +} | ||
72 | + | ||
73 | +.new_learn { | ||
74 | + width: 40rpx; | ||
75 | + height: 146rpx; | ||
76 | + background: rgba(255, 255, 255, 1); | ||
77 | + border-radius: 20rpx; | ||
78 | + font-size: 24rpx; | ||
79 | + color: #4ac7fb; | ||
80 | + display: flex; | ||
81 | + align-items: flex-end; | ||
82 | + justify-content: center; | ||
83 | + padding-bottom: 7rpx; | ||
84 | +} | ||
85 | +.symble_box .lowheight{ | ||
86 | + height: 74rpx; | ||
87 | +} | ||
88 | +.symble_box .gao_height{ | ||
89 | + height: 146rpx; | ||
90 | +} | ||
91 | +.top { | ||
92 | + margin-bottom: 50rpx; | ||
93 | +} | ||
94 | + | ||
95 | +.left { | ||
96 | + margin-left: 37rpx; | ||
97 | +} |
pages/community/community.js
0 → 100644
1 | +// pages/community/community.js | ||
2 | +const app=getApp(); | ||
3 | +Page({ | ||
4 | + | ||
5 | + /** | ||
6 | + * 页面的初始数据 | ||
7 | + */ | ||
8 | + data: { | ||
9 | + current:0, | ||
10 | + listdata:[], | ||
11 | + slide:'', | ||
12 | + cate_id: 15//GMAT高分故事->15,资讯发布->16 | ||
13 | + }, | ||
14 | + tabCharge(e){ | ||
15 | + let that=this; | ||
16 | + if (parseInt(e.currentTarget.dataset.current) == 0){ | ||
17 | + that.setData({ | ||
18 | + current: e.currentTarget.dataset.current, | ||
19 | + cate_id:15 | ||
20 | + }) | ||
21 | + that.getdata(); | ||
22 | + } else if (parseInt(e.currentTarget.dataset.current) == 1){ | ||
23 | + that.setData({ | ||
24 | + current: e.currentTarget.dataset.current, | ||
25 | + cate_id: 16 | ||
26 | + }) | ||
27 | + that.getdata(); | ||
28 | + } | ||
29 | + }, | ||
30 | + //列表详情 | ||
31 | + listDetail(e){ | ||
32 | + wx.navigateTo({ | ||
33 | + url: '../communityDetail/communityDetail?id='+e.currentTarget.id, | ||
34 | + }) | ||
35 | + }, | ||
36 | + getdata(){ | ||
37 | + let that=this; | ||
38 | + let url ='Show/getShow6'; | ||
39 | + app.post(url, { cate_id: that.data.cate_id}).then((res)=>{ | ||
40 | + if(res.data.code==1){ | ||
41 | + that.setData({ | ||
42 | + listdata:res.data.data | ||
43 | + }) | ||
44 | + } | ||
45 | + }).catch((errMsg)=>{ | ||
46 | + console.log(errMsg) | ||
47 | + }) | ||
48 | + }, | ||
49 | + //获取banner图(1代表首页图片,2代表社区模板最上方图片) | ||
50 | + getSlide() { | ||
51 | + let that = this; | ||
52 | + let url = 'Common/getSlide'; | ||
53 | + let params = { | ||
54 | + id: 2 | ||
55 | + } | ||
56 | + app.post(url, params).then((res) => { | ||
57 | + that.setData({ | ||
58 | + slide: res.data.data[0] | ||
59 | + }) | ||
60 | + }).catch((err) => { | ||
61 | + console.log(err) | ||
62 | + }) | ||
63 | + }, | ||
64 | + /** | ||
65 | + * 生命周期函数--监听页面加载 | ||
66 | + */ | ||
67 | + onLoad: function (options) { | ||
68 | + let that=this; | ||
69 | + that.getdata(); | ||
70 | + that.getSlide(); | ||
71 | + | ||
72 | + }, | ||
73 | + | ||
74 | + /** | ||
75 | + * 生命周期函数--监听页面初次渲染完成 | ||
76 | + */ | ||
77 | + onReady: function () { | ||
78 | + | ||
79 | + }, | ||
80 | + | ||
81 | + /** | ||
82 | + * 生命周期函数--监听页面显示 | ||
83 | + */ | ||
84 | + onShow: function () { | ||
85 | + | ||
86 | + }, | ||
87 | + | ||
88 | + /** | ||
89 | + * 生命周期函数--监听页面隐藏 | ||
90 | + */ | ||
91 | + onHide: function () { | ||
92 | + | ||
93 | + }, | ||
94 | + | ||
95 | + /** | ||
96 | + * 生命周期函数--监听页面卸载 | ||
97 | + */ | ||
98 | + onUnload: function () { | ||
99 | + | ||
100 | + }, | ||
101 | + | ||
102 | + /** | ||
103 | + * 页面相关事件处理函数--监听用户下拉动作 | ||
104 | + */ | ||
105 | + onPullDownRefresh: function () { | ||
106 | + | ||
107 | + }, | ||
108 | + | ||
109 | + /** | ||
110 | + * 页面上拉触底事件的处理函数 | ||
111 | + */ | ||
112 | + onReachBottom: function () { | ||
113 | + | ||
114 | + }, | ||
115 | + | ||
116 | + /** | ||
117 | + * 用户点击右上角分享 | ||
118 | + */ | ||
119 | + onShareAppMessage: function () { | ||
120 | + | ||
121 | + } | ||
122 | +}) |
pages/community/community.json
0 → 100644
1 | +{"navigationBarTitleText": "社区"} |
pages/community/community.wxml
0 → 100644
1 | +<!--pages/community/community.wxml--> | ||
2 | +<view class='banner_box'> | ||
3 | + <view class='title'>社区</view> | ||
4 | + <navigator class='banner_img' hover-class='none' url='/pages/out/out?url={{slide.url}}'> | ||
5 | + <image src='{{slide.image}}'></image> | ||
6 | + </navigator> | ||
7 | +</view> | ||
8 | +<view class='content_box'> | ||
9 | + <view class='tab_content'> | ||
10 | + <view class='tab_box'> | ||
11 | + <view class="tab_item {{current==0?'active':''}}" data-current='0' bindtap='tabCharge'>GMAT高分故事</view> | ||
12 | + <view class="tab_item {{current==1?'active':''}}" data-current="1" bindtap='tabCharge'>资讯发布</view> | ||
13 | + </view> | ||
14 | + </view> | ||
15 | + <view class='content_item' > | ||
16 | + <block wx:if='{{listdata.length !=0}}'> | ||
17 | + <view class='item_list' bindtap='listDetail' wx:for='{{listdata}}' wx:key id='{{item.id}}'> | ||
18 | + <view> | ||
19 | + <view>{{item.title}}</view> | ||
20 | + <view class='date'>{{item.update_time}}</view> | ||
21 | + </view> | ||
22 | + <view class='iconfont icon-jiantouarrow487'></view> | ||
23 | + </view> | ||
24 | + </block> | ||
25 | + <block wx:else> | ||
26 | + <view class='nodata'>暂无数据</view> | ||
27 | + </block> | ||
28 | + </view> | ||
29 | +</view> |
pages/community/community.wxss
0 → 100644
1 | +/* pages/community/community.wxss */ | ||
2 | + | ||
3 | +page { | ||
4 | + background: #fafafa; | ||
5 | +} | ||
6 | + | ||
7 | +.banner_box { | ||
8 | + background: #fff; | ||
9 | + padding: 30rpx; | ||
10 | + /* position: fixed; */ | ||
11 | +} | ||
12 | + | ||
13 | +.title { | ||
14 | + font-size: 48rpx; | ||
15 | + font-weight: bold; | ||
16 | + color: #1a1a1a; | ||
17 | +} | ||
18 | + | ||
19 | +.banner_img { | ||
20 | + width: 100%; | ||
21 | + height: 340rpx; | ||
22 | + display: flex; | ||
23 | + align-items: center; | ||
24 | + justify-content: center; | ||
25 | + margin-top: 34rpx; | ||
26 | + border-radius: 10rpx; | ||
27 | + overflow: hidden; | ||
28 | +} | ||
29 | + | ||
30 | +.banner_img image { | ||
31 | + width: 100%; | ||
32 | + height: 100%; | ||
33 | +} | ||
34 | + | ||
35 | +.content_box { | ||
36 | + background: #fff; | ||
37 | + padding: 0 30rpx; | ||
38 | + margin-top: 20rpx; | ||
39 | +} | ||
40 | +.tab_content{ | ||
41 | + padding: 0 20rpx; | ||
42 | +} | ||
43 | +.tab_box { | ||
44 | + display: flex; | ||
45 | + align-items: center; | ||
46 | + justify-content: space-between; | ||
47 | + border-bottom: 1rpx solid #ebebeb; | ||
48 | + padding: 30rpx 100rpx; | ||
49 | +} | ||
50 | + | ||
51 | +.tab_item { | ||
52 | + font-size: 28rpx; | ||
53 | + color: #666; | ||
54 | + position: relative; | ||
55 | +} | ||
56 | + | ||
57 | +.tab_item.active { | ||
58 | + font-size: 32rpx; | ||
59 | + color: #1db9fa; | ||
60 | +} | ||
61 | + | ||
62 | +.tab_item.active::after { | ||
63 | + content: ""; | ||
64 | + width: 62rpx; | ||
65 | + height: 8rpx; | ||
66 | + background: rgba(29, 185, 250, 1); | ||
67 | + border-radius: 3rpx; | ||
68 | + position: absolute; | ||
69 | + bottom: -30rpx; | ||
70 | + left: 50%; | ||
71 | + transform: translateX(-50%); | ||
72 | +} | ||
73 | + | ||
74 | +.item_list { | ||
75 | + background: rgba(245, 248, 252, 1); | ||
76 | + border-radius: 10rpx; | ||
77 | + margin-top: 20rpx; | ||
78 | + font-size: 28rpx; | ||
79 | + color: #000000; | ||
80 | + display: flex; | ||
81 | + align-items: center; | ||
82 | + justify-content: space-between; | ||
83 | + padding: 30rpx; | ||
84 | +} | ||
85 | +.date{ | ||
86 | + font-size: 28rpx; | ||
87 | + color: #999999; | ||
88 | + margin-top: 10rpx; | ||
89 | +} | ||
90 | +.icon-jiantouarrow487{ | ||
91 | + color: #ccc; | ||
92 | +} | ||
93 | +.content_item{ | ||
94 | + padding-bottom: 20rpx; | ||
95 | +} |
pages/communityDetail/communityDetail.js
0 → 100644
1 | + | ||
2 | +const app = getApp(); | ||
3 | +var wxParse = require("../../wxParse/wxParse.js") | ||
4 | +Page({ | ||
5 | + /** | ||
6 | + * 页面的初始数据 | ||
7 | + */ | ||
8 | + data: { | ||
9 | + listdata: [] | ||
10 | + }, | ||
11 | + getdata(id) { | ||
12 | + let that = this; | ||
13 | + let url = 'Show/getShow6Detail'; | ||
14 | + app.post(url, { id: id }).then((res) => { | ||
15 | + console.log(res) | ||
16 | + if (res.data.code == 1) { | ||
17 | + that.setData({ | ||
18 | + listdata: res.data.data | ||
19 | + }) | ||
20 | + wx.setNavigationBarTitle({ | ||
21 | + title: res.data.data.title | ||
22 | + }) | ||
23 | + wxParse.wxParse('content', 'html', res.data.data.content, that, 5) | ||
24 | + } | ||
25 | + }).catch((errMsg) => { | ||
26 | + console.log(errMsg) | ||
27 | + }) | ||
28 | + }, | ||
29 | + /** | ||
30 | + * 生命周期函数--监听页面加载 | ||
31 | + */ | ||
32 | + onLoad: function (options) { | ||
33 | + let that = this; | ||
34 | + that.getdata(options.id); | ||
35 | + }, | ||
36 | + | ||
37 | + /** | ||
38 | + * 生命周期函数--监听页面初次渲染完成 | ||
39 | + */ | ||
40 | + onReady: function () { | ||
41 | + | ||
42 | + }, | ||
43 | + | ||
44 | + /** | ||
45 | + * 生命周期函数--监听页面显示 | ||
46 | + */ | ||
47 | + onShow: function () { | ||
48 | + | ||
49 | + }, | ||
50 | + | ||
51 | + /** | ||
52 | + * 生命周期函数--监听页面隐藏 | ||
53 | + */ | ||
54 | + onHide: function () { | ||
55 | + | ||
56 | + }, | ||
57 | + | ||
58 | + /** | ||
59 | + * 生命周期函数--监听页面卸载 | ||
60 | + */ | ||
61 | + onUnload: function () { | ||
62 | + | ||
63 | + }, | ||
64 | + | ||
65 | + /** | ||
66 | + * 页面相关事件处理函数--监听用户下拉动作 | ||
67 | + */ | ||
68 | + onPullDownRefresh: function () { | ||
69 | + | ||
70 | + }, | ||
71 | + | ||
72 | + /** | ||
73 | + * 页面上拉触底事件的处理函数 | ||
74 | + */ | ||
75 | + onReachBottom: function () { | ||
76 | + | ||
77 | + }, | ||
78 | + | ||
79 | + /** | ||
80 | + * 用户点击右上角分享 | ||
81 | + */ | ||
82 | + onShareAppMessage: function () { | ||
83 | + | ||
84 | + } | ||
85 | +}) |
pages/communityDetail/communityDetail.json
0 → 100644
1 | +{"navigationBarTitleText": "社区文章详情"} |
pages/communityDetail/communityDetail.wxml
0 → 100644
1 | +<!--pages/communityDetail/communityDetail.wxml--> | ||
2 | +<view class='null_box'></view> | ||
3 | + | ||
4 | +<view class='content_box'> | ||
5 | + <view> | ||
6 | + <view class='title'>{{listdata.title}}</view> | ||
7 | + <view class='content'> | ||
8 | + <import src="../../wxParse/wxParse.wxml" /> | ||
9 | + <template is='wxParse' data='{{wxParseData:content.nodes}}' /> | ||
10 | + </view> | ||
11 | + <view class='date'>{{listdata.update_time}}</view> | ||
12 | + </view> | ||
13 | +</view> |
pages/communityDetail/communityDetail.wxss
0 → 100644
1 | +/* pages/communityDetail/communityDetail.wxss */ | ||
2 | +@import "/pages/index/goldArticle/goldArticle.wxss"; | ||
3 | +.title { | ||
4 | + font-size: 36rpx; | ||
5 | + font-weight: bold; | ||
6 | + color: #1a1a1a; | ||
7 | + text-align: center; | ||
8 | + margin-top: 20rpx; | ||
9 | +} | ||
10 | +.content { | ||
11 | + font-size: 26rpx; | ||
12 | + color: #666; | ||
13 | + margin-top: 49rpx; | ||
14 | + line-height: 50rpx; | ||
15 | + box-sizing: border-box; | ||
16 | +} | ||
17 | +.content image{ | ||
18 | + width:100%; | ||
19 | +} | ||
20 | +.date { | ||
21 | + font-size: 30rpx; | ||
22 | + color: #707070; | ||
23 | + text-align: right; | ||
24 | + margin-top: 92rpx; | ||
25 | +} |
pages/contact/contact.js
0 → 100644
1 | +// pages/contact/contact.js | ||
2 | +Page({ | ||
3 | + | ||
4 | + /** | ||
5 | + * 页面的初始数据 | ||
6 | + */ | ||
7 | + data: { | ||
8 | + | ||
9 | + }, | ||
10 | + tel(){ | ||
11 | + wx.showModal({ | ||
12 | + title: '提示', | ||
13 | + content: '是否拨打客服400-728-0020', | ||
14 | + showCancel: true, | ||
15 | + cancelText: '取消', | ||
16 | + cancelColor: '', | ||
17 | + confirmText: '确定', | ||
18 | + confirmColor: '', | ||
19 | + success: function(res) { | ||
20 | + wx.makePhoneCall({ | ||
21 | + phoneNumber: '400-728-0020', | ||
22 | + }) | ||
23 | + }, | ||
24 | + fail: function(res) {}, | ||
25 | + complete: function(res) { | ||
26 | + }, | ||
27 | + }) | ||
28 | + | ||
29 | + }, | ||
30 | + gomy(){ | ||
31 | + wx.switchTab({ | ||
32 | + url: '/pages/my/my', | ||
33 | + }) | ||
34 | + }, | ||
35 | + | ||
36 | + /** | ||
37 | + * 生命周期函数--监听页面加载 | ||
38 | + */ | ||
39 | + onLoad: function (options) { | ||
40 | + | ||
41 | + }, | ||
42 | + | ||
43 | + /** | ||
44 | + * 生命周期函数--监听页面初次渲染完成 | ||
45 | + */ | ||
46 | + onReady: function () { | ||
47 | + | ||
48 | + }, | ||
49 | + | ||
50 | + /** | ||
51 | + * 生命周期函数--监听页面显示 | ||
52 | + */ | ||
53 | + onShow: function () { | ||
54 | + | ||
55 | + }, | ||
56 | + | ||
57 | + /** | ||
58 | + * 生命周期函数--监听页面隐藏 | ||
59 | + */ | ||
60 | + onHide: function () { | ||
61 | + | ||
62 | + }, | ||
63 | + | ||
64 | + /** | ||
65 | + * 生命周期函数--监听页面卸载 | ||
66 | + */ | ||
67 | + onUnload: function () { | ||
68 | + | ||
69 | + }, | ||
70 | + | ||
71 | + /** | ||
72 | + * 页面相关事件处理函数--监听用户下拉动作 | ||
73 | + */ | ||
74 | + onPullDownRefresh: function () { | ||
75 | + | ||
76 | + }, | ||
77 | + | ||
78 | + /** | ||
79 | + * 页面上拉触底事件的处理函数 | ||
80 | + */ | ||
81 | + onReachBottom: function () { | ||
82 | + | ||
83 | + }, | ||
84 | + | ||
85 | + /** | ||
86 | + * 用户点击右上角分享 | ||
87 | + */ | ||
88 | + onShareAppMessage: function () { | ||
89 | + | ||
90 | + } | ||
91 | +}) |
pages/contact/contact.json
0 → 100644
1 | +{"navigationBarTitleText": "单词小程序"} |
pages/contact/contact.wxml
0 → 100644
1 | +<!--pages/contact/contact.wxml--> | ||
2 | +<view bindtap='tel'>全国统一客服:400-728-0020</view> | ||
3 | +<view>大仙课程咨询:</view> | ||
4 | +<view>KEVAN老师微信:18001662020</view> | ||
5 | +<view>小林老师微信:15618952569</view> | ||
6 | +<view>E-MAIL:service@igmat.cn</view> | ||
7 | +<view>地址:上海静安区南京西路580号40层4003室</view> | ||
8 | +<view class='btn' bindtap='gomy'>返回</view> | ||
9 | + |
pages/contact/contact.wxss
0 → 100644
1 | +/* pages/contact/contact.wxss */ | ||
2 | +page{ | ||
3 | + background: linear-gradient(#1fbbfa,#6cf0f9); | ||
4 | + padding:30rpx; | ||
5 | + box-sizing: border-box; | ||
6 | + color:#fff; | ||
7 | + font-size:32rpx; | ||
8 | + line-height: 3; | ||
9 | + text-align: center; | ||
10 | +} | ||
11 | +.btn{ | ||
12 | +margin: 160rpx auto 0 auto; | ||
13 | +font-size:32rpx; | ||
14 | +color:#fff; | ||
15 | +width:520rpx; | ||
16 | +height:80rpx; | ||
17 | +background:#1fbbfa; | ||
18 | +border-radius:40rpx; | ||
19 | +display:flex; | ||
20 | +align-items:center; | ||
21 | +justify-content:center; | ||
22 | + | ||
23 | + | ||
24 | +} | ||
25 | +.btn:active{ | ||
26 | + opacity: 0.7; | ||
27 | +} |
pages/course/course.js
0 → 100644
1 | +// pages/course/course.js | ||
2 | +const app = getApp() | ||
3 | +Page({ | ||
4 | + data: { | ||
5 | + imgsUrls:[], | ||
6 | + currentindex: 0, | ||
7 | + current: 0, | ||
8 | + cate_id: 8,//备考策略->8,解题方法->9,经典系列->10 | ||
9 | + listinfo:[], | ||
10 | + }, | ||
11 | + handleChange(e) { | ||
12 | + this.setData({ | ||
13 | + currentindex: e.detail.current | ||
14 | + }) | ||
15 | + }, | ||
16 | + chargeTab(e) { | ||
17 | + this.setData({ | ||
18 | + current: e.currentTarget.dataset.current | ||
19 | + }) | ||
20 | + if (this.data.current == 0) { | ||
21 | + this.setData({ | ||
22 | + cate_id: 8 | ||
23 | + }) | ||
24 | + this.testStrategy() | ||
25 | + } else if (this.data.current == 1) { | ||
26 | + this.setData({ | ||
27 | + cate_id: 9 | ||
28 | + }) | ||
29 | + this.testStrategy() | ||
30 | + } else if (this.data.current == 2) { | ||
31 | + this.setData({ | ||
32 | + cate_id: 10 | ||
33 | + }) | ||
34 | + this.testStrategy() | ||
35 | + } | ||
36 | + }, | ||
37 | + courseDetail(e) { | ||
38 | + var id=e.currentTarget.dataset.id | ||
39 | + wx.navigateTo({ | ||
40 | + url: '../course/courseDetail/courseDetail?id='+id, | ||
41 | + }) | ||
42 | + }, | ||
43 | + //获取听大仙讲GMAT列表 | ||
44 | + //备考策略->8,解题方法->9,经典系列->10 | ||
45 | + testStrategy() { | ||
46 | + let url = 'Show/getShow1' | ||
47 | + let params = { | ||
48 | + cate_id: this.data.cate_id | ||
49 | + } | ||
50 | + app.post(url, params).then((res) => { | ||
51 | + if(res.data.code==1){ | ||
52 | + this.setData({ | ||
53 | + listinfo:res.data.data | ||
54 | + }) | ||
55 | + } | ||
56 | + }).catch((errMsg)=>{ | ||
57 | + console.log(errMsg) | ||
58 | + }) | ||
59 | + }, | ||
60 | + //获取听大仙讲GMATbanner | ||
61 | + GMATbanner(){ | ||
62 | + let that=this; | ||
63 | + let url ='Show/getShow7'; | ||
64 | + app.post(url,{}).then((res)=>{ | ||
65 | + console.log(res) | ||
66 | + if(res.data.code==1){ | ||
67 | + that.setData({ | ||
68 | + imgsUrls:res.data.data | ||
69 | + }) | ||
70 | + } | ||
71 | + }).catch((errMsg)=>{ | ||
72 | + console.log(errMsg) | ||
73 | + }) | ||
74 | + }, | ||
75 | + | ||
76 | + | ||
77 | + /** | ||
78 | + * 生命周期函数--监听页面加载 | ||
79 | + */ | ||
80 | + onLoad: function(options) { | ||
81 | + let that=this; | ||
82 | + this.testStrategy(); | ||
83 | + that.GMATbanner(); | ||
84 | + }, | ||
85 | + | ||
86 | + /** | ||
87 | + * 生命周期函数--监听页面初次渲染完成 | ||
88 | + */ | ||
89 | + onReady: function() { | ||
90 | + | ||
91 | + }, | ||
92 | + | ||
93 | + /** | ||
94 | + * 生命周期函数--监听页面显示 | ||
95 | + */ | ||
96 | + onShow: function() { | ||
97 | + }, | ||
98 | + | ||
99 | + /** | ||
100 | + * 生命周期函数--监听页面隐藏 | ||
101 | + */ | ||
102 | + onHide: function() { | ||
103 | + | ||
104 | + }, | ||
105 | + | ||
106 | + /** | ||
107 | + * 生命周期函数--监听页面卸载 | ||
108 | + */ | ||
109 | + onUnload: function() { | ||
110 | + | ||
111 | + }, | ||
112 | + | ||
113 | + /** | ||
114 | + * 页面相关事件处理函数--监听用户下拉动作 | ||
115 | + */ | ||
116 | + onPullDownRefresh: function() { | ||
117 | + | ||
118 | + }, | ||
119 | + | ||
120 | + /** | ||
121 | + * 页面上拉触底事件的处理函数 | ||
122 | + */ | ||
123 | + onReachBottom: function() { | ||
124 | + | ||
125 | + }, | ||
126 | + | ||
127 | + /** | ||
128 | + * 用户点击右上角分享 | ||
129 | + */ | ||
130 | + onShareAppMessage: function() { | ||
131 | + | ||
132 | + } | ||
133 | +}) |
-
请 注册 或 登录 后发表评论