Merge branch 'feature/task1.0.0' into 'msb_test'

Feature/task1.0.0

See merge request yanxuan-frontend/shop-pc!79
merge-requests/81/merge
肖广 3 years ago
commit 24201b110e

@ -39,7 +39,8 @@ export default {
categoryId: "",
order: "",
});
vm.recommendedData = res.result;
console.log(res.result)
vm.recommendedData = res.result.records;
},
},
};

@ -10,7 +10,7 @@
<div
slot="reference"
class="header-cart-popover__refrence flex flex-middle"
@click="onJumpCart"
@click="onJumCartPage"
>
<img src="~/assets/img/layout/icon-shop.png" />
<span>购物车</span>
@ -144,16 +144,13 @@ export default {
},
},
methods: {
onJumpCart() {
if (!this.$isLoginValidate()) {
return;
}
this.$router.push("/cart");
},
onJumpGoodsDetail(id) {
this.$router.push(`/goods/detail/${id}`);
},
onJumCartPage() {
if (!this.$isLoginValidate()) {
return;
}
this.$router.push("/cart");
},
},

@ -61,14 +61,13 @@
<HeaderInfoBar />
<div class="default-bar-header">
<div class="bar-header-box">
<div
class="bar-header-box__wrap flex flex-between flex-middle"
@click="onOpenHomePage"
>
<div class="bar-header-box__wrap flex flex-between flex-middle">
<div @click="onOpenHomePage">
<img
class="header-box-wrap__logo"
src="~/assets/img/layout/logo.png"
/>
</div>
<div class="header-box-wrap__right flex flex-middle">
<div class="box-wrap-right__search flex">
<div class="search-input">
@ -76,7 +75,7 @@
v-model="searchContent"
clearable
placeholder="请输入商品名称"
@keyup.enter="onSearch"
@keyup.enter.native="onSearch"
>
</el-input>
</div>

@ -46,7 +46,7 @@ export default {
'@plugins/axiosTk.js',
'@plugins/vue-inject.js',
'@/plugins/v-distpicker',
'@/plugins/router',
// '@/plugins/router',
'@/plugins/im'
],

@ -43,10 +43,10 @@ export default {
return {};
},
computed: {
...mapState(["token"], ["socketMsgData"]),
...mapState(["token","socketMsgData"]),
},
mounted(){
console.log(`socketMsgData`,this.socketMsgData)
console.log(`socketMsgData`,this.$store)
},
methods: {},
};

@ -25,7 +25,6 @@ export default function ({$axios, store, route}, inject) {
if(result.code === 'TOKEN_FAIL'){
store.commit('setLoginOut');
store.commit('setLoginVisible');
return result;
}
return Promise.reject(result);
}

@ -18,7 +18,7 @@ Vue.prototype.$startWebSockets = function () {
Vue.prototype.Socket.onopen = () => {
let traceId = guid();
Vue.prototype.Socket.send(
`{"traceId":${traceId},traceType:1,"content":{"size": 100}}`
`{"traceId":"${traceId}",traceType:1,"content":{"size": 100}}`
);
};
Vue.prototype.Socket.onclose = () => {
@ -40,7 +40,7 @@ Vue.prototype.$startWebSockets = function () {
if (msg.traceType == 1) {
let traceId = guid();
let sys = msg.content.sessionVOS.find((item) => item.type != 3);
let str = `{"traceId":${traceId},traceType:2,"content":{"sessionId":${sys.id}}}`;
let str = `{"traceId":"${traceId}",traceType:2,"content":{"sessionId":${sys.id}}}`;
Vue.prototype.Socket.send(str);
this.$store.commit("setUnreadCount", msg.content.totalUnreadCount);
}
@ -54,9 +54,13 @@ Vue.prototype.$startWebSockets = function () {
if (msg.traceType == 3) {
let traceId = guid();
Vue.prototype.Socket.send(
`{"traceId":${traceId},traceType:1,"content":{"size": 100}}`
`{"traceId":"${traceId}",traceType:1,"content":{"size": 100}}`
);
}
setTimeout(()=>{
console.log(this.$store.state)
},500)
};
}
};

@ -54,6 +54,7 @@ const mutations = {
},
setSocketMsgData(state, val){
state.socketMsgData = val;
console.log(state.socketMsgData)
}
};
const actions = {

Loading…
Cancel
Save