guhongwei 4 vuotta sitten
vanhempi
commit
69f9fa364f

+ 0 - 38
store/gov/affairsColumn.js

@@ -1,38 +0,0 @@
-import Vue from 'vue';
-import Vuex from 'vuex';
-import _ from 'lodash';
-Vue.use(Vuex);
-const api = {
-  columnInfo: `/api/affairs/column`,
-};
-const state = () => ({});
-const mutations = {};
-
-const actions = {
-  async query({ commit }, { skip = 0, limit, ...info } = {}) {
-    const res = await this.$axios.$get(`${api.columnInfo}`, { skip, limit, ...info });
-    return res;
-  },
-  async create({ commit }, payload) {
-    const res = await this.$axios.$post(`${api.columnInfo}`, payload);
-    return res;
-  },
-  async fetch({ commit }, payload) {
-    const res = await this.$axios.$get(`${api.columnInfo}/${payload}`);
-    return res;
-  },
-  async update({ commit }, { id, ...data }) {
-    const res = await this.$axios.$post(`${api.columnInfo}/update/${id}`, data);
-    return res;
-  },
-  async delete({ commit }, payload) {
-    const res = await this.$axios.$delete(`${api.columnInfo}/${payload}`);
-    return res;
-  },
-};
-export default {
-  namespaced: true,
-  state,
-  mutations,
-  actions,
-};

+ 0 - 38
store/gov/affairsNews.js

@@ -1,38 +0,0 @@
-import Vue from 'vue';
-import Vuex from 'vuex';
-import _ from 'lodash';
-Vue.use(Vuex);
-const api = {
-  newsInfo: `/api/affairs/news`,
-};
-const state = () => ({});
-const mutations = {};
-
-const actions = {
-  async query({ commit }, { skip = 0, limit, column_id, ...info } = {}) {
-    const res = await this.$axios.$get(`${api.newsInfo}`, { skip, limit, column_id, ...info });
-    return res;
-  },
-  async create({ commit }, payload) {
-    const res = await this.$axios.$post(`${api.newsInfo}`, payload);
-    return res;
-  },
-  async fetch({ commit }, payload) {
-    const res = await this.$axios.$get(`${api.newsInfo}/${payload}`);
-    return res;
-  },
-  async update({ commit }, { id, ...data }) {
-    const res = await this.$axios.$post(`${api.newsInfo}/update/${id}`, data);
-    return res;
-  },
-  async delete({ commit }, payload) {
-    const res = await this.$axios.$delete(`${api.newsInfo}/${payload}`);
-    return res;
-  },
-};
-export default {
-  namespaced: true,
-  state,
-  mutations,
-  actions,
-};

+ 0 - 38
store/gov/link.js

@@ -1,38 +0,0 @@
-import Vue from 'vue';
-import Vuex from 'vuex';
-import _ from 'lodash';
-Vue.use(Vuex);
-const api = {
-  links: `/api/setting/link`,
-};
-const state = () => ({});
-const mutations = {};
-
-const actions = {
-  async query({ commit }, { skip = 0, limit, ...info } = {}) {
-    const res = await this.$axios.$get(`${api.links}`, { skip, limit, ...info });
-    return res;
-  },
-  async create({ commit }, payload) {
-    const res = await this.$axios.$post(`${api.links}`, payload);
-    return res;
-  },
-  async fetch({ commit }, payload) {
-    const res = await this.$axios.$get(`${api.links}/${payload}`);
-    return res;
-  },
-  async update({ commit }, { id, ...data }) {
-    const res = await this.$axios.$post(`${api.links}/update/${id}`, data);
-    return res;
-  },
-  async delete({ commit }, payload) {
-    const res = await this.$axios.$delete(`${api.links}/${payload}`);
-    return res;
-  },
-};
-export default {
-  namespaced: true,
-  state,
-  mutations,
-  actions,
-};

+ 0 - 39
store/live/apply.js

@@ -1,39 +0,0 @@
-import Vue from 'vue';
-import Vuex from 'vuex';
-import _ from 'lodash';
-Vue.use(Vuex);
-const api = {
-  applyInfo: `/api/live/dock/apply`,
-};
-const state = () => ({});
-const mutations = {};
-
-const actions = {
-  async query({ commit }, { skip = 0, limit = undefined, ...info } = {}) {
-    const res = await this.$axios.$get(api.applyInfo, { skip, limit, ...info });
-    return res;
-  },
-  async create({ commit }, { id, ...info } = {}) {
-    const res = await this.$axios.$post(`${api.applyInfo}/${id}`, { ...info });
-    return res;
-  },
-  async fetch({ commit }, payload) {
-    const res = await this.$axios.$get(`${api.applyInfo}/${payload}`);
-    return res;
-  },
-  async update({ commit }, { dock_id, id, ...data }) {
-    const res = await this.$axios.$post(`${api.applyInfo}/${dock_id}/check/${id}`, data);
-    return res;
-  },
-  async delete({ commit }, payload) {
-    const res = await this.$axios.$delete(`${api.applyInfo}/${payload}`);
-    return res;
-  },
-};
-
-export default {
-  namespaced: true,
-  state,
-  mutations,
-  actions,
-};

+ 0 - 39
store/live/chat.js

