Commit ff3425cda447ee9ef8d81fe4f2a78f6b2f693c44

Authored by xianghenggang
1 parent fe265c9389

反馈页面

Showing 4 changed files with 101 additions and 103 deletions

littleApp_child/app.json View file @ ff3425c
1 1 {
2 2 "pages": [
3   - "pages/mySaved/mySaved",
  3 +
4 4 "pages/feedback/feedback",
5   -
  5 + "pages/mySaved/mySaved",
6 6 "pages/home/home",
7 7  
8 8 "pages/checkTabList/checkTabList",
littleApp_child/pages/feedback/feedback.js View file @ ff3425c
... ... @@ -14,108 +14,42 @@
14 14  
15 15 Page({
16 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"
  17 + chooseOne: 0,
  18 + chooseTwo: 0,
  19 + chooseThree: 0,
  20 + content: ""
21 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 22 },
63   - /*---------生命周期--------*/
64   - onLoad: function () {
65   -
66   -
  23 + chooseOne: function () {
  24 + this.setData({
  25 + chooseOne: 1,
  26 + chooseTwo: 0,
  27 + chooseThree: 0,
  28 + })
67 29 },
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
  30 + chooseTwo: function () {
  31 + this.setData({
  32 + chooseOne: 0,
  33 + chooseTwo: 1,
  34 + chooseThree: 0,
93 35 })
94 36 },
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   - }
  37 + chooseThree: function () {
100 38 this.setData({
101   - list: list
  39 + chooseOne: 0,
  40 + chooseTwo: 0,
  41 + chooseThree: 1,
102 42 })
103 43 },
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
  44 + inputOver: function (e) {
111 45  
112   - self.setData({
113   - isShowCheckbox: isShowCheckbox,
114   - list: list
  46 + var value = e.detail.value
  47 + this.setData({
  48 + content: value
115 49 })
116 50 },
117   - deleteAll: function (e) {
118   -
  51 + submit: function () {
  52 + console.log(this.data.content)
119 53 }
120 54 })
littleApp_child/pages/feedback/feedback.wxml View file @ ff3425c
1 1 <!--hospitalList.wxml 医院列表 联系医院-->
2 2 <view class="main">
3   - <textarea class="content" placeholder="写下你的意见或建议..." />
4   -
  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 +
5 25 </view>
6 26  
7   -<button class="delete_bt2" bindtap="showChoose">提交</button>
  27 +<button class="delete_bt2" bindtap="submit">提交</button>
littleApp_child/pages/feedback/feedback.wxss View file @ ff3425c
1 1 .main {
  2 + width: 100%;
2 3 background: white;
3 4 height: 100%;
4 5 }
5 6  
6 7 .content {
7   - width: 100%;
8   - left: 10px;
9   - right: 10px;
10   - background: #fff;
  8 + margin-left: 10px;
  9 + font-size: 10pt;
  10 + padding-top: 10px;
  11 + padding-right: 20px;
  12 +}
  13 +
  14 +textarea {
11 15 border: 1px solid #e6e6e6;
12 16 border-radius: 4px;
13   - padding: 10px;
  17 + width: 100%;
  18 + height: 120px;
14 19 font-size: 14px;
15 20 color: #888;
16   - margin-top: 10px;
17   - height: 120px;
  21 + padding: 5px;
18 22 }
19 23  
  24 +/*占位符样式*/
  25 +
  26 +.placeholdText {
  27 + font-size: 2em;
  28 +}
  29 +
20 30 .delete_bt2 {
21 31 background: #48c17b;
22 32 border-radius: 100px;
... ... @@ -27,5 +37,39 @@
27 37 left: 10px;
28 38 right: 10px;
29 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;
30 74 }