|
@@ -105,6 +105,7 @@ Vue.use(VanImage);
|
|
|
Vue.use(Lazyload);
|
|
|
const { mapActions: gensign } = createNamespacedHelpers('gensign');
|
|
|
const { mapActions: room } = createNamespacedHelpers('room');
|
|
|
+const { mapActions: quest } = createNamespacedHelpers('quest');
|
|
|
const { mapActions: chat } = createNamespacedHelpers('chat');
|
|
|
export default {
|
|
|
name: 'roomsDetail',
|
|
@@ -138,6 +139,9 @@ export default {
|
|
|
rvideoid_: '',
|
|
|
userList: [],
|
|
|
isxf: '',
|
|
|
+ showQuest: false,
|
|
|
+ queid: '',
|
|
|
+ questInfo: {},
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
@@ -160,6 +164,7 @@ export default {
|
|
|
...gensign(['gensignFetch']),
|
|
|
...room(['lookuserFetch', 'fetch', 'lookusercount', 'lookquery', 'lookupdate', 'lookrecord']),
|
|
|
...chat(['query', 'create']),
|
|
|
+ ...quest(['questfetch']),
|
|
|
async recordSave() {
|
|
|
console.log(2121);
|
|
|
let data = {};
|
|
@@ -217,6 +222,9 @@ export default {
|
|
|
this.$stomp({
|
|
|
[`/exchange/public_chat_` + this.id]: this.onMessage,
|
|
|
});
|
|
|
+ this.$stomp({
|
|
|
+ [`/exchange/quest_publish_` + this.id]: this.onQueMessage,
|
|
|
+ });
|
|
|
},
|
|
|
onMessage(message) {
|
|
|
// console.log('receive a message: ', message.body);
|
|
@@ -230,6 +238,25 @@ export default {
|
|
|
document.getElementById('chatSell').scrollTop = document.getElementById('chatSell').scrollHeight + 275;
|
|
|
});
|
|
|
},
|
|
|
+ onQueMessage(message) {
|
|
|
+ // console.log('receive a message: ', message.body);
|
|
|
+ this.showQuest = true;
|
|
|
+ let body = _.get(message, 'body');
|
|
|
+ if (body) {
|
|
|
+ body = JSON.parse(body);
|
|
|
+ this.queid = body.queid;
|
|
|
+ this.questSearch();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ async questSearch() {
|
|
|
+ if (this.queid) {
|
|
|
+ const result = await this.questfetch(this.queid);
|
|
|
+ if (this.$checkRes(result)) {
|
|
|
+ console.log(result.data);
|
|
|
+ this.$set(this, `questInfo`, result.data);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
async lookuserSearch() {
|
|
|
if (this.user.uid) {
|
|
|
let data = {};
|