@@ -1,39 +0,0 @@
-import Vue from 'vue';
-import Vuex from 'vuex';
-import _ from 'lodash';
-Vue.use(Vuex);
-const api = {
-  interface: `/api/live/chat`,
-};
-const state = () => ({});
-const mutations = {};
-
-const actions = {
-  async query({ commit }, { skip = 0, limit = undefined, ...info } = {}) {
-    const res = await this.$axios.$get(api.interface, { skip, limit, ...info });
-    return res;
-  },
-  async create({ commit }, payload) {
-    const res = await this.$axios.$post(`${api.interface}`, payload);
-    return res;
-  },
-  async fetch({ commit }, payload) {
-    const res = await this.$axios.$get(`${api.interface}/${payload}`);
-    return res;
-  },
-  async update({ commit }, { id, ...info } = {}) {
-    const res = await this.$axios.$post(`${api.interface}/${id}`, { ...info });
-    return res;
-  },
-  async delete({ commit }, payload) {
-    const res = await this.$axios.$delete(`${api.interface}/${payload}`);
-    return res;
-  },
-};
-
-export default {
-  namespaced: true,
-  state,
-  mutations,
-  actions,
-};

+ 0 - 42
store/live/column.js

@@ -1,42 +0,0 @@
-import Vue from 'vue';
-import Vuex from 'vuex';
-import _ from 'lodash';
-Vue.use(Vuex);
-const api = {
-  columnInfo: `/api/live/column`,
-};
-const state = () => ({});
-const mutations = {};
-
-const actions = {
-  async query({ commit }, { skip = 0, limit, ...info } = {}) {
-    const res = await this.$axios.$get(`${api.columnInfo}`, {
-      skip,
-      limit,
-      ...info,
-    });
-    return res;
-  },
-  async create({ commit }, payload) {
-    const res = await this.$axios.$post(`${api.columnInfo}`, payload);
-    return res;
-  },
-  async fetch({ commit }, payload) {
-    const res = await this.$axios.$get(`${api.columnInfo}/${payload}`);
-    return res;
-  },
-  async update({ commit }, { id, ...data }) {
-    const res = await this.$axios.$post(`${api.columnInfo}/update/${id}`, data);
-    return res;
-  },
-  async delete({ commit }, payload) {
-    const res = await this.$axios.$delete(`${api.columnInfo}/${payload}`);
-    return res;
-  },
-};
-export default {
-  namespaced: true,
-  state,
-  mutations,
-  actions,
-};

+ 0 - 44
store/live/comment.js

@@ -1,44 +0,0 @@
-import Vue from 'vue';
-import Vuex from 'vuex';
-import _ from 'lodash';
-Vue.use(Vuex);
-const api = {
-  newsInfo: `/api/live/comment`,
-};
-const state = () => ({});
-const mutations = {};
-
-const actions = {
-  async query({ commit }, { skip = 0, limit, ...info } = {}) {
-    const res = await this.$axios.$get(`${api.newsInfo}`, {
-      skip,
-      limit,
-      ...info,
-    });
-    return res;
-  },
-
-  async create({ commit }, payload) {
-    const res = await this.$axios.$post(`${api.newsInfo}`, payload);
-    return res;
-  },
-  async fetch({ commit }, payload) {
-    const res = await this.$axios.$get(`${api.newsInfo}/${payload}`);
-    return res;
-  },
-  async update({ commit }, { id, ...data }) {
-    const res = await this.$axios.$post(`${api.newsInfo}/update/${id}`, data);
-    return res;
-  },
-
-  async delete({ commit }, payload) {
-    const res = await this.$axios.$delete(`${api.newsInfo}/${payload}`);
-    return res;
-  },
-};
-export default {
-  namespaced: true,
-  state,
-  mutations,
-  actions,
-};

+ 0 - 64
store/live/dock.js

@@ -1,64 +0,0 @@
-import Vue from 'vue';
-import Vuex from 'vuex';
-import _ from 'lodash';
-Vue.use(Vuex);
-const api = {
-  dockInfo: `/api/live/dock`,
-  myapplyInfo: `/api/live/dock/myapply`,
-};
-const state = () => ({});
-const mutations = {};
-
-const actions = {
-  async query({ commit }, { skip = 0, limit = undefined, ...info } = {}) {
-    const res = await this.$axios.$get(api.dockInfo, { skip, limit, ...info });
-    return res;
-  },
-  async myapply({ commit }, { skip = 0, limit = undefined, ...info } = {}) {
-    const res = await this.$axios.$get(api.myapplyInfo, {
-      skip,
-      limit,
-      ...info,
-    });
-    return res;
-  },
-  async create({ commit }, payload) {
-    const res = await this.$axios.$post(`${api.dockInfo}`, payload);
-    return res;
-  },
-  async fetch({ commit }, payload) {
-    const res = await this.$axios.$get(`${api.dockInfo}/${payload}`);
-    return res;
-  },
-  async update({ commit }, { id, ...info } = {}) {
-    const res = await this.$axios.$post(`${api.dockInfo}/${id}`, { ...info });
-    return res;
-  },
-  async delete({ commit }, payload) {
-    const res = await this.$axios.$delete(`${api.dockInfo}/${payload}`);
-    return res;
-  },
-  async shenhe({ commit }, { id, ...data }) {
-    const res = await this.$axios.$post(`${api.dockInfo}/check/${id}`, data);
-    return res;
-  },
-  async updateVip({ commit }, { id, ...data }) {
-    const res = await this.$axios.$post(`${api.dockInfo}/updatevipuser/${id}`, data);
-    return res;
-  },
-  async createvipuser({ commit }, { id, ...data }) {
-    const res = await this.$axios.$post(`${api.dockInfo}/createvipuser/${id}`, data);
-    return res;
-  },
-  async updateGood({ commit }, { id, ...data }) {
-    const res = await this.$axios.$post(`${api.dockInfo}/goods/${id}`, data);
-    return res;
-  },
-};
-
-export default {
-  namespaced: true,
-  state,
-  mutations,
-  actions,
-};

