riku
2024-11-13 48145f787eda81815f653ad21161a60e89b6a303
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
const $f = require("./baserequest")
 
module.exports = {
  //查找评分规则
  getRule: function (sceneTypeId, fun) {
    let cb = {
      url: '/evaluationrule/rule',
      params: {
        sceneTypeId: sceneTypeId,
      },
    }
    Object.assign(cb, fun)
    $f.get(cb)
  },
 
  //查找评分规则子项表以及对应的具体得分
  getScore: function (userId, time, fun) {
    let cb = {
      url: '/evaluationsubrule/score',
      params: {
        userId: userId,
        time: time,
        platform: 'weixin'
      },
    }
    Object.assign(cb, fun)
    $f.get(cb)
  },
 
  //查找用户历史得分
  getHistoryPoint: function (userId, page, fun) {
    let cb = {
      url: `/evaluation/historyPoint/${userId}`,
      params: {
        page: page,
        per_page: 30,
        platform: 'weixin'
      },
    }
    Object.assign(cb, fun)
    $f.get(cb)
  },
 
  //上传评分
  uploadScore: function (userId, period, itemList, fun) {
    let cb = {
      url: `/evaluation/upload`,
      params: {
        userId: userId,
        period: period
      },
      data: itemList
    }
    Object.assign(cb, fun)
    $f.post(cb)
  },
 
  //获取测评详情
  getDetail: function (userId, period, fun) {
    let cb = {
      url: '/evaluation/detail',
      params: {
        userId: userId,
        period: period
      },
    }
    Object.assign(cb, fun)
    $f.get(cb)
  },
}