guhongwei 4 years ago
commit
fd0f6874e7
83 changed files with 14779 additions and 0 deletions
  1. 2 0
      .env
  2. 33 0
      .eslintrc.js
  3. 21 0
      .gitignore
  4. 24 0
      README.md
  5. BIN
      assets/home/bg.jpg
  6. BIN
      assets/home/gk1.png
  7. BIN
      assets/home/gk2.png
  8. BIN
      assets/home/gk3.png
  9. BIN
      assets/home/gk4.png
  10. BIN
      assets/home/gk5.png
  11. BIN
      assets/home/gk6.png
  12. BIN
      assets/home/logo.png
  13. BIN
      assets/home/zw1.jpg
  14. BIN
      assets/home/zw1.png
  15. BIN
      assets/home/zw2.png
  16. BIN
      assets/home/zw3.png
  17. BIN
      assets/home/zw4.png
  18. BIN
      assets/home/zw5.png
  19. BIN
      assets/home/zw6.png
  20. BIN
      assets/home/zw7.png
  21. BIN
      assets/home/zw8.png
  22. BIN
      assets/home/更多.png
  23. 3 0
      babel.config.js
  24. 49 0
      layout/home/foot.vue
  25. 165 0
      layout/home/government.vue
  26. 85 0
      layout/home/layout.vue
  27. 40 0
      layout/home/logo.vue
  28. 84 0
      layout/home/menuInfo.vue
  29. 81 0
      layout/home/top.vue
  30. 74 0
      layout/subPage/question.vue
  31. 12250 0
      package-lock.json
  32. 61 0
      package.json
  33. 19 0
      plugins/axios.js
  34. 39 0
      plugins/check-res.js
  35. 5 0
      plugins/element.js
  36. 6 0
      plugins/filters.js
  37. 27 0
      plugins/loading.js
  38. 4 0
      plugins/meta.js
  39. 20 0
      plugins/setting.js
  40. 65 0
      plugins/stomp.js
  41. BIN
      public/favicon.ico
  42. 17 0
      public/index.html
  43. 9 0
      router/before.js
  44. 31 0
      src/App.vue
  45. BIN
      src/assets/logo.png
  46. 130 0
      src/components/HelloWorld.vue
  47. 12 0
      src/main.js
  48. 28 0
      src/router/index.js
  49. 11 0
      src/store/index.js
  50. 5 0
      src/views/About.vue
  51. 18 0
      src/views/Home.vue
  52. 38 0
      store/gov/affairsColumn.js
  53. 38 0
      store/gov/affairsNews.js
  54. 38 0
      store/gov/link.js
  55. 39 0
      store/live/apply.js
  56. 39 0
      store/live/chat.js
  57. 42 0
      store/live/column.js
  58. 44 0
      store/live/comment.js
  59. 64 0
      store/live/dock.js
  60. 39 0
      store/live/news.js
  61. 44 0
      store/live/personalchat.js
  62. 49 0
      store/live/personalroom.js
  63. 39 0
      store/live/room-chat.js
  64. 130 0
      store/login.js
  65. 56 0
      store/market/enterpriseproject.js
  66. 42 0
      store/market/expertsaudit.js
  67. 51 0
      store/market/exportuser.js
  68. 39 0
      store/market/market.js
  69. 67 0
      store/market/marketproduct.js
  70. 39 0
      store/market/markettype.js
  71. 30 0
      store/market/newmarketproduct.js
  72. 43 0
      store/market/password.js
  73. 49 0
      store/market/productpact.js
  74. 38 0
      store/market/talentExperts.js
  75. 39 0
      store/market/tranaudit.js
  76. 38 0
      store/market/transaction.js
  77. 43 0
      store/place/place.js
  78. 22 0
      store/site.js
  79. 44 0
      store/user/auth-user.js
  80. 33 0
      store/user/mutations.js
  81. 40 0
      store/user/role.js
  82. 2 0
      store/user/state.js
  83. 3 0
      vue.config.js

+ 2 - 0
.env

@@ -0,0 +1,2 @@
+VUE_APP_AXIOS_BASE_URL = ''
+VUE_APP_ROUTER="/platlive"

+ 33 - 0
.eslintrc.js

@@ -0,0 +1,33 @@
+// https://eslint.org/docs/user-guide/configuring
+
+module.exports = {
+  root: true,
+  env: {
+    node: true,
+  },
+  extends: ['plugin:vue/essential', '@vue/prettier'],
+  plugins: ['vue'],
+  rules: {
+    'max-len': [
+      'warn',
+      {
+        code: 250,
+      },
+    ],
+    'no-unused-vars': 'off',
+    'no-console': 'off',
+    'prettier/prettier': [
+      'warn',
+      {
+        singleQuote: true,
+        trailingComma: 'es5',
+        bracketSpacing: true,
+        jsxBracketSameLine: true,
+        printWidth: 160,
+      },
+    ],
+  },
+  parserOptions: {
+    parser: 'babel-eslint',
+  },
+};

+ 21 - 0
.gitignore