+ 0 - 39
store/live/news.js

@@ -1,39 +0,0 @@
-import Vue from 'vue';
-import Vuex from 'vuex';
-import _ from 'lodash';
-Vue.use(Vuex);
-const api = {
-  newsInfo: `/api/live/news`,
-};
-const state = () => ({});
-const mutations = {};
-
-const actions = {
-  async query({ commit }, { skip = 0, limit = undefined, ...info } = {}) {
-    const res = await this.$axios.$get(api.newsInfo, { skip, limit, ...info });
-    return res;
-  },
-  async create({ commit }, payload) {
-    const res = await this.$axios.$post(`${api.newsInfo}`, payload);
-    return res;
-  },
-  async fetch({ commit }, payload) {
-    const res = await this.$axios.$get(`${api.newsInfo}/${payload}`);
-    return res;
-  },
-  async update({ commit }, { id, ...info } = {}) {
-    const res = await this.$axios.$post(`${api.newsInfo}/update/${id}`, { ...info });
-    return res;
-  },
-  async delete({ commit }, payload) {
-    const res = await this.$axios.$delete(`${api.newsInfo}/${payload}`);
-    return res;
-  },
-};
-
-export default {
-  namespaced: true,
-  state,
-  mutations,
-  actions,
-};

+ 0 - 44
store/live/personalchat.js

@@ -1,44 +0,0 @@
-import Vue from 'vue';
-import Vuex from 'vuex';
-import _ from 'lodash';
-Vue.use(Vuex);
-const api = {
-  interface: `/api/live/personchat`,
-  isRead: `/api/live/personchat/received`,
-};
-const state = () => ({});
-const mutations = {};
-
-const actions = {
-  async query({ commit }, { skip = 0, limit = undefined, ...info } = {}) {
-    const res = await this.$axios.$get(api.interface, { skip, limit, ...info });
-    return res;
-  },
-  async create({ commit }, payload) {
-    const res = await this.$axios.$post(`${api.interface}`, payload);
-    return res;
-  },
-  async fetch({ commit }, payload) {
-    const res = await this.$axios.$get(`${api.interface}/${payload}`);
-    return res;
-  },
-  async update({ commit }, { id, ...info } = {}) {
-    const res = await this.$axios.$post(`${api.interface}/${id}`, { ...info });
-    return res;
-  },
-  async delete({ commit }, payload) {
-    const res = await this.$axios.$delete(`${api.interface}/${payload}`);
-    return res;
-  },
-  async isRead({ commit }, payload) {
-    const res = await this.$axios.$post(`${api.isRead}`, payload);
-    return res;
-  },
-};
-
-export default {
-  namespaced: true,
-  state,
-  mutations,
-  actions,
-};

+ 0 - 49
store/live/personalroom.js

@@ -1,49 +0,0 @@
-import Vue from 'vue';
-import Vuex from 'vuex';
-import _ from 'lodash';
-Vue.use(Vuex);
-const api = {
-  interface: `/api/live/personroom`,
-  roomCountDelete: id => `/api/live/personroomtalk/${id}`,
-  roomCount: `/api/live/personroomtalk/countroom`,
-};
-const state = () => ({});
-const mutations = {};
-
-const actions = {
-  async query({ commit }, { skip = 0, limit = undefined, ...info } = {}) {
-    const res = await this.$axios.$get(api.interface, { skip, limit, ...info });
-    return res;
-  },
-  async create({ commit }, payload) {
-    const res = await this.$axios.$post(`${api.interface}`, payload);
-    return res;
-  },
-  async fetch({ commit }, payload) {
-    const res = await this.$axios.$get(`${api.interface}/${payload}`);
-    return res;
-  },
-  async update({ commit }, { id, ...info } = {}) {
-    const res = await this.$axios.$post(`${api.interface}/${id}`, { ...info });
-    return res;
-  },
-  async delete({ commit }, payload) {
-    const res = await this.$axios.$delete(`${api.interface}/${payload}`);
-    return res;
-  },
-  async countRoom({ commit }, payload) {
-    const res = await this.$axios.$get(api.roomCount);
-    return res;
-  },
-  async countDelete({ commit }, payload) {
-    const res = await this.$axios.$delete(api.roomCountDelete(payload));
-    return res;
-  },
-};
-
-export default {
-  namespaced: true,
-  state,
-  mutations,
-  actions,
-};

+ 0 - 39
store/live/room-chat.js

@@ -1,39 +0,0 @@
-import Vue from 'vue';
-import Vuex from 'vuex';
-import _ from 'lodash';
-Vue.use(Vuex);
-const api = {
-  interface: `/api/live/roomchat`,
-};
-const state = () => ({});
-const mutations = {};
-
-const actions = {
-  async query({ commit }, { skip = 0, limit = undefined, ...info } = {}) {
-    const res = await this.$axios.$get(api.interface, { skip, limit, ...info });
-    return res;
-  },
-  async create({ commit }, payload) {
-    const res = await this.$axios.$post(`${api.interface}`, payload);
-    return res;
-  },
-  async fetch({ commit }, payload) {
-    const res = await this.$axios.$get(`${api.interface}/${payload}`);
-    return res;
-  },
-  async update({ commit }, { id, ...info } = {}) {
-    const res = await this.$axios.$post(`${api.interface}/${id}`, { ...info });
-    return res;
-  },
-  async delete({ commit }, payload) {
-    const res = await this.$axios.$delete(`${api.interface}/${payload}`);
-    return res;
-  },
-};
-
-export default {
-  namespaced: true,
-  state,
-  mutations,
-  actions,
-};

