ann0707
2018-08-16 c9bc8ec61cff4076132f6396d99d383a2cdf5a03
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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
/**
 * Created by c.y on 2018/3/16.
 * 接口的统一处理
 */
import Service from './service';
import bndApi from './bndApi';
 
export default {
    // 获取项目的配置信息
    getProductConfig() {
        return Service.get('/json/finlean/chanBaseInfo.json?=' + new Date());
    },
    // 获取项目的路由配置信息
    getRouterControlConfig() {
        return Service.get('/json/finlean/auditRouterControl.json?=' + new Date());
    },
    // 获取额度评估的问题列表
    fetchAssessmentQuestionList() {
        return Service.get('/json/finlean/question.json?=' + new Date());
    },
    // 协议内容
    getAgreementContent() {
        let prodConfig = JSON.parse(window.localStorage.getItem('newProdConfig'));
        // https://t.finlean.com/html/commerce/finlean/agreement.html
        return Service.get(prodConfig.agreementPath);
    },
    // 额度评估的问题列表与bank的三个分类
    fetchQuestionAndTypeList() {
        return Service.get('/json/finlean/finlean_wallet_config.json?=' + new Date());
    },
    // 保存额度评估的问题列表
    saveAssessmentList(data) {
        return Service.post('/commerce/v2/feedback/assess', data);
    },
    // 获取城市列表
    getAreaInfo() {
        return Service.get('/json/finlean/finlean_wallet_area.json?=' + new Date());
    },
    // 获取资讯列表/banner
    fetchNewsList(data) {
        return Service.post('/commerce/v2/notice/initInfo', data);
    },
    // 获取资讯的详情页面
    fetchNewsDetail(data) {
        return Service.post('/commerce/v2/notice/info', data);
    },
    // ios--咨询的图片上传
    advisoryImgUpLoad(data) {
        return Service.post('/ques/imgUpLoad', data);
    },
    //ios-咨询的提交
    advisorySubmit(data) {
        return Service.post('/commerce/v2/feedback/consult', data);
    },
    // 反馈图片的上传与咨询的图片的上传
    uploadIMG(data) {
        return Service.post('/commerce/v2/file/upload', data);
    },
// /v2/account/uploadHead
    // IOS 审核功能 用户头像上传功能
    userHearderUploadIMG(data) {
        return Service.post('/commerce/v2/account/uploadHead', data);
    },
    // 反馈图片的删除
    deleteIMG(data) {
        return Service.post('/commerce/v2/file/del', data);
    },
    // 问题反馈的提交
    submitFeedBack(data) {
        return Service.post('/commerce/v2/feedback/idea', data);
    },
    // 进入产品详情的都要调一次这个接口,记录产品的点击次数
    fetchProdRec(data) {
        return Service.post('/commerce/v2/prod/prodRec', data);
    },
    // 产品申请接口,这个接口还是调用旧C端的
    getVisitUrl(data) {
        return Service.post('/commerce/v2/prod/visitUrl', data);
    },
    // 额度评估的为你优先的接口
    fetchPushProd(data) {
        return Service.post('/commerce/v2/prod/pushProd', data);
    },
    // 产品详情
    fetchProdDetail(data) {
        return Service.post('/commerce/v2/prod/prodDetail', data);
    },
    // 我的申请记录
    fetchApplyRecord(data) {
        return Service.post('/commerce/v2/prod/aplyhis', data);
    },
    // loan的tab 产品分类的产品列表
    fetchProdTypeList(data) {
        return Service.post('/commerce/v2/prod/prodType', data);
    },
    // 公告的初始化列表
    fetchNoticeList(data) {
        return Service.post('/commerce/v2/notice/initNotice', data);
    },
    // 公告的详情
    fetchNoticeDetail(data) {
        return Service.post('/commerce/v2/notice/notice', data);
    },
    //登陆===========================================================================================
    // 通过验证码登录
    loginByCode(data) {
        return Service.post('/commerce/v2/loginByCode', data);
    },
    // 密码登陆
    userLogin(data) {
        return Service.post('/commerce/v2/login', data);
    },
    // 退出登陆
    userLogout(data) {
        return Service.post('/commerce/v2/logout', data);
    },
    // 发送验证码 0代表注册, 1代表忘记密码
    getVerCode(data) {
        return Service.post('/commerce/v2/account/getVerCode', data);
    },
    // 验证图形验证码
    checkImageCode(data) {
        return Service.post('/commerce/v2/user/checkImageCode', data);
    },
    //实名认证
    threeData(data) {
        return Service.post('/commerce/v2/account/threeData', data);
    },
    //修改密码
    editPwd(data) {
        return Service.post('/commerce/v2/user/editPwd', data);
    },
    //忘记密码
    forgetPwd(data) {
        return Service.post('/commerce/v2/user/forgetPwd', data);
    },
    //登出
    logout(data) {
        return Service.post('/commerce/v2/logout', data);
    },
    //注册
    register(data) {
        return Service.post('/commerce/v2/user/register', data);
    },
    //实名认证
    fetchAuth(data) {
        return Service.post('/commerce/v2/account/threeData', data);
    },
    //实名反显
    fetchAuthInit(data) {
        return Service.post('/commerce/v2/account/threeDataCheck', data);
    },
    //首页初始化
    homeInit(data) {
        return Service.post('/commerce/v2/index/init', data);
    },
    //首页消息接口
    homeNotice(data) {
        return Service.post('/commerce/v2/notice/noticeStatus', data);
    },
    // /commerce/v2/notice/noticeStatus
    // 获取banner
    fetchProdBanner(data) {
        return Service.post('/commerce/v2/prod/banner', data);
    },
    //===================收入贷 接口 begin =======================
    // 收入贷图片上传
    upLoadImg(data) {
        return Service.post('/commerce/v2/income/uploadFile', data);
    },
    // 收入贷图片删除
    deleteImageFile(data) {
        return Service.post('/commerce/v2/income/deleteFile', data);
    },
    // 收入贷初始化个人信息
    initPersonalInfo(data) {
        return Service.post('/commerce/v2/income/initPersonalInfo', data);
    },
    // 收入贷保存个人信息
    savePersonalInfo(data) {
        return Service.post('/commerce/v2/income/savePersonalInfo', data);
    },
    // 收入贷初始化居住及工作信息
    initHomeWorkInfo(data) {
        return Service.post('/commerce/v2/income/initHomeWorkInfo', data);
    },
    // 收入贷保存居住及工作信息
    saveHomeWorkInfo(data) {
        return Service.post('/commerce/v2/income/saveHomeWorkInfo', data);
    },
    // 收入贷初始化绑定银行卡页面
    initBankCardInfo(data) {
        return Service.post('/commerce/v2/income/initBankCardInfo', data);
    },
    // 收入贷绑定银行卡
    saveBankCardInfo(data) {
        return Service.post('/commerce/v2/income/saveBankCardInfo', data);
    },
    // 收入贷初始化证明材料页面
    initMaterialInfo(data) {
        return Service.post('/commerce/v2/income/initMaterialInfo', data);
    },
    // 收入贷提交
    incomeSubmit(data) {
        return Service.post('/commerce/v2/income/submit', data);
    },
    // 收入贷初始化审核结果页面
    initApplyResult(data) {
        return Service.post('/commerce/v2/income/initApplyResult', data);
    },
    //===================收入贷 接口 end =======================
    // 从客户端获取微信token
    getWXToken(data) {
        let config = {
            headers: {
                'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
            },
            transformRequest: [function (data) {
                if (data === undefined) {
                    return data;
                }
                // 参数转换处理
                let ret = '';
                for (let it in data) {
                    ret += encodeURIComponent(it) + '=' + encodeURIComponent(data[it]) + '&';
                }
                return ret;
            }]
        };
        return Service.post('/commerce/wechat/getsine', data, config);
    },
    //获取第三方url
    prodUrl(data) {
        return Service.post('/commerce/v2/xyd/prodUrl', data);
    },
// ======================= v2 end =============================
    //包你贷接口api start=========
    ...bndApi
    //包你贷接口api end=========
}