@@ -0,0 +1,21 @@
+.DS_Store
+node_modules
+/dist
+
+# local env files
+.env.local
+.env.*.local
+
+# Log files
+npm-debug.log*
+yarn-debug.log*
+yarn-error.log*
+
+# Editor directories and files
+.idea
+.vscode
+*.suo
+*.ntvs*
+*.njsproj
+*.sln
+*.sw?

+ 24 - 0
README.md

@@ -0,0 +1,24 @@
+# common
+
+## Project setup
+```
+npm install
+```
+
+### Compiles and hot-reloads for development
+```
+npm run serve
+```
+
+### Compiles and minifies for production
+```
+npm run build
+```
+
+### Lints and fixes files
+```
+npm run lint
+```
+
+### Customize configuration
+See [Configuration Reference](https://cli.vuejs.org/config/).

BIN
assets/home/bg.jpg


BIN
assets/home/gk1.png


BIN
assets/home/gk2.png


BIN
assets/home/gk3.png


BIN
assets/home/gk4.png


BIN
assets/home/gk5.png


BIN
assets/home/gk6.png


BIN
assets/home/logo.png


BIN
assets/home/zw1.jpg


BIN
assets/home/zw1.png


BIN
assets/home/zw2.png


BIN
assets/home/zw3.png


BIN
assets/home/zw4.png


BIN
assets/home/zw5.png


BIN
assets/home/zw6.png


BIN
assets/home/zw7.png


BIN
assets/home/zw8.png


BIN
assets/home/更多.png


+ 3 - 0
babel.config.js

@@ -0,0 +1,3 @@
+module.exports = {
+  presets: ["@vue/cli-plugin-babel/preset"]
+};

+ 49 - 0
layout/home/foot.vue

@@ -0,0 +1,49 @@
+<template>
+  <div id="foot">
+    <el-row>
+      <el-col :span="24" class="foot">
+        <div class="div">
+          <p v-if="info" v-html="info.content"></p>
+        </div>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'foot',
+  props: {
+    info: null,
+  },
+  components: {},
+  data: () => ({}),
+  created() {},
+  computed: {},
+  methods: {},
+};
+</script>
+
+<style lang="less" scoped>
+/deep/.foot p p {
+  padding: 0;
+  margin: 0;
+}
+.foot {
+  width: 100%;
+  min-height: 120px;
+  background-color: rgba(0, 0, 0, 0.4);
+  overflow: hidden;
+}
+.foot .div {
+  width: 650px;
+  margin: 0 auto;
+}
+.foot p {
+  float: left;
+  color: #858f9b;
+  font-size: 14px;
+  margin-right: 24px;
+  line-height: 30px;
+}
+</style>

+ 165 - 0
layout/home/government.vue

@@ -0,0 +1,165 @@
+<template>
+  <div id="government">
+    <el-row>
+      <el-col :span="24" class="top">
+        <top></top>
+      </el-col>
+      <el-col :span="24" class="logo">
+        <div class="w_1200">
+          <logo :info="info"></logo>
+        </div>
+      </el-col>
+      <el-col :span="24" class="menu">
+        <div class="w_1200">
+          <menuInfo></menuInfo>
+        </div>
+      </el-col>
+      <el-col :span="24" class="main">
+        <!-- <div class="w_1200">
+          <el-col :span="12" class="phontoNews">
+            <photoNews :photoNews="photoNews"> </photoNews>
+          </el-col>
+          <el-col :span="12" class="news">
+            <news :chuangxinList="chuangxinList" :guoneiList="guoneiList" :zhengwuList="zhengwuList" :meitiList="meitiList"></news>
+          </el-col>
+          <el-col :span="8" class="notice">
+            <notice :tongzhiList="tongzhiList"></notice>
+          </el-col>
+          <el-col :span="16" class="zhengwu">
+            <zhengwu :zhengwu="zhengwu"></zhengwu>
+          </el-col>
+          <el-col :span="24" class="gongzhong">
+            <gongzhong :gongzhongList="gongzhongList"></gongzhong>
+          </el-col>
+          <el-col :span="24" class="link">
+            <linkInfo :linkList="linkList"></linkInfo>
+          </el-col>
+        </div> -->
+      </el-col>
+      <el-col :span="24" class="foot">
+        <div class="w_1200">
+          <foot :info="info"></foot>
+        </div>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import top from '@/layout/index/top.vue';
+import logo from '@/layout/index/logo.vue';
+import menuInfo from '@/layout/index/menuInfo.vue';
+import foot from '@/layout/index/foot.vue';
+import photoNews from '@/layout/government/photoNews.vue';
+import news from '@/layout/government/news.vue';
+import notice from '@/layout/government/notice.vue';
+import zhengwu from '@/layout/government/zhengwu.vue';
+import gongzhong from '@/layout/government/gongzhong.vue';
+import linkInfo from '@/layout/index/linkInfo.vue';
+export default {
+  name: 'government',
+  props: {
+    info: null, //站点信息
+    photoNews: null, //图片新闻
+    chuangxinList: null, //科技政务图片旁边新闻
+    guoneiList: null, //科技政务图片旁边国内动态
+    zhengwuList: null, //科技政务图片旁边政务活动
+    meitiList: null, //科技政务图片旁边媒体焦距
+    tongzhiList: null, //通知公告
+    zhengwu: null, //政务公开
+    gongzhongList: null, //公众参与
+    linkList: null, //友情链接
+  },
+  components: {
+    top, //头部
+    logo, //logo
+    menuInfo, //导航
+    foot, //底部
+    // photoNews, //科技政务下的图片新闻照片
+    // news, //科技政务图片旁边新闻
+    // notice, //通知公告
+    // zhengwu, //政务公告
+    // gongzhong, //公众参与
+    // linkInfo, //相关链接
+  },
+  data: () => ({}),
+  created() {},
+  computed: {},
+  methods: {},
+};
+</script>
+
+<style lang="less" scoped>
+.w_1200 {
+  width: 1200px;
+  margin: 0 auto;
+}
+.top {
+  height: 40px;
+  overflow: hidden;
+  background-color: rgba(11, 58, 125, 0.8);
+}
+.logo {
+  height: 200px;
+  overflow: hidden;
+}
+.menu {
+  height: 70px;
+  overflow: hidden;
+}
+.main {
+  height: 1080px;
+  overflow: hidden;
+  margin: 10px 0;
+}
+.main .phontoNews {
+  float: left;
+  width: 590px;
+  height: 400px;
+  overflow: hidden;
+  margin: 0 10px 10px 0;
+  background-color: #fff;
+}
+.main .news {
+  float: left;
+  width: 600px;
+  height: 400px;
+  margin: 0 0 10px 0;
+  overflow: hidden;
+  background-color: #fff;
+}
+.main .notice {
+  float: left;
+  width: 390px;
+  height: 320px;
+  margin: 0 10px 10px 0;
+  overflow: hidden;
+  background-color: #fff;
+}
+.main .zhengwu {
+  float: left;
+  width: 800px;
+  height: 320px;
+  margin: 0 0 10px 0;
+  overflow: hidden;
+  background-color: #fff;
+}
+.main .gongzhong {
+  height: 240px;
+  margin: 0 0 10px 0;
+  background-color: #fff;
+}
+.main .link {
+  float: left;
+  width: 100%;
+  height: 100px;
+  overflow: hidden;
+  background-color: #fff;
+}
+.foot {
+  float: left;
+  width: 100%;
+  height: 120px;
+  overflow: hidden;
+}
+</style>

