Blame view

src/pages/myassess/index.vue 3.95 KB
ce4c83ff   wxy   初始提交
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
  <template>
  <div class='container'>
    <navigator class='assess-item' v-for="(comment,k) in commentList" :key="k">
      <div class='head'>
        <img src='/static/imgs/avatar.png'>
        <div>
          <span class='name'>{{comment.wxUser.wx_Name}}</span><span class="type">[问题类别:{{comment.consultantTag.lawCategory.cate_Name}}]</span>
          <p class='time'>{{comment.createDate}}</p>
        </div>
      </div>
      <div class='way'>
        <span>响应速度:</span>
        <image src='/static/imgs/flower_on.png' v-for="n in comment.reponspeed" :key="n"></image>
        <image src='/static/imgs/flower.png' v-for="m in 5-comment.reponspeed" :key="m"></image>
      </div>
      <div class='way'>
        <span>服务态度:</span>
        <image src='/static/imgs/flower_on.png' v-for="n in comment.serviceatd" :key="n"></image>
        <image src='/static/imgs/flower.png' v-for="n in 5-comment.serviceatd" :key="m"></image>
      </div>
      <div class='way'>
        <span>解决问题:</span>
        <image src='/static/imgs/flower_on.png' v-for="n in comment.solvePrm" :key="n"></image>
        <image src='/static/imgs/flower.png' v-for="n in 5-comment.solvePrm" :key="m"></image>
      </div>
      <div class='assess'>{{comment.eltdescription}}</div>
      <div class='question'>
        <div class='title'>{{comment.qainfo.consultant_Content}}</div>
        <div class='time'>{{comment.qainfo.replay_Date}}</div>
        <div class='content'><span>我的回复:</span>{{comment.qainfo.consultant_Reply}}</div>
      </div>
    </navigator>
   <!-- <NoData v-if='loaded && commentList.length==0' paddingTop=176 />-->
    </div>
  </template>
  <script>
    import NoData from '@/components/NoData'
    export default {
      components: {NoData},
      data() {
        return {
          commentList: [],
          loaded: false
        }
      },
      methods: {
        loadComment() {
          this.loaded = false
          wx.showLoading({title: '正在加载'})
          wx.request({
            url: this.rootUrl + '/comment/list',
            data: {sessionID: wx.getStorageSync('sessionID')},
            success: res => {
              if (res.statusCode == '500') {
                this.service.getUnionId(this.rootAvatar, this.rootUrl).then(res => this.loadComment())
              } else {
                console.log(res.data)
                this.commentList = []
                var commentList = res.data
                commentList.forEach(v => {
                  const timeObj = this.service.formatDate(new Date(v.createDate))
                  v.createDate = timeObj
                  const timeObjtwo = this.service.formatDate(new Date(v.qainfo.replay_Date))
                  v.qainfo.replay_Date = timeObjtwo
                })
                this.commentList = res.data
                this.loaded = true
                wx.hideLoading()
              }
            },
            fail: res => {
              wx.hideLoading()
              wx.showToast({title: '加载失败', icon: 'none'})
            }
          })
        },
      },
      onLoad() {
        this.loadComment()
      }
    }
  </script>
  <style lang="stylus" scoped>
  .container
    position absolute
    min-height 100%
    width 100%
    Background()
  .assess-item
    padding 25rpx
    margin-bottom 20rpx
    background white
  .head
    Flex(flex, , center)
    img
      Height_Width(80rpx)
      border-radius 50%
      margin-right 20rpx
    div
      .name
        Font(30rpx)
      .type
        margin-left 20rpx
        color #aa001a
        font-size 28rpx
      .time
        margin-top 15rpx
        Font(26rpx)
        color #777
  .way
    margin-top 15rpx
    width 100%
    display flex
    align-items center
  .way span
    margin-right 10rpx
    color #333
    font-size 30rpx
  .way image
    margin-right 20rpx
    width 40rpx
    height 40rpx
  .assess
    Font(30rpx,45rpx)
    margin 20rpx 0
    text-align justify
  .question
    padding 25rpx
    background #f6f6f6
    border 1rpx solid #eee
    Font(28rpx)
    .title
      Font(30rpx, 35rpx, bold)
    .time
      Font(28rpx)
      color #888
      margin 20rpx 0
    .content
      text-overflow ellipsis
      line-height 40rpx
      text-align justify
      span
        color #777
  </style>