Selaa lähdekoodia

Merge branch 'master' of http://git.cc-lotus.info/service-platform/web-website

wuhongyuq 5 vuotta sitten
vanhempi
commit
5c2693ea42

+ 1 - 1
.env

@@ -1,2 +1,2 @@
 VUE_APP_AXIOS_BASE_URL = ''
-VUE_APP_ROUTER="/www"
+VUE_APP_ROUTER="/platweb"

+ 5 - 1
src/layout/index/logo.vue

@@ -3,7 +3,11 @@
     <el-row>
       <el-col :span="24" class="logo">
         <span v-if="info.logourl">
-          <el-image style="width:690px;height:66px;" :src="info.logourl"></el-image>
+          <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>

+ 5 - 1
src/layout/index/top.vue

@@ -6,6 +6,7 @@
           <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
@@ -18,6 +19,7 @@
 </template>
 
 <script>
+import { mapActions, mapState, createNamespacedHelpers } from 'vuex';
 export default {
   name: 'top',
   props: {},
@@ -28,7 +30,9 @@ export default {
   created() {
     this.currentTime();
   },
-  computed: {},
+  computed: {
+    ...mapState(['user']),
+  },
   methods: {
     currentTime() {
       setInterval(this.getTime, 500);

+ 7 - 1
src/router/index.js

@@ -78,6 +78,12 @@ const live = [
     name: 'live_list',
     component: () => import('../views/live/hall/liveList.vue'),
   },
+  {
+    path: '/live/hallDetail',
+    meta: { title: '直播详情', subSite: true },
+    name: 'live_hallDetail',
+    component: () => import('../views/live/hall/hallDetail.vue'),
+  },
   {
     path: '/live/home',
     meta: { title: '直播首页', subSite: true },
@@ -321,7 +327,7 @@ const routes = [
 
 const router = new VueRouter({
   mode: 'history',
-  base: process.env.BASE_URL,
+  base: process.env.NODE_ENV === 'development' ? '' : process.env.VUE_APP_ROUTER,
   routes,
 });
 checkLogin(router);

+ 39 - 0
src/store/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 }, { id, ...info } = {}) {
+    const res = await this.$axios.$post(`${api.applyInfo}/${id}`, { ...info });
+    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
src/store/dock.js

@@ -0,0 +1,39 @@
+import Vue from 'vue';
+import Vuex from 'vuex';
+import _ from 'lodash';
+Vue.use(Vuex);
+const api = {
+  dockInfo: `/api/live/dock`,
+};
+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 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;
+  },
+};
+
+export default {
+  namespaced: true,
+  state,
+  mutations,
+  actions,
+};

+ 4 - 0
src/store/index.js

@@ -22,6 +22,8 @@ import marketproduct from './marketproduct';
 import markettype from './markettype';
 import tranaudit from './tranaudit';
 import chat from './chat';
+import dock from './dock';
+import apply from './apply';
 
 import * as ustate from './user/state';
 import * as umutations from './user/mutations';
@@ -52,6 +54,8 @@ export default new Vuex.Store({
     markettype,
     tranaudit,
     chat,
+    dock,
+    apply,
   },
   state: { ...ustate },
   mutations: { ...umutations },

+ 20 - 16
src/views/live/hall/hall.vue

@@ -47,7 +47,7 @@
           <div class="livemain">
             <div class="livevideo">
               <div class="left">
-                <p class="title"><span style="color:#FF8400">现场</span><span>直播</span></p>
+                <p class="title" @click="hallDetail()"><span style="color:#FF8400">现场</span><span>直播</span></p>
                 <div class="video">
                   直播换面
                 </div>
@@ -71,9 +71,10 @@
               <!-- <img :src="img.main1" /> -->
               <el-carousel :interval="4000" type="card" height="150px">
                 <el-carousel-item class="liveMainImageList" v-for="(item, index) in liveMainImageList" :key="index">
-                  <el-image :src="item.pic"></el-image>
+                  <!-- <el-image :src="item.pic"></el-image> -->
+                  <p style="color:red;text-align: center;font-size: 30px;">{{ item.title }}</p>
                   <el-col :span="24" class="btn">
-                    <el-button @click="apply()">立即申请</el-button>
+                    <el-button @click="apply(item.id)">立即申请</el-button>
                   </el-col>
                 </el-carousel-item>
               </el-carousel>
@@ -225,6 +226,7 @@ import liveFoot from '@/layout/live/foot.vue';
 import { mapState, createNamespacedHelpers } from 'vuex';
 const { mapActions: mapProduct } = createNamespacedHelpers('enterpriseproject');
 const { mapActions: market } = createNamespacedHelpers('market');
+const { mapActions: dock } = createNamespacedHelpers('dock');
 
 import _ from 'loadsh';
 export default {
@@ -238,17 +240,7 @@ export default {
       logo20: require('@/assets/live/logo20.png'),
       img: require('@/assets/live/测试图片.jpg'),
     },
-    liveMainImageList: [
-      {
-        pic: require('@/assets/live/main1.png'),
-      },
-      {
-        pic: require('@/assets/live/main1.png'),
-      },
-      {
-        pic: require('@/assets/live/main1.png'),
-      },
-    ],
+    liveMainImageList: [],
     // 找技术
     technologyList: [],
     // 找产品
@@ -382,10 +374,12 @@ export default {
   }),
   created() {
     this.searchInfo();
+    this.searchDock();
   },
   methods: {
     ...mapProduct({ mapProductQuery: 'query' }),
     ...market({ marketFetch: 'fetch' }),
+    ...dock({ dockQuery: 'query' }),
     async searchInfo({ skip = 0, limit = 10, ...info } = {}) {
       let res = await this.mapProductQuery({ skip, limit, totaltype: 0, ...info });
       if (res.errcode === 0) {
@@ -404,13 +398,23 @@ export default {
         this.$set(this, `serviceList`, res.data);
       }
     },
+    async searchDock() {
+      let res = await this.dockQuery({});
+      if (res.errcode === 0) {
+        this.$set(this, `liveMainImageList`, res.data);
+      }
+    },
     // 实况直播
     clickBtn() {
       this.$router.push({ path: '/live/liveList' });
     },
     // 申请
-    apply() {
-      this.$router.push({ path: '/live/liveApply' });
+    apply(id) {
+      this.$router.push({ path: '/live/liveApply', query: { id: id } });
+    },
+    // 图文直播详情
+    hallDetail() {
+      this.$router.push({ path: '/live/hallDetail' });
     },
   },
   filters: {

+ 154 - 0
src/views/live/hall/hallDetail.vue

@@ -0,0 +1,154 @@
+<template>
+  <div id="liveList">
+    <div class="pz_top">
+      <div class="w_0100">
+        <div class="livetop">
+          <div class="w_1200">
+            <div class="title">
+              吉林省计算机中心对接直播中心
+            </div>
+            <div class="zhuban">
+              <span>主办方:</span>
+              <span>吉林省计算机中心直播大厅</span>
+            </div>
+            <div class="num">
+              <p>
+                <span>同时在线</span>
+                <span>1人</span>
+              </p>
+              <p>
+                <span>特邀嘉宾</span>
+                <span>1人</span>
+              </p>
+              <p>
+                <span>洽谈合作</span>
+                <span>1人</span>
+              </p>
+              <p>
+                <span>达成意愿</span>
+                <span>1人</span>
+              </p>
+              <p>
+                <span>展示成果</span>
+                <span>1人</span>
+              </p>
+              <p>
+                <span>发布需求</span>
+                <span>1人</span>
+              </p>
+            </div>
+          </div>
+        </div>
+      </div>
+    </div>
+    <div class="pz_main">
+      <div class="w_0100">
+        <div class="w_1200">
+          <el-col :span="24" class="hallDetail">
+            <el-col :span="12" class="left">
+              <el-col :span="24" class="top">
+                图文直播
+              </el-col>
+              <el-col :span="24" class="info">
+                直播画面
+              </el-col>
+            </el-col>
+            <el-col :span="12" class="right">
+              <el-col :span="24" class="top">
+                聊天记录
+              </el-col>
+              <el-col :span="24" class="info">
+                聊天记录列表
+              </el-col>
+            </el-col>
+            <el-col :span="24" class="hallDetailInput">
+              <el-input placeholder="请输入内容"></el-input>
+              <el-button type="primary">发送</el-button>
+            </el-col>
+          </el-col>
+        </div>
+      </div>
+    </div>
+    <div class="pz_down">
+      <div class="w_0100">
+        <div class="superdown">
+          <div class="w_1200">
+            <p>版权所有:吉林省技术算中心</p>
+            <p>
+              <span>技术支持:长春福瑞科技有限公司</span>
+              &nbsp;&nbsp;&nbsp;&nbsp;
+              <span>邮编:130000</span>
+              &nbsp;&nbsp;&nbsp;&nbsp;
+              <span>传真:239823982</span>
+            </p>
+            <p>
+              <span>地址:吉林省长春市朝阳区前进大街1244号</span>
+              &nbsp;&nbsp;&nbsp;&nbsp;
+              <span>电话:0134-1234567</span>
+              &nbsp;&nbsp;&nbsp;&nbsp;
+              <span>邮箱:123456@163.com</span>
+            </p>
+          </div>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import { mapState, createNamespacedHelpers } from 'vuex';
+export default {
+  name: 'hallDetail',
+  props: {},
+  components: {},
+  data: () => ({}),
+  created() {},
+  methods: {},
+  computed: {
+    ...mapState(['user']),
+    pageTitle() {
+      return `${this.$route.meta.title}`;
+    },
+  },
+  metaInfo() {
+    return { title: this.$route.meta.title };
+  },
+};
+</script>
+
+<style lang="less">
+@import '~@/style/style.css';
+.hallDetail {
+  height: 710px;
+  border: 1px solid red;
+  margin: 0 0 20px 0;
+}
+.hallDetail .left {
+  height: 600px;
+  border: 1px solid #cccccc;
+}
+.hallDetail .left .top {
+  height: 40px;
+  line-height: 40px;
+  padding: 0px 15px;
+  font-size: 18px;
+  border-bottom: 1px dashed #ccc;
+}
+.hallDetail .right {
+  border: 1px solid #ccc;
+  height: 600px;
+}
+.hallDetail .right .top {
+  height: 40px;
+  line-height: 40px;
+  padding: 0px 15px;
+  font-size: 18px;
+  border-bottom: 1px dashed #ccc;
+}
+.hallDetailInput {
+  padding: 31px 0 0 215px;
+}
+.hallDetailInput .el-input {
+  width: 70%;
+}
+</style>

+ 38 - 15
src/views/live/hall/liveApply.vue

@@ -52,30 +52,29 @@
                 <upload :limit="1" :data="form.image.url" type="url" :url="'/files/image/upload'" @upload="uploadSuccess"></upload>
               </el-form-item> -->
               <el-form-item label="申请人身份">
-                <el-radio-group v-model="form.resource" @change="changeuser">
+                <el-radio-group v-model="form.buyer" @change="changeuser">
                   <el-radio label="0">买家</el-radio>
                   <el-radio label="1">卖家</el-radio>
                 </el-radio-group>
               </el-form-item>
               <span v-if="this.resource == '1' || this.resource == ''">
                 <el-form-item label="选择产品">
-                  <el-select v-model="form.region" placeholder="请选择产品">
-                    <el-option label="产品1" value="0"></el-option>
-                    <el-option label="产品2" value="1"></el-option>
+                  <el-select v-model="form.goodsList" placeholder="请选择选择产品">
+                    <el-option v-for="(item, index) in goodsLists" :key="index" :label="item.name" :value="item.id"> </el-option>
                   </el-select>
                 </el-form-item>
               </span>
               <el-form-item label="联系人">
-                <el-input v-model="form.name"></el-input>
+                <el-input v-model="form.contact"></el-input>
               </el-form-item>
               <el-form-item label="联系电话">
-                <el-input v-model="form.name"></el-input>
+                <el-input v-model="form.contact_tel"></el-input>
               </el-form-item>
               <el-form-item label="电子邮箱">
-                <el-input v-model="form.name"></el-input>
+                <el-input v-model="form.email"></el-input>
               </el-form-item>
               <el-form-item label="单位名称">
-                <el-input v-model="form.name"></el-input>
+                <el-input v-model="form.company"></el-input>
               </el-form-item>
               <el-row style="text-align:center">
                 <el-button type="primary" @click="onSubmit">立即申请</el-button>
@@ -91,6 +90,8 @@
 
 <script>
 import { mapState, createNamespacedHelpers } from 'vuex';
+const { mapActions: mapProduct } = createNamespacedHelpers('enterpriseproject');
+const { mapActions: apply } = createNamespacedHelpers('apply');
 import upload from '@/components/upload.vue';
 export default {
   name: 'liveApply',
@@ -99,21 +100,43 @@ export default {
     // upload,
   },
   data: () => ({
-    form: {
-      image: {},
-    },
+    form: {},
     logo: require('@/assets/live/d10_fbb1.png'),
     resource: '',
+    goodsLists: [],
   }),
   created() {
-    console.log(this.form);
+    this.searchInfo();
   },
   methods: {
-    onSubmit() {
-      console.log(this.form);
+    ...mapProduct({ mapProductQuery: 'query', mapProductFetch: 'fetch' }),
+    ...apply({ applyCreate: 'create' }),
+    async onSubmit() {
+      let duplicate = JSON.parse(JSON.stringify(this.form));
+      let data = { ...duplicate };
+      data.user_id = this.user.id;
+      data.user_name = this.user.name;
+      let dock_id = this.$route.query.id;
+      data.goodsList = [this.productInfo(this.form.goodsList)];
+      const res = await this.applyCreate({ id: dock_id, ...data });
+      if (res.errcode === 0) {
+        this.$message({
+          message: '申请参加对接会成功',
+          type: 'success',
+        });
+      }
+    },
+    productInfo(id) {
+      let index = this.goodsLists.find(item => item.id == id);
+      return index;
+    },
+    async searchInfo() {
+      let res = await this.mapProductQuery({});
+      if (res.errcode === 0) {
+        this.$set(this, `goodsLists`, res.data);
+      }
     },
     changeuser(label) {
-      // console.log(label);
       this.$set(this, 'resource', label);
     },
     uploadSuccess({ type, data }) {

+ 3 - 2
vue.config.js

@@ -1,6 +1,7 @@
 const path = require('path');
 module.exports = {
-  publicPath: '/',
+  publicPath: process.env.NODE_ENV === 'development' ? '/' : process.env.VUE_APP_ROUTER,
+  // outputDir: process.env.VUE_APP_ROUTER,
   configureWebpack: config => {
     Object.assign(config, {
       // 开发生产共同配置
@@ -65,7 +66,7 @@ module.exports = {
         // pathRewrite: { '^/api/affairs': '/api' },
       },
       '/api/live': {
-        target: 'http://free.liaoningdoupo.com',
+        target: 'http://10.16.10.72:9009',
         changeOrigin: true,
         ws: true,
         // pathRewrite: { '^/api/affairs': '/api' },