This commit is contained in:
parent
4365d790cc
commit
b15e2eb7ba
|
@ -12,10 +12,10 @@ const openPush = (uid = 10) => {
|
|||
});
|
||||
// 浏览器监听user-2频道的消息,也就是用户uid为1的用户消息
|
||||
var user_channel = connection.subscribe( uid==10?'user-' + uid:uid+'user-trad');
|
||||
console.log(user_channel,"user_channnel")
|
||||
|
||||
// var user_channel = connection.subscribe( 'a'+'user-trad');
|
||||
// 当user-2频道有message事件的消息时
|
||||
user_channel.on('message', function (data) {
|
||||
console.log("收到事件",data)
|
||||
globalEventBus.emit(data.content.event, data.content.data)
|
||||
|
||||
});
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<template>
|
||||
<div class="headers">
|
||||
<div class="logo" >
|
||||
<!-- <img style="width: 33px;height:33px;margin-left: 50px;margin-top: 5px;"
|
||||
src="/logo.png" alt=""> -->
|
||||
<span style="color: red;">{{ areaStore.area }}</span>
|
||||
<img style="width: 33px;height:33px;margin-left: 50px;margin-top: 5px;"
|
||||
src="/logo.png" alt="">
|
||||
<!-- <span style="color: red;">{{ areaStore.area }}</span> -->
|
||||
</div>
|
||||
<div class="tab" v-if="role != 1">
|
||||
<div class="tab-li">
|
||||
|
|
|
@ -155,10 +155,9 @@ globalEventBus.on('header3-3', data => {
|
|||
...areaStore.area
|
||||
}
|
||||
).then(res => {
|
||||
localStorage.setItem('TRAD_STORE_INFO', JSON.stringify(res.data))
|
||||
areaStore.storeLogin(res.data)
|
||||
router.push('/storeLogin')
|
||||
|
||||
|
||||
})
|
||||
})
|
||||
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
<img src="/static/town/TABBG.png" style="width: 100%;height: 100%;position: absolute;z-index: -10000;" alt="">
|
||||
<div class="content">
|
||||
<div class="btns">
|
||||
<div class="btn " :class="ShwostoreType ? 'act-btn' : ''" @click="ShwostoreType = true">商品分类</div>
|
||||
<div class="btn" :class="!ShwostoreType ? 'act-btn' : ''" @click="ShwostoreType = false">商品管理</div>
|
||||
<div class="btn " :class="ShwostoreType ? 'act-btn' : ''" @click="ShwostoreType = true">商品管理</div>
|
||||
<div class="btn" :class="!ShwostoreType ? 'act-btn' : ''" @click="ShwostoreType = false">商品分类</div>
|
||||
<!-- <img src="/static/index/actbg.png" alt=""> -->
|
||||
</div>
|
||||
<div style="display: flex;color: white;justify-content: flex-end;margin-right: 5vw;cursor: pointer;"
|
||||
|
@ -14,11 +14,10 @@
|
|||
:class="{ actmanageBtn: type == item.type }">{{ item.name }}</div>
|
||||
|
||||
</div>
|
||||
<div class="table" v-if="ShwostoreType && configs.data.length">
|
||||
|
||||
<div class="table" v-if="!ShwostoreType && configs.data.length">
|
||||
<dv-scroll-board @click="tableClick" :config="configs" style="width:95vw;height:100%" />
|
||||
</div>
|
||||
<div class="table" v-if="!ShwostoreType && configs2.data.length">
|
||||
<div class="table" v-if="ShwostoreType && configs2.data.length">
|
||||
<dv-scroll-board :config="configs2" style="width:95vw;height:100%" />
|
||||
<!-- <scrollTable :config="configs2" style="width:95vw;height:100%"></scrollTable> -->
|
||||
|
||||
|
@ -248,11 +247,11 @@ onMounted(() => {
|
|||
|
||||
})
|
||||
globalEventBus.on('header2-1', data => {
|
||||
ShwostoreType.value = true
|
||||
ShwostoreType.value = false
|
||||
|
||||
})
|
||||
globalEventBus.on('header2-2', data => {
|
||||
ShwostoreType.value = false
|
||||
ShwostoreType.value = true
|
||||
|
||||
})
|
||||
globalEventBus.on('header2-2-1', data => {
|
||||
|
|
|
@ -145,6 +145,8 @@
|
|||
import { ref, reactive, onMounted, watch } from "vue"
|
||||
import { merchant_count_mainApi, merchant_product_rankingApi, merchant_product_visitApi, merchant_product_cartApi, } from "@/api.js"
|
||||
import { areaObj } from "../store";
|
||||
import { globalEventBus } from '@/common/eventBus'
|
||||
import { merchantApi } from "@/api.js"
|
||||
|
||||
const areaStore = areaObj()
|
||||
let query;
|
||||
|
@ -350,7 +352,23 @@ watch(
|
|||
}
|
||||
|
||||
)
|
||||
globalEventBus.on('header3-3', datas => {
|
||||
let { area_id, mer_id, street_id } = storeLogin.merchant
|
||||
query = {
|
||||
areaCode: area_id,
|
||||
streetCode: street_id,
|
||||
mer_id: datas.id
|
||||
}
|
||||
init()
|
||||
merchant_count_mainApi(
|
||||
{ ...query }
|
||||
).then((res) => {
|
||||
for (let key in res.data) {
|
||||
data[key] = res.data[key]
|
||||
}
|
||||
})
|
||||
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
|
|
Loading…
Reference in New Issue