| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865 |
- const tokens = {
- admin: {
- token: 'admin-token'
- },
- editor: {
- token: 'editor-token'
- }
- }
- const users = {
- 'admin-token': {
- roles: ['admin'],
- introduction: 'I am a super administrator',
- avatar: 'https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif',
- name: 'Super Admin'
- },
- 'editor-token': {
- roles: ['editor'],
- introduction: 'I am an editor',
- avatar: 'https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif',
- name: 'Normal Editor'
- }
- }
- module.exports = [
- // user login
- {
- url: '/vue-element-admin/user/login',
- type: 'post',
- response: config => {
- /* const { username } = config.body
- const token = tokens[username]
- // mock error
- if (!token) {
- return {
- code: 60204,
- message: 'Account and password are incorrect.'
- }
- }
- return {
- code: 20000,
- data: token
- }*/
- return { code: 0, message: '', data: { token: '0ac9709d32945302ef5ce62d8a5a0324' }}
- }
- },
- // get user info
- {
- url: '/vue-element-admin/user/info\.*',
- type: 'get',
- response: config => {
- /* const { token } = config.query
- const info = users[token]
- // mock error
- if (!info) {
- return {
- code: 50008,
- message: 'Login failed, unable to get user details.'
- }
- }
- return {
- code: 20000,
- data: info
- }*/
- return { code: 0, message: 'ok', data: { user_name: 'youwl', nick_name: '游1', avatar: 'http:\/\/oss.bbshenqian.cn\/bbshenqian\/common\/2020\/0215\/logo.png', phone: '13555555555', is_super: 0, update_time: '2020-12-15T02:31:48.000000Z', create_time: '2016-05-11T11:06:16.000000Z' }}
- }
- },
- // user logout
- {
- url: '/vue-element-admin/user/logout',
- type: 'post',
- response: _ => {
- return {
- code: 0,
- data: 'success'
- }
- }
- },
- // getAdminList
- {
- url: '/vue-element-admin/user/get-admin-list',
- type: 'get',
- response: _ => {
- return {
- code: 0,
- message: 'ok',
- data: {
- current_page: 1,
- data: [
- {
- id: 1,
- company_id: 3,
- user_id: 3,
- user_name: '游文亮',
- nick_name: '游文亮',
- real_name: '游文亮',
- role_name: '角色',
- role_id: 2,
- phone: '13777777777',
- create_time: '2020-12-08 11:18:50',
- update_time: '2020-12-08 11:18:50'
- },
- {
- id: 2,
- company_id: 3,
- user_id: 3,
- user_name: '游文亮1',
- nick_name: '游文亮1',
- real_name: '游文亮1',
- role_name: '角色1',
- role_id: 1,
- phone: '13777777777',
- create_time: '2020-12-08 11:18:50',
- update_time: '2020-12-08 11:18:50'
- },
- {
- id: 3,
- company_id: 3,
- user_id: 3,
- user_name: '游文亮2',
- nick_name: '游文亮3',
- real_name: '游文亮3',
- role_name: '角色3',
- role_id: 3,
- phone: '13777777777',
- create_time: '2020-12-08 11:18:50',
- update_time: '2020-12-08 11:18:50'
- }
- ],
- from: 1,
- last_page: 1,
- per_page: '10',
- to: 8,
- total: 12
- }
- }
- }
- },
- // role-lest
- {
- url: '/vue-element-admin/user/role-lest',
- type: 'get',
- response: _ => {
- return {
- code: 0,
- message: 'ok',
- data: {
- current_page: 1,
- data: [
- { id: 1, role_name: '管理猿', create_time: '2016-05-11 03:06:16', status: 0 },
- { id: 2, role_name: '运营猿', create_time: '2016-05-11 03:06:16', status: 0 },
- { id: 3, role_name: '低级管理猿', create_time: '2016-05-11 03:06:16', status: 0 }
- ],
- from: 0,
- last_page: 1,
- per_page: 10,
- to: 3,
- total: 3
- }
- }
- }
- },
- // 公司账号列表
- {
- url: '/vue-element-admin/user/get-company-list',
- type: 'get',
- response: _ => {
- return {
- 'code': 0,
- 'message': 'ok',
- 'data': {
- 'current_page': 1,
- 'data': [
- {
- 'id': 10313,
- 'name': '游文亮',
- 'phone': '',
- 'address': '',
- 'update_time': '2016-03-15 10:45:52',
- 'create_time': '2016-03-15 10:40:37',
- 'status': '0',
- 'active_time': '2016-03-15 00:00:00',
- 'invalid_time': '2020-12-23 00:00:00',
- 'type_id': 1,
- 'bind_app': '[{"id":"4","vers":["8"]},{"id":"6","vers":["11","13","14","19"]},{"id":"9","vers":["15"]},{"id":"27","vers":["18"]}]',
- 'agent_id': 1,
- 'is_login_code': 0,
- 'login_code_mobile': '',
- 'province': '',
- 'city': '',
- 'domain': '',
- 'user_type_id': 0,
- 'sub_user_count': 10,
- 'website_count': '50'
- },
- {
- 'id': 10314,
- 'name': '厦门聚百客科技有限公司',
- 'phone': '',
- 'address': '',
- 'update_time': '2020-04-05 12:16:49',
- 'create_time': '2020-03-10 03:39:15',
- 'status': '0',
- 'active_time': '2020-02-01 00:00:00',
- 'invalid_time': '2029-12-31 00:00:00',
- 'type_id': 0,
- 'bind_app': '[{"id":"4","vers":["8"]},{"id":"6","vers":["11","13","14","19"]},{"id":"9","vers":["15"]},{"id":"27","vers":["18"]}]',
- 'agent_id': 1,
- 'is_login_code': 0,
- 'login_code_mobile': '',
- 'province': '',
- 'city': '',
- 'domain': '',
- 'user_type_id': 0,
- 'sub_user_count': 5,
- 'website_count': '50'
- },
- {
- 'id': 10315,
- 'name': '科勒尔',
- 'phone': '',
- 'address': '',
- 'update_time': '2020-04-05 12:16:28',
- 'create_time': '2020-03-30 05:45:08',
- 'status': '0',
- 'active_time': '2020-03-30 00:00:00',
- 'invalid_time': '2021-12-31 00:00:00',
- 'type_id': 0,
- 'bind_app': '',
- 'agent_id': 1,
- 'is_login_code': 0,
- 'login_code_mobile': '',
- 'province': '',
- 'city': '',
- 'domain': '',
- 'user_type_id': 0,
- 'sub_user_count': 5,
- 'website_count': '7'
- },
- {
- 'id': 10316,
- 'name': 'CBME童装展-新英富曼集团',
- 'phone': '',
- 'address': '',
- 'update_time': '2020-04-05 12:02:21',
- 'create_time': '2020-04-05 12:02:21',
- 'status': '0',
- 'active_time': '2020-04-05 00:00:00',
- 'invalid_time': '2021-12-31 00:00:00',
- 'type_id': 0,
- 'bind_app': '',
- 'agent_id': 1,
- 'is_login_code': 0,
- 'login_code_mobile': '',
- 'province': '',
- 'city': '',
- 'domain': '',
- 'user_type_id': 0,
- 'sub_user_count': 5,
- 'website_count': '1'
- },
- {
- 'id': 10317,
- 'name': '东网电力',
- 'phone': '',
- 'address': '',
- 'update_time': '2020-04-05 12:06:37',
- 'create_time': '2020-04-05 12:06:37',
- 'status': '0',
- 'active_time': '2020-04-05 00:00:00',
- 'invalid_time': '2021-12-31 00:00:00',
- 'type_id': 0,
- 'bind_app': '',
- 'agent_id': 1,
- 'is_login_code': 0,
- 'login_code_mobile': '',
- 'province': '',
- 'city': '',
- 'domain': '',
- 'user_type_id': 0,
- 'sub_user_count': 5,
- 'website_count': '4'
- },
- {
- 'id': 10318,
- 'name': '悦容整形',
- 'phone': '',
- 'address': '',
- 'update_time': '2020-04-05 12:09:44',
- 'create_time': '2020-04-05 12:09:44',
- 'status': '0',
- 'active_time': '2020-04-05 00:00:00',
- 'invalid_time': '2021-12-01 00:00:00',
- 'type_id': 0,
- 'bind_app': '',
- 'agent_id': 1,
- 'is_login_code': 0,
- 'login_code_mobile': '',
- 'province': '',
- 'city': '',
- 'domain': '',
- 'user_type_id': 0,
- 'sub_user_count': 5,
- 'website_count': '3'
- },
- {
- 'id': 10319,
- 'name': 'china-homecare',
- 'phone': '',
- 'address': '',
- 'update_time': '2020-04-15 02:10:21',
- 'create_time': '2020-04-15 02:09:01',
- 'status': '0',
- 'active_time': '0000-11-30 00:00:00',
- 'invalid_time': '2021-04-15 00:00:00',
- 'type_id': 0,
- 'bind_app': '',
- 'agent_id': 1,
- 'is_login_code': 0,
- 'login_code_mobile': '',
- 'province': '13',
- 'city': '',
- 'domain': '',
- 'user_type_id': 0,
- 'sub_user_count': 5,
- 'website_count': '2'
- },
- {
- 'id': 10320,
- 'name': '翡翠侠',
- 'phone': '',
- 'address': '',
- 'update_time': '2020-04-28 14:28:06',
- 'create_time': '2020-04-28 14:28:06',
- 'status': '0',
- 'active_time': '2020-04-28 00:00:00',
- 'invalid_time': '2021-12-31 00:00:00',
- 'type_id': 0,
- 'bind_app': '',
- 'agent_id': 1,
- 'is_login_code': 0,
- 'login_code_mobile': '',
- 'province': '',
- 'city': '',
- 'domain': '',
- 'user_type_id': 0,
- 'sub_user_count': 1,
- 'website_count': '1'
- },
- {
- 'id': 10323,
- 'name': '苏凯欣',
- 'phone': '',
- 'address': '',
- 'update_time': '2020-06-24 01:36:54',
- 'create_time': '2020-06-24 01:36:54',
- 'status': '0',
- 'active_time': '2020-06-23 00:00:00',
- 'invalid_time': '2022-04-01 00:00:00',
- 'type_id': 1,
- 'bind_app': '',
- 'agent_id': 1,
- 'is_login_code': 0,
- 'login_code_mobile': '',
- 'province': '',
- 'city': '',
- 'domain': '',
- 'user_type_id': 0,
- 'sub_user_count': 5,
- 'website_count': '50'
- },
- {
- 'id': 10325,
- 'name': 'standard ME',
- 'phone': '',
- 'address': '',
- 'update_time': '2020-09-01 07:41:16',
- 'create_time': '2020-09-01 07:41:16',
- 'status': '0',
- 'active_time': '2020-09-01 00:00:00',
- 'invalid_time': '2029-12-31 00:00:00',
- 'type_id': 1,
- 'bind_app': '',
- 'agent_id': 1,
- 'is_login_code': 0,
- 'login_code_mobile': '',
- 'province': '',
- 'city': '',
- 'domain': '',
- 'user_type_id': 0,
- 'sub_user_count': 5,
- 'website_count': '50'
- }
- ],
- 'from': 0,
- 'last_page': 2,
- 'per_page': 10,
- 'to': 10,
- 'total': 15
- }
- }
- }
- },
- // 省份列表
- {
- url: '/vue-element-admin/user/get-province-list',
- type: 'get',
- response: _ => {
- return {
- 'code': 0,
- 'message': 'ok',
- 'data': [
- {
- 'id': 1,
- 'province': '直辖市'
- },
- {
- 'id': 2,
- 'province': '河北省'
- },
- {
- 'id': 3,
- 'province': '江西省'
- },
- {
- 'id': 4,
- 'province': '山东省'
- },
- {
- 'id': 5,
- 'province': '山西省'
- },
- {
- 'id': 6,
- 'province': '内蒙古自治区'
- },
- {
- 'id': 7,
- 'province': '河南省'
- },
- {
- 'id': 8,
- 'province': '辽宁省'
- },
- {
- 'id': 9,
- 'province': '湖北省'
- },
- {
- 'id': 10,
- 'province': '吉林省'
- },
- {
- 'id': 11,
- 'province': '湖南省'
- },
- {
- 'id': 12,
- 'province': '黑龙江'
- },
- {
- 'id': 13,
- 'province': '广东省'
- },
- {
- 'id': 14,
- 'province': '江苏省'
- },
- {
- 'id': 15,
- 'province': '广西壮族自治区'
- },
- {
- 'id': 16,
- 'province': '海南省'
- },
- {
- 'id': 17,
- 'province': '四川省'
- },
- {
- 'id': 18,
- 'province': '浙江省'
- },
- {
- 'id': 19,
- 'province': '贵州省'
- },
- {
- 'id': 20,
- 'province': '安徽省'
- },
- {
- 'id': 21,
- 'province': '云南省'
- },
- {
- 'id': 22,
- 'province': '福建省'
- },
- {
- 'id': 23,
- 'province': '澳门特别行政区'
- },
- {
- 'id': 24,
- 'province': '甘肃省'
- },
- {
- 'id': 25,
- 'province': '黑龙江省'
- },
- {
- 'id': 26,
- 'province': '宁夏回族自治区'
- },
- {
- 'id': 27,
- 'province': '青海省'
- },
- {
- 'id': 28,
- 'province': '陕西省'
- },
- {
- 'id': 29,
- 'province': '台湾省'
- },
- {
- 'id': 30,
- 'province': '西藏自治区'
- },
- {
- 'id': 31,
- 'province': '香港特别行政区'
- },
- {
- 'id': 32,
- 'province': '新疆维吾尔自治区'
- },
- {
- 'id': 33,
- 'province': 'asdfasd'
- },
- {
- 'id': 34,
- 'province': '加利福尼亚州'
- },
- {
- 'id': 35,
- 'province': 'abcdefg'
- },
- {
- 'id': 36,
- 'province': '新泽西州'
- }
- ]
- }
- }
- },
- // 城市列表
- {
- url: '/vue-element-admin/user/get-city-list',
- type: 'get',
- response: _ => {
- return {
- 'code': 0,
- 'message': 'ok',
- 'data|5': [
- {
- 'id|+1': 1,
- 'province_id|+1': 2,
- 'city|1': ['张家口市', '沧州市', '承德市', '邯郸市', '衡水市', '廊坊市'],
- 'area_code|+1': '0313',
- 'province': '河北省'
- }
- ]
- }
- }
- },
- // 公司详情
- {
- url: '/vue-element-admin/user/get-company',
- type: 'get',
- response: _ => {
- return {
- 'code': 0,
- 'message': 'ok',
- 'data': {
- 'id': 10333,
- 'name': 'jy',
- 'phone': '13311111111',
- 'address': '厦门市思明区xxxxxxx',
- 'update_time': '2020-12-22 09:17:27',
- 'create_time': '2020-12-22 07:57:23',
- 'status': 0,
- 'active_time': '2016-03-15 00:00:00',
- 'invalid_time': '2020-12-23 00:00:00',
- 'type_id': 1,
- 'bind_app': '',
- 'agent_id': 1,
- 'is_login_code': 0,
- 'login_code_mobile': '',
- 'province': 22,
- 'city': 1,
- 'domain': '',
- 'user_type_id': 0,
- 'sub_user_count': 5,
- 'website_count': null
- }
- }
- }
- },
- // 公司授权应用详情
- {
- url: '/vue-element-admin/user/get-user-soft-bind',
- type: 'get',
- response: _ => {
- return {
- 'code': 0,
- 'message': 'ok',
- 'data': {
- 'id': 10333,
- 'name': '李肖明2',
- 'phone': '13311111111',
- 'address': '集美区',
- 'update_time': '2020-12-22 09:42:44',
- 'create_time': '2020-12-22 07:57:23',
- 'status': 1,
- 'active_time': '2016-03-15 00:00:00',
- 'invalid_time': '2020-12-23 00:00:00',
- 'type_id': 1,
- 'bind_app': '',
- 'agent_id': 1,
- 'is_login_code': 0,
- 'login_code_mobile': '',
- 'province': '22',
- 'city': '261',
- 'domain': '',
- 'user_type_id': 0,
- 'sub_user_count': 5,
- 'website_count': null,
- 'bind_apps': [
- {
- 'id': 5942,
- 'bind_user': 10333,
- 'app_id': 1,
- 'ver_id': 32,
- 'ver_func': '',
- 'start_time': '2016-03-15 09:42:44',
- 'end_time': '2020-12-23 09:42:44',
- 'status': 0,
- 'create_time': '2020-12-23 06:07:40',
- 'update_time': '2020-12-23 07:12:20'
- },
- {
- 'id': 5945,
- 'bind_user': 10333,
- 'app_id': 2,
- 'ver_id': 33,
- 'ver_func': [93, 96],
- 'start_time': '2016-03-15 09:42:44',
- 'end_time': '2020-12-28 09:42:44',
- 'status': 0,
- 'create_time': '2020-12-23 06:35:33',
- 'update_time': '2020-12-23 07:12:20'
- }
- ]
- }
- }
- }
- },
- // 获取公司应用管理菜单\功能权限列表详情
- {
- url: '/vue-element-admin/user/get-app-menus-list',
- type: 'get',
- response: _ => {
- return {
- 'code': 0,
- 'message': 'ok',
- 'data': {
- 'current_page': 1,
- 'data': [
- {
- 'id': 1,
- 'menus_name': '展会管理',
- 'sort': 1,
- 'role_name': '',
- 'role_key': '',
- 'pid': 0,
- 'icon': '',
- 'app_id': 1,
- 'is_default': 0,
- 'status': 0,
- 'update_time': '2019-08-24 11:24:39',
- 'create_time': null,
- 'name': '展会系统',
- 'p_name': ''
- },
- {
- 'id': 2,
- 'menus_name': '创建展会',
- 'sort': 1,
- 'role_name': 'MNU-SYS-EXHIBITION',
- 'role_key': 'Account.Index.index',
- 'pid': 1,
- 'icon': 'fa fa-slideshare',
- 'app_id': 1,
- 'is_default': 0,
- 'status': 0,
- 'update_time': '2019-08-24 11:18:00',
- 'create_time': null,
- 'name': '展会系统',
- 'p_name': '展会管理'
- },
- {
- 'id': 3,
- 'menus_name': '测试菜单',
- 'sort': 0,
- 'role_name': 'cs',
- 'role_key': 'Account.Index.cs',
- 'pid': 2,
- 'icon': '',
- 'app_id': 1,
- 'is_default': 0,
- 'status': 0,
- 'update_time': '2020-12-15 10:34:01',
- 'create_time': null,
- 'name': '展会系统',
- 'p_name': '创建展会'
- },
- {
- 'id': 4,
- 'menus_name': '页面',
- 'sort': 0,
- 'role_name': 'Page',
- 'role_key': 'page',
- 'pid': 0,
- 'icon': 'fa fa-slideshare',
- 'app_id': 1,
- 'is_default': 0,
- 'status': 0,
- 'update_time': '2020-12-18 09:53:45',
- 'create_time': null,
- 'name': '展会系统',
- 'p_name': ''
- },
- {
- 'id': 5,
- 'menus_name': '页面',
- 'sort': 1,
- 'role_name': 'PageIdex',
- 'role_key': 'page.pageindex',
- 'pid': 4,
- 'icon': '',
- 'app_id': 1,
- 'is_default': 0,
- 'status': 0,
- 'update_time': '2020-12-18 09:53:54',
- 'create_time': null,
- 'name': '展会系统',
- 'p_name': '页面'
- }
- ],
- 'from': 0,
- 'last_page': 1,
- 'per_page': 10,
- 'to': 5,
- 'total': 5
- }
- }
- }
- },
- // 新增公司
- {
- url: '/vue-element-admin/user/add-company',
- type: 'post',
- response: config => {
- return {
- 'code': 0,
- 'message': 'ok',
- 'data': 10333
- }
- }
- },
- // 修改公司状态
- {
- url: '/vue-element-admin/user/ban-company',
- type: 'post',
- response: config => {
- return {
- 'code': 0,
- 'message': 'ok',
- 'data': 10333
- }
- }
- },
- // 公司授权应用提交
- {
- url: '/vue-element-admin/user/save-user-soft-bind',
- type: 'post',
- response: config => {
- return {
- 'code': 0,
- 'message': 'ok',
- 'data': 10333
- }
- }
- },
- // 新增后台账号
- {
- url: '/vue-element-admin/user/add-admin-user',
- type: 'post',
- response: config => {
- return {
- 'code': 0,
- 'message': 'ok',
- 'data': 10333
- }
- }
- },
- // 编辑后台账号
- {
- url: '/vue-element-admin/user/edit-admin-user',
- type: 'post',
- response: config => {
- return {
- 'code': 0,
- 'message': 'ok',
- 'data': 10333
- }
- }
- },
- // 修改后台账号状态
- {
- url: '/vue-element-admin/user/ban-admin-userr',
- type: 'post',
- response: config => {
- return {
- 'code': 0,
- 'message': 'ok',
- 'data': 10333
- }
- }
- },
- // 修改角色状态
- {
- url: '/vue-element-admin/user/add-role',
- type: 'post',
- response: config => {
- return {
- 'code': 0,
- 'message': 'ok',
- 'data': 10333
- }
- }
- }
- ]
|