Authored by lea guo

Merge branch 'develop' into promotion/order-list

# Conflicts:
#	apps/pages/home/indexPage/components/tabs.vue
#	apps/pages/list/search.vue
#	apps/pages/order/order-detail/buyer-order-detail.vue
#	apps/pages/order/order-detail/seller-order-detail.vue
#	apps/pages/order/order-list/order-list.vue
#	apps/store/home/channel.js
#	config/home-api-map.js
... ... @@ -381,6 +381,12 @@ export default {
},
goSearch() {
this.$store.dispatch('reportYas', {
params: {
param: {SEARCH_POS: 1},
appop: 'XY_UFO_SEARCH_CLICK'
}
});
this.$router.push({
name: 'Search',
});
... ...
... ... @@ -12,7 +12,7 @@
<script>
import { createNamespacedHelpers } from 'vuex';
const { mapState } = createNamespacedHelpers('home/channel');
const { mapState, mapActions } = createNamespacedHelpers('home/channel');
import Widget from './widget';
export default {
... ... @@ -36,12 +36,16 @@ export default {
},
...mapState(['showMsg'])
},
watch: {
'showMsg':function(sss) {
console.log(sss);
}
activated() {
this.getAllInboxCatInfo();
},
// watch: {
// 'showMsg':function(sss) {
// console.log(sss);
// }
// },
methods: {
...mapActions(['getAllInboxCatInfo']),
onClick(index) {
this.$emit('click', index);
}
... ...
... ... @@ -86,6 +86,7 @@ export default {
goSearch: function(parameters, param) {
let query = parameters.query;
this.addLocalWord(query);
this.yasInput(param);
this.$router.push({
name: 'List',
... ... @@ -112,18 +113,19 @@ export default {
this.SEARCH_POS = 3;
}
},
addLocalWord: function() {
if (this.query) {
addLocalWord: function(query) {
if (this.query || query) {
let addQuery = query || this.query;
let localHistory = localStorage.getItem('@YohoUFOStore:searchHistory');
if (localHistory) {
let localArr = localHistory.split(',');
if (!localArr.includes(this.query)) {
localStorage.setItem('@YohoUFOStore:searchHistory', this.query + ',' + localHistory);
if (!localArr.includes(addQuery)) {
localStorage.setItem('@YohoUFOStore:searchHistory', addQuery + ',' + localHistory);
}
} else {
localStorage.setItem('@YohoUFOStore:searchHistory', this.query);
localStorage.setItem('@YohoUFOStore:searchHistory', addQuery);
}
}
},
... ...
... ... @@ -8,7 +8,7 @@
:emulateMask="true"
:full="true">
<div class="buy-sheet">
<a class="header" @click.prevent="gotoNewPage">求购<i class="cubeic-question"></i></a>
<a class="header" @click.prevent="gotoNewPage">求购<i class="cubeic-question question"></i></a>
<div class="title">
<div class="title-thumbnail">
<square-img :src="imageUrl" :width="300" :height="300"/>
... ... @@ -187,6 +187,11 @@ export default {
text-align: right;
}
.question {
color: #ccc;
font-size: 28px;
}
.title-thumbnail {
width: 200px;
height: 200px;
... ...
... ... @@ -54,11 +54,10 @@ export default function() {
Vue.set(state.channelList, 'page', productlist.page);
},
[Types.FETCH_NEWSACTIVE](state, { list }) {
state.showMsg = false;
list && list.map((item) => {
if (item.id === 6 && item.unReadCount > 0) {
if (item.unReadCount > 0) {
state.showMsg = true;
} else {
state.showMsg = false;
}
});
},
... ... @@ -88,10 +87,10 @@ export default function() {
}
},
async getAllInboxCatInfo({ commit }) {
const result = await this.$api.get('/api/ufo/home/getAllInboxCatInfo', {});
const result = await this.$api.get('/api/ufo/home/listInboxTypeInfo', {});
if (result.code === 200) {
commit(Types.FETCH_NEWSACTIVE, { list: result.data.list });
commit(Types.FETCH_NEWSACTIVE, { list: result.data || [] });
}
}
},
... ...
... ... @@ -132,10 +132,10 @@ module.exports = {
api: 'ufo.user.getUserAliPayAccountInfo',
param: {}
},
'/api/ufo/home/getAllInboxCatInfo': {
// ufo: true,
'/api/ufo/home/listInboxTypeInfo': {
ufo: true,
auth: true,
api: 'app.inbox.getAllInboxCatInfo',
api: 'ufo.users.listInboxTypeInfo',
param: {}
},
};
... ...