+ 85 - 0
layout/home/layout.vue

@@ -0,0 +1,85 @@
+<template>
+  <div :style="`background:url(${bg}) no-repeat fixed;background-size: 100% 100%;`">
+    <el-row>
+      <el-col :span="24" class="top">
+        <top></top>
+      </el-col>
+      <el-col :span="24" class="logo">
+        <div class="w_1200">
+          <logo :info="info"></logo>
+        </div>
+      </el-col>
+      <el-col :span="24" class="menu">
+        <div class="w_1200">
+          <menuInfo></menuInfo>
+        </div>
+      </el-col>
+      <el-col :span="24" class="main">
+        <div class="w_1200">
+          <router-view />
+        </div>
+      </el-col>
+      <el-col :span="24" class="foot">
+        <div class="w_1200">
+          <foot :info="info"></foot>
+        </div>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import top from './top.vue';
+import logo from './logo.vue';
+import menuInfo from './menuInfo.vue';
+import foot from './foot.vue';
+export default {
+  name: 'government',
+  props: {
+    info: null, //站点信息
+  },
+  components: {
+    top, //头部
+    logo, //logo
+    menuInfo, //导航
+    foot, //底部
+  },
+  data: () => ({
+    bg: require('@common/assets/home/bg.jpg'),
+  }),
+  created() {},
+  computed: {},
+  methods: {},
+};
+</script>
+
+<style lang="less" scoped>
+.w_1200 {
+  width: 1200px;
+  margin: 0 auto;
+}
+.top {
+  height: 40px;
+  overflow: hidden;
+  background-color: rgba(11, 58, 125, 0.8);
+}
+.logo {
+  height: 200px;
+  overflow: hidden;
+}
+.menu {
+  height: 70px;
+  overflow: hidden;
+}
+.main {
+  // height: 1080px;
+  overflow: hidden;
+  margin: 10px 0;
+}
+.foot {
+  float: left;
+  width: 100%;
+  height: 120px;
+  overflow: hidden;
+}
+</style>

+ 40 - 0
layout/home/logo.vue

@@ -0,0 +1,40 @@
+<template>
+  <div id="logo">
+    <el-row>
+      <el-col :span="24" class="logo">
+        <span v-if="info && info.logourl">
+          <el-image style="width:690px;height:66px;" :src="info.logourl">
+            <div slot="error" class="image-slot">
+              <el-image style="width:690px;height:66px;" :src="logourl"></el-image>
+            </div>
+          </el-image>
+        </span>
+        <span v-else>
+          <el-image style="width:690px;height:66px;" :src="logourl"></el-image>
+        </span>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'logo',
+  props: {
+    info: null,
+  },
+  components: {},
+  data: () => ({
+    logourl: require('@/assets/home/logo.png'),
+  }),
+  created() {},
+  computed: {},
+  methods: {},
+};
+</script>
+
+<style lang="less" scoped>
+.logo {
+  padding: 65px 0;
+}
+</style>