+ 0 - 130
store/login.js

@@ -1,130 +0,0 @@
-import Vue from 'vue';
-import Vuex from 'vuex';
-import axios from 'axios';
-import _ from 'lodash';
-import { Notification } from 'element-ui';
-const jwt = require('jsonwebtoken');
-Vue.use(Vuex);
-const api = {
-  interface: `/api/auth/login`,
-  getUser: `/api/auth/token`,
-  logout: '/api/auth/logout',
-  getMenu: `/api/auth/user/menus`,
-  updatePassword: '/api/user/pwd_edit',
-};
-const state = () => ({});
-const mutations = {};
-
-const actions = {
-  /**
-    user:Object required 登陆信息 
-    router:router 如果跳转就传
-    path:String 跳转到的路由位置
-    needReturn: Boolean 是否返回结果
-    typeCheck: Boolean 是否检查身份对应匹配的前端项目
-    isWx: Boolean 是否是微信登陆
-    needNotice:Boolean 是否需要提示
-   */
-  async login({ commit, dispatch }, { user, router, path = '/', needReturn = false, typeCheck = false, isWx = false, needNotice = true }) {
-    let res;
-    //wx登陆,openid存在,user中是openid和qrcode;正常登陆,user中是mobile和passwd
-    if (isWx) res = await this.$axios.$post(`${api.wxLogin}`, user);
-    else res = await this.$axios.$post(`${api.interface}`, user);
-    const setUser = async (token, commit) => {
-      localStorage.setItem('token', token);
-      let userInfo = await dispatch('toGetUser');
-      return userInfo;
-    };
-    let userInfo = {};
-    if (res.errcode == '0') {
-      userInfo = await setUser(res.data.key, commit);
-      Notification({
-        title: '登录成功',
-        // message: `欢迎,${user.user_name}`,
-        type: 'success',
-        duration: 2000,
-      });
-      return userInfo;
-    } else {
-      if (needReturn) return res;
-      else {
-        Notification({
-          title: '登录失败',
-          message: `失败原因:${res.errmsg || '登陆失败'}`,
-          type: 'error',
-        });
-      }
-    }
-  },
-  async toGetUser({ commit }, payload) {
-    let key = localStorage.getItem('token');
-    if (!key) {
-      if (_.isFunction(payload)) {
-        payload();
-        return;
-      }
-      console.log('游客身份');
-      let user = localStorage.getItem('user');
-      if (user) {
-        commit('setUser', JSON.parse(user), { root: true });
-      } else {
-        let stamp = new Date().getTime();
-        let name = `游客${stamp}`;
-        localStorage.setItem('user', JSON.stringify({ name }));
-        commit('setUser', { name }, { root: true });
-      }
-      return;
-    }
-    console.log('用户');
-    let res = await axios.post(api.getUser, { key: key });
-    let user = {};
-    if (res.data.errcode == '0') {
-      let token = _.get(res, `data.data.token`);
-      if (token) {
-        user = jwt.decode(token);
-        commit('setUser', user, { root: true });
-      }
-    }
-    return user;
-  },
-  async toGetMenu({ commit }, payload) {
-    const res = await this.$axios.$get(api.getMenu, payload);
-    return res;
-  },
-  async logout({ commit }, payload) {
-    let key = localStorage.removeItem('token');
-    const res = await this.$axios.$post(api.logout, { key: key });
-    commit('deleteUser');
-  },
-  async update({ commit }, payload) {
-    let res = await this.$axios.$post(`${api.updatePassword}`, {
-      data: payload,
-    });
-    return res;
-  },
-  async bind({ commit }, payload) {
-    let res = await this.$axios.$post(`${api.bind}`, payload);
-    return res;
-  },
-  async userBind({ commit }, payload) {
-    let res = await this.$axios.$post(`${api.userBind}`, payload);
-    return res;
-  },
-  async getQrcode({ commit }, payload) {
-    let res = await this.$axios.$get(`${api.connection}`);
-    if (res.errcode === 0) return res.data;
-    else {
-      console.warn('请求qrcode失败');
-    }
-  },
-  async wxCheck({ commit }, payload) {
-    let res = await this.$axios.$post(`${api.wxCheck}`, payload);
-    return res;
-  },
-};
-export default {
-  namespaced: true,
-  state,
-  mutations,
-  actions,
-};

+ 0 - 56
store/market/enterpriseproject.js

@@ -1,56 +0,0 @@
-import Vue from 'vue';
-import Vuex from 'vuex';
-import _ from 'lodash';
-Vue.use(Vuex);
-const api = {
-  columnInfo: `/api/market/product`,
-};
-const state = () => ({});
-const mutations = {};
-
-const actions = {
-  async query({ commit }, { skip = 0, limit, ...info } = {}) {
-    const res = await this.$axios.$get(`${api.columnInfo}`, {
-      skip,
-      limit,
-      ...info,
-    });
-    return res;
-  },
-  async create({ commit }, payload) {
-    const res = await this.$axios.$post(`${api.columnInfo}`, payload);
-    return res;
-  },
-  async fetch({ commit }, payload) {
-    const res = await this.$axios.$get(`${api.columnInfo}/${payload}`);
-    return res;
-  },
-  async newfetch({ commit }, payload) {
-    const res = await this.$axios.$get(`${api.columnInfo}/newfetch/${payload}`);
-    return res;
-  },
-
-  async newquery({ commit }, { skip = 0, limit, ...info } = {}) {
-    const res = await this.$axios.$get(`${api.columnInfo}`, {
-      skip,
-      limit,
-      ...info,
-    });
-    return res;
-  },
-
-  async update({ commit }, { id, ...data }) {
-    const res = await this.$axios.$post(`${api.columnInfo}/update/${id}`, data);
-    return res;
-  },
-  async delete({ commit }, payload) {
-    const res = await this.$axios.$delete(`${api.columnInfo}/${payload}`);
-    return res;
-  },
-};
-export default {
-  namespaced: true,
-  state,
-  mutations,
-  actions,
-};

