Commit aaa7c9b960085e89553b6d452033c0ad2f70c26b
Exists in
master
and in
2 other branches
Merge branch 'master' of https://git.healthbaby.com.cn/luoye/littleapp_child
* 'master' of https://git.healthbaby.com.cn/luoye/littleapp_child: 反馈页面 我的收藏页面和反馈页面 旋转 # Conflicts: # littleApp_child/app.json
Showing 14 changed files
- littleApp_child/app.json
- littleApp_child/pages/childcare_knowledge/childcare_knowledge.js
- littleApp_child/pages/childcare_knowledge/childcare_knowledge.wxml
- littleApp_child/pages/childcare_knowledge/childcare_knowledge.wxss
- littleApp_child/pages/feedback/feedback.js
- littleApp_child/pages/feedback/feedback.json
- littleApp_child/pages/feedback/feedback.wxml
- littleApp_child/pages/feedback/feedback.wxss
- littleApp_child/pages/mySaved/mySaved.js
- littleApp_child/pages/mySaved/mySaved.json
- littleApp_child/pages/mySaved/mySaved.wxml
- littleApp_child/pages/mySaved/mySaved.wxss
- littleApp_child/source/save_not.png
- littleApp_child/utils/network_util.js
littleApp_child/app.json
View file @
aaa7c9b
1 | 1 | { |
2 | 2 | "pages": [ |
3 | + | |
3 | 4 | "pages/home/home", |
4 | 5 | "pages/Setting/Setting", |
5 | 6 | "pages/PersonalInfo/PersonalInfo", |
6 | 7 | "pages/checkTabList/checkTabList", |
7 | - | |
8 | + "pages/feedback/feedback", | |
9 | + "pages/mySaved/mySaved", | |
8 | 10 | "pages/CheckReport/CheckReport", |
9 | 11 | "pages/articleLists/articleLists", |
10 | 12 |
littleApp_child/pages/childcare_knowledge/childcare_knowledge.js
View file @
aaa7c9b
... | ... | @@ -12,7 +12,9 @@ |
12 | 12 | var app = getApp() |
13 | 13 | |
14 | 14 | var pageLimit=15 |
15 | - | |
15 | +var animation1 = wx.createAnimation({ | |
16 | + duration:1000 | |
17 | +}) | |
16 | 18 | Page({ |
17 | 19 | data: { |
18 | 20 | list: [ |
... | ... | @@ -33,6 +35,7 @@ |
33 | 35 | titles: [],//"日常护理", "营养美食", "疾病护理", "亲子互动", "言传身教" |
34 | 36 | category:'', |
35 | 37 | current_index:0, |
38 | + animationData:{}, | |
36 | 39 | swiperHeight:0 |
37 | 40 | }, |
38 | 41 | onLoad: function (e) { |
... | ... | @@ -81,7 +84,17 @@ |
81 | 84 | list: [], |
82 | 85 | |
83 | 86 | }) |
84 | - | |
87 | + animation1 = wx.createAnimation({ | |
88 | + duration: 1000 | |
89 | + }) | |
90 | + animation1.rotate(720).step() | |
91 | + | |
92 | + this.setData({ | |
93 | + animationData: animation1.export() | |
94 | + }) | |
95 | + | |
96 | + | |
97 | + | |
85 | 98 | networkUtil.showLoading() |
86 | 99 | // 网络请求,重新请求一遍数据 |
87 | 100 | this.requestData(); |
88 | 101 | |
89 | 102 | |
... | ... | @@ -144,9 +157,25 @@ |
144 | 157 | list:arr, |
145 | 158 | hasMore: hasMore |
146 | 159 | }) |
160 | + // var that = this; | |
161 | + setTimeout(function () { | |
162 | + animation1.rotate(0).step({ duration: 0, transformOrigin: "50%,50%", timingFunction: 'linear' }) | |
163 | + self.setData({ | |
164 | + animationData: animation1.export() | |
165 | + }) | |
166 | + }, 300) | |
167 | + | |
147 | 168 | },function(res){ |
148 | 169 | isRefresh = false |
170 | + setTimeout(function () { | |
171 | + animation1.rotate(0).step({ duration: 0, transformOrigin: "50%,50%", timingFunction: 'linear' }) | |
172 | + self.setData({ | |
173 | + animationData: animation1.export() | |
174 | + }) | |
175 | + }, 300) | |
149 | 176 | }) |
177 | + | |
178 | + | |
150 | 179 | }, |
151 | 180 | // 文章点赞 |
152 | 181 | articleLike: function (e){ |
littleApp_child/pages/childcare_knowledge/childcare_knowledge.wxml
View file @
aaa7c9b
littleApp_child/pages/childcare_knowledge/childcare_knowledge.wxss
View file @
aaa7c9b
littleApp_child/pages/feedback/feedback.js
View file @
aaa7c9b
1 | +//hospitalList.js 医院列表 联系医院 | |
2 | + | |
3 | +// 网络请求工具类 | |
4 | +var networkUtil = require('../../utils/network_util.js') | |
5 | +var api = require('../../utils/apiFile.js') | |
6 | + | |
7 | +// 页码 | |
8 | +var page = 0 | |
9 | +// 地理位置信息 | |
10 | +var latitude = 0 | |
11 | +var longitude = 0 | |
12 | +// 是否有更多 | |
13 | +var hasMore = true | |
14 | + | |
15 | +Page({ | |
16 | + data: { | |
17 | + chooseOne: 0, | |
18 | + chooseTwo: 0, | |
19 | + chooseThree: 0, | |
20 | + content: "" | |
21 | + | |
22 | + }, | |
23 | + chooseOne: function () { | |
24 | + this.setData({ | |
25 | + chooseOne: 1, | |
26 | + chooseTwo: 0, | |
27 | + chooseThree: 0, | |
28 | + }) | |
29 | + }, | |
30 | + chooseTwo: function () { | |
31 | + this.setData({ | |
32 | + chooseOne: 0, | |
33 | + chooseTwo: 1, | |
34 | + chooseThree: 0, | |
35 | + }) | |
36 | + }, | |
37 | + chooseThree: function () { | |
38 | + this.setData({ | |
39 | + chooseOne: 0, | |
40 | + chooseTwo: 0, | |
41 | + chooseThree: 1, | |
42 | + }) | |
43 | + }, | |
44 | + inputOver: function (e) { | |
45 | + | |
46 | + var value = e.detail.value | |
47 | + this.setData({ | |
48 | + content: value | |
49 | + }) | |
50 | + }, | |
51 | + submit: function () { | |
52 | + console.log(this.data.content) | |
53 | + } | |
54 | +}) |
littleApp_child/pages/feedback/feedback.json
View file @
aaa7c9b
littleApp_child/pages/feedback/feedback.wxml
View file @
aaa7c9b
1 | +<!--hospitalList.wxml 医院列表 联系医院--> | |
2 | +<view class="main"> | |
3 | + | |
4 | + <view class="content"> | |
5 | + <textarea placeholder="写下你的意见或建议..." bindinput="inputOver" /> | |
6 | + <view class="feedback_type"> | |
7 | + <view class="type_text">选择反馈类型</view> | |
8 | + <view style="display: flex;margin-top:10px;"> | |
9 | + <view class="type_choose1" bindtap="chooseOne"> | |
10 | + <image class="img" src="../../source/{{chooseOne==1 ? 'save_not.png':'like.png'}}"></image> | |
11 | + <text class="choose_text1">无法正常使用</text> | |
12 | + </view> | |
13 | + <view class="type_choose2" bindtap="chooseTwo"> | |
14 | + <image class="img" src="../../source/{{chooseTwo==1 ? 'save_not.png':'like.png'}}"></image> | |
15 | + <text class="choose_text2">内容意见</text> | |
16 | + </view> | |
17 | + <view class="type_choose2" bindtap="chooseThree"> | |
18 | + <image class="img" src="../../source/{{chooseThree==1 ? 'save_not.png':'like.png'}}"></image> | |
19 | + <text class="choose_text2">其他反馈</text> | |
20 | + </view> | |
21 | + </view> | |
22 | + </view> | |
23 | + </view> | |
24 | + | |
25 | +</view> | |
26 | + | |
27 | +<button class="delete_bt2" bindtap="submit">提交</button> |
littleApp_child/pages/feedback/feedback.wxss
View file @
aaa7c9b
1 | +.main { | |
2 | + width: 100%; | |
3 | + background: white; | |
4 | + height: 100%; | |
5 | +} | |
6 | + | |
7 | +.content { | |
8 | + margin-left: 10px; | |
9 | + font-size: 10pt; | |
10 | + padding-top: 10px; | |
11 | + padding-right: 20px; | |
12 | +} | |
13 | + | |
14 | +textarea { | |
15 | + border: 1px solid #e6e6e6; | |
16 | + border-radius: 4px; | |
17 | + width: 100%; | |
18 | + height: 120px; | |
19 | + font-size: 14px; | |
20 | + color: #888; | |
21 | + padding: 5px; | |
22 | +} | |
23 | + | |
24 | +/*占位符样式*/ | |
25 | + | |
26 | +.placeholdText { | |
27 | + font-size: 2em; | |
28 | +} | |
29 | + | |
30 | +.delete_bt2 { | |
31 | + background: #48c17b; | |
32 | + border-radius: 100px; | |
33 | + position: fixed; | |
34 | + color: white; | |
35 | + font-size: 14px; | |
36 | + bottom: 20px; | |
37 | + left: 10px; | |
38 | + right: 10px; | |
39 | + height: 36px; | |
40 | +} | |
41 | + | |
42 | +.feedback_type { | |
43 | + margin-top: 10px; | |
44 | + padding: 5px; | |
45 | + width: 100%; | |
46 | + border-radius: 4px; | |
47 | + height: 64px; | |
48 | + border: 1px solid #e6e6e6; | |
49 | +} | |
50 | + | |
51 | +.type_text { | |
52 | + font-size: 12px; | |
53 | + color: #999; | |
54 | +} | |
55 | + | |
56 | +.type_choose1 { | |
57 | + width: 40%; | |
58 | + display: flex; | |
59 | +} | |
60 | + | |
61 | +.type_choose2 { | |
62 | + width: 30%; | |
63 | + display: flex; | |
64 | +} | |
65 | + | |
66 | +.img { | |
67 | + width: 20px; | |
68 | + height: 20px; | |
69 | +} | |
70 | + | |
71 | +.choose_text { | |
72 | + font-size: 14px; | |
73 | + color: #333; | |
74 | +} |
littleApp_child/pages/mySaved/mySaved.js
View file @
aaa7c9b
1 | +//hospitalList.js 医院列表 联系医院 | |
2 | + | |
3 | +// 网络请求工具类 | |
4 | +var networkUtil = require('../../utils/network_util.js') | |
5 | +var api = require('../../utils/apiFile.js') | |
6 | + | |
7 | +// 页码 | |
8 | +var page = 0 | |
9 | +// 地理位置信息 | |
10 | +var latitude = 0 | |
11 | +var longitude = 0 | |
12 | +// 是否有更多 | |
13 | +var hasMore = true | |
14 | + | |
15 | +Page({ | |
16 | + data: { | |
17 | + list: [ | |
18 | + { | |
19 | + checked: false, id: 1, title: "title1", introduction: "introductionintroductionintroductionintroductionintroductionintroductionintroduction", isLike: 1, likeCount:2,image:{ | |
20 | + medium:"https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=4131634322,487666839&fm=26&gp=0.jpg" | |
21 | + | |
22 | + } }, | |
23 | + { | |
24 | + checked: false, id: 2, title: "title2", introduction: "introduction", isLike: 1, likeCount: 2, image: { | |
25 | + medium: "https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=4131634322,487666839&fm=26&gp=0.jpg" | |
26 | + | |
27 | + } }, | |
28 | + { | |
29 | + checked: false, id: 3, title: "title1", introduction: "introduction", isLike: 1, likeCount: 2, image: { | |
30 | + medium: "https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=4131634322,487666839&fm=26&gp=0.jpg" | |
31 | + | |
32 | + } }, | |
33 | + { | |
34 | + checked: false, id: 4, title: "title2", introduction: "introduction", isLike: 1, likeCount: 2, image: { | |
35 | + medium: "https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=4131634322,487666839&fm=26&gp=0.jpg" | |
36 | + | |
37 | + } }, | |
38 | + | |
39 | + { | |
40 | + checked: false, id: 5, title: "title1", introduction: "introduction", isLike: 1, likeCount: 2, image: { | |
41 | + medium: "https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=4131634322,487666839&fm=26&gp=0.jpg" | |
42 | + | |
43 | + } }, | |
44 | + { | |
45 | + checked: false, id: 6, title: "title2", introduction: "introduction", isLike: 1, likeCount: 2, image: { | |
46 | + medium: "https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=4131634322,487666839&fm=26&gp=0.jpg" | |
47 | + | |
48 | + } }, | |
49 | + { | |
50 | + checked: false, id: 7, title: "title1", introduction: "introduction", isLike: 1, likeCount: 2, image: { | |
51 | + medium: "https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=4131634322,487666839&fm=26&gp=0.jpg" | |
52 | + | |
53 | + } }, | |
54 | + { | |
55 | + checked: false, id: 8, title: "title2", introduction: "introduction", isLike: 1, likeCount: 2, image: { | |
56 | + medium: "https://ss1.bdstatic.com/70cFvXSh_Q1YnxGkpoWK1HF6hhy/it/u=4131634322,487666839&fm=26&gp=0.jpg" | |
57 | + | |
58 | + } }, | |
59 | + | |
60 | + ], | |
61 | + isShowCheckbox: false, | |
62 | + }, | |
63 | + /*---------生命周期--------*/ | |
64 | + onLoad: function () { | |
65 | + | |
66 | + | |
67 | + }, | |
68 | + checkboxChange: function (e) { | |
69 | + console.log(e) | |
70 | + if (this.data.isShowCheckbox){ | |
71 | + var self = this | |
72 | + var id = e.target.dataset.id | |
73 | + var checked = e.target.dataset.checked ? false : true | |
74 | + console.log(this.data.list) | |
75 | + for (var i = 0; i < this.data.list.length; i++) { | |
76 | + if (id == this.data.list[i].id) { | |
77 | + this.data.list[i].checked = checked | |
78 | + } | |
79 | + } | |
80 | + // console.log(this.data.list) | |
81 | + this.setData({ | |
82 | + list: this.data.list | |
83 | + }) | |
84 | + } | |
85 | + | |
86 | + }, | |
87 | + showChoose: function (e) { | |
88 | + var self = this | |
89 | + var isShowCheckbox = !self.data.isShowCheckbox | |
90 | + | |
91 | + self.setData({ | |
92 | + isShowCheckbox: isShowCheckbox | |
93 | + }) | |
94 | + }, | |
95 | + chooseAll: function (e) { | |
96 | + var list = this.data.list | |
97 | + for (var i = 0; i < list.length; i++) { | |
98 | + list[i].checked = true | |
99 | + } | |
100 | + this.setData({ | |
101 | + list: list | |
102 | + }) | |
103 | + }, | |
104 | + cancle: function (e) { | |
105 | + var self = this | |
106 | + var list = this.data.list | |
107 | + for (var i = 0; i < list.length; i++) { | |
108 | + list[i].checked = false | |
109 | + } | |
110 | + var isShowCheckbox = !self.data.isShowCheckbox | |
111 | + | |
112 | + self.setData({ | |
113 | + isShowCheckbox: isShowCheckbox, | |
114 | + list: list | |
115 | + }) | |
116 | + }, | |
117 | + deleteAll: function (e) { | |
118 | + | |
119 | + } | |
120 | +}) |
littleApp_child/pages/mySaved/mySaved.json
View file @
aaa7c9b
littleApp_child/pages/mySaved/mySaved.wxml
View file @
aaa7c9b
1 | +<!--hospitalList.wxml 医院列表 联系医院--> | |
2 | +<view class="main"> | |
3 | + | |
4 | + <scroll-view scroll-y="true" style="height: 100%;" bindscrolltolower="loadMore"> | |
5 | + <!--list的item--> | |
6 | + <view class=""> | |
7 | + <view wx:for="{{list}}" style="display: flex"> | |
8 | + | |
9 | + <image wx:if="{{isShowCheckbox}}" class="check_image" src="../../source/{{item.checked ? 'like.png' :'save_not.png'}}" bindtap="checkboxChange" data-id="{{item.id}}" data-checked="{{item.checked}}"></image> | |
10 | + <view class="content_item"> | |
11 | + <view style="margin-right:75px;"> | |
12 | + <view class="content_title">{{item.title}}</view> | |
13 | + <view class="content_content">{{item.introduction}}</view> | |
14 | + <view class="zarparent_box"> | |
15 | + | |
16 | + <view class="zar_box" catchtap="articleLike" data-id="{{item.id}}" data-index="{{index}}"> | |
17 | + <image class="zar_img" src="../../source/{{item.isLike == 1 ? 'zanguo.png' : 'like.png'}}"></image> | |
18 | + <view class="content_zar">{{item.likeCount}}</view> | |
19 | + </view> | |
20 | + <view class="zar_box"> | |
21 | + <image class="zar_img" src="../../source/{{item.isLike == 1 ? 'save_not.png' : 'like.png'}}"></image> | |
22 | + <view class="content_zar">{{item.likeCount}}</view> | |
23 | + </view> | |
24 | + <view class="tags_view" > | |
25 | + <view class="tags1">新生儿</view> | |
26 | + <view class="tags1">健康宝宝</view> | |
27 | + </view> | |
28 | + </view> | |
29 | + | |
30 | + </view> | |
31 | + <image class="content_image" mode="aspectFill" src="{{item.image.medium}}"></image> | |
32 | + <view class="home__list-item__bottom"></view> | |
33 | + </view> | |
34 | + | |
35 | + | |
36 | + </view> | |
37 | + | |
38 | + <view class="loadMoreView" wx:if="{{hasMore}}">加载更多...</view> | |
39 | + </view> | |
40 | + | |
41 | + </scroll-view> | |
42 | + | |
43 | + <view wx:if="{{isShowCheckbox}}" class="bottom_view"> | |
44 | + <view class="chooseAll" bindtap="chooseAll">全选</view> | |
45 | + <view class="chooseAll" bindtap="cancle">取消</view> | |
46 | + <view class="delete_bt" bindtap="deleteAll">删除</view> | |
47 | + </view> | |
48 | + <button wx:if="{{!isShowCheckbox}}" class="delete_bt2" bindtap="showChoose">删除</button> | |
49 | +</view> |
littleApp_child/pages/mySaved/mySaved.wxss
View file @
aaa7c9b
1 | +.main { | |
2 | + background: white; | |
3 | + height: 100%; | |
4 | + width: 100%; | |
5 | +} | |
6 | + | |
7 | +.check_image { | |
8 | + width: 20px; | |
9 | + height: 20px; | |
10 | + margin-left: 10px; | |
11 | + transform: translateY(-55px); | |
12 | +} | |
13 | + | |
14 | +.content_item { | |
15 | + width: 100%; | |
16 | + height: 90px; | |
17 | + right: 75px; | |
18 | + margin-left: 10px; | |
19 | + position: flex; | |
20 | +} | |
21 | + | |
22 | +.content_title { | |
23 | + font-family: PingFangSC-Regular; | |
24 | + font-size: 14px; | |
25 | + padding-top: 7px; | |
26 | + color: #222; | |
27 | + display: -webkit-box; | |
28 | + -webkit-box-orient: vertical; | |
29 | + -webkit-line-clamp: 1; | |
30 | + overflow: hidden; | |
31 | +} | |
32 | + | |
33 | +.content_content { | |
34 | + height: 36px; | |
35 | + font-family: PingFangSC-Regular; | |
36 | + font-size: 12px; | |
37 | + color: #888; | |
38 | + line-height: 18px; | |
39 | + display: -webkit-box; | |
40 | + overflow: hidden; | |
41 | + text-overflow: ellipsis; | |
42 | + word-break: break-all; | |
43 | + -webkit-box-orient: vertical; | |
44 | + -webkit-line-clamp: 2; | |
45 | +} | |
46 | + | |
47 | +.content_image { | |
48 | + width: 50px; | |
49 | + transform: translateY(-75px); | |
50 | + float: right; | |
51 | + margin-right: 15px; | |
52 | + height: 50px; | |
53 | + position: absolute; | |
54 | + right: 0px; | |
55 | +} | |
56 | + | |
57 | +.zarparent_box { | |
58 | + display: flex; | |
59 | +} | |
60 | + | |
61 | +.zar_box { | |
62 | + display: flex; | |
63 | + margin-left: -5px; | |
64 | + width: 50px; | |
65 | +} | |
66 | + | |
67 | +.zar_img { | |
68 | + width: 25px; | |
69 | + height: 25px; | |
70 | +} | |
71 | + | |
72 | +.save_img { | |
73 | + width: 25px; | |
74 | + height: 25px; | |
75 | +} | |
76 | + | |
77 | +.content_zar { | |
78 | + font-family: PingFangSC-Regular; | |
79 | + font-size: 10px; | |
80 | + margin-left: 3px; | |
81 | + margin-top: 5px; | |
82 | + color: #c6c6c6; | |
83 | +} | |
84 | + | |
85 | +.tags_view{ | |
86 | + display:flex; | |
87 | + float: right; | |
88 | + position: absolute; | |
89 | + right: 20px; | |
90 | +} | |
91 | +.tags1 { | |
92 | + background: #f2fdf7; | |
93 | + border-radius: 2px; | |
94 | + font-size: 12px; | |
95 | + margin-left: 10px; | |
96 | + color: #58a478; | |
97 | + margin-top: 5px; | |
98 | +} | |
99 | + | |
100 | +/*item 分割线*/ | |
101 | + | |
102 | +.home__list-item__bottom { | |
103 | + height: 1px; | |
104 | + background: #e2e2e2; | |
105 | + margin-top: 5px; | |
106 | + margin-bottom: 5px; | |
107 | + left: 15px; | |
108 | + right: 15px; | |
109 | +} | |
110 | + | |
111 | +.list_scroll { | |
112 | + height: 100vh; | |
113 | + /* background: rebeccapurple */ | |
114 | +} | |
115 | + | |
116 | +.bottom_view { | |
117 | + position: fixed; | |
118 | + display: flex; | |
119 | + bottom: 20px; | |
120 | + left: 10px; | |
121 | + right: 10px; | |
122 | + height: 36px; | |
123 | +} | |
124 | + | |
125 | +.chooseAll { | |
126 | + background: #eaeaea; | |
127 | + border: 1px solid #e6e6e6; | |
128 | + border-radius: 100px; | |
129 | + font-size: 14px; | |
130 | + color: #888; | |
131 | + margin-right: 10px; | |
132 | + text-align: center; | |
133 | + line-height: 36px; | |
134 | + width: 30%; | |
135 | +} | |
136 | + | |
137 | +.delete_bt { | |
138 | + background: #48c17b; | |
139 | + border-radius: 100px; | |
140 | + color: white; | |
141 | + font-size: 14px; | |
142 | + width: 30%; | |
143 | + line-height: 36px; | |
144 | + text-align: center; | |
145 | +} | |
146 | + | |
147 | +.delete_bt2 { | |
148 | + background: #48c17b; | |
149 | + border-radius: 100px; | |
150 | + position: fixed; | |
151 | + color: white; | |
152 | + font-size: 14px; | |
153 | + bottom: 20px; | |
154 | + left: 10px; | |
155 | + right: 10px; | |
156 | + height: 36px; | |
157 | +} |
littleApp_child/source/save_not.png
View file @
aaa7c9b
1.25 KB
littleApp_child/utils/network_util.js
View file @
aaa7c9b