+ 84 - 0
layout/home/menuInfo.vue

@@ -0,0 +1,84 @@
+<template>
+  <div id="menuInfo">
+    <el-row>
+      <el-col :span="24" class="menu">
+        <el-menu
+          :default-active="thisRouter()"
+          class="el-menu-demo"
+          mode="horizontal"
+          :router="false"
+          :default-openeds="defalutMenu"
+          @select="to"
+          text-color="#fff"
+        >
+          <el-menu-item index="/">网站首页</el-menu-item>
+          <el-menu-item index="/government/government">科技政务</el-menu-item>
+          <el-menu-item index="/policy/policy">科技政策</el-menu-item>
+          <el-menu-item index="/supermaket/supermarket">科技超市</el-menu-item>
+          <el-menu-item index="/shuju/shuju">科技数据</el-menu-item>
+          <el-menu-item index="/service/service">科技服务</el-menu-item>
+          <el-menu-item index="/">
+            <el-link
+              style="padding: 0px 0px;font-size: 22px;"
+              :underline="false"
+              href="http://139.210.167.203/free-technological-management/mapApply/getMap"
+              target="_blank"
+              >科技资源</el-link
+            >
+          </el-menu-item>
+          <el-menu-item index="/personnel/personnel">科技人才</el-menu-item>
+        </el-menu>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'menuInfo',
+  props: {},
+  components: {},
+  data: () => ({
+    defalutMenu: [],
+  }),
+  created() {},
+  computed: {},
+  methods: {
+    thisRouter() {
+      console.log(this.$route.path);
+    },
+    to(index) {
+      this.$router.push({ path: index });
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.menu {
+  height: 70px;
+  overflow: hidden;
+  background-color: rgba(0, 0, 0, 0.4);
+}
+/deep/.el-menu {
+  background-color: rgba(0, 0, 0, 0.4);
+}
+/deep/.el-menu--horizontal > .el-menu-item {
+  height: 70px;
+  line-height: 70px;
+  border-right: 1px solid #ccc;
+  padding: 0 30px;
+  font-size: 22px;
+}
+/deep/.el-menu--horizontal > .el-menu-item:last-child {
+  padding: 0 34px 0 33px;
+}
+/deep/.el-menu--horizontal > .el-menu-item.is-active {
+  border-bottom: none;
+  color: #fff;
+  background-color: #215299;
+}
+/deep/.el-menu--horizontal > .el-menu-item:hover {
+  background-color: #215299;
+}
+</style>

+ 81 - 0
layout/home/top.vue

@@ -0,0 +1,81 @@
+<template>
+  <div id="top">
+    <el-row>
+      <el-col :span="24" class="top">
+        <div class="w_1200">
+          <el-col :span="22" class="date">
+            {{ gettime }}
+          </el-col>
+          <el-col :span="2" class="btn" v-if="user && user.id"> {{ user.name }} | <el-link :underline="false" @click="toLogOut">注销</el-link> </el-col>
+          <el-col :span="2" class="btn">
+            <el-link :underline="false" @click="loginBtn()" target="_blank">注册</el-link>|<el-link :underline="false" @click="loginBtn()" target="_blank"
+              >登录</el-link
+            >
+          </el-col>
+        </div>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+import { mapActions, mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'top',
+  props: {},
+  components: {},
+  data: () => ({
+    gettime: '',
+  }),
+  created() {
+    this.currentTime();
+  },
+  computed: {
+    ...mapState(['user']),
+  },
+  methods: {
+    currentTime() {
+      setInterval(this.getTime, 500);
+    },
+    getTime: function() {
+      var _this = this;
+      let yy = new Date().getFullYear();
+      let mm = new Date().getMonth() + 1;
+      let dd = new Date().getDate();
+      let day = new Date().getDay();
+      var weekday = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'];
+      _this.gettime = yy + '-' + mm + '-' + dd + ' ' + weekday[day];
+    },
+    loginBtn() {
+      window.location.href = 'http://free.liaoningdoupo.com/platlogin/';
+    },
+    toLogOut() {
+      localStorage.removeItem('token');
+      this.logout();
+      window.location.href = 'http://free.liaoningdoupo.com/platlogin/';
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.w_1200 {
+  width: 1200px;
+  margin: 0 auto;
+}
+.date {
+  height: 40px;
+  line-height: 40px;
+  color: #fff;
+  font-size: 16px;
+}
+.btn {
+  height: 40px;
+  line-height: 40px;
+  color: #fff;
+}
+.btn .el-link {
+  color: #fff;
+  margin: 0 5px;
+}
+</style>

+ 74 - 0
layout/subPage/question.vue

@@ -0,0 +1,74 @@
+<template>
+  <div id="question">
+    <el-row>
+      <el-col :span="24" class="info">
+        <el-col :span="24" class="infoTop">
+          <el-image style="width:250px;height:60px;" :src="pic"></el-image>
+        </el-col>
+        <el-col :span="24" class="form">
+          <el-col :span="24" class="image">
+            <el-image :src="formImage" style="width:100px;height:80px;"></el-image>
+          </el-col>
+          <el-form ref="form" :model="form">
+            <el-form-item label="您是否愿意继续关注本平台">
+              <el-radio-group v-model="form.resource">
+                <el-radio label="愿意"></el-radio>
+                <el-radio label="不愿意"></el-radio>
+              </el-radio-group>
+            </el-form-item>
+            <el-form-item>
+              <el-button type="primary" @click="onSubmit">确认提交</el-button>
+            </el-form-item>
+          </el-form>
+        </el-col>
+      </el-col>
+    </el-row>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'question',
+  props: {},
+  components: {},
+  data: () => ({
+    pic: require('@/assets/diaocha.gif'),
+    formImage: require('@/assets/cha.png'),
+    form: {
+      resource: '',
+    },
+  }),
+  created() {},
+  computed: {},
+  methods: {
+    onSubmit() {
+      console.log('submit!');
+    },
+  },
+};
+</script>
+
+<style lang="less" scoped>
+.infoTop {
+  width: 250px;
+  height: 60px;
+  overflow: hidden;
+}
+.image {
+  text-align: center;
+  margin: 20px 0;
+}
+.form .el-form {
+  float: left;
+  width: 100%;
+  text-align: center;
+}
+/deep/.el-radio {
+  color: #000;
+}
+/deep/.el-form-item__label {
+  width: 100%;
+  text-align: center;
+  color: #000;
+}
+</style>

File diff suppressed because it is too large
+ 12250 - 0
package-lock.json


+ 61 - 0
package.json

@@ -0,0 +1,61 @@
+{
+  "name": "common",
+  "version": "0.1.0",
+  "private": true,
+  "scripts": {
+    "serve": "vue-cli-service serve",
+    "build": "vue-cli-service build",
+    "lint": "vue-cli-service lint"
+  },
+  "dependencies": {
+    "@stomp/stompjs": "^5.4.4",
+    "axios": "^0.19.2",
+    "core-js": "^3.6.4",
+    "element-ui": "^2.13.1",
+    "jsonwebtoken": "^8.5.1",
+    "loadsh": "0.0.4",
+    "moment": "^2.24.0",
+    "naf-core": "^0.1.2",
+    "vue": "^2.6.11",
+    "vue-meta": "^2.3.3",
+    "vue-router": "^3.1.6",
+    "vuex": "^3.1.3",
+    "wangeditor": "^3.1.1"
+  },
+  "devDependencies": {
+    "@vue/cli-plugin-babel": "^4.3.0",
+    "@vue/cli-plugin-eslint": "^4.3.0",
+    "@vue/cli-plugin-router": "^4.3.0",
+    "@vue/cli-plugin-vuex": "^4.3.0",
+    "@vue/cli-service": "^4.3.0",
+    "@vue/eslint-config-prettier": "^6.0.0",
+    "babel-eslint": "^10.1.0",
+    "eslint": "^6.7.2",
+    "eslint-plugin-prettier": "^3.1.1",
+    "eslint-plugin-vue": "^6.2.2",
+    "less": "^3.0.4",
+    "less-loader": "^5.0.0",
+    "prettier": "^1.19.1",
+    "vue-template-compiler": "^2.6.11"
+  },
+  "eslintConfig": {
+    "root": true,
+    "env": {
+      "node": true
+    },
+    "extends": [
+      "plugin:vue/essential",
+      "eslint:recommended",
+      "@vue/prettier"
+    ],
+    "parserOptions": {
+      "parser": "babel-eslint"
+    },
+    "rules": {}
+  },
+  "browserslist": [
+    "> 1%",
+    "last 2 versions",
+    "not dead"
+  ]
+}

+ 19 - 0
plugins/axios.js

@@ -0,0 +1,19 @@
+import Vue from 'vue';
+import AxiosWrapper from '@/util/axios-wrapper';
+
+const Plugin = {
+  install(vue, options) {
+    // 3. 注入组件
+    vue.mixin({
+      created() {
+        if (this.$store && !this.$store.$axios) {
+          this.$store.$axios = this.$axios;
+        }
+      },
+    });
+    // 4. 添加实例方法
+    vue.prototype.$axios = new AxiosWrapper(options);
+  },
+};
+
+Vue.use(Plugin, { baseUrl: process.env.VUE_APP_AXIOS_BASE_URL });

+ 39 - 0
plugins/check-res.js

@@ -0,0 +1,39 @@
+/* eslint-disable no-underscore-dangle */
+/* eslint-disable no-param-reassign */
+/* eslint-disable no-unused-vars */
+/* eslint-disable no-shadow */
+import Vue from 'vue';
+import _ from 'lodash';
+import { Message } from 'element-ui';
+
+const vm = new Vue({});
+const Plugin = {
+  install(Vue, options) {
+    // 4. 添加实例方法
+    Vue.prototype.$checkRes = (res, okText, errText) => {
+      let _okText = okText;
+      let _errText = errText;
+      if (!_.isFunction(okText) && _.isObject(okText) && okText != null) {
+        ({ okText: _okText, errText: _errText } = okText);
+      }
+      const { errcode = 0, errmsg } = res || {};
+      if (errcode === 0) {
+        if (_.isFunction(_okText)) {
+          return _okText();
+        }
+        if (_okText) {
+          Message.success(_okText);
+        }
+        return true;
+      }
+      if (_.isFunction(_errText)) {
+        return _errText();
+      }
+      Message.error(_errText || errmsg);
+      // Message({ message: _errText || errmsg, duration: 60000 });
+      return false;
+    };
+  },
+};
+
+Vue.use(Plugin);

+ 5 - 0
plugins/element.js

@@ -0,0 +1,5 @@
+import Vue from 'vue';
+import Element from 'element-ui';
+import 'element-ui/lib/theme-chalk/index.css';
+
+Vue.use(Element);

+ 6 - 0
plugins/filters.js

@@ -0,0 +1,6 @@
+import Vue from 'vue';
+import filters from '@/util/filters';
+
+for (const method in filters) {
+  Vue.filter(method, filters[method]);
+}

+ 27 - 0
plugins/loading.js

@@ -0,0 +1,27 @@
+/* eslint-disable no-console */
+/* eslint-disable no-param-reassign */
+
+import Vue from 'vue';
+
+const Plugin = {
+  // eslint-disable-next-line no-unused-vars
+  install(vue, options) {
+    // 3. 注入组件
+    vue.mixin({
+      created() {
+        // eslint-disable-next-line no-underscore-dangle
+        const isRoot = this.constructor === Vue;
+        // console.log(`rootId:${rootVue_uid}; thisId:${this._uid}`);
+        // if (rootVue_uid !== 3) {
+        //   console.log(this);
+        // }
+        if (isRoot) {
+          const el = document.getElementById('loading');
+          if (el) el.style.display = 'none';
+        }
+      },
+    });
+  },
+};
+
+Vue.use(Plugin, { baseUrl: process.env.VUE_APP_AXIOS_BASE_URL });

+ 4 - 0
plugins/meta.js

@@ -0,0 +1,4 @@
+import Vue from 'vue';
+import Meta from 'vue-meta';
+
+Vue.use(Meta);

+ 20 - 0
plugins/setting.js

@@ -0,0 +1,20 @@
+import Vue from 'vue';
+
+Vue.config.weixin = {
+  // baseUrl: process.env.BASE_URL + 'weixin',
+  baseUrl: 'http://10.16.8.209:9005',
+};
+
+Vue.config.stomp = {
+  // brokerURL: 'ws://http://free.liaoningdoupo.com/ws',
+  brokerURL: '/ws', // ws://${location.host}/ws
+  connectHeaders: {
+    host: 'visit',
+    login: 'visit', //visit
+    passcode: 'visit', //visit123
+  },
+  // debug: true,
+  reconnectDelay: 5000,
+  heartbeatIncoming: 4000,
+  heartbeatOutgoing: 4000,
+};

+ 65 - 0
plugins/stomp.js

@@ -0,0 +1,65 @@
+/**
+ * 基于WebStomp的消息处理插件
+ */
+
+import Vue from 'vue';
+import _ from 'lodash';
+import assert from 'assert';
+import { Client } from '@stomp/stompjs/esm5/client';
+
+const Plugin = {
+  install(Vue, options) {
+    assert(_.isObject(options));
+    if (options.debug && !_.isFunction(options.debug)) {
+      options.debug = str => {
+        console.log(str);
+      };
+    }
+    assert(_.isString(options.brokerURL));
+    if (!options.brokerURL.startsWith('ws://')) {
+      options.brokerURL = `ws://${location.host}${options.brokerURL}`;
+    }
+
+    // 3. 注入组件
+    Vue.mixin({
+      beforeDestroy: function() {
+        if (this.$stompClient) {
+          this.$stompClient.deactivate();
+          delete this.$stompClient;
+        }
+      },
+    });
+
+    // 4. 添加实例方法
+    Vue.prototype.$stomp = function(subscribes = {}) {
+      // connect to mq
+      const client = new Client(options);
+      client.onConnect = frame => {
+        // Do something, all subscribes must be done is this callback
+        // This is needed because this will be executed after a (re)connect
+        console.log('[stomp] connected');
+        Object.keys(subscribes)
+          .filter(p => _.isFunction(subscribes[p]))
+          .forEach(key => {
+            client.subscribe(key, subscribes[key]);
+          });
+      };
+
+      client.onStompError = frame => {
+        // Will be invoked in case of error encountered at Broker
+        // Bad login/passcode typically will cause an error
+        // Complaint brokers will set `message` header with a brief message. Body may contain details.
+        // Compliant brokers will terminate the connection after any error
+        console.log('Broker reported error: ' + frame.headers['message']);
+        console.log('Additional details: ' + frame.body);
+      };
+
+      client.activate();
+
+      this.$stompClient = client;
+    };
+  },
+};
+export default () => {
+  Vue.use(Plugin, Vue.config.stomp);
+};

BIN
public/favicon.ico


+ 17 - 0
public/index.html

@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html lang="en">
+  <head>
+    <meta charset="utf-8">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge">
+    <meta name="viewport" content="width=device-width,initial-scale=1.0">
+    <link rel="icon" href="<%= BASE_URL %>favicon.ico">
+    <title><%= htmlWebpackPlugin.options.title %></title>
+  </head>
+  <body>
+    <noscript>
+      <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
+    </noscript>
+    <div id="app"></div>
+    <!-- built files will be auto injected -->
+  </body>
+</html>

+ 9 - 0
router/before.js

@@ -0,0 +1,9 @@
+import store from '@/store/index';
+
+const checkLogin = (router, func) => {
+  router.beforeEach(async (to, form, next) => {
+    let res = await store.dispatch('login/toGetUser', func ? func : null);
+    next();
+  });
+};
+export default checkLogin;

+ 31 - 0
src/App.vue

@@ -0,0 +1,31 @@
+<template>
+  <div id="app">
+    <div id="nav">
+      <router-link to="/">Home</router-link> |
+      <router-link to="/about">About</router-link>
+    </div>
+    <router-view />
+  </div>
+</template>
+
+<style lang="less">
+#app {
+  font-family: Avenir, Helvetica, Arial, sans-serif;
+  -webkit-font-smoothing: antialiased;
+  -moz-osx-font-smoothing: grayscale;
+  text-align: center;
+  color: #2c3e50;
+}
+
+#nav {
+  padding: 30px;
+  a {
+    font-weight: bold;
+    color: #2c3e50;
+
+    &.router-link-exact-active {
+      color: #42b983;
+    }
+  }
+}
+</style>

BIN
src/assets/logo.png


+ 130 - 0
src/components/HelloWorld.vue

@@ -0,0 +1,130 @@
+<template>
+  <div class="hello">
+    <h1>{{ msg }}</h1>
+    <p>
+      For a guide and recipes on how to configure / customize this project,<br />
+      check out the
+      <a href="https://cli.vuejs.org" target="_blank" rel="noopener"
+        >vue-cli documentation</a
+      >.
+    </p>
+    <h3>Installed CLI Plugins</h3>
+    <ul>
+      <li>
+        <a
+          href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-babel"
+          target="_blank"
+          rel="noopener"
+          >babel</a
+        >
+      </li>
+      <li>
+        <a
+          href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-router"
+          target="_blank"
+          rel="noopener"
+          >router</a
+        >
+      </li>
+      <li>
+        <a
+          href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-vuex"
+          target="_blank"
+          rel="noopener"
+          >vuex</a
+        >
+      </li>
+      <li>
+        <a
+          href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-eslint"
+          target="_blank"
+          rel="noopener"
+          >eslint</a
+        >
+      </li>
+    </ul>
+    <h3>Essential Links</h3>
+    <ul>
+      <li>
+        <a href="https://vuejs.org" target="_blank" rel="noopener">Core Docs</a>
+      </li>
+      <li>
+        <a href="https://forum.vuejs.org" target="_blank" rel="noopener"
+          >Forum</a
+        >
+      </li>
+      <li>
+        <a href="https://chat.vuejs.org" target="_blank" rel="noopener"
+          >Community Chat</a
+        >
+      </li>
+      <li>
+        <a href="https://twitter.com/vuejs" target="_blank" rel="noopener"
+          >Twitter</a
+        >
+      </li>
+      <li>
+        <a href="https://news.vuejs.org" target="_blank" rel="noopener">News</a>
+      </li>
+    </ul>
+    <h3>Ecosystem</h3>
+    <ul>
+      <li>
+        <a href="https://router.vuejs.org" target="_blank" rel="noopener"
+          >vue-router</a
+        >
+      </li>
+      <li>
+        <a href="https://vuex.vuejs.org" target="_blank" rel="noopener">vuex</a>
+      </li>
+      <li>
+        <a
+          href="https://github.com/vuejs/vue-devtools#vue-devtools"
+          target="_blank"
+          rel="noopener"
+          >vue-devtools</a
+        >
+      </li>
+      <li>
+        <a href="https://vue-loader.vuejs.org" target="_blank" rel="noopener"
+          >vue-loader</a
+        >
+      </li>
+      <li>
+        <a
+          href="https://github.com/vuejs/awesome-vue"
+          target="_blank"
+          rel="noopener"
+          >awesome-vue</a
+        >
+      </li>
+    </ul>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "HelloWorld",
+  props: {
+    msg: String
+  }
+};
+</script>
+
+<!-- Add "scoped" attribute to limit CSS to this component only -->
+<style scoped lang="less">
+h3 {
+  margin: 40px 0 0;
+}
+ul {
+  list-style-type: none;
+  padding: 0;
+}
+li {
+  display: inline-block;
+  margin: 0 10px;
+}
+a {
+  color: #42b983;
+}
+</style>

+ 12 - 0
src/main.js

@@ -0,0 +1,12 @@
+import Vue from "vue";
+import App from "./App.vue";
+import router from "./router";
+import store from "./store";
+
+Vue.config.productionTip = false;
+
+new Vue({
+  router,
+  store,
+  render: h => h(App)
+}).$mount("#app");

+ 28 - 0
src/router/index.js

@@ -0,0 +1,28 @@
+import Vue from "vue";
+import VueRouter from "vue-router";
+import Home from "../views/Home.vue";
+
+Vue.use(VueRouter);
+
+const routes = [
+  {
+    path: "/",
+    name: "Home",
+    component: Home
+  },
+  {
+    path: "/about",
+    name: "About",
+    // route level code-splitting
+    // this generates a separate chunk (about.[hash].js) for this route
+    // which is lazy-loaded when the route is visited.
+    component: () =>
+      import(/* webpackChunkName: "about" */ "../views/About.vue")
+  }
+];
+
+const router = new VueRouter({
+  routes
+});
+
+export default router;

+ 11 - 0
src/store/index.js

@@ -0,0 +1,11 @@
+import Vue from 'vue';
+import Vuex from 'vuex';
+
+Vue.use(Vuex);
+
+export default new Vuex.Store({
+  state: {},
+  mutations: {},
+  actions: {},
+  modules: {},
+});

+ 5 - 0
src/views/About.vue

@@ -0,0 +1,5 @@
+<template>
+  <div class="about">
+    <h1>This is an about page</h1>
+  </div>
+</template>

+ 18 - 0
src/views/Home.vue

@@ -0,0 +1,18 @@
+<template>
+  <div class="home">
+    <img alt="Vue logo" src="../assets/logo.png" />
+    <HelloWorld msg="Welcome to Your Vue.js App" />
+  </div>
+</template>
+
+<script>
+// @ is an alias to /src
+import HelloWorld from "@/components/HelloWorld.vue";
+
+export default {
+  name: "Home",
+  components: {
+    HelloWorld
+  }
+};
+</script>

+ 38 - 0
store/gov/affairsColumn.js

@@ -0,0 +1,38 @@
+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,
+};