+ 0 - 42
store/market/expertsaudit.js

@@ -1,42 +0,0 @@
-import Vue from 'vue';
-import Vuex from 'vuex';
-import _ from 'lodash';
-Vue.use(Vuex);
-const api = {
-  expertsauditInfo: `/api/market/expertsaudit`,
-};
-const state = () => ({});
-const mutations = {};
-
-const actions = {
-  async query({ commit }, { skip = 0, limit, ...info } = {}) {
-    const res = await this.$axios.$get(`${api.expertsauditInfo}`, {
-      skip,
-      limit,
-      ...info,
-    });
-    return res;
-  },
-  async create({ commit }, payload) {
-    const res = await this.$axios.$post(`${api.expertsauditInfo}`, payload);
-    return res;
-  },
-  async fetch({ commit }, payload) {
-    const res = await this.$axios.$get(`${api.expertsauditInfo}/${payload}`);
-    return res;
-  },
-  async update({ commit }, { id, ...data }) {
-    const res = await this.$axios.$post(`${api.expertsauditInfo}/update/${id}`, data);
-    return res;
-  },
-  async delete({ commit }, payload) {
-    const res = await this.$axios.$delete(`${api.expertsauditInfo}/${payload}`);
-    return res;
-  },
-};
-export default {
-  namespaced: true,
-  state,
-  mutations,
-  actions,
-};

+ 0 - 51
store/market/exportuser.js

@@ -1,51 +0,0 @@
-import Vue from 'vue';
-import Vuex from 'vuex';
-import _ from 'lodash';
-Vue.use(Vuex);
-const api = {
-  expertsuserInfo: `/api/market/expertsuser`,
-};
-const state = () => ({});
-const mutations = {};
-
-const actions = {
-  async query({ commit }, { skip = 0, limit = undefined, ...info } = {}) {
-    const res = await this.$axios.$get(api.expertsuserInfo, {
-      skip,
-      limit,
-      ...info,
-    });
-    return res;
-  },
-  async create({ commit }, payload) {
-    const res = await this.$axios.$post(`${api.expertsuserInfo}`, payload);
-    return res;
-  },
-  async fetch({ commit }, payload) {
-    const res = await this.$axios.$get(`${api.expertsuserInfo}/${payload}`);
-    return res;
-  },
-  async update({ commit }, { id, ...info } = {}) {
-    const res = await this.$axios.$post(`${api.expertsuserInfo}/update/${id}`, {
-      ...info,
-    });
-    return res;
-  },
-  async delete({ commit }, payload) {
-    const res = await this.$axios.$delete(`${api.expertsuserInfo}/${payload}`);
-    return res;
-  },
-  async upgrade({ commit }, { id, ...info } = {}) {
-    const res = await this.$axios.$post(`${api.expertsuserInfo}/upgrade/${id}`, {
-      ...info,
-    });
-    return res;
-  },
-};
-
-export default {
-  namespaced: true,
-  state,
-  mutations,
-  actions,
-};

+ 0 - 39
store/market/market.js

@@ -1,39 +0,0 @@
-import Vue from 'vue';
-import Vuex from 'vuex';
-import _ from 'lodash';
-Vue.use(Vuex);
-const api = {
-  userInfo: `/api/market/user`,
-};
-const state = () => ({});
-const mutations = {};
-
-const actions = {
-  async query({ commit }, { skip = 0, limit, ...info } = {}) {
-    const res = await this.$axios.$get(`${api.userInfo}`, { skip, limit, ...info });
-    return res;
-  },
-  async create({ commit }, payload) {
-    const res = await this.$axios.$post(`${api.userInfo}`, payload);
-    return res;
-  },
-  async fetch({ commit }, payload) {
-    const res = await this.$axios.$get(`${api.userInfo}/${payload}`);
-    return res;
-  },
-  async update({ commit }, { id, ...data }) {
-    const res = await this.$axios.$post(`${api.userInfo}/${id}`, data);
-    return res;
-  },
-
-  async delete({ commit }, payload) {
-    const res = await this.$axios.$delete(`${api.userInfo}/${payload}`);
-    return res;
-  },
-};
-export default {
-  namespaced: true,
-  state,
-  mutations,
-  actions,
-};

+ 0 - 67
store/market/marketproduct.js

