|
@@ -63,22 +63,22 @@
|
|
|
<xmdjtechol :detailInfo="detailInfo"></xmdjtechol>
|
|
|
</span>
|
|
|
<span v-else-if="type == '1'">
|
|
|
- 成果
|
|
|
+ <xmdjachieve :detailInfo="detailInfo"></xmdjachieve>
|
|
|
</span>
|
|
|
<span v-else-if="type == '2'">
|
|
|
- 商务
|
|
|
+ 商务信息
|
|
|
</span>
|
|
|
<span v-else>
|
|
|
- 专家
|
|
|
+ <xmdjaexpert :detailInfo="detailInfo"></xmdjaexpert>
|
|
|
</span>
|
|
|
</span>
|
|
|
<span v-else-if="menuIndex == '1'">
|
|
|
- <el-col :span="12" class="productImage" v-for="(item, index) in image" :key="index">
|
|
|
+ <el-col :span="12" class="productImage" v-for="(item, index) in detailInfo.image" :key="index">
|
|
|
<el-image :src="item.url"></el-image>
|
|
|
</el-col>
|
|
|
</span>
|
|
|
<span v-else>
|
|
|
- 对接
|
|
|
+ <xmdjchat v-if="room.id" :room="room" @onSubmit="onSubmit"></xmdjchat>
|
|
|
</span>
|
|
|
</el-col>
|
|
|
</el-col>
|
|
@@ -101,10 +101,14 @@
|
|
|
import ywlx from './parts/ywlx.vue';
|
|
|
import liveFoot from '@/layout/live/foot.vue';
|
|
|
import xmdjtechol from './parts/xmdjtechol.vue';
|
|
|
+import xmdjachieve from './parts/xmdjachieve.vue';
|
|
|
+import xmdjaexpert from './parts/xmdjaexpert.vue';
|
|
|
+import xmdjchat from './parts/xmdjchat.vue';
|
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
const { mapActions: dock } = createNamespacedHelpers('dock');
|
|
|
const { mapActions: transaction } = createNamespacedHelpers('transaction');
|
|
|
const { mapActions: expertsuser } = createNamespacedHelpers('expertsuser');
|
|
|
+const { mapActions: personalRoom } = createNamespacedHelpers('personalroom');
|
|
|
var moment = require('moment');
|
|
|
export default {
|
|
|
metaInfo() {
|
|
@@ -117,6 +121,12 @@ export default {
|
|
|
ywlx,
|
|
|
// 技术对接
|
|
|
xmdjtechol,
|
|
|
+ // 成果对接
|
|
|
+ xmdjachieve,
|
|
|
+ // 对接聊天,
|
|
|
+ xmdjchat,
|
|
|
+ // 专家对接
|
|
|
+ xmdjaexpert,
|
|
|
},
|
|
|
data: function() {
|
|
|
return {
|
|
@@ -150,17 +160,8 @@ export default {
|
|
|
},
|
|
|
],
|
|
|
menuIndex: '0',
|
|
|
- image: [
|
|
|
- {
|
|
|
- url: require('@a/7.jpg'),
|
|
|
- },
|
|
|
- {
|
|
|
- url: require('@a/7.jpg'),
|
|
|
- },
|
|
|
- {
|
|
|
- url: require('@a/7.jpg'),
|
|
|
- },
|
|
|
- ],
|
|
|
+ // 对接聊天
|
|
|
+ room: {},
|
|
|
};
|
|
|
},
|
|
|
async created() {
|
|
@@ -170,6 +171,7 @@ export default {
|
|
|
...dock({ dockQuery: 'query', dockFetch: 'fetch', goodsquery: 'goodsquery' }),
|
|
|
...transaction({ buyProduct: 'create' }),
|
|
|
...expertsuser(['fetch']),
|
|
|
+ ...personalRoom(['create', 'countDelete']),
|
|
|
async searchInfo() {
|
|
|
// 查询展会详情
|
|
|
if (this.dock_id) {
|
|
@@ -225,6 +227,44 @@ export default {
|
|
|
this.$set(this, `detailInfo`, res.data);
|
|
|
}
|
|
|
},
|
|
|
+ // 选择菜单
|
|
|
+ changeMenu(name, index) {
|
|
|
+ this.menuIndex = index;
|
|
|
+ if (name == '项目对接') {
|
|
|
+ this.btnPhone();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 聊天
|
|
|
+ async btnPhone() {
|
|
|
+ if (!this.room.id) {
|
|
|
+ //TODO 请求房间号
|
|
|
+ let obj = {};
|
|
|
+ if (!this.user.uid) {
|
|
|
+ // this.$message.error('游客身份无法与卖家对话,请先注册');
|
|
|
+ this.$message({
|
|
|
+ dangerouslyUseHTMLString: true,
|
|
|
+ message: '<strong><a href="http://free.liaoningdoupo.com/platlive/webLogin" style="color:red;">游客身份无法与卖家对话,请先注册</a></strong>',
|
|
|
+ type: 'error',
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ } else {
|
|
|
+ obj.buyer_id = this.user.uid;
|
|
|
+ obj.buyer_name = this.user.name;
|
|
|
+ }
|
|
|
+ if (!this.detailInfo.userid) {
|
|
|
+ this.$message.error('缺少卖家信息,请联系卖家或管理员');
|
|
|
+ return;
|
|
|
+ } else {
|
|
|
+ obj.seller_id = this.detailInfo.userid;
|
|
|
+ obj.seller_name = this.detailInfo.contacts || this.detailInfo.name;
|
|
|
+ }
|
|
|
+ console.log(obj);
|
|
|
+ let res = await this.create(obj);
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ this.$set(this, `room`, res.data);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
// 洽谈
|
|
|
async onSubmit() {
|
|
|
let data = this.detailInfo;
|
|
@@ -265,10 +305,6 @@ export default {
|
|
|
this.$checkRes(res, '购买申请成功', res.errmsg || '购买申请失败');
|
|
|
}
|
|
|
},
|
|
|
- // 选择菜单
|
|
|
- changeMenu(name, index) {
|
|
|
- this.menuIndex = index;
|
|
|
- },
|
|
|
},
|
|
|
computed: {
|
|
|
...mapState(['user']),
|