+ 38 - 0
store/gov/affairsNews.js

@@ -0,0 +1,38 @@
+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,
+};

+ 38 - 0
store/gov/link.js

@@ -0,0 +1,38 @@
+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,
+};

+ 39 - 0
store/live/apply.js

@@ -0,0 +1,39 @@
+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,
+};

+ 39 - 0
store/live/chat.js

@@ -0,0 +1,39 @@
+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,
+};

+ 42 - 0
store/live/column.js

@@ -0,0 +1,42 @@
+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,
+};

+ 44 - 0
store/live/comment.js

@@ -0,0 +1,44 @@
+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,
+};

+ 64 - 0
store/live/dock.js

@@ -0,0 +1,64 @@
+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,
+};

+ 39 - 0
store/live/news.js

@@ -0,0 +1,39 @@
+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,
+};

+ 44 - 0
store/live/personalchat.js

@@ -0,0 +1,44 @@
+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,
+};

+ 49 - 0
store/live/personalroom.js

@@ -0,0 +1,49 @@
+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,
+};

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

@@ -0,0 +1,39 @@
+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,
+};

+ 130 - 0
store/login.js

@@ -0,0 +1,130 @@
+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,
+};

+ 56 - 0
store/market/enterpriseproject.js

@@ -0,0 +1,56 @@
+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,
+};