@@ -1,67 +0,0 @@
-import Vue from 'vue';
-import Vuex from 'vuex';
-import _ from 'lodash';
-Vue.use(Vuex);
-const api = {
-  newsInfo: `/api/market/product`,
-};
-const state = () => ({});
-const mutations = {};
-
-const actions = {
-  async query({ commit }, { skip = 0, limit, ...info } = {}) {
-    const res = await this.$axios.$get(`${api.newsInfo}`, {
-      skip,
-      limit,
-      ...info,
-    });
-    return res;
-  },
-  async newquery({ commit }, { skip = 0, limit, ...info } = {}) {
-    const res = await this.$axios.$get(`${api.newsInfo}/newquery`, {
-      skip,
-      limit,
-      ...info,
-    });
-    return res;
-  },
-  async comquery({ commit }, { skip = 0, limit, ...info } = {}) {
-    const res = await this.$axios.$get(`${api.newsInfo}/allquery`, {
-      skip,
-      limit,
-      ...info,
-    });
-    return res;
-  },
-  async newfetch({ commit }, { skip = 0, limit, ...info } = {}) {
-    const res = await this.$axios.$get(`${api.newsInfo}/newfetch`, {
-      skip,
-      limit,
-      ...info,
-    });
-    return res;
-  },
-  async create({ commit }, payload) {
-    const res = await this.$axios.$post(`${api.newsInfo}`, payload);
-    return res;
-  },
-  async fetch({ commit }, payload) {
-    const res = await this.$axios.$get(`${api.newsInfo}/${payload}`);
-    return res;
-  },
-  async update({ commit }, { id, ...data }) {
-    const res = await this.$axios.$post(`${api.newsInfo}/update/${id}`, data);
-    return res;
-  },
-
-  async delete({ commit }, payload) {
-    const res = await this.$axios.$delete(`${api.newsInfo}/${payload}`);
-    return res;
-  },
-};
-export default {
-  namespaced: true,
-  state,
-  mutations,
-  actions,
-};

+ 0 - 39
store/market/markettype.js

@@ -1,39 +0,0 @@
-import Vue from 'vue';
-import Vuex from 'vuex';
-import _ from 'lodash';
-Vue.use(Vuex);
-const api = {
-  codeitemInfo: `/api/setting/codeitem`,
-};
-const state = () => ({});
-const mutations = {};
-
-const actions = {
-  async query({ commit }, { skip = 0, limit = 10, ...info } = {}) {
-    console.log(info);
-    const res = await this.$axios.$get(api.codeitemInfo, { skip, limit, ...info });
-    return res;
-  },
-  async create({ commit }, payload) {
-    const res = await this.$axios.$post(`${api.codeitemInfo}`, payload);
-    return res;
-  },
-  async fetch({ commit }, payload) {
-    const res = await this.$axios.$get(`${api.codeitemInfo}/${payload}`);
-    return res;
-  },
-  async update({ commit }, { id, ...info } = {}) {
-    const res = await this.$axios.$post(`${api.codeitemInfo}/${id}`, { ...info });
-    return res;
-  },
-  async delete({ commit }, payload) {
-    const res = await this.$axios.$delete(`${api.codeitemInfo}/${payload}`);
-    return res;
-  },
-};
-export default {
-  namespaced: true,
-  state,
-  mutations,
-  actions,
-};

+ 0 - 30
store/market/newmarketproduct.js

@@ -1,30 +0,0 @@
-import Vue from 'vue';
-import Vuex from 'vuex';
-import _ from 'lodash';
-Vue.use(Vuex);
-const api = { newsInfo: `/api/market/product` };
-const state = () => ({});
-const mutations = {};
-const actions = {
-  async query({ commit }, { skip = 0, limit, ...info } = {}) {
-    const res = await this.$axios.$get(`${api.newsInfo}`, { skip, limit, ...info });
-    return res;
-  },
-  async create({ commit }, payload) {
-    const res = await this.$axios.$post(`${api.newsInfo}`, payload);
-    return res;
-  },
-  async fetch({ commit }, payload) {
-    const res = await this.$axios.$get(`${api.newsInfo}/${payload}`);
-    return res;
-  },
-  async update({ commit }, { id, ...data }) {
-    const res = await this.$axios.$post(`${api.newsInfo}/newfetch/${id}`, data);
-    return res;
-  },
-  async delete({ commit }, payload) {
-    const res = await this.$axios.$delete(`${api.newsInfo}/${payload}`);
-    return res;
-  },
-};
-export default { namespaced: true, state, mutations, actions };

+ 0 - 43
store/market/password.js

@@ -1,43 +0,0 @@
-import Vue from 'vue';
-import Vuex from 'vuex';
-import _ from 'lodash';
-Vue.use(Vuex);
-const api = {
-  userInfo: `/api/auth/user/uppasswd`,
-};
-const state = () => ({});
-const mutations = {};
-
-const actions = {
-  async query({ commit }, { skip = 0, limit, ...info } = {}) {
-    const res = await this.$axios.$get(`${api.userInfo}`, {
-      skip,
-      limit,
-      ...info,
-    });
-    return res;
-  },
-  async create({ commit }, payload) {
-    const res = await this.$axios.$post(`${api.userInfo}`, payload);
-    return res;
-  },
-  async fetch({ commit }, payload) {
-    const res = await this.$axios.$get(`${api.userInfo}/${payload}`);
-    return res;
-  },
-  async update({ commit }, payload) {
-    const res = await this.$axios.$post(`${api.userInfo}`, payload);
-    return res;
-  },
-
-  async delete({ commit }, payload) {
-    const res = await this.$axios.$delete(`${api.userInfo}/${payload}`);
-    return res;
-  },
-};
-export default {
-  namespaced: true,
-  state,
-  mutations,
-  actions,
-};

+ 0 - 49
store/market/productpact.js