+ 42 - 0
store/market/expertsaudit.js

@@ -0,0 +1,42 @@
+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,
+};

+ 51 - 0
store/market/exportuser.js

@@ -0,0 +1,51 @@
+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,
+};

+ 39 - 0
store/market/market.js

@@ -0,0 +1,39 @@
+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,
+};

+ 67 - 0
store/market/marketproduct.js

@@ -0,0 +1,67 @@
+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,
+};

+ 39 - 0
store/market/markettype.js

@@ -0,0 +1,39 @@
+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,
+};

+ 30 - 0
store/market/newmarketproduct.js

@@ -0,0 +1,30 @@
+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 };

+ 43 - 0
store/market/password.js

@@ -0,0 +1,43 @@
+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,
+};

+ 49 - 0
store/market/productpact.js

@@ -0,0 +1,49 @@
+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,
+};

+ 38 - 0
store/market/talentExperts.js

@@ -0,0 +1,38 @@
+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,
+};

+ 39 - 0
store/market/tranaudit.js

@@ -0,0 +1,39 @@
+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,
+};

+ 38 - 0
store/market/transaction.js

@@ -0,0 +1,38 @@
+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,
+};

+ 43 - 0
store/place/place.js

@@ -0,0 +1,43 @@
+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,
+};

+ 22 - 0
store/site.js

@@ -0,0 +1,22 @@
+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,
+};

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

@@ -0,0 +1,44 @@
+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,
+};

+ 33 - 0
store/user/mutations.js

@@ -0,0 +1,33 @@
+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');
+};

+ 40 - 0
store/user/role.js

@@ -0,0 +1,40 @@
+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,
+};

+ 2 - 0
store/user/state.js

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

+ 3 - 0
vue.config.js

@@ -0,0 +1,3 @@
+module.exports = {
+  lintOnSave: false
+};