@@ -1,49 +0,0 @@
-import Vue from 'vue';
-import Vuex from 'vuex';
-import _ from 'lodash';
-Vue.use(Vuex);
-const api = {
-  productpactInfo: `/api/market/productpact`,
-  findpactInfo: `/api/market/productpact/findpact`,
-};
-const state = () => ({});
-const mutations = {};
-
-const actions = {
-  async query({ commit }, { skip = 0, limit, ...info } = {}) {
-    const res = await this.$axios.$get(api.productpactInfo, {
-      skip,
-      limit,
-      ...info,
-    });
-    return res;
-  },
-  async create({ commit }, payload) {
-    const res = await this.$axios.$post(`${api.productpactInfo}`, payload);
-    return res;
-  },
-  async fetch({ commit }, payload) {
-    const res = await this.$axios.$get(`${api.productpactInfo}/${payload}`);
-    return res;
-  },
-
-  async findpact({ commit }, payload) {
-    const res = await this.$axios.$get(`${api.findpactInfo}/${payload}`);
-    return res;
-  },
-
-  async update({ commit }, { id, ...data }) {
-    const res = await this.$axios.$post(`${api.productpactInfo}/update/${id}`, data);
-    return res;
-  },
-  async delete({ commit }, payload) {
-    const res = await this.$axios.$delete(`${api.productpactInfo}/${payload}`);
-    return res;
-  },
-};
-export default {
-  namespaced: true,
-  state,
-  mutations,
-  actions,
-};

+ 0 - 38
store/market/talentExperts.js

@@ -1,38 +0,0 @@
-import Vue from 'vue';
-import Vuex from 'vuex';
-import _ from 'lodash';
-Vue.use(Vuex);
-const api = {
-  expertsInfo: `/api/talent/experts`,
-};
-const state = () => ({});
-const mutations = {};
-
-const actions = {
-  async query({ commit }, { skip = 0, limit, ...info } = {}) {
-    const res = await this.$axios.$get(`${api.expertsInfo}`, { skip, limit, ...info });
-    return res;
-  },
-  async create({ commit }, payload) {
-    const res = await this.$axios.$post(`${api.expertsInfo}`, payload);
-    return res;
-  },
-  async fetch({ commit }, payload) {
-    const res = await this.$axios.$get(`${api.expertsInfo}/${payload}`);
-    return res;
-  },
-  async update({ commit }, { id, ...data }) {
-    const res = await this.$axios.$post(`${api.expertsInfo}/update/${id}`, data);
-    return res;
-  },
-  async delete({ commit }, payload) {
-    const res = await this.$axios.$delete(`${api.expertsInfo}/${payload}`);
-    return res;
-  },
-};
-export default {
-  namespaced: true,
-  state,
-  mutations,
-  actions,
-};

+ 0 - 39
store/market/tranaudit.js

@@ -1,39 +0,0 @@
-import Vue from 'vue';
-import Vuex from 'vuex';
-import _ from 'lodash';
-Vue.use(Vuex);
-const api = {
-  newsInfo: `/api/market/tranaudit`,
-};
-const state = () => ({});
-const mutations = {};
-
-const actions = {
-  async query({ commit }, { skip = 0, limit, ...info } = {}) {
-    const res = await this.$axios.$get(`${api.newsInfo}`, { skip, limit, ...info });
-    return res;
-  },
-  async create({ commit }, payload) {
-    const res = await this.$axios.$post(`${api.newsInfo}`, payload);
-    return res;
-  },
-  async fetch({ commit }, payload) {
-    const res = await this.$axios.$get(`${api.newsInfo}/${payload}`);
-    return res;
-  },
-  async update({ commit }, { id, ...data }) {
-    const res = await this.$axios.$post(`${api.newsInfo}/update/${id}`, data);
-    return res;
-  },
-
-  async delete({ commit }, payload) {
-    const res = await this.$axios.$delete(`${api.newsInfo}/${payload}`);
-    return res;
-  },
-};
-export default {
-  namespaced: true,
-  state,
-  mutations,
-  actions,
-};

+ 0 - 38
store/market/transaction.js

@@ -1,38 +0,0 @@
-import Vue from 'vue';
-import Vuex from 'vuex';
-import _ from 'lodash';
-Vue.use(Vuex);
-const api = {
-  transactionInfo: `/api/market/transaction`,
-};
-const state = () => ({});
-const mutations = {};
-
-const actions = {
-  async query({ commit }, { skip = 0, limit, ...info } = {}) {
-    const res = await this.$axios.$get(`${api.transactionInfo}`, { skip, limit, ...info });
-    return res;
-  },
-  async create({ commit }, payload) {
-    const res = await this.$axios.$post(`${api.transactionInfo}`, payload);
-    return res;
-  },
-  async fetch({ commit }, payload) {
-    const res = await this.$axios.$get(`${api.transactionInfo}/${payload}`);
-    return res;
-  },
-  async update({ commit }, { id, ...data }) {
-    const res = await this.$axios.$post(`${api.transactionInfo}/update/${id}`, data);
-    return res;
-  },
-  async delete({ commit }, payload) {
-    const res = await this.$axios.$delete(`${api.transactionInfo}/${payload}`);
-    return res;
-  },
-};
-export default {
-  namespaced: true,
-  state,
-  mutations,
-  actions,
-};

+ 0 - 43
store/place/place.js

@@ -1,43 +0,0 @@
-import Vue from 'vue';
-import Vuex from 'vuex';
-import _ from 'lodash';
-Vue.use(Vuex);
-const api = {
-  userInfo: `/api/setting/xzqh/items`,
-};
-const state = () => ({});
-const mutations = {};
-
-const actions = {
-  async query({ commit }, { skip = 0, limit, ...info } = {}) {
-    const res = await this.$axios.$get(`${api.userInfo}`, {
-      skip,
-      limit,
-      ...info,
-    });
-    return res;
-  },
-  async create({ commit }, payload) {
-    const res = await this.$axios.$post(`${api.userInfo}`, payload);
-    return res;
-  },
-  async fetch({ commit }, payload) {
-    const res = await this.$axios.$get(`${api.userInfo}/${payload}`);
-    return res;
-  },
-  async update({ commit }, { id, ...data }) {
-    const res = await this.$axios.$post(`${api.userInfo}/${id}`, data);
-    return res;
-  },
-
-  async delete({ commit }, payload) {
-    const res = await this.$axios.$delete(`${api.userInfo}/${payload}`);
-    return res;
-  },
-};
-export default {
-  namespaced: true,
-  state,
-  mutations,
-  actions,
-};

+ 0 - 22
store/site.js

@@ -1,22 +0,0 @@
-import Vue from 'vue';
-import Vuex from 'vuex';
-import _ from 'lodash';
-Vue.use(Vuex);
-const api = {
-  shows: `/api/setting/set/show`,
-};
-const state = () => ({});
-const mutations = {};
-
-const actions = {
-  async showInfo({ commit }, { ...info } = {}) {
-    const res = await this.$axios.$get(`${api.shows}`, { ...info });
-    return res;
-  },
-};
-export default {
-  namespaced: true,
-  state,
-  mutations,
-  actions,
-};

+ 0 - 44
store/user/auth-user.js

@@ -1,44 +0,0 @@
-import Vue from 'vue';
-import Vuex from 'vuex';
-import _ from 'lodash';
-//用户的菜单选项增删改查
-Vue.use(Vuex);
-const api = {
-  interface: `/api/auth/user`,
-  getMenu: `/api/auth/user/menus`,
-};
-const state = () => ({});
-const mutations = {};
-
-const actions = {
-  async query({ commit }, { skip = 0, limit = undefined, ...info } = {}) {
-    const res = await this.$axios.$get(api.interface, { skip, limit, ...info });
-    return res;
-  },
-  async create({ commit }, payload) {
-    const res = await this.$axios.$post(`${api.interface}`, payload);
-    return res;
-  },
-  async fetch({ commit }, payload) {
-    //特殊变化,查用户菜单
-    const res = await this.$axios.$get(`${api.getMenu}`, payload);
-    return res;
-  },
-  async update({ commit }, { id, ...info } = {}) {
-    const res = await this.$axios.$post(`${api.interface}/update/${id}`, {
-      ...info,
-    });
-    return res;
-  },
-  async delete({ commit }, payload) {
-    const res = await this.$axios.$delete(`${api.interface}/${payload}`);
-    return res;
-  },
-};
-
-export default {
-  namespaced: true,
-  state,
-  mutations,
-  actions,
-};

+ 0 - 33
store/user/mutations.js

@@ -1,33 +0,0 @@
-export const setUser = (state, payload) => {
-  state.user = payload;
-  // let res = true;
-  // //登陆时
-  // if (payload) {
-  //   state.token = payload;
-  // } else {
-  //   //已经登陆,切换路由时取出用户信息放在总store中
-  //   let token = localStorage.getItem('token');
-  //   if (token && token !== 'guest') {
-  //     state.user = jwt.decode(token);
-  //   } else if (token && token == 'guest') {
-  //     let user = localStorage.getItem('user');
-  //     state.user = JSON.parse(user);
-  //   } else {
-  //     let timestamp = new Date().getTime();
-  //     let user = {
-  //       // id: `guest${timestamp}`,
-  //       name: `游客${timestamp}`,
-  //     };
-  //     state.user = user;
-  //     localStorage.setItem('token', 'guest');
-  //     localStorage.setItem('user', JSON.stringify(user));
-  //     console.warn('游客身份');
-  //   }
-  // }
-  // return res;
-};
-
-export const deleteUser = (state, payload) => {
-  state.user = {};
-  localStorage.removeItem('token');
-};

+ 0 - 40
store/user/role.js

@@ -1,40 +0,0 @@
-import Vue from 'vue';
-import Vuex from 'vuex';
-import _ from 'lodash';
-//用户的菜单选项增删改查
-Vue.use(Vuex);
-const api = {
-  interface: `/api/auth/role`,
-};
-const state = () => ({});
-const mutations = {};
-
-const actions = {
-  async query({ commit }, { skip = 0, limit = undefined, ...info } = {}) {
-    const res = await this.$axios.$get(api.interface, { skip, limit, ...info });
-    return res;
-  },
-  async create({ commit }, payload) {
-    const res = await this.$axios.$post(`${api.interface}`, payload);
-    return res;
-  },
-  async fetch({ commit }, payload) {
-    const res = await this.$axios.$get(`${api.interface}/${payload}`);
-    return res;
-  },
-  async update({ commit }, { id, ...info } = {}) {
-    const res = await this.$axios.$post(`${api.interface}/update/${id}`, { ...info });
-    return res;
-  },
-  async delete({ commit }, payload) {
-    const res = await this.$axios.$delete(`${api.interface}/${payload}`);
-    return res;
-  },
-};
-
-export default {
-  namespaced: true,
-  state,
-  mutations,
-  actions,
-};

+ 0 - 2
store/user/state.js

@@ -1,2 +0,0 @@
-export const user = {};
-export const